#garfield Logs

Oct 27 2020

#garfield Calendar

12:33 AM rue_bed: polprog, how many hours till you wake up again?
01:15 AM rue_mohr: polprog, it would also be great if you could drop me a link to a page that uses your slideshow
01:15 AM rue_mohr: I need to fix my fit mode again
03:57 AM polprog: morning
03:57 AM polprog: overslep today
03:58 AM polprog: https://polprog.net/zenit/city/
03:58 AM polprog: but.. i dont remember if fit works here okay
04:00 AM polprog: this one doesnt really scale on my phone..
04:00 AM polprog: but it was ok on pc. idk
07:15 AM polprog: one of our programming assignments was to write a program that numerically computes the impedance of an RLC network
07:15 AM polprog: i just finished it
07:15 AM polprog: its nothing special, its more of an excercise in virtual methods in cpp rather than a useful program
07:15 AM polprog: i can throw it here if anyone wants it
07:15 AM polprog: its simple, but you have to recompile it every time you want to change the network
08:11 AM rue_mohr: series or parallel
08:34 AM polprog: any
08:35 AM polprog: the test network is --R1--L--(R2 || C)--
08:35 AM polprog: ill throw it here later today
08:35 AM polprog: its c++ with abstraction thoigh, a bit messuly
08:35 AM polprog: messy*
08:35 AM polprog: split into 6 files... >_>
09:03 AM rue_mohr: how does that get split into 6 files?
09:03 AM rue_mohr: is that counting header files too?
09:04 AM polprog: yeah
09:06 AM polprog: theres a file for element classes (cpp+hpp), for a net junction (cpp+hpp) and for the base abstract class (hpp), and main.cpp
09:07 AM rue_mohr: ah
09:07 AM polprog: ill clean it up and post later.. its sorta useful
09:12 AM rue_mohr: ok exam...
09:23 AM polprog: best of luck :)
10:12 AM Tom_L: ice day here
10:53 AM rue_mohr: dear god
10:53 AM rue_mohr: what a test
10:53 AM rue_mohr: (I got 96% but I'm cooked)
10:55 AM Tom_L: heh
10:55 AM Tom_L: you'll make a good sparkie some day
10:56 AM rue_mohr: hah
10:56 AM rue_mohr: I have to finish the program, I'll feel shamed if I dont
10:57 AM rue_mohr: I'm already paid more than I should be for my level
10:57 AM Tom_L: it would give you a piece of paper that might open a door
11:01 AM rue_mohr: no, there are no doors around here
11:02 AM Tom_L: ahh, just windows for the cat
11:02 AM Tom_L: you could just about be guaranteed a job here
11:02 AM rue_mohr: I spawned in the wrong part of the planet
11:02 AM Tom_L: maybe not during covid but normally
11:02 AM rue_mohr: of the wrong solar system
11:02 AM rue_mohr: of the wrong galaxy
11:03 AM rue_mohr: just like me to REALLY stuff it up.
11:29 AM rue_mohr: ruemohr.org/~ircjunk/distractions/scanned7seg/
11:30 AM polprog: ULN for driving leds :P?
11:31 AM rue_mohr: well the rom cant
11:31 AM rue_mohr: I had to add a blooming pullup to the transistor
11:31 AM polprog: hmm
11:31 AM rue_mohr: the ROMs high is only like 3.2V
11:32 AM polprog: oh, right, i was using flashmem
11:32 AM rue_mohr: yea an eeprom might be ok
11:36 AM polprog: oh nice, i just learnt fourier series
11:37 AM rue_mohr: heh
11:37 AM rue_mohr: did I post any sketches?
11:38 AM polprog: of what?
11:38 AM rue_mohr: I learned a LOT doing the FFT project
11:38 AM rue_mohr: I did FFT in _8_ bits
11:38 AM polprog: oh yeah
11:38 AM polprog: its eye opening
11:38 AM rue_mohr: there is almost NO headroom
11:38 AM rue_mohr: you have 3 bits of precision by the time your done
11:38 AM polprog: now i want to put a small sin table in a rom and generate some stuff
11:38 AM rue_mohr: nope nope nope
11:38 AM rue_mohr: dont use a sin table, you only need like 4 values
11:39 AM rue_mohr: test it out, write some code to show you what values in the table you use
11:39 AM polprog: hmm
11:39 AM polprog: yeah, ill have to play
11:39 AM rue_mohr: depending on the depth, your only using a palmfull of them
11:39 AM rue_mohr: I dont know if I even posted my fft code
11:40 AM polprog: i dont think you did
11:40 AM rue_mohr: https://github.com/ruenahcmohr/max7219fft
11:40 AM rue_mohr: thats onyl the result tho
11:40 AM polprog: ah, the cold turkey algorhitm
11:40 AM polprog: :)
11:40 AM rue_mohr: :)
11:41 AM rue_mohr: what I found HALARIOUS
11:41 AM rue_mohr: is that the cooley-turkey was a hack back in 1967
11:41 AM rue_mohr: then it was ported to basic
11:41 AM rue_mohr: directly, cause nobody understood how it worked
11:41 AM rue_mohr: then the basic was ported to C
11:41 AM rue_mohr: then the C to java/etc
11:42 AM rue_mohr: and every time it was ported it picked up more garbage
11:42 AM rue_mohr: that nobody ever dealt with cause they didn't understand how it worked
11:42 AM rue_mohr: the origional code, in fortran, could only handle a 1D data array
11:43 AM rue_mohr: https://github.com/ruenahcmohr/max7219fft/blob/master/FOUR1.for
11:43 AM rue_mohr: that is a retype, of the ORIGIONAL document
11:43 AM rue_mohr: I think the typo is part of the orig
11:43 AM rue_mohr: and the orig document is impossible to make out properly unless you understand the code (its bad quality)
11:44 AM rue_mohr: IEEE AUDIO TRANSACTIONS (JUNE 1967) <-- can you get to that using your school?
11:45 AM rue_mohr: I would love to show you more stuff I came up with studdying it, give me shout if you have time
11:46 AM rue_mohr: I wrote a program that helps build fft *systems*, aka, helping you get the range you want and work out the sampling rate and trig tables
11:47 AM rue_mohr: after I did the fft stuff I was totally into doing some IIR and FIR filters, didn't get to it
11:48 AM rue_mohr: MLEs project with the arduino voice thing was interesting, it uses a FIR filter
11:48 AM rue_mohr: 10? level?
11:54 AM polprog: haha, your site comes up when searching for that ieee thing
11:57 AM polprog: https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1161897
11:57 AM polprog: which article do you think it is in that journal?
11:58 AM rue_mohr: :)
11:58 AM rue_mohr: I had a paywall problem, thanks :)
11:58 AM polprog: thats just the TOC, i found that on google
11:59 AM rue_mohr: oh,
12:00 PM rue_mohr: can you get a copy of the journal thru school?
12:00 PM polprog: yeah, but not the whole thing
12:00 PM polprog: i think..
12:00 PM polprog: ive got some articles
12:00 PM rue_mohr: ok can we match the name...
12:00 PM polprog: the blue book on your site is open access
12:01 PM rue_mohr: hu?
12:02 PM polprog: thats what it says on the library search
12:02 PM polprog: but dtic.mil does not seem to answer...
12:02 PM polprog: (the server its hosted on)
12:02 PM polprog: COOLEY et al: APPLICATION TO COMPUTATION OF SERIES AND INTEGRALS ?
12:02 PM rue_mohr: NORMAN BRENNER ?
12:03 PM polprog: yeah
12:03 PM rue_mohr: hmm brenner isn't mentioned in the index
12:04 PM rue_mohr: I'm guessing page 85
12:04 PM rue_mohr: or 91
12:06 PM polprog: hmm, i got a slice that ends in 84
12:06 PM polprog: close...
12:09 PM polprog: theres algol source code
12:12 PM polprog: https://openlibrary.cmre.nato.int/bitstream/handle/20.500.12489/153/SM-182-UU.pdf?sequence=1
12:12 PM polprog: ok, no source code there
12:13 PM polprog: but i found the ALGOL code, the singleton version (which seems to be the very first according to ^^^ and some other papers)
12:19 PM rue_mohr: heh, I'm in school too, ...
12:19 PM rue_mohr: digging on my end
12:19 PM polprog: which source are you looking for? the one unreadable in the book you currently have?
12:20 PM rue_mohr: I'd like that whole journal, I'd like to know what it says
12:21 PM polprog: they sliced it per-article
12:23 PM polprog: they wont let you have the whole journal :( againts tos
12:29 PM rue_mohr: I can only find the front cover and the contributors page
02:11 PM Tom_L: https://chicago.craigslist.org/chc/tls/d/des-plaines-unfinish-project-8-4-cnc/7220208286.html
04:22 PM rue_mohr: I just saw 56 people taken thru one of the steepest logic intros I could have ever imagined
04:23 PM rue_mohr: Tom_L, DAMN!
04:23 PM rue_mohr: mines like $20
04:24 PM Tom_L: hehehe
04:48 PM polprog: ok, im back
04:48 PM polprog: got a big-ass pentium tower
04:48 PM polprog: 2" tall
04:51 PM polprog: and a nice kettle lead power strip
04:51 PM rue_mohr: feet is one tick
04:51 PM rue_mohr: '
04:51 PM polprog: ah
04:51 PM polprog: right'
04:51 PM polprog: :P
04:51 PM rue_mohr: casue its too long a distance for both ticks to fit on the page "
04:51 PM rue_mohr: " <- inch
04:52 PM rue_mohr: my tower is bigger thant hat
04:52 PM rue_mohr: its a REAL FULL size atx
04:53 PM polprog: 65 cm, it's still AT because pentium I, socket 7
04:53 PM rue_mohr: polprog, so, the 56 electrical students were just faced with one of the steepest intors to digital logic I might eversee
04:53 PM polprog: oh, do tell
04:54 PM polprog: /ca
04:54 PM polprog: whoops, space
04:54 PM rue_mohr: from "this is an AND gate" to "write the boolean expression for this mess of 4 logic gates" in 2 hours
04:54 PM polprog: damn
04:54 PM rue_mohr: *but dont worry about simplifying it
04:54 PM rue_mohr: haha
04:54 PM rue_mohr: and thats right after an exam this morning
04:55 PM rue_mohr: night before last I was looking to simplify the bool alg. for a few channels of a 7 segment decoder
04:55 PM rue_mohr: I looked at it and decided not to
04:56 PM polprog: not even karnaugh?
04:56 PM rue_mohr: tho I have a burning curiosity about how few gates it can be packed into
04:56 PM rue_mohr: I'v never done karnaugh
04:56 PM rue_mohr: funny enough
04:56 PM polprog: ive done it... maybe twice
04:56 PM rue_mohr: hah
04:56 PM polprog: i *think* i get it now
04:56 PM polprog: but im not sure
04:56 PM polprog: i was thinking about putting that in the gal tut
04:56 PM polprog: since.. its vital
04:57 PM rue_mohr: all inputs against all inputs table, then relational groups
04:57 PM polprog: yeah
04:57 PM rue_mohr: I'll just program in the table thanks.
04:57 PM rue_mohr: :)
04:57 PM polprog: not in a gal :D
04:57 PM rue_mohr: when he put up a messy bool.alg. formula and said "work out the logic gates for this"
04:58 PM rue_mohr: I cracked a joke about using a 74ls151 that was configured for the answer
04:58 PM rue_mohr: you can put a table in a gal
04:58 PM rue_mohr: you can put formulas in a ROM :)
04:58 PM polprog: h
04:59 PM polprog: well.. you have to work it out as a sum of products
04:59 PM rue_mohr: not square root tho, that'll take me some work
04:59 PM rue_mohr: it looks like I framed eq5 out for it tho
04:59 PM * polprog drills a sum of products into rue_mohr and rue_shop1
04:59 PM rue_mohr: ugh
04:59 PM polprog: hmm.. maybe i should try to go back to that table2ihex prog
04:59 PM rue_mohr: you did see how to put a table in a gal?
04:59 PM polprog: wanna help me understanging it
04:59 PM polprog: no
04:59 PM polprog: i didnt
05:00 PM rue_mohr: yea
05:00 PM rue_mohr: and yea
05:00 PM rue_mohr: did we just fork?
05:00 PM polprog: what do you mean
05:00 PM rue_mohr: https://github.com/linker3000/GALBinaryTo7Seg/blob/master/BIN2X7SEG16V8.PLD <-- thread 1
05:00 PM polprog: ah
05:01 PM rue_mohr: how about I show you how to make a data selector with table2ihex, its a simpler example
05:01 PM polprog: well, that uses the majic compiler that im not sure even palasm is
05:01 PM rue_mohr: I dont know if its starting too far in tho
05:01 PM polprog: i wanted to add that error for writing A=
05:01 PM rue_mohr: hah
05:01 PM rue_mohr: I want to finish ops.c
05:01 PM polprog: anyway, let me download and build it
05:02 PM rue_mohr: ? did you change locations again?
05:02 PM polprog: yes, now were back on the lab pc
05:02 PM rue_mohr: hah
05:02 PM polprog: i do have SMB running between eachother but that needs the laptop to be on
05:02 PM polprog: wait, on the laptop i was remoted into the server
05:02 PM polprog: anyway
05:02 PM rue_mohr: I cant remember what me last night wanted me after school to do
05:03 PM polprog: the server version is broken by me so i have to start over anyway
05:03 PM rue_mohr: I think adding that error would be a refactor issue
05:03 PM rue_mohr: the eq_eval returns a number and has no mechanism for an error
05:03 PM rue_mohr: I shouldn't ahve done it like that
05:04 PM polprog: youd think tar -xvf asdasdasd -C foo would mkdir foo if necesary
05:04 PM polprog: stupid program
05:04 PM rue_mohr: I usually (as you can see in my code there) return my global error type, values are returned via pointers
05:04 PM rue_mohr: xvf? xvzf?
05:04 PM polprog: xzf
05:04 PM polprog: nah wait
05:04 PM polprog: xvf worked
05:05 PM polprog: maybe its smart enough to see itz gzipped
05:05 PM polprog: ah damn, i have to help sis with maths
05:05 PM polprog: bbl
05:06 PM rue_mohr: heh, goodnight :)
05:06 PM polprog: hmm did you put four1-fortran up just now?
05:06 PM polprog: im sure i saw it before
05:06 PM rue_mohr: here I was gonna ask if you use discord, and want to help 56 people with basic digital logic
05:07 PM polprog: i do use it
05:07 PM rue_mohr: the pdf is in
05:07 PM rue_mohr: the vault
05:07 PM rue_mohr: http://ruemohr.org/~ircjunk/not_public_dont_open/four1-fortran.pdf
05:07 PM rue_mohr: I have no idea what the copyright is on it
05:08 PM rue_mohr: did you want to try to extract FOURT from it?
05:08 PM Tom_L: fortran?
05:08 PM rue_mohr: that would be a 3rd thread
05:08 PM Tom_L: they've probably expired :)
05:08 PM rue_mohr: Tom_L, the FFT stuff
05:08 PM Tom_L: oh
05:08 PM rue_mohr: I went back in time to find out why modern FFT code is so F****D
05:09 PM rue_mohr: and found my answer, and more
05:09 PM rue_mohr: more than I ever expected to find
05:09 PM rue_mohr: Tom_L, you know how modern software is a hack?
05:09 PM Tom_L: it's all pretty much a copy from something else
05:09 PM rue_mohr: well, there were no good-ole-days, they been making hacked code since 1967
05:10 PM Tom_L: all marketing
05:10 PM rue_mohr: oh polprog that one doc you have IS dated 1982
05:10 PM rue_mohr: which explains why they mention an apple II
05:10 PM Tom_L: he wasn't born yet
05:10 PM rue_mohr: the code must have been running on something much older in 1967
05:11 PM Tom_L: tubes?
05:11 PM rue_mohr: the microprocessors were 1974?+
05:11 PM rue_mohr: I think it was tubes
05:11 PM rue_mohr: or transistors
05:11 PM Tom_L: rooms full
05:11 PM rue_mohr: but not chips
05:11 PM Tom_L: when did the transistor come into play?
05:11 PM Tom_L: bell labs...
05:12 PM rue_mohr: I'm gonna call the transitions "mushy"
05:12 PM rue_mohr: and decline from drawing lines
05:15 PM rue_mohr: polprog, if your playing with fft, tell me and I'll post this optimization/discovery doc
06:50 PM polprog: sure
06:56 PM polprog: nighters
08:05 PM rue_mohr: you asleep now?
08:07 PM aandrew: how's everyone tonight
08:17 PM rue_mohr: 90-someodd % on this mornings exam
08:17 PM rue_mohr: then the STEEPEST digital intro I couldn't have imagined
08:18 PM rue_mohr: literally 2 hours from "this is an AND gate" to "write out the logic circuit for this boolean equation"
08:18 PM rue_mohr: I feel really sorry for everyone in the class
08:18 PM rue_mohr: I know the stuff and I was laboured
08:37 PM rue_shop1: TA7291P
08:47 PM aandrew: rue_shop1: nice
08:47 PM aandrew: I don't think I could do a class again
08:48 PM aandrew: I was never much of an academic but now I feel I'd just walk out
08:57 PM rue_mohr: 3rd year with all the math took me to a limit
08:57 PM rue_mohr: my head was DONE
09:45 PM rue_mohr: ok I got the x^y working
09:45 PM rue_mohr: the operator is **
09:45 PM rue_mohr: zippo:/files/programming/c/Equation/eqv5# ./eq 2**5
09:45 PM rue_mohr: 2**5 -->> 32
09:45 PM rue_mohr: zippo:/files/programming/c/Equation/eqv5# ./eq 3**3
09:45 PM rue_mohr: 3**3 -->> 27
09:45 PM rue_mohr: zippo:/files/programming/c/Equation/eqv5# ./eq 8**1
09:45 PM rue_mohr: 8**1 -->> 8
09:45 PM rue_mohr: zippo:/files/programming/c/Equation/eqv5# ./eq 8**2
09:45 PM rue_mohr: 8**2 -->> 64
10:05 PM rue_mohr: ./eq "A+0(A^=0x50)((A=0x55))(ResultBase=16)"
10:05 PM rue_mohr: A+0(A^=0x50)((A=0x55))(ResultBase=16) -->> 0x55
10:05 PM rue_mohr: ^^no! bad computer
10:06 PM rue_mohr: ./eq "A+0(A=A^0x50)((A=0x55))(ResultBase=16)"
10:06 PM rue_mohr: A+0(A=A^0x50)((A=0x55))(ResultBase=16) -->> 0x5
10:06 PM rue_mohr: ^^ that is the correct answer
10:14 PM rue_mohr: aha, it didn't get assigned a priority
10:20 PM rue_mohr: oh
10:22 PM rue_mohr: ok!
10:22 PM rue_mohr: zippo:/files/programming/c/Equation/eqv5# ./eq "(A+0(A^=0x50)((A=0x55)))(ResultBase=16)"
10:22 PM rue_mohr: lhs: 0.000000, Operator:= rhs: 85.000000 result 85.000000
10:22 PM rue_mohr: lhs: 85.000000, Operator:^= rhs: 80.000000 result 5.000000
10:22 PM rue_mohr: lhs: 5.000000, Operator:+ rhs: 0.000000 result 5.000000
10:22 PM rue_mohr: lhs: 10.000000, Operator:= rhs: 16.000000 result 16.000000
10:22 PM rue_mohr: (A+0(A^=0x50)((A=0x55)))(ResultBase=16) -->> 0x5
10:23 PM rue_mohr: that can be a template for the rest of them
10:23 PM rue_mohr: so I have to say A+0 becasue if I say A( it thinks A is a function
10:23 PM rue_mohr: and then says it doesn't support functions and barfs out a 42
11:41 PM rue_mohr: ^= &= |= >>= <<= all working
11:58 PM rue_mohr: ok now += -= /= and *= work