#garfield Logs

Oct 26 2020

#garfield Calendar

03:21 AM rue_mohr: laying in bed isn't helping me get to sleep
03:28 AM rue_mohr: polprog, your up aren't ya?
03:28 AM polprog: i am
03:28 AM polprog: i wanted to lie in bed but i was hungry
03:28 AM rue_mohr: about 9kw
03:28 AM rue_mohr: so hypothetically, I could pull 4kw for electricity from a steam coil
03:31 AM polprog: ok, shower time
03:31 AM rue_mohr: ok I made a tar
03:31 AM rue_mohr: forgot makefile
03:32 AM rue_mohr: uploaded
03:33 AM rue_mohr: it would be nice to know if it compiles ok
03:33 AM rue_mohr: make should do it
03:33 AM rue_mohr: http://ruemohr.org/~ircjunk/software/table2ihex2p6p6.tar.gz
03:33 AM rue_mohr: there will be an error about 'nextversion' command not found
03:33 AM rue_mohr: its a program that rewrites version.h for me after each compile
03:33 AM rue_mohr: so no worries
03:34 AM rue_mohr: the tbl files are plaintext, it uses the same parser as the internal prompt
03:35 AM rue_mohr: unfortunatly it doesn't take a command line argument to open a file
03:39 AM rue_mohr: the math engine cant do functions :(
03:41 AM rue_mohr: addrule ssn==0 segss=d0 -200
03:41 AM rue_mohr: think of it like
03:41 AM rue_mohr: if ssn==0 then segss=d0
03:44 AM rue_mohr: hmm I suppose the ability to have comments would be good
04:06 AM rue_mohr: ok, well I rejigged a file for a decoder to do 3 digits
04:07 AM polprog: ok, lets give it a shot
04:07 AM rue_mohr: tell me if it compiles for ya!
04:08 AM polprog: huh, no readline.h
04:08 AM polprog: let me install
04:08 AM polprog: sudo apt-get install libreadline6 libreadline6-dev
04:09 AM polprog: ok
04:10 AM polprog: wurks
04:10 AM polprog: whats the address variable? a?
04:13 AM rue_mohr: oh readline is a standard one
04:13 AM rue_mohr: A is the address
04:13 AM rue_mohr: D is the data
04:13 AM rue_mohr: those are the only build-in variables
04:13 AM rue_mohr: so, if you make one rule, addrule 1 D=A 10
04:14 AM rue_mohr: ( if 1 then D=A )
04:14 AM rue_mohr: then the data at each memory location will be set to the address
04:14 AM polprog: ok
04:14 AM rue_mohr: (to the 8 bit limit)
04:15 AM polprog: how do i set the rom size
04:15 AM rue_mohr: memend
04:15 AM rue_mohr: its the address AFTER the last address
04:15 AM polprog: very nice
04:16 AM rue_mohr: so, if you have a rom with an 8 bit address, memend = 256 or 0x100
04:16 AM rue_mohr: and default will set the value for memory addresses that aren't modified by the rules
04:17 AM rue_mohr: you can also apply litteral values for memory locations
04:18 AM rue_mohr: the system starts at the highest "priority" and works down
04:18 AM rue_mohr: as it crosses "0" (be it there or not) it applies the litteral values
04:18 AM rue_mohr: the priorities can be negitive, so you can apply rules to change values AFTER the litterals were applied
04:22 AM rue_mohr: its a complete alien to just learn
04:23 AM rue_mohr: I threw those .tbl files in as examples
04:23 AM rue_mohr: some of them are dev test files
04:45 AM polprog: neat
04:52 AM rue_mohr: if you tell me what you want it to do, I can probably help you make it do it
04:54 AM polprog: classes started :/
04:54 AM polprog: ill play with it later
04:54 AM polprog: quite powerful
04:56 AM rue_mohr: "walk" will show you the calcs as it does them
05:01 AM polprog: hmm
05:01 AM polprog: how do i manipulte singe bits?
05:01 AM rue_mohr: or / and masks
05:02 AM rue_mohr: V = V | 0x40
05:02 AM rue_mohr: apparenlty the |= and &= operators aren't working
05:02 AM rue_mohr: so use long hand
05:02 AM polprog: ok
05:02 AM rue_mohr: V = V & (!0x40)
05:03 AM rue_mohr: V = V | (1<<4)
05:03 AM rue_mohr: the console will allow you to play with it realtime
05:04 AM rue_mohr: set the memend to like 4 and use 'view'
05:04 AM rue_mohr: 'show' shows you the config
05:04 AM rue_mohr: 'view' dumps you a table
05:04 AM polprog: mmm
05:04 AM polprog: what's V?
05:04 AM rue_mohr: 'walk' steps thru the making of it
05:04 AM rue_mohr: you can make whatever variables you want
05:04 AM polprog: ah
05:05 AM rue_mohr: if you use a var that isn't defined, its 0
05:05 AM rue_mohr: but math operators that dont work yet return 42
05:05 AM rue_mohr: so, potential bug
05:05 AM polprog: hmm
05:05 AM rue_mohr: if you see 42 come up, thats why
05:05 AM rue_mohr: I dont think it happens on that one
05:06 AM rue_mohr: so
05:06 AM polprog: weird
05:06 AM polprog: addrule A<16 A=D 10
05:06 AM polprog: i get zeros
05:06 AM polprog: wait
05:06 AM polprog: ....
05:06 AM rue_mohr: the A<16 is a qualifier
05:06 AM polprog: i needed D=A
05:06 AM polprog: ...
05:06 AM rue_mohr: so if the address does not go over 16
05:06 AM rue_mohr: oh yea
05:06 AM rue_mohr: A is read only
05:07 AM rue_mohr: 1 is also a fair-enough qualifier :)
05:08 AM polprog: ok, im getting the hang of it
05:08 AM rue_mohr: :) maybe I'm not insane
05:09 AM rue_mohr: by the way, once it has a filename known to it, you can just say 'save'
05:10 AM rue_mohr: I think you can also load multiple files over each other, if you want to mix them
05:10 AM rue_mohr: but there cant be dups in the priorities
05:16 AM polprog: hmm
05:16 AM polprog: im reading the source code
05:16 AM rue_mohr: hahah
05:16 AM rue_mohr: the main or a sublibrary ;)
05:17 AM polprog: trying to think where could i add a warning when i try ti do A=...
05:17 AM polprog: :P
05:17 AM rue_mohr: LOTS of libraries on that one
05:17 AM polprog: eq5 for now
05:17 AM rue_mohr: look for a return value from
05:17 AM rue_mohr: resolve? of read-only
05:18 AM rue_mohr: double eq_Eval( const char * equation, varlist_t * vars)
05:18 AM rue_mohr: hmm
05:18 AM polprog: hmmm
05:18 AM rue_mohr: somewhere in there, is a read-only error
05:18 AM polprog: sudo apt-get install libreadline6 libreadline6-dev
05:19 AM polprog: ugh wrong clipboard
05:19 AM polprog: retval = resolve_Num(eq.Head, vars, &funcs);
05:19 AM polprog: 41 //printf("%s result is: %f \n",equation, retval);
05:19 AM polprog: 42
05:20 AM rue_mohr: uh
05:20 AM rue_mohr: wait a sec, I dont see the read-only error
05:20 AM rue_mohr: Status_t writeVar(variable_t * this, char * name, double value, char writable) {
05:20 AM rue_mohr: this->value = value;
05:20 AM rue_mohr: if (this->name) free(this->name);
05:20 AM rue_mohr: this->name = strdup(name);
05:20 AM rue_mohr: this->writable = writable;
05:20 AM rue_mohr: return OK;
05:20 AM rue_mohr: }
05:21 AM polprog: yeah i saw that function but couldnt see a test
05:21 AM rue_mohr: :) I dont see it either
05:21 AM rue_mohr: oh
05:21 AM rue_mohr: Status_t setVarVal (varlist_t * this, char * name, double value) {
05:21 AM rue_mohr: unsigned int i;
05:21 AM rue_mohr:
05:21 AM rue_mohr: if (findIndex(this, name, &i) == OK) {
05:21 AM rue_mohr: if (this->var[i].writable == 1) {
05:21 AM rue_mohr: this->var[i].value = value;
05:21 AM rue_mohr: return OK;
05:21 AM polprog: 78Status_t setVarVal (varlist_t * this, char * name, double value) {
05:21 AM polprog: 79 unsigned int i;
05:21 AM polprog: 80
05:21 AM polprog: 81 if (findIndex(this, name, &i) == OK) {
05:21 AM polprog: 82 if (this->var[i].writable == 1) {
05:21 AM rue_mohr: } else {
05:21 AM polprog: 83 this->var[i].value = value;
05:21 AM rue_mohr: return Forbidden;
05:21 AM polprog: 84 return OK;
05:21 AM rue_mohr: the error is "Forbidden"
05:21 AM polprog: 85 } else {
05:21 AM polprog: 86 return Forbidden;
05:21 AM polprog: ah hah
05:21 AM polprog: ok, so that just needs to have the Forbidden handled
05:21 AM polprog: okies
05:22 AM rue_mohr: but I dont see it used
05:24 AM polprog: yeah.. not called
05:24 AM polprog: setvar is called
05:25 AM rue_mohr: that seems wrong
05:25 AM polprog: ok, so only setvar needs to be checked
05:25 AM rue_mohr: if (this->lhs->type == VAR) setVar(vars, this->lhs->detail, lhs, 1); // !!!???!!! writable ?
05:25 AM rue_mohr: :D
05:25 AM polprog: Breakpoint 2, setVar (this=0x7fffffffe100, name=0x55555555b1bf "D", value=0, writable=1 '\001')
05:25 AM polprog: :P
05:26 AM rue_mohr: well, safe it to say, thats not the only bug
05:26 AM polprog: eakpoint 2, setVar (this=0x7fffffffe100, name=0x55555555b1c1 "A", value=0, writable=0 '\000')
05:26 AM rue_mohr: and then it sets the value?
05:26 AM polprog: let me check
05:27 AM polprog: then it calls addvar
05:27 AM rue_mohr: if you grep for "!!!???!!!" its all the things I knew I needed to address
05:27 AM polprog: ok
05:28 AM rue_mohr: I'm note sure how to escape THAT
05:33 AM polprog: ok, now it segfaults
05:33 AM rue_mohr: god thats a log of code...
05:33 AM rue_mohr: lot
05:35 AM rue_mohr: heh 2009
05:35 AM polprog: wow
05:36 AM rue_mohr: if its an error in eq5 I should fix it anyhow
05:36 AM rue_mohr: but the only means I have to return an error right now is with the value 42
05:36 AM rue_mohr: so the result could be cryptic :)
05:36 AM rue_mohr: (I should add a pointer to a return status or something)
05:37 AM rue_mohr: (eq5 is under major work to add function support, like sin() cos() srqt() )
05:42 AM polprog: mmm
05:42 AM polprog: ok, gotta go
05:42 AM rue_mohr: the premis behind it is that you give it a string and a structure of variable values, it just gives you the answer, no pre-parsing and junk
05:42 AM rue_mohr: have a good one
11:54 AM polprog: so i got your pdfsearch working
11:54 AM polprog: and it now escapes the shell
11:58 AM polprog: https://polprog.net/rozne1/ircjunk/various/pdfsearch.png
11:58 AM polprog: ok, im kidding, it does not use the teletext font
12:08 PM polprog: it also doesnt need the html file
12:12 PM polprog: rue_mohr: https://polprog.net/rozne1/ircjunk/various/pdfsearch.php.txt
12:19 PM polprog: https://polprog.net/rozne1/ircjunk/various/pdfsearch2.png
12:45 PM aandrew: polprog: nice, I should set up that kind of indexing for my 500GB of books. Unfortunately some of them are just gigantic compressed TIFFs with no metadata
12:45 PM polprog: well, the php file is pretty easy
12:46 PM polprog: should work if your books have sane filenames
12:46 PM polprog: hmm, i should maybe use it for books too
12:46 PM polprog: hmm
12:46 PM polprog: just a case of moving the symlink
12:59 PM rue_mohr: heh
12:59 PM rue_mohr: on lunch just now
12:59 PM rue_mohr: I need it to have the server make it the default page
01:00 PM rue_mohr: great if the top and bottom searches are working !
01:00 PM rue_mohr: just didn't get around to fixing that
01:01 PM rue_mohr: and honestly, have you EVER found datasheet on alldatasheet?
01:01 PM rue_mohr: it has never ONCE hit a part number for me
01:02 PM rue_mohr: :)
01:03 PM polprog: i did, many times
01:14 PM rue_mohr: ok
01:24 PM rue_mohr: anymore insights I can throw you about that program in the next 5 minutes?
01:25 PM polprog: sure
01:25 PM polprog: nwo im stuck helping someone with cpp ;)
01:25 PM polprog: but i have two screens ;)
01:26 PM rue_mohr: take a challange, make the first part of a 4 bit ALU D0-3 are one argument D4-7 are the other argument, D8-11 are the operation to perform Q0-4 is the result, with 4 being carry step 1, just implement a copy command for operation = 0
01:26 PM rue_mohr: np
01:26 PM polprog: in the table2ihex?
01:26 PM rue_mohr: yea
01:26 PM polprog: hmm, not now..
01:26 PM rue_mohr: yea np, ponder it, sometimes an objective helps
01:27 PM rue_mohr: copy as in Q = arg0 I suppose
01:28 PM polprog: ok, ill try to get to it later
01:28 PM polprog: go test that pdfsearch
01:28 PM polprog: youll have to fix the find path back
01:28 PM rue_mohr: np
01:29 PM polprog: and i think i nuked the remote parameter logic
01:29 PM rue_mohr: I'm just going back into another 3 hour session, do 'er after
01:29 PM polprog: session of what?
01:29 PM rue_mohr: hah, yea thats me specific
01:29 PM rue_mohr: class
01:29 PM polprog: ahh
01:29 PM rue_mohr: yr 4 electrician
01:29 PM polprog: have fun :)
02:02 PM polprog: heh
02:02 PM polprog: HCS12 instruction man
02:03 PM polprog: DAA Decimal adjust A for BCD
02:03 PM polprog: :)
02:04 PM polprog: The CPU uses the following types of data:•Bits•5-bit signed integers•8-bit signed and unsigned integers•8-bit, 2-digit binary coded decimal numbers•9-bit signed integers•16-bit signed and unsigned integers•16-bit effective addresses
02:04 PM polprog: christ
02:49 PM Tom_L: may i help you?
02:49 PM polprog: :
02:49 PM polprog: :)
02:49 PM Tom_L: heh
02:49 PM polprog: nah, just browsing the hc12 doscsk
02:50 PM polprog: docs*
02:50 PM polprog: im tired :/
02:50 PM polprog: today i took an hour long nap
02:50 PM Tom_L: there are reasons some Uc are popular and some aren't
02:50 PM polprog: or was it two hours
02:50 PM polprog: yeah, the hc12 isntruction set man is not the clearest
02:52 PM polprog: i cant find the datasheet for my particular device
03:09 PM polprog: ah, found i
03:09 PM polprog: it*
03:09 PM polprog: https://www.nxp.com/docs/en/data-sheet/MC9S12DP256.pdf
03:17 PM polprog: that pdf search is soooo useful
03:17 PM polprog: why didnt i think aboutit earlier
04:02 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/rotary/Broach/Test_Keyway3.jpg
04:02 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/rotary/Broach/Test_Keyway9.jpg
04:02 PM Tom_L: slight improvement over the first one
04:06 PM polprog: nice
04:32 PM rue_mohr: ok, well
04:32 PM rue_mohr: I see trouble on tommorow mornings test
04:34 PM rue_mohr: what method did you use?
04:34 PM rue_mohr: thats not a broach...
04:34 PM Tom_L: it is
04:35 PM rue_mohr: wait did you say you bought one?
04:36 PM Tom_L: i did
04:37 PM rue_mohr: ok, merge a few things back into polprogs version here
04:38 PM polprog: what was the remote param used for?
04:38 PM rue_mohr: the links are to the mount point if the fileserver is local
04:38 PM rue_mohr: but I have two fileservers
04:38 PM rue_mohr: the house uses a different mount for the shop
04:38 PM rue_mohr: and the shop uses a different mount for the house
04:38 PM rue_mohr: the local fileserver is /files
04:38 PM polprog: ah
04:39 PM rue_mohr: but the remote one might be /zipfiles or /morfiles
04:39 PM polprog: hmm i wonder if it would work nicely on my phone
04:39 PM rue_mohr: but the server is in the shop
04:39 PM rue_mohr: well, I HAVE to studdy up electrical code rules tonight
04:39 PM rue_mohr: its 20% of tommroow mornings test
04:40 PM polprog: damnit
04:40 PM polprog: stupid phone changes microraver.local to www.microraver.local
04:41 PM polprog: looks like android doesnt resolve zeroconf
04:42 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/rotary/Broach/Broach1.jpg
04:42 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/rotary/Broach/Broach2.jpg
04:44 PM rue_mohr: oh, rotary broach
04:44 PM rue_mohr: no
04:44 PM Tom_L: keyslot broach
04:44 PM rue_mohr: yea
04:45 PM Tom_L: stick the bushing in and shove it thru the hole
04:45 PM rue_mohr: yup
04:45 PM rue_mohr: and dont get stuck, cause its a 1 way trip
04:45 PM Tom_L: alot nicer than i could have done otherwise
04:45 PM Tom_L: you can back it out if you need to
04:45 PM rue_mohr: thought it snaps the teeth
04:46 PM Tom_L: it's going in aluminum
04:46 PM Tom_L: it better not
04:46 PM Tom_L: still no word on the motor
04:48 PM rue_mohr: polprog, oh and the reason I prefixed with "acroread" is because they seem to be hard coding browsers to NOT open acroread on their own
04:48 PM rue_mohr: I cant force it to do it
04:48 PM rue_mohr: tried
04:48 PM rue_mohr: so I copy and paste on command line
04:49 PM polprog: hmm, my firefox just opens pdfs internally
04:49 PM rue_mohr: yea, I cant use that
04:49 PM rue_mohr: cause I cant print properly from it and stuf
04:49 PM rue_mohr: I have to open it in a proper pdf viewer
04:57 PM rue_mohr: well find seems to be working ok like that
04:58 PM Tom_L: is there a pdf creator for linux?
04:58 PM Tom_L: i use that
04:59 PM rue_mohr: no
04:59 PM rue_mohr: you can print as pdf
04:59 PM Tom_L: i do that
04:59 PM rue_mohr: but usually I zoom the window into the chip pinout and use "print view"
04:59 PM Tom_L: print _to_ pdf
04:59 PM rue_mohr: I get a whole page with just the pinout on it
04:59 PM rue_mohr: lots of room for notes
05:00 PM rue_mohr: polprog, &remote=true isn't working, but I dont see why not
05:03 PM rue_mohr: oh the .
05:04 PM rue_mohr: polprog, heh, I didn't realize how custom to my site it was :)
05:07 PM rue_mohr: well I think it could use a facelift (some layout help) but its good
05:07 PM rue_mohr: and both search fields work!
05:07 PM rue_mohr: (what had I done wrong there anyhow?)
05:08 PM rue_mohr: I honestly did a copy/paste and when it didn't work I didn't bother fixing it
05:08 PM rue_mohr: it should use a pear template or something
05:08 PM rue_mohr: work for later
05:10 PM rue_mohr: ok, I said, after school to...... before the stores close
05:20 PM polprog: :)
05:20 PM polprog: both search fields work because they are separate forms now
05:21 PM polprog: i didnt know the remote thing was important, sorry for nuking it :v
05:21 PM polprog: pear template?
05:23 PM polprog: ah, yeah, i had some issues with printing from firefox pdf viewer in the past
06:40 PM rue_mohr: you didn't nuke the remote
06:40 PM rue_mohr: it tripped up on the . prefix of the dirs
06:40 PM rue_mohr: its all good
06:41 PM polprog: oh, ok
06:41 PM polprog: i was sure i deleted the remote hidden params
07:04 PM polprog: so you might have to add these in the html part
08:16 PM polprog: rue_mohr: that LeapPad just activated some early memories of mine
08:16 PM polprog: i used to have one
08:17 PM polprog: i wonder where is it
08:17 PM polprog: it was a great toy :')
08:19 PM rue_mohr: yea they put some neat tech togethor for those
08:19 PM rue_mohr: crazy coding system tho
08:19 PM rue_mohr: weird toolchain that did all sorts of different things
08:20 PM polprog: it was pretty awesome
08:20 PM polprog: i dont know how old was i when i was playing with it
08:20 PM polprog: i remember it played music and such
08:20 PM rue_mohr: I dont think I still have a machine with the dev software
08:21 PM polprog: nighters
08:21 PM polprog: maybe ill try to crack that table prog later
08:22 PM rue_mohr: I realized the math libraries need a pile of simple work
08:22 PM rue_mohr: the program is functional, but if you stray off the path much you fall down a cliff
08:23 PM polprog: for now id just like to add a warning/err when modifying address var
08:23 PM polprog: ..
08:26 PM polprog: nite
09:08 PM Tom_L: kids had a leap pad
09:10 PM Tom_L: well at least i got a test hole with a keyslot to test fit the motor shaft if it ever does get here
09:16 PM rue_mohr: :)
09:16 PM rue_mohr: did they ever do "the day leap ate an olive"?
09:17 PM Tom_L: that was quite some time ago. you really expect me to remember that?
09:17 PM Tom_L: :)
09:17 PM rue_mohr: olives?
09:17 PM rue_mohr: I was one of the coders
09:17 PM Tom_L: i'm sure they'd probably remember
09:17 PM rue_mohr: along with two other books, dont recall which ones
09:18 PM Tom_L: i'll ask em
09:19 PM Tom_L: he doesn't remmeber
09:57 PM rue_mohr: distraction, multiplexing and displaying 12 bits in hex
09:57 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1170816.jpg
09:57 PM rue_mohr: http://ruemohr.org/~ircjunk/tempimage/p1170819.jpg
09:57 PM rue_mohr: I think this is minimal chip, (with the mod in blue)
09:58 PM rue_mohr: I can make it 6 digit with 2 more chips
09:59 PM rue_mohr: I could lose a chip if I used white 7 segment displays
09:59 PM rue_mohr: (drive current is tiny)
10:00 PM Tom_L: transistors driving the anodes?
10:00 PM rue_mohr: yes
10:01 PM rue_mohr: in common emitter mode you dont need base resistors
10:01 PM rue_mohr: and, more importantly, they dont invert
10:02 PM Tom_L: get your sprayer order out?
10:02 PM rue_mohr: the other chap is on it
10:02 PM rue_mohr: he's been doing almost everything
10:02 PM rue_mohr: I been keeping some of the machines going on new parts
10:02 PM rue_mohr: over the last few days did about 12 handles
10:04 PM Tom_L: my poor drillpress was a keyslot press today
10:04 PM rue_mohr: hmm
10:04 PM Tom_L: wasn't as much pressure as i had expected really
10:04 PM Tom_L: or i would have stopped
10:04 PM rue_mohr: my old one would drop out the chuck with side-load
10:04 PM rue_mohr: I havn't tried the new one
10:05 PM Tom_L: they all do
10:05 PM Tom_L: it's the MT2
10:05 PM Tom_L: not designed to handle any side load
10:05 PM rue_mohr: I think the new one is one of those reverse taper ones
10:07 PM Tom_L: supposed to snow again tomorrow and i'm due out of town
10:07 PM Tom_L: may not make that trip
10:07 PM rue_mohr: hmm
10:07 PM rue_mohr: I wonder if we will get snow before feb
10:07 PM Tom_L: first time it's snowed in October in at least 10 yrs that i can remember
10:08 PM rue_mohr: ok I have to go read about 800 more pages of the electrical code
10:08 PM rue_mohr: not sure how much is sticking
10:09 PM Tom_L: heh
10:09 PM Tom_L: good luck
10:09 PM Tom_L: does it cover residential and industrial?
10:09 PM Tom_L: and high power lines
11:48 PM rue_mohr: yea
11:48 PM rue_mohr: and yea
11:48 PM rue_mohr: lots of new junk in my brain