#garfield Logs
Oct 28 2020
#garfield Calendar
12:04 AM rue_mohr: and not %= works
12:10 AM rue_mohr: and now
12:10 AM rue_mohr: past bedtime
12:10 AM rue_mohr: thats a lot of progress tho
12:12 AM rue_mohr: eq_Eval calls doOp, which can return an error
12:13 AM rue_mohr: right now, the only error it returns is BadData if the operation is not known to it
12:14 AM rue_mohr: the operation itself has no idea of whats going on, its given 3 values and it just does its things
12:14 AM rue_mohr: Boilrhs actually puts the results where they need to go
12:15 AM rue_mohr: Boilrhs returns an error code, which is always OK
12:16 AM rue_mohr: if (this->lhs->type == VAR) setVar(vars, this->lhs->detail, lhs, 1); // !!!???!!! writable ?
12:16 AM rue_mohr: this line is where the problem exists
12:16 AM rue_mohr: it has two challanges
12:17 AM rue_mohr: create a variable if one doesn't exist, and assign a value to it
12:18 AM rue_mohr: Status_t setVar(varlist_t * this, char * name, double value, char writable)
12:19 AM rue_mohr: setVar checks to see if the var already exists, it creates it if it doesnt, otherwise sets it
12:19 AM rue_mohr: if the variable exists, it uses writevar
12:20 AM rue_mohr: writevar does a permissions-free set of all the attributes
12:20 AM rue_mohr: --
12:20 AM rue_mohr: so the problem stems from variables created in the formula parser
12:23 AM rue_mohr: my command line calc uses this libary (it is the library) and it has 2 read-only constants programmed into it
12:23 AM rue_mohr: Pi and version
12:23 AM rue_mohr: according to this, I should be able to rewrite Pi
12:24 AM rue_mohr: ./eq "(Pi)((Pi=3))"
12:24 AM rue_mohr: the brackets set the priority, so Pi=3 is done before Pi (which is the result of the work and therefore the answer (also, leftmost)
12:24 AM rue_mohr: (Pi)((Pi=3)) -->> 3
12:24 AM rue_mohr: as opposed to
12:24 AM rue_mohr: ./eq Pi
12:24 AM rue_mohr: Pi -->> 3.14159
12:25 AM rue_mohr: ok, I can manifest the bug
12:25 AM rue_mohr: so
12:25 AM rue_mohr: first step is to USE the error from Boilrhs
12:34 AM rue_mohr: done, the next step is to make sure Boilrhs can create variables, but not overwrite RO ones
12:34 AM rue_mohr: currently setVar will use writeVar, which has full privelidges
12:34 AM rue_mohr: and we need that mechanism
12:34 AM rue_mohr: but we need a lower-permission entry point
12:35 AM rue_mohr: ./eq "(Pi)((Pi=3))"
12:35 AM rue_mohr: (Pi)((Pi=3)) -->> 3.14159
12:35 AM rue_mohr: :)
12:36 AM rue_mohr: lastly, if setVarVal returns as error, we need to pass it on
12:37 AM rue_mohr: zippo:/files/programming/c/Equation/eqv5# ./eq "(Pi)((Pi=3))"
12:37 AM rue_mohr: Unable to perform calculation, (Pi)((Pi=3)) -->> 42
12:38 AM rue_mohr: yay!
12:44 AM rue_mohr: ./eq "(Pi)((Pi=3))"
12:44 AM rue_mohr: Unable to perform calculation, Forbidden
12:44 AM rue_mohr: (Pi)((Pi=3)) -->> 42
12:44 AM rue_mohr: there! a bit more detail!
12:54 AM rue_mohr: oh interesting, that isn't working in table2ihex
12:56 AM rue_mohr: I wonder what it thinks isn't writable
12:56 AM rue_mohr: it might be to do with the way it breaks down an equation
12:56 AM rue_mohr: but it shouldn't be
12:59 AM rue_mohr: Applying rule -1: q:1 m:lsn=A&0x0F
12:59 AM rue_mohr: Unable to perform calculation, Forbidden
12:59 AM rue_mohr: Applying rule -2: q:1 m:msn=(A&0xF0)>>4
12:59 AM rue_mohr: Unable to perform calculation, Forbidden
12:59 AM rue_mohr: Applying rule -3: q:1 m:ssn=(A&0xF00)>>8
12:59 AM rue_mohr: Unable to perform calculation, Forbidden
12:59 AM rue_mohr: Applying rule -4: q:1 m:dig=(A&0xF000)>>12
12:59 AM rue_mohr: Unable to perform calculation, Forbidden
01:00 AM rue_mohr: but it shouldn't be trying to write to it
01:01 AM rue_mohr: huh
01:01 AM rue_mohr: ./eq Pi*3
01:01 AM rue_mohr: Unable to perform calculation, Forbidden
01:01 AM rue_mohr: Pi*3 -->> 42
01:01 AM rue_mohr: oh, I'v accidently implemented write-only too
01:01 AM rue_mohr: or just a general permission denied
01:01 AM rue_mohr: huh
01:02 AM rue_mohr: ok
01:05 AM rue_mohr: ah interesting
01:05 AM rue_mohr: ./eq 3*Pi
01:05 AM rue_mohr: 3*Pi -->> 9.42478
01:05 AM rue_mohr: ./eq Pi*3
01:05 AM rue_mohr: Unable to perform calculation, Forbidden
01:05 AM rue_mohr: Pi*3 -->> 42
01:06 AM rue_mohr: its a bad carry-over on how I resolve the calc
01:06 AM rue_mohr: have to ponder this later
01:10 AM rue_mohr: whats odd, is that its not actaully trying to assign the variable, its turning it into a constant
01:12 AM rue_mohr: calc "(Pi*2)((Pi*3))(((Pi+1)))"
01:12 AM rue_mohr: (Pi*2)((Pi*3))(((Pi+1))) -->> 6.28319
01:13 AM rue_mohr: but it doesn't quite add up to me how setvar is called
09:03 AM rue_mohr: polprog, ?
09:18 AM rue_mohr: ok, this morning is PLCs
09:19 AM rue_mohr: I have to be carefull to pay attention so I know how the class works
09:21 AM polprog: hi there
09:22 AM rue_mohr: so, my formula solver uses substitution
09:22 AM rue_mohr: 3+4+5 -> 3+9 -> 12
09:22 AM rue_mohr: in the process of handling variables, it apparently does a mock write
09:23 AM rue_mohr: which messes up the error catch
09:23 AM rue_mohr: other than that, made some great progress last night
09:24 AM rue_mohr: the point of the library is to NOT include python in the project :)
09:25 AM polprog: :)
09:25 AM polprog: thats for the table prog ? or is eqn5 something else
09:26 AM polprog: i once implemented a formula solver, well, evaluator for math expressions
09:26 AM polprog: they were RPN though
09:26 AM rue_mohr: eq5 is the math library for the table2ihex AND my command line calc
09:26 AM polprog: ah
09:26 AM polprog: well
09:26 AM polprog: RPN is dead simple to implement
09:26 AM polprog: infix not so much
09:26 AM rue_mohr: I hate rpn
09:26 AM polprog: not a fan either
09:26 AM rue_mohr: but the other point of this is the variables
09:27 AM polprog: it just looks weird
09:27 AM rue_mohr: you can, in this do 6+(e=9)+3 and get 18, as well as an e that equals 9
09:28 AM polprog: neat
09:29 AM rue_mohr: calc "1(2)(3)(4)"
09:29 AM rue_mohr: 1(2)(3)(4) -->> 1
09:30 AM rue_mohr: for things that break down into multiple numbers, the leftmost is taken as the answer
09:31 AM rue_mohr: calc "r(2+(r=7)+6)"
09:31 AM rue_mohr: r(2+(r=7)+6) -->> 7
09:31 AM rue_mohr: I kinda wonder if it should return a list
09:32 AM rue_mohr: part of the goal was "just return me a number"
09:34 AM rue_mohr: oh
09:35 AM rue_mohr: oh it ALWAYS writes a value to the variable, but for non-assignments, the value is the same as its initial value
09:35 AM rue_mohr: ok
09:35 AM rue_mohr: cute
09:36 AM rue_mohr: I have to think on that
09:38 AM rue_mohr: because everything is resolved to a value, calculated in parts, and put back, its not always immediatly clear that the value came from the same place
09:42 AM rue_mohr: heh, "result" is discarded
09:42 AM rue_mohr: oh no there is it
10:38 AM Tom_L: doesn't look like class work to me :)
10:55 AM Tom_L: https://deepnest.io/
01:01 PM rue_mohr: oh
05:39 PM rue_mohr: polprog, change your avatar again eh!?
05:40 PM polprog: again?
05:40 PM polprog: i havent changed it before
05:40 PM polprog: hmm
05:40 PM polprog: maybe ill change it back
05:40 PM polprog: idk
05:41 PM rue_mohr: just tkaes me getting used to
05:41 PM rue_mohr: I think the old one was blue
05:41 PM rue_mohr: I have to go shopping
05:41 PM rue_mohr: school is used up all my paper
05:41 PM rue_mohr: and need a stapler
05:41 PM Tom_L: they get off cheap doing online classes
05:42 PM rue_mohr: heh
05:42 PM Tom_L: talked to my motor guy today he said: oh yeah it's sitting right here but i forgot who to send it to
05:43 PM Tom_L: bastard
05:43 PM Tom_L: check your own website!
05:43 PM Tom_L: supposedly it will ship tomorrow
05:45 PM polprog: yeah i changed it back
05:45 PM polprog: i didnt like the dilbert
05:45 PM polprog: hmm
05:45 PM polprog: how would you describe me
05:50 PM Tom_L: boy you really opened that up
05:51 PM polprog: huh?
05:51 PM Tom_L: how would i describe you.....
05:52 PM polprog: yeah. i don't know myself
05:53 PM polprog: s/know/even know/
07:03 PM polprog: nighters
07:03 PM polprog: maybe rue will know how to answer that :D
07:03 PM polprog: cuz i dont ;)
07:41 PM rue_mohr: tech head, fascinated person
07:42 PM rue_mohr: electonics and programming
07:42 PM rue_mohr: https://www.ransom-randolph.com/keycote-system
07:42 PM rue_mohr: Tom_L, it looks like its re-usable
07:42 PM rue_mohr: ?
07:43 PM rue_mohr: no it cant be if its two part
07:43 PM rue_mohr: ?
07:44 PM rue_mohr: so I had an idea
07:45 PM rue_mohr: if I dont modify the value, return NULL and have it skip the write to the var
07:45 PM rue_mohr: I had the boiler tank up to 70c
07:45 PM rue_mohr: its at 32 now
07:46 PM rue_mohr: darn, its passed by value, not pointer
07:54 PM Tom_L: what's the Keycote for?
07:54 PM rue_mohr: like to get better at casting stuff
07:55 PM Tom_L: oh
07:55 PM rue_mohr: I might be able to learn from the technique and not have to subscribe to the material$
07:55 PM Tom_L: like the YT i posted ages back
07:56 PM rue_mohr: probably
07:56 PM Tom_L: dip coating
07:57 PM rue_mohr: do you think I can cast into 1200c rated silicone?
07:59 PM Tom_L: no idea
07:59 PM rue_mohr: even 700c is a long ways from 1200c
08:00 PM rue_mohr: alum should be 660
08:00 PM Tom_L: doesn't sound like a proces i've heard of so there must be issures with it
08:00 PM rue_mohr: any water would be BAD
08:00 PM rue_mohr: typically you want gasses and junk to "soak into" your investment material
08:01 PM rue_mohr: I got a carbon block to play with for a mold
08:01 PM rue_mohr: I suspect the heat will take it apart pretty quick
08:02 PM Tom_L: dammit!
08:03 PM rue_mohr: ?
08:03 PM rue_mohr: motor?
08:03 PM Tom_L: i just had ice cream, now i need some hot tea. i didn't think that thru with it 40F outside
08:03 PM rue_mohr: hah
08:03 PM Tom_L: well i just hope the guy does what he said
08:04 PM Tom_L: seems pretty straightforward about things so far
08:04 PM Tom_L: off to make tea
08:05 PM rue_mohr: so my math library
08:05 PM rue_mohr: if you give it a variable
08:05 PM rue_mohr: like D+7
08:05 PM rue_mohr: reads the value of D, does the calculation, and then writes the value of D back to D
08:07 PM rue_mohr: part of the reason it does it, is so that everything is the same process
08:10 PM Tom_L: ahhh much better..
08:11 PM Tom_L: i did another broach test yesterday
08:11 PM Tom_L: seems to do pretty good
08:11 PM rue_mohr: :)
08:11 PM rue_mohr: how much was it?
08:11 PM Tom_L: we don't wanna talk about that
08:11 PM Tom_L: https://hackaday.com/2018/02/25/casting-metal-parts-and-silicone-molds-from-3d-prints/
08:11 PM Tom_L: broaches aren't cheap
08:13 PM Tom_L: my bud has a set but they're inch and i'd still have to file it out to size from 3/16 to 5mm
08:14 PM Tom_L: and i didn't really wanna do that on this
08:16 PM Tom_L: i was also afraid if i used the mill to do it, i'd break the axis
08:17 PM Tom_L: i pushed it thru on the drill press and the table was bowing down a bit. that give you an idea of the force it takes
08:17 PM Tom_L: i may take it out to my buds to do the pullies since he's got a big press
08:17 PM Tom_L: it would be peanuts for it
08:21 PM Tom_L: https://www.ebay.com/itm/5mm-duMONT-Keyway-Broach-Series-B1-II-3-16-Wide-x-6-3-4-OAL/154080303404?hash=item23dfe6d92c:g:ToYAAOSwcqxfWOJL
08:21 PM Tom_L: a bit higher locally then you gotta buy the bushing which was ~$15
08:22 PM rue_mohr: I know they aren't cheap
08:22 PM Tom_L: he's got a full US set
08:23 PM Tom_L: i was gonna use a 3/16 but he'd have to turn down one of his bushings and i didn't want to do that
08:24 PM Tom_L: so you run it thru once then add the shim that comes with it and run it thru again for the full depth
08:25 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/rotary/Broach/Broach1.jpg
08:25 PM Tom_L: it's about 1/16 thick roughly
08:25 PM rue_mohr: grr, power bills are $200 ea
08:26 PM Tom_L: mine never get that high
08:26 PM Tom_L: maybe combined they would
08:26 PM Tom_L: when electric goes up, gas goes down etc
08:26 PM rue_mohr: your also paying in usd
08:26 PM rue_mohr: so maybe $133?
08:27 PM Tom_L: electric was 104 this time
08:27 PM Tom_L: gas was 40
08:28 PM Tom_L: built in the 30's so not that tight
08:28 PM rue_mohr: hmmm
08:30 PM Tom_L: if you lived here, you would be broke all the time
08:30 PM Tom_L: with all the resources here
08:31 PM Tom_L: do you have grainger up there?
08:32 PM Tom_L: big industrial supply
08:32 PM Tom_L: you need it, they got it or can get it
08:32 PM Tom_L: but they're higher
08:33 PM rue_mohr: no
08:34 PM rue_mohr: I almost have to describe a screwdriver to the hardware store to get one ordered in
08:35 PM rue_mohr: the faster store is awesome tho
08:35 PM rue_mohr: they had the key I needed for that drilll press
08:35 PM rue_mohr: they actually had an authentic jacobbs key
08:36 PM rue_mohr: good thing I knew tho, cause the key had NO information anywhere about being for that chuck
08:36 PM rue_mohr: to make it worse, they have two size 3 keys and there is *NO* information about the other one
08:37 PM rue_mohr: you would think a company that old would have their stuff togethor
08:42 PM Tom_L: there's fastenal here but i go to a local fastener guy that has about anything you want
08:42 PM Tom_L: ace would want $5 for a couple machine screws and i can get a box of 100 from him for the same
08:43 PM rue_mohr: I have a catalog here from a machine company back from like the 60's 70's
08:43 PM rue_mohr: its hard cover, they list the chuck I have in there
08:43 PM rue_mohr: its still a current product
08:44 PM Tom_L: jacobs has been around for years
08:45 PM rue_mohr: if this book is 75 (I'm guessing late)
08:46 PM rue_mohr: 45 conservitive,
08:46 PM rue_mohr: prolly 50 years
08:46 PM rue_mohr: and they do not have key information
08:46 PM rue_mohr: they acutaly dont in this catalog either
08:46 PM rue_mohr: they only list the price for the keys
09:01 PM rue_mohr: ok I pulled symantics on the library
09:01 PM rue_mohr: "if you ask to write to a variable, and that variable has the same value, then regardless of weather the variable is writable, the operation will be 'allowed'"
09:03 PM rue_mohr: so polprog its fixed
09:03 PM rue_mohr: and the libraries are all expanded
09:04 PM rue_mohr: we can do D|=0x80 now
09:05 PM rue_mohr: so the duct under the heat exchanger of the boiler may need to be replaced
09:05 PM rue_mohr: looks like its rotting out
09:05 PM rue_mohr: damn water
09:05 PM rue_mohr: that thing weights like 400lbs
09:06 PM rue_mohr: I wonder, actually, I thnk the gantry can pick it up full
09:07 PM rue_mohr: drat, the lift hooks are under the upper ducting
09:08 PM rue_mohr: and I dont think I built them to pick it up full
09:15 PM rue_mohr: for the math lib, it would be nice to implement fn's like sqrt() sin() cos() tan() rand()
09:29 PM Tom_L: https://www.fluesystems.com/shop/high-temperature-black-silicone-enviromgraf.html
09:29 PM Tom_L: https://www.dap.com/media/3578/high-heat-fire-resistant-mortar_tds_3619.pdf
09:47 PM rue_shop1: wait mortar
10:24 PM rue_mohr: test question: whats 1010010100100110101(base2) - 1010100111(base 2) in decimal?
10:24 PM rue_mohr: Rue adds them and submits the wrong answer
10:24 PM rue_mohr: DOH!
10:24 PM rue_mohr: there are two parts to a test
10:25 PM rue_mohr: a) being able to come up with the answer
10:25 PM rue_mohr: b) being able to do a test