#garfield Logs

Jan 21 2020

#garfield Calendar

03:06 AM rue_bed: ok between things I'v written 3 libraries
03:12 AM rue_bed: one of them formats numbers in SI notation, aka 4.7k
03:12 AM rue_bed: one of them parses decimal numbers, in si 2.4k, mixed si 2k4 normal and exponential 5.6e+05
03:12 AM rue_bed: one of them takes numbers and finds the closest standard value depending on what range you give it (e12, e24, e48...)
03:12 AM rue_bed: my main coding project is an editor
03:12 AM rue_bed: which I got nothing done on today
09:50 AM polprog: hm
09:50 AM polprog: o rdered some 6502 on aliexpress in november
09:50 AM polprog: still not here
09:50 AM polprog: ordered*
03:09 PM Tom_L: better check that one off your list
03:12 PM polprog: i guess
03:13 PM Tom_L: unless that's normal delivery time for your area
03:13 PM polprog: no, its really not
03:13 PM polprog: not sure wher they are stuck
03:13 PM polprog: where*
03:13 PM polprog: in other news im pretty postive about the exam thing
03:13 PM Tom_L: your customs ppl are playing with them
03:14 PM polprog: haha
03:14 PM polprog: must be the china side customs.. would have already gotten a letter from the polish customs office
03:15 PM Tom_L: maybe the container fell into the ocean
03:15 PM polprog: heh
03:15 PM polprog: ill probably open a dispute in 4 days
03:16 PM polprog: thats when the timer thing runs out
03:16 PM Tom_L: yeah you better
03:17 PM Tom_L: i wouldn't wait the full 4 days
03:18 PM polprog: > 1. If your order does not arrive on 2020-01-24 , you can apply for a refund by opening a dispute.
03:18 PM polprog: hmm
03:18 PM polprog: guess i have to wait
03:19 PM polprog: in other news, i found someones homepage today who posted two public PGP or whatever keys and claimed they "can't read anything that is not encrypted by these"
03:19 PM polprog: meaning emails mostly
03:19 PM polprog: i wonder how do these people function on a day to day basis
03:20 PM polprog: Paranoia strikes deep
03:20 PM polprog: Into your life it will creep
03:20 PM polprog: It starts when you're always afraid
03:20 PM polprog: You step out of line, the man come and take you away
03:20 PM * polprog sings happily
03:25 PM polprog: he also had a "no discord" gif badge on his site. lol
06:28 PM rue_mohr: polprog, is that ebay?
06:51 PM rue_mohr: from the description I think they shaped out the existing cover a bit
06:51 PM rue_mohr: guess I'll find out when the weather gets better
08:00 PM dsl4638 is now known as MoonyMoon
08:13 PM MoonyMoon: few, one beer left.
08:13 PM Tom_L: share with friends
08:14 PM MoonyMoon: If I only could :/
08:16 PM MoonyMoon: ruI got a bunch off cool things for your supplyse_mohr,
08:16 PM MoonyMoon: rue_mohr,
08:18 PM rue_mohr: k
08:19 PM rue_mohr: zippo:/files/programming/c/ohm# ./a.out -v 5 -i 0.005
08:19 PM rue_mohr: Power is: 25.000mW
08:19 PM rue_mohr: Current is: 5.000mA
08:19 PM rue_mohr: Voltage is: 5.000V
08:19 PM rue_mohr: Resistance is: 1.000kOhms
08:19 PM rue_mohr: hey, there, one half of the problem
08:21 PM rue_mohr: printf("Power is: %sW\n", s = adoubleToPrefixS(P)); free(s);
08:21 PM rue_mohr: printf("Current is: %sA\n", s = adoubleToPrefixS(I)); free(s);
08:21 PM rue_mohr: printf("Voltage is: %sV\n", s = adoubleToPrefixS(V)); free(s);
08:21 PM rue_mohr: printf("Resistance is: %sOhms\n", s = adoubleToPrefixS(R)); free(s);
08:21 PM MoonyMoon: whay are you Malloc()'ing s?
08:22 PM rue_mohr: the fucntion does it for me
08:23 PM rue_mohr: it returns a malloced string
08:23 PM rue_mohr: asprintf(&r, "%.3fm", v*1.0e+03);
08:23 PM rue_mohr: char * r;
08:24 PM rue_mohr: you dont have to worry about how big its going to be
08:24 PM rue_mohr: black box
08:24 PM MoonyMoon: oh ok
08:24 PM rue_mohr: it gives you the result in a big enough malloced space, that you can expand if you want
08:24 PM rue_mohr: asprintf is a game changer
08:25 PM MoonyMoon: i only know sprintf
08:25 PM rue_mohr: a = alloc
08:25 PM rue_mohr: man asprintf
08:25 PM MoonyMoon: ooooohhhhhhhh
08:26 PM MoonyMoon: address OF THE pointer to change the pointer
08:27 PM rue_mohr: MoonyMoon, so, what do you think of the idea of side work bounty hunting code bugs
08:27 PM MoonyMoon: wow, tell me more :)
08:27 PM rue_mohr: google bounty coder
08:28 PM MoonyMoon: oh like that
08:29 PM rue_mohr: would probably have to have a windows machine for most of it
08:30 PM MoonyMoon: think i'm good enough? ps. I'm onm a workstation thats running kernel 2.4
08:30 PM rue_mohr: considering the crap code out there, yes
08:30 PM MoonyMoon: cool
08:30 PM rue_mohr: just remember two things
08:30 PM MoonyMoon: ?
08:31 PM rue_mohr: ) people are too stupid to know if a new bug was actaully caused by you or not
08:31 PM rue_mohr: ) I forgot
08:31 PM rue_mohr: oh yea
08:31 PM rue_mohr: ) dont get carried away and fix everything, just the targeted bounty
08:32 PM MoonyMoon: ok
08:32 PM MoonyMoon: fuck im hungry :P
08:33 PM rue_mohr: so, GM says their done
08:33 PM rue_mohr: sounds like they 'adjusted' the cover
08:33 PM MoonyMoon: what does DOMNE mean ?? :|
08:33 PM rue_mohr: *sigh*
08:34 PM * MoonyMoon slams another beer
08:34 PM MoonyMoon: so......
08:34 PM rue_mohr: no idea
08:34 PM MoonyMoon: :/
08:34 PM rue_mohr: they say the water pump is not well, but I happen to know the clutch on the fan is noisy
08:35 PM rue_mohr: I think they are a 2/10 points quality shop
08:35 PM MoonyMoon: god tell those guys to fuck off allready!
08:35 PM rue_mohr: they might have fixed stuff they didn't mention
08:35 PM rue_mohr: they might have done a good job
08:36 PM rue_mohr: they might refund me to get closer to the origional estimate
08:36 PM MoonyMoon: might and maytbees weel see
08:36 PM rue_mohr: there is much yet to be told
08:36 PM rue_mohr: they might ahve also put the engine bracket back on
08:36 PM rue_mohr: I left them a nice big green flag
08:36 PM rue_mohr: with a !
08:37 PM MoonyMoon: I wnat a balet girl :(
08:37 PM MoonyMoon: ballet*
08:37 PM MoonyMoon: ???
08:37 PM rue_mohr: uint8_t numColIsMult(char c);
08:37 PM rue_mohr: double numColMultVal(char p);
08:37 PM rue_mohr: double numColDigitVal(char p);
08:37 PM rue_mohr: double NumColExtract(const char *p) ;
08:37 PM rue_mohr: format those MoonyMoon
08:37 PM MoonyMoon: what do you mean?
08:38 PM rue_mohr: ugh, nevermind
08:38 PM MoonyMoon: :(
08:38 PM MoonyMoon: NTFS or FAT ??? HAHAHAHAH
08:39 PM MoonyMoon: Through me a bine
08:39 PM rue_mohr: 420 -> 420.000000000000000
08:39 PM rue_mohr: 4.2 -> 4.200000000000000
08:39 PM rue_mohr: 4k2 -> 4200.000000000000000
08:39 PM rue_mohr: 4.2k -> 4200.000000000000000
08:39 PM rue_mohr: .42 -> 0.420000000000000
08:39 PM rue_mohr: k42 -> 420.000000000000057
08:39 PM rue_mohr: 0.42 -> 0.420000000000000
08:39 PM MoonyMoon: bone
08:39 PM rue_mohr: 4.2e+3 -> 4200.000000000000000
08:39 PM rue_mohr: 4.2e+03 -> 4200.000000000000000
08:39 PM rue_mohr: 4.2e-3 -> 0.004200000000000
08:39 PM rue_mohr: 4.2e-03 -> 0.004200000000000
08:39 PM rue_mohr: 4k2k -> nan
08:39 PM rue_mohr: .4.2 -> nan
08:40 PM rue_mohr: k4.2 -> nan
08:40 PM rue_mohr: k42e-03 -> nan
08:40 PM rue_mohr: ^^ are there any errors?
08:40 PM MoonyMoon: looks good
08:41 PM rue_mohr: ok
08:41 PM MoonyMoon: k42 -> 420.000000000000057
08:41 PM MoonyMoon: ??
08:41 PM MoonyMoon: why 57
08:41 PM rue_mohr: yea, THAT is a good question
08:42 PM MoonyMoon: try onlyreading back to 3 dec. places to start :|\\\
08:42 PM rue_mohr: I think it sneaks in from the fact that 10 cant be properly represented in binary
08:42 PM rue_mohr: er, something like that (hahahahah)
08:42 PM Tom_L: truck "fixed" ehh?
08:42 PM rue_mohr: "cover adjusted a bit"
08:42 PM rue_mohr: I'll see eh?
08:42 PM Tom_L: sledge hammer?
08:42 PM MoonyMoon: ha
08:43 PM Tom_L: you said it ran poorly too
08:43 PM rue_mohr: yup
08:43 PM Tom_L: cover won't fix that
08:43 PM rue_mohr: I think the timing was set back too bar
08:43 PM MoonyMoon: ba-bar
08:43 PM rue_mohr: I want to see if they did the bracket
08:43 PM Tom_L: electrical timing
08:43 PM Tom_L: not valve timing
08:44 PM rue_mohr: either could do that
08:44 PM rue_mohr: eh?
08:44 PM Tom_L: yes
08:45 PM rue_mohr: zippo:/files/programming/c/ohm# ./a.out -v 25k -i 2m
08:45 PM rue_mohr: Power is: 50.000W
08:45 PM rue_mohr: Current is: 2.000mA
08:45 PM rue_mohr: Voltage is: 25.000kV
08:45 PM rue_mohr: Resistance is: 12.500MOhms
08:46 PM rue_mohr: :)
08:46 PM rue_mohr: LETS SEE BC DO THAT AL :)
08:47 PM MoonyMoon: ha
08:48 PM rue_mohr: thats cool
08:48 PM rue_mohr: to do that I only had to change 8 lines of code
08:49 PM MoonyMoon: 3dec ?
08:49 PM rue_mohr: printf("Power is: %sW\n", s = adoubleToPrefixS(P)); free(s);
08:49 PM rue_mohr: printf("Current is: %sA\n", s = adoubleToPrefixS(I)); free(s);
08:49 PM rue_mohr: printf("Voltage is: %sV\n", s = adoubleToPrefixS(V)); free(s);
08:49 PM rue_mohr: printf("Resistance is: %sOhms\n", s = adoubleToPrefixS(R)); free(s);
08:49 PM rue_mohr: and 4 like P = NumColExtract(argv);
08:52 PM rue_mohr: zippo:/files/programming/c/ohm# ohm -v 5 -i 15m
08:52 PM rue_mohr: Power is: 75.000mW
08:52 PM rue_mohr: Current is: 15.000mA
08:52 PM rue_mohr: Voltage is: 5.000V
08:52 PM rue_mohr: Resistance is: 333.333Ohms
08:52 PM rue_mohr: the next step is to make the values be able to be formulas
08:52 PM rue_mohr: so I can say ohm -v 5-1.4 -i 15m
08:52 PM MoonyMoon: !
08:52 PM rue_mohr: well I wrote my math library for stuff just like that
08:53 PM rue_mohr: its not really an issue
08:53 PM MoonyMoon: thats pretty dope
08:53 PM rue_mohr: but I need to stitch that new value collector into the math library first
08:53 PM rue_mohr: right now its validation parser wont accept number formats like that
08:54 PM rue_mohr: well it will like *that* but not like 4k7-22m
08:59 PM rue_mohr: well I wonder what else I can do while I'm half asleep
09:02 PM rue_mohr: zippo:/files/programming/c/ohm# ohm -v 5 -i 0.4m
09:02 PM rue_mohr: Power is: 2.000mW
09:02 PM rue_mohr: Current is: 400.000uA
09:02 PM rue_mohr: Voltage is: 5.000V
09:02 PM rue_mohr: Resistance is: 12.500kOhms
09:02 PM rue_mohr: its clever too
09:11 PM MoonyMoon: boot load of switch statemsnts no doubt
09:12 PM rue_mohr: the parsing is a evil kinda state machine like blob
09:12 PM rue_mohr: the printing of values is a big if-else blob
09:15 PM rue_mohr: I think I want to make one for impedence with capacitors and inductors
09:16 PM MoonyMoon: :)
09:16 PM MoonyMoon: sin wave only ? :/
09:16 PM rue_mohr: mho -f 60 -c 10u -v 12
09:18 PM MoonyMoon: -w sin || -w sq
09:21 PM rue_mohr: ok, you write a program for sine
09:22 PM rue_mohr: Xc = pie pie f c
09:27 PM MoonyMoon: 1 / 2 pi f c
09:27 PM MoonyMoon: silly
09:43 PM rue_mohr: ok, now code it
09:43 PM rue_mohr: use double
09:43 PM rue_mohr: I'll nodd off again while you do that
10:14 PM Tom_L: rue_mohr,
10:17 PM rue_mohr: yes
10:17 PM Tom_L: one sec
10:22 PM Tom_itx: https://www.youtube.com/watch?v=0wmyTCGB0l8&feature=youtu.be
10:22 PM rue_mohr: scancodes?
10:22 PM Tom_L: yes
10:22 PM rue_mohr: good show
10:23 PM rue_mohr: I wrote a program to upload to an 8051 and I cant find it
10:24 PM Tom_L: for scan codes?
10:24 PM rue_mohr: no, to write a hex file to an 8051
10:24 PM Tom_L: ahh
10:24 PM rue_mohr: nxpdude
10:25 PM rue_mohr: ok
10:25 PM rue_mohr: it was the nxp 8051 I did it with, thats what I wanted to know
10:25 PM rue_mohr: they obsoleted it just after
10:25 PM rue_mohr: its got a serial bootloader
10:25 PM Tom_L: i was curious if ctrl, shft etc changed the codes but it doesn't
10:25 PM rue_mohr: Tom_L, so was the keyoard one of the examples?
10:25 PM Tom_L: it just sends out the code for them ahead
10:25 PM Tom_L: yes
10:25 PM rue_mohr: yup
10:25 PM rue_mohr: they have up and down codes
10:26 PM rue_mohr: you can see some of the multibyte stuff flying by
10:26 PM Tom_L: that may just be keybounce
10:26 PM rue_mohr: dont think so
10:26 PM rue_mohr: some of those are multibyte
10:26 PM rue_mohr: its an UGLY protocol
10:26 PM Tom_L: which ones?
10:27 PM Tom_L: they all flicker the display
10:28 PM rue_mohr: hold one down
10:28 PM Tom_L: may try the vga tomorrow
10:28 PM rue_mohr: there shuuld be a down code and an up code
10:28 PM rue_mohr: repeat is done by the bios
10:28 PM Tom_L: hmm
10:29 PM rue_mohr: yes?
10:29 PM rue_mohr: or am I on glue
10:29 PM Tom_L: it doesn't show the up down
10:29 PM Tom_L: just the key code
10:29 PM rue_mohr: oh
10:29 PM Tom_L: but it does flicker both ways
10:30 PM Tom_L: maybe if i knew more i could show the up down on the other half of the display
10:30 PM Tom_L: good way to test a kbd :)
10:32 PM Tom_L: did you see the P-modules that can plug into this?
10:42 PM rue_mohr: yea, but I think that stuff is silly
10:42 PM Tom_L: well i agree but i wasn't aware this board had those plugs
10:42 PM rue_mohr: I just want a carrier board with the suppport hardware so I can use the thing :)
10:45 PM Tom_L: they've got all sorts of sensors
10:45 PM rue_mohr: yep
10:45 PM Tom_L: i had no idea
10:45 PM rue_mohr: if its the size of a pro mini I'm happy, stick it in a thing and call it applied :)
10:56 PM Tom_L: too bad nobody does projects like we used to
10:57 PM rue_mohr: yea it been too long sicne I etched a board
10:59 PM Tom_L: may try to find one of my encoders and wire it up
10:59 PM rue_mohr: yea, the state machine would be great for that, give you 'count up' and 'count down' pulses
10:59 PM rue_mohr: I could do one too
11:00 PM rue_mohr: it seems every time I find an encoder on ali for a good price I buy it
11:00 PM rue_mohr: and I been finding them all over the place
11:00 PM Tom_L: you got a 7seg display?
11:00 PM rue_mohr: :S
11:00 PM rue_mohr: I can
11:00 PM Tom_L: mine are all off used stuff
11:00 PM Tom_L: but good ones like 500cpr or more
11:00 PM rue_mohr: wellll
11:01 PM rue_mohr: you still have the encoder motor that rifraf coaxed us into?
11:01 PM rue_mohr: I thought we all got a set
11:01 PM Tom_L: i'm sure somewhere
11:01 PM Tom_L: those were heds encoders
11:01 PM rue_mohr: encoder is 1/3 or a servo
11:01 PM rue_mohr: of
11:01 PM rue_mohr: wow, if I move too fast the world spins
11:02 PM Tom_L: never said anything here but i almost went down in the back yard few weeks back
11:02 PM Tom_L: pretty sure it was bad food
11:03 PM Tom_L: but i was dizzy and disoriented
11:03 PM rue_mohr: hmm
11:03 PM rue_mohr: there is a flu or something going around
11:03 PM rue_mohr: here
11:10 PM Tom_L: https://www.youtube.com/watch?v=LHiPMLELjUE
11:10 PM Tom_L: might come in handy for you sometime
11:14 PM rue_mohr: hah, that took me a while to figure out
11:55 PM polprog: rue_mohr: no, aliexpress