#garfield Logs

Oct 31 2020

#garfield Calendar

03:07 AM rue_mohr: -not- is such a different operation its breaking things at all levels
03:14 AM rue_mohr: I'm trying to avoid adding exceptions for it at every level
03:14 AM rue_mohr: I might need to change my "operator identifier" code to be a state machine
03:14 AM rue_mohr: else if(!strcmp(in, "=")) *out = IS;
03:14 AM rue_mohr: else if(!strcmp(in, "==")) *out = EQ;
03:14 AM rue_mohr: else if(!strcmp(in, "!=")) *out = NE;
03:14 AM rue_mohr: else if(!strcmp(in, ">")) *out = GT;
03:14 AM rue_mohr: else if(!strcmp(in, ">=")) *out = GTRE;
03:14 AM rue_mohr: else if(!strcmp(in, "<")) *out = LE;
03:14 AM rue_mohr: else if(!strcmp(in, "<=")) *out = LERE;
03:14 AM rue_mohr: else if(!strcmp(in, "&&")) *out = AND;
03:14 AM rue_mohr: else if(!strcmp(in, "||")) *out = OR;
03:14 AM rue_mohr: else if(!strcmp(in, "^=")) *out = EQXOR;
03:14 AM rue_mohr: else if(!strcmp(in, "&=")) *out = EQAND;
03:14 AM rue_mohr: else if(!strcmp(in, "|=")) *out = EQOR;
03:14 AM rue_mohr: else if(!strcmp(in, ">>=")) *out = EQSHR;
03:14 AM rue_mohr: else if(!strcmp(in, "<<=")) *out = EQSHL;
03:14 AM rue_mohr: else if(!strcmp(in, "+=")) *out = EQADD;
03:14 AM rue_mohr: else if(!strcmp(in, "-=")) *out = EQSUB;
03:14 AM rue_mohr: else if(!strcmp(in, "*=")) *out = EQMUL;
03:14 AM rue_mohr: else if(!strcmp(in, "/=")) *out = EQDIV;
03:14 AM rue_mohr: else if(!strcmp(in, "%=")) *out = EQMOD;
03:14 AM rue_mohr: else if(!strcmp(in, "+")) *out = ADD;
03:14 AM rue_mohr: else if(!strcmp(in, "^")) *out = XOR;
03:14 AM rue_mohr: else if(!strcmp(in, "-")) *out = SUB;
03:14 AM rue_mohr: else if(!strcmp(in, "|")) *out = BOR;
03:14 AM rue_mohr: else if(!strcmp(in, "&")) *out = BAND;
03:14 AM rue_mohr: else if(!strcmp(in, "*")) *out = MUL;
03:14 AM rue_mohr: else if(!strcmp(in, "/")) *out = DIV;
03:14 AM rue_mohr: else if(!strcmp(in, "%")) *out = MODU;
03:14 AM rue_mohr: else if(!strcmp(in, ">>")) *out = SHIFTR;
03:14 AM rue_mohr: else if(!strcmp(in, "<<")) *out = SHIFTL;
03:14 AM rue_mohr: else if(!strcmp(in, "**")) *out = POW;
03:14 AM rue_mohr: else if(!strcmp(in, "!")) *out = NOT;
03:14 AM rue_mohr: in the beggining there were only 9 supported operations
03:15 AM rue_mohr: calc -5
03:15 AM rue_mohr: Unable to perform calculation, -5 -->> 42
03:16 AM rue_mohr: yea
03:16 AM rue_mohr: hmm
03:16 AM rue_mohr: maybe I need to fix this in the same swoop
03:19 AM rue_mohr: ./eq 'B(B=5)'
03:19 AM rue_mohr: B
03:19 AM rue_mohr: EXTREME WARNING, Functions not supported yet.
03:19 AM rue_mohr: B(B=5) -->> 42
03:19 AM rue_mohr: that is an issue too
03:21 AM rue_mohr: I wonder if I should do more of the work in the post-correction code
03:21 AM rue_mohr: right now, to catch functions, I look for a "variable" followed by a (
03:22 AM rue_mohr: if I find that, I re-arrange it, and re-label the var as a function name
03:24 AM rue_mohr: I swear I'v nodded on more times infront of this code...
08:25 AM aandrew: good god, what are you doing rue?
08:26 AM aandrew: why not parse the incoming text as a stream rather than trying to strcmp it
08:27 AM aandrew: then your state machine can easily handle multiple operators
08:28 AM aandrew: stupid example: your current state is READ_OP_OR_VAL. you read in a space. this is a NOP so you're still in the same state
08:28 AM aandrew: you read again and it's a > this time. now you're in BUILD_OP with the "op string" being ">"
08:29 AM aandrew: you read again, it's a >. you're still in BUILD_OP and hte "op string" is ">>" now
08:30 AM aandrew: read again, and it's a space. now you look at the "op string" with that gigantic strcmp() monstrosity, set last_token to OP and jump back to READ_OP_OR_VAL
08:31 AM aandrew: but let's say it wasn't a space, it was a "B". you do the same thing as last time , but now you set the "op string" to "B" and move to READ_VAL
08:31 AM aandrew: etc etc
09:26 AM polprog: https://pbs.twimg.com/media/ElqMU3lWMAILT-u?format=jpg&name=medium
02:22 PM rue_mohr: cant quite, its not predictable like that
02:24 PM rue_mohr: hmm wait let me think on that
02:50 PM rue_mohr: states_t state = ERR;
02:50 PM rue_mohr: eqNode_t * iter;
02:50 PM rue_mohr:
02:50 PM rue_mohr: while( *e ) {
02:50 PM rue_mohr: // seperate components
02:50 PM rue_mohr: getClassChunk( &e, &chunk, &state);
02:50 PM rue_mohr: if (state != WHITE) eqLL_Append(this, state, chunk, NULL);
02:50 PM rue_mohr: free(chunk);
02:50 PM rue_mohr: }
02:50 PM rue_mohr: is how it works
02:50 PM rue_mohr: but
02:51 PM rue_mohr: it cant look back
02:51 PM rue_mohr: beginning = *end;
02:51 PM rue_mohr: getClass( state, **end);
02:51 PM rue_mohr:
02:51 PM rue_mohr: switch(*state) {
02:51 PM rue_mohr: case CONST: while(is_constc(**end)) (*end)++; break;
02:51 PM rue_mohr: case VAR: while(is_var(**end)) (*end)++; break;
02:51 PM rue_mohr: case OPER: while(is_op(**end)) (*end)++; break;
02:51 PM rue_mohr: case WHITE: while(is_white(**end)) (*end)++; break;
02:51 PM rue_mohr: case PAREN: while(is_paren(**end)) (*end)++; break; // actually we want to break after each one.
02:51 PM rue_mohr: case ERR: (*end)++; break;
02:51 PM rue_mohr: }
02:52 PM Tom_L: wait... what???
02:52 PM Tom_L: this is Saturday....
02:52 PM Tom_L: then
02:52 PM rue_mohr: the code for parsing equations
02:52 PM rue_mohr: sunday today
02:52 PM Tom_L: why the fuck was i workin!??
02:52 PM rue_mohr: no sat
02:52 PM rue_mohr: Tom_L, extra marks?
02:53 PM Tom_L: no tomorrow is christmas
02:53 PM rue_mohr: is it easter yet?
02:53 PM rue_mohr: where did easter go
02:53 PM Tom_L: we skipped it
02:53 PM Tom_L: iirc it went from March to December
02:54 PM Tom_L: err november
02:54 PM Tom_L: one of the 'er's
03:09 PM rue_mohr: ok I'm awake, what do I work on first...
03:10 PM rue_mohr: oh yea, the power board for my power supply
03:11 PM rue_mohr: polprog, you must be awake
03:12 PM rue_mohr: aandrew, your suggestion would also fix the problem of thinking variables are functions
03:12 PM rue_mohr: there are a few thin grey lines
05:36 PM MoonyMoon: https://ia800707.us.archive.org/22/items/6502_Mostek/6502_Mostek.pdf
05:53 PM MoonyMoon: rue_bed: rue_mohr: rue_shop2: !
05:56 PM Tom_L: sry he's rue_shop1 now
05:57 PM rue_mohr: MoonyMoon,
06:07 PM MoonyMoon: hey
06:08 PM rue_mohr: well this has some good detail
06:08 PM rue_mohr: its funny they still dont say how the inside of the clock circuit works
06:08 PM MoonyMoon: I bet
06:09 PM polprog: https://www.youtube.com/watch?v=Q_BlCBEUKRo
06:09 PM MoonyMoon: remind me where in memory the interupt vector table is on the 6502?
06:10 PM rue_mohr: the top FFFF
06:10 PM MoonyMoon: oh right the bottum ;)
06:11 PM polprog: depends which way you install it..
06:11 PM MoonyMoon: HA, no doubt XD
06:11 PM rue_mohr: polprog, so, the new code doesn't do boolean alg nicely yet
06:11 PM rue_mohr: I'm working on it,
06:11 PM rue_mohr: but it will do a better job reporting errors
06:12 PM polprog: are you patching the existing one or rewriting some stuff
06:12 PM rue_mohr: the read-only variable thing is fixed (bit of a band-aid)
06:12 PM rue_mohr: That new file has mods to eq5 and ops
06:24 PM MoonyMoon: Whats the scoop on the 'zero page'??
06:27 PM rue_mohr: ... 8 bit addressable
06:31 PM rue_shop1: polprog, I'm totally tempted to change the datasheet lookup to green text on a black background
06:32 PM polprog: goood... good
06:32 PM polprog: ;)
06:37 PM polprog: https://3.bp.blogspot.com/_0Gj4hQxJVrc/TKMptVKDuHI/AAAAAAAAABk/cVGcDQjMBsU/s1600/myfirst+login.bmp
06:37 PM polprog: have some inspiration ;)
06:52 PM polprog: hmm, rue_shop1 got the new gallery script?
06:55 PM MoonyMoon: oh ok cool
07:01 PM polprog: ok, got it
07:46 PM polprog: https://polprog.net/rozne1/ircjunk/jvc_mixer/slide.html
07:47 PM rue_mohr: yea the max_ tags
07:49 PM polprog: ok. ill have to tackle it later
07:49 PM polprog: when/if i move that to the front page
07:50 PM polprog: i like the ircjunk idea, its like a store backroom
07:50 PM rue_mohr: :)
07:50 PM rue_mohr: I kept it with the tilda, incase I need to move it back to another server
07:50 PM polprog: yeah, i decided to hide it a bit more
07:50 PM polprog: :)
07:51 PM polprog: try visiting https://polprog.net/rozne1
07:51 PM rue_mohr: hah nice
07:51 PM rue_mohr: I wonder what causet he pcbs to crack
07:52 PM rue_mohr: I should probably have some halowen candy
07:52 PM rue_mohr: oooh
07:52 PM rue_mohr: suggestion,
07:52 PM rue_mohr: the text thing in the slideshow
07:52 PM polprog: :)
07:52 PM rue_mohr: set it up to take html
07:52 PM polprog: i bet someone just abused it
07:52 PM rue_mohr: then you can throw in whatever formatting you want
07:53 PM polprog: it takes html that was typed into the slider
07:53 PM rue_mohr: ok
07:53 PM polprog: i had to add another div to make it smaller and red
07:53 PM rue_mohr: I dont recall, but mine doesn't do html right, just text
07:53 PM polprog: oterhwise its huge and violetish
07:54 PM polprog: take a look into the source
07:54 PM polprog: i have to go
07:54 PM polprog: goodnight
07:54 PM rue_mohr: gnight
07:54 PM rue_mohr: I should convert myself into a robot asap so I have time to play with all the things
07:55 PM rue_mohr: sooner than later
08:36 PM X704 is now known as tiwake
11:34 PM rue_shop1: polprog, so I'v tried alldatasheet a few times when digchip let me down, not ONCE have they come thru
11:34 PM rue_shop1: so far their like 0/4000 with me
11:44 PM Tom_L: u get an extra hr to play tonight
11:50 PM rue_shop1: oh no, somewhere a clock will be wrong