#garfield Logs
Dec 09 2022
#garfield Calendar
01:54 AM rue_mohr: aandrew, polprog tkx happy b day
02:04 AM rue_mohr: Tom_L, your pwm method
02:04 AM rue_mohr: your reversing pwm method where you pwm the motor between forward and reverse
02:04 AM rue_mohr: cant stop bringing that up in my mind
02:13 AM rue_shop2: module main(
02:13 AM rue_shop2: input CLK,
02:13 AM rue_shop2: output LED
02:13 AM rue_shop2: );
02:13 AM rue_shop2: assign LED = CLK;
02:13 AM rue_shop2: endmodule
02:13 AM rue_shop2: can I make it work tho?
03:37 AM polprog: :)
04:49 AM Tom_L: LAP or sign magnitude?
04:50 AM Tom_L: been so long i forgot which was which
10:22 AM rue_mohr: Tom_L, you were just using the direction
10:22 AM rue_mohr: and feeding it 50% at stop, then dialing it up down to balance in more forward/reverse
01:12 PM Tom_L: the down side is the motor is always under power even at rest iirc
01:25 PM rue_mohr: yes, but with the induction, it might not even matter
01:25 PM rue_mohr: just shuffling charge around
02:58 PM rue_mohr: anyone alive?
03:01 PM rue_mohr: I got a scanner working
03:03 PM rue_mohr: Rue, talk to me
03:03 PM rue_mohr: go
03:03 PM rue_mohr: ok, so I need a system that, when I drop an image into a folder, its assigned a UID, renamed, and placed in a different folder
03:04 PM rue_mohr: so, less the UID, I'd say bash
03:04 PM rue_mohr: it would be good to have the UID put in a database
03:04 PM rue_mohr: just a stub eh?
03:04 PM rue_mohr: will python do database?
03:04 PM rue_mohr: that would be python-postgres...
03:05 PM rue_mohr: wait, what did you do the repari database in
03:05 PM rue_mohr: perl...
03:05 PM rue_mohr: how about that.
03:05 PM rue_mohr: whats the different python to postgres
03:06 PM rue_mohr: well, python has the opencv, you can modify the images later if you want
03:06 PM rue_mohr: lets try it
03:08 PM rue_mohr: so, UID
03:08 PM rue_mohr: can we make base 34 counters in postgres?
03:32 PM Tom_L: I AM ALIVE!!!!!!!!!!!!
03:32 PM rue_mohr: oh hi
03:33 PM rue_mohr: ideas how you would attack that task?
03:33 PM rue_mohr: wait for an image, rename and move it?
03:34 PM rue_mohr: I think generating the image name will be the hard part
03:43 PM Tom_L: phone. sorry
03:46 PM Tom_L: java
03:49 PM Tom_L: the image name should be human decipherable so you have some clue as to what it might be
03:52 PM rue_mohr: I'm going to make it an alphanumberic unique number
03:53 PM rue_mohr: and have an index file
03:53 PM rue_mohr: I want to do things like have a keyword search
03:54 PM rue_mohr: and I'll add paramteric stuff too
03:54 PM rue_mohr: fight off some sleep right now
03:54 PM rue_mohr: I also want to be just scanning pages and dropping them into a folder with the rest taken care of
03:55 PM rue_mohr: have you used java for that kinda thing often?
03:56 PM Tom_L: all i did was that phone thing with memento
03:56 PM Tom_L: all my data files are in dos
03:56 PM rue_mohr: :]
03:57 PM Tom_L: wrote it myself
03:57 PM rue_mohr: yep
03:57 PM rue_mohr: wow I'm tired
03:58 PM rue_mohr: you know, when your eyes snap shut and you dont notice?
04:09 PM Tom_L: never :)
04:09 PM * Tom_L thinks he's seen the last of rue_mohr for a while
04:09 PM rue_mohr: I keep snapping them back open
04:10 PM rue_mohr: I"m tyring to code and falling asleep in the m key doens't help
04:10 PM Tom_L: so, no parts yet?
04:10 PM rue_mohr: no doesn't look like it we have to sort things out and sean had to run
04:11 PM rue_mohr: somewhere we have worked out what the costs were, there was no time to find it
04:11 PM rue_mohr: we have to work out if were gonna use 1/4" pipe for pins too
04:11 PM rue_mohr: same difference, find number and weigh things
04:16 PM Tom_L: tell him his US vendor had a Dec sale.. Jan the price will double
04:16 PM Tom_L: :)
04:24 PM rue_mohr: :]
04:24 PM rue_mohr: it helped us a lot, you can rip them off hella lot faster than we can!
04:28 PM rue_mohr: stackoverflow is funny
04:29 PM rue_mohr: they will throw a loop at anything needed in favor of a built in function that does the same thing in one line
04:48 PM aandrew: rue_mohr: the image thing sounds like it can be done entirely in bash
04:49 PM aandrew: there's a program part of the e2fsprogs package called uuidgen
04:49 PM aandrew: oh
04:49 PM aandrew: one better
04:49 PM rue_mohr: kinda
04:49 PM aandrew: UUID=$(cat /proc/sys/kernel/random/uuid)
04:50 PM aandrew: I didn't know about that one
04:50 PM rue_mohr: I'd like to pull the uid from a counter in a databse
04:50 PM rue_mohr: how long are those...
04:50 PM rue_mohr: ed02ff59-0dbf-491f-8795-c01b83e513bd
04:51 PM rue_mohr: hmm
04:51 PM aandrew: sure, every db I've ever used had that kind of thing
04:51 PM rue_mohr: yea, a sequence
04:51 PM rue_mohr: I'm working on converting it to base 36
04:51 PM aandrew: you declare the column as autoincrement and unique or primary key
04:51 PM rue_mohr: openai just helped a LOT
04:52 PM aandrew: wow someone went the extra mile: https://serverfault.com/a/597626/211536
04:52 PM aandrew: heh awk: od -x /dev/urandom | head -1 | awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}'
04:53 PM aandrew: way too much fun
04:53 PM rue_mohr: ugh
04:53 PM rue_mohr: nowonder code today is so slow
04:53 PM aandrew: hm?
04:53 PM rue_mohr: everyone goes out of their way to avoid built-in one-liners in favor of multiple nested for loops
04:54 PM aandrew: nah I can see a use case for it
04:54 PM aandrew: I've been on enough super restricted systems where you doon't have basic utilities
04:54 PM rue_mohr: so I searched how to convert a number to base32
04:54 PM rue_mohr: ALL the stack exchange results were for loops
04:54 PM rue_mohr: so I asked openai
04:55 PM rue_mohr: and it said to use the b32 encoding fn in the 'base64' package
04:55 PM rue_mohr: no loops, just do it
04:55 PM rue_mohr: >>> num = 123456
04:55 PM rue_mohr: >>> B6.b64encode(num.to_bytes(8, 'big')).decode('ascii')
04:55 PM rue_mohr: 'AAAAAAAB4kA='
04:56 PM aandrew: ah, sure, if you've got python
04:56 PM rue_mohr: I'm just working on tuning it
04:56 PM rue_mohr: yea, I'm doin in in python
04:56 PM rue_mohr: this is for the scanned schematics
04:56 PM aandrew: oh nice
04:56 PM aandrew: and yeah if you've got python then everything else is silly
04:56 PM rue_mohr: I might have openai put text on the bottom corner of them scans
04:57 PM rue_mohr: should be, unless stack exchange is telling you to do a tripple nested loop to multiply two floating point numbers
04:57 PM rue_mohr: whats bugging me tho, it that the 36 chars dont start with 0, they start with A
05:16 PM rue_mohr: why doesn't base 32 encoding start at 0 and go to z?
05:18 PM rue_mohr: https://datatracker.ietf.org/doc/html/rfc4648.html
05:18 PM rue_mohr: huh
05:19 PM rue_mohr: '0' isn't even part of base32 for that
05:19 PM rue_mohr: huh
05:37 PM rue_mohr: maybe I'll just leave it numberic
05:43 PM rue_mohr: import os
05:43 PM rue_mohr: # Rename the file "old_file.txt" to "new_file.txt"
05:43 PM rue_mohr: os.rename("old_file.txt", "new_file.txt")
05:43 PM rue_mohr: I really like having openai help me write software...
05:52 PM rue_mohr: this is cool, even tho I cant think I can code
07:01 PM rue_mohr: yay
07:23 PM rue_mohr: hey hey
07:23 PM rue_mohr: 24 lines of python later
07:33 PM rue_mohr: test=# select * from schematics;
07:33 PM rue_mohr: UID | title
07:33 PM rue_mohr: -------------+-------
07:33 PM rue_mohr: S0000000014 |
07:33 PM rue_mohr: S0000000015 |
07:34 PM rue_mohr: ok, I can scan in a bunch of pages and have it file them for me
07:34 PM rue_mohr: I can work on an interface to add descriptions
07:34 PM Tom_L: but how are you going to know what number is what schematic?
07:37 PM rue_mohr: not yet
07:37 PM Tom_L: if you're going to scan them anyway, why not make a pdf with an index that jumps to that page when clicked
07:37 PM rue_mohr: but there is almost more of a goal to have UIDs for the drawings
07:37 PM rue_mohr: I'm going to organize them into books later
07:38 PM rue_mohr: my goals are to have a UID I can put on a breadbaord to know what circuit is on it
07:38 PM Tom_L: ok
07:38 PM rue_mohr: and to have a "not a page number" for arbitrarily ordered books,
07:38 PM rue_mohr: and to have a database where I can search by paramiter or keyword
07:38 PM rue_mohr: and a system of course I can just browse
07:39 PM rue_mohr: but I can just open my paper book if I want to browse them
07:39 PM rue_mohr: yike its windy
07:39 PM rue_mohr: prolly gonna lose power
07:44 PM Tom_L: not much goin on here
07:45 PM rue_mohr: I been quiet
07:45 PM rue_mohr: got the ai helping my write my program here
07:45 PM rue_mohr: its prettymuch done
07:45 PM rue_mohr: saved me a lot of time lookin things up
10:59 PM rue_mohr: who the heck and I gonna chat with