|
Boiled Water posted:today in terrible programming: my boss said to me: "hey boiled can we remove the square brackets from the json output? yeah the ones demarking arrays, our scandi customers are having trouble parsing them"
|
# ? Aug 15, 2018 11:49 |
|
|
# ? Oct 11, 2024 07:38 |
|
there's so many questions, like how is it harder to parse arrays than json objects
|
# ? Aug 15, 2018 12:00 |
|
ugh I just realised that this reporting component I rewrote has a) got out of hand and is probably at least as complex as what it replaces (though still better imho) and b) an assumption I made way back about the model structure is wrong and certain things I'm encountering now would be easier if I hadn't done that. now the question is do i: a) refactor b) brute force a solution and leave lots of comments saying "todo:sorry" c) drink
|
# ? Aug 15, 2018 12:12 |
Powerful Two-Hander posted:ugh I just realised that this reporting component I rewrote has a) got out of hand and is probably at least as complex as what it replaces (though still better imho) and b) an assumption I made way back about the model structure is wrong and certain things I'm encountering now would be easier if I hadn't done that. I vote both a) and c).
|
|
# ? Aug 15, 2018 12:16 |
|
Powerful Two-Hander posted:ugh I just realised that this reporting component I rewrote has a) got out of hand and is probably at least as complex as what it replaces (though still better imho) and b) an assumption I made way back about the model structure is wrong and certain things I'm encountering now would be easier if I hadn't done that. b+c always. Its a lifestyle choice
|
# ? Aug 15, 2018 12:16 |
|
Symbolic Butt posted:there's so many questions, like how is it harder to parse arrays than json objects oh my it got better. After making the change the franchise partners got back to a relations person (thankfully i don't have direct contact with anyone) and said "postman no work now, it says syntax error "
|
# ? Aug 15, 2018 13:49 |
|
people doing the emulator 101 thing: what's the ac flag in the condition codes? nm: auxiliary carry, apparently. also this manual is the best resource i've found: http://altairclone.com/downloads/manuals/8080%20Programmers%20Manual.pdf DONT THREAD ON ME fucked around with this message at 14:07 on Aug 15, 2018 |
# ? Aug 15, 2018 14:05 |
|
gonadic io posted:b+c always. Its a lifestyle choice also brute forcing a solution may lead you to a more optimal path to refactoring
|
# ? Aug 15, 2018 14:08 |
|
MALE SHOEGAZE posted:people doing the emulator 101 thing: what's the ac flag in the condition codes? I thought it stood for adjust carry
|
# ? Aug 15, 2018 14:11 |
|
MALE SHOEGAZE posted:people doing the emulator 101 thing: what's the ac flag in the condition codes? yeah, it's for doing bcd arithmetic (which was a thing people did back in those days, 'cos converting a binary number to decimal in order to display it is pretty expensive when you don't have a hardware divider)
|
# ? Aug 15, 2018 14:11 |
|
another emulator 101 question: has anyone tried integrating the diagnostic tool referenced here? http://www.emulator101.com/full-8080-emulation.html I'm not really sure what it's supposed to do, and I'm not sure if I'm on track with it or not. I'm running the bin file, and it's not quite what the author describes. The first instruction is not ORG 00100H, it's a JMP; it looks like the bin has been updated to work without needing to modify it but I'd imagine the author would have updated the tutorial were that the case. But it's possible they didn't, I've found a few other inconsistencies. So far I'm just hitting unimplemented opcodes which is expected, and I think I'm on track since it's not jumping into nonsense, but I'm not sure. I implemented the print code the author describes, but I don't really understand what it does. I assume it prints diagnostic information if an opcode isn't implemented correctly. DONT THREAD ON ME fucked around with this message at 14:27 on Aug 15, 2018 |
# ? Aug 15, 2018 14:24 |
|
That page is confusing because the author switches between talking about the ASM file and the BIN file a few times. The ORG 00100H instruction is in the ASM file and tells the assembler to offset the assembled BIN file by 0x100, presumably to leave room for CP/M subroutines like the one at 0x05 that prints stuff and one at 0x00 that exits the process. I haven't tried that diagnostic code yet, though, because I keep refactoring stuff so I can implement all these MOV instructions easier!
|
# ? Aug 15, 2018 15:12 |
|
What's a good random side project for RUST? I've been blanking on this for like 24 hours, now.
|
# ? Aug 15, 2018 15:13 |
|
I blanked on it for a year then saw an excuse to use it at work
|
# ? Aug 15, 2018 15:16 |
|
Bloody posted:I blanked on it for a year then saw an excuse to use it at work Hmm... maybe I should replace our python script that spins up infrastructure repos for drone with a RUST executable.
|
# ? Aug 15, 2018 15:18 |
|
gonadic io posted:b+c always. Its a lifestyle choice Symbolic Butt posted:also brute forcing a solution may lead you to a more optimal path to refactoring yeah i think it's gonna be b then c then a which means more testing but i can make somebody else do that also the problem is that I created the report object model as having a list of columns and a list of filters, where filters are applied to columns. really, i should have had the filters as being part of the column object but i didn't because not all columns have filters and in some cases we only want to render the filters for certain columns and then post this back as a list of filters, then for some reason instead of just mapping those filters back to the column model leaving some columns as unfiltered, i decided to treat it as a separate list entirely and i cant remember why. i mean, that same mapping between a filter and its related column object basically has to be done at some point regardless so this is probably just changing when its done, but it would be clearer from an object model point of view. Powerful Two-Hander fucked around with this message at 15:38 on Aug 15, 2018 |
# ? Aug 15, 2018 15:32 |
|
Finster Dexter posted:Hmm... maybe I should replace our python script that spins up infrastructure repos for drone with a RUST executable. that would be a fine use case for rust. I would focus on getting up to speed with how rust does error handling (Result, Try/?, Option, and monadic combinators), it should be helpful for your use case (and it's a place where rust really shines, but the language feels super awkward til you figure it out). CPColin posted:That page is confusing because the author switches between talking about the ASM file and the BIN file a few times. The ORG 00100H instruction is in the ASM file and tells the assembler to offset the assembled BIN file by 0x100, presumably to leave room for CP/M subroutines like the one at 0x05 that prints stuff and one at 0x00 that exits the process. that makes way more sense. DONT THREAD ON ME fucked around with this message at 15:37 on Aug 15, 2018 |
# ? Aug 15, 2018 15:33 |
|
ugh i just realised if i dont do this now then i can't do it later because the objects are gonna get serlialised and saved to a db, so if i change the object model i then have to parse the old model into the new one and it's bad enough that i already have to do that for converting from the current model where some genius decided that rather than store an actual list of selected options, they'd concatenate it all into a single string that I then have to decode.
Powerful Two-Hander fucked around with this message at 16:27 on Aug 15, 2018 |
# ? Aug 15, 2018 16:24 |
|
https://github.com/search?p=2&q=%3Awq&type=Commits
|
# ? Aug 15, 2018 16:50 |
|
|
# ? Aug 15, 2018 16:50 |
|
|
# ? Aug 15, 2018 16:53 |
|
i wanna write terrible programs for money that go fast and dont use a lot of ram is knowing only c decently employable or do the businessmen really mean c++ when they write "c/c++"
|
# ? Aug 15, 2018 17:04 |
|
lmao
|
# ? Aug 15, 2018 17:04 |
|
Triglav posted:i wanna write terrible programs for money that go fast and dont use a lot of ram businesses want agile, fast and cheap programs realistically you may want to look into embedded something
|
# ? Aug 15, 2018 17:18 |
|
|
# ? Aug 15, 2018 17:36 |
|
Triglav posted:is knowing only c decently employable extremely
|
# ? Aug 15, 2018 18:08 |
|
MALE SHOEGAZE posted:another emulator 101 question: has anyone tried integrating the diagnostic tool referenced here? actually it turned out the page is wrong. the bin file does not contain the ORG 00100H op, but the instructions are written as if it does. so you need to adjust the offsets accordingly if you want to skip the DAA tests. I'm not sure if you need to adjust the stack pointer as he says, I think it's correct without adjustment.
|
# ? Aug 15, 2018 18:36 |
|
MALE SHOEGAZE posted:actually it turned out the page is wrong. the bin file does not contain the ORG 00100H op, but the instructions are written as if it does. so you need to adjust the offsets accordingly if you want to skip the DAA tests. "ORG 00100H" is a directive to the assembler to put the first byte of code at 0x0100; it doesn't make it into cpudiag.bin and isn't an operation the CPU knows about. But you're right, the instruction to initialize the stack pointer does appear to be correct already: 000000a0 52 52 4f 52 20 45 58 49 54 3d 24 31 ad 07 e6 00 |RROR EXIT=$1....| Those three bytes translate to "LXI SP,#07ad", which is what the author says it should be. I don't know why the author's trying to set the byte at address 368 (or why they use decimal for that address only), but the non-offset equivalent at 0x0070 is already 0x07, so who knows what happened there. That's the 7 in this bit of cpudiag.asm: code:
|
# ? Aug 15, 2018 19:23 |
|
Triglav posted:i wanna write terrible programs for money that go fast and dont use a lot of ram I usually interpret "c/c++" as "c++ but used really badly in a c-like way"
|
# ? Aug 15, 2018 19:48 |
|
|
# ? Aug 15, 2018 20:44 |
|
https://github.com/search?q=dongs&type=Commits
|
# ? Aug 15, 2018 21:08 |
|
CPColin posted:"ORG 00100H" is a directive to the assembler to put the first byte of code at 0x0100; it doesn't make it into cpudiag.bin and isn't an operation the CPU knows about. But you're right, the instruction to initialize the stack pointer does appear to be correct already: oooh, so the problem is that all the branch targets are off because of the directive, so you need to shift everything down so that it starts at 0x100. which is what the author says, but i didn't get it. DONT THREAD ON ME fucked around with this message at 22:06 on Aug 15, 2018 |
# ? Aug 15, 2018 21:39 |
|
well, it runs (spot the mistakes) DONT THREAD ON ME fucked around with this message at 23:14 on Aug 15, 2018 |
# ? Aug 15, 2018 23:10 |
|
|
# ? Aug 16, 2018 01:39 |
|
MALE SHOEGAZE posted:(spot the mistakes) (I'm sorry, but if you're going to softball them in like this...)
|
# ? Aug 16, 2018 02:38 |
|
Peeny Cheez posted:
the mistake is u using amberpos wtf
|
# ? Aug 16, 2018 02:41 |
|
i do it to own the libs
|
# ? Aug 16, 2018 02:45 |
|
MALE SHOEGAZE posted:oooh, so the problem is that all the branch targets are off because of the directive, so you need to shift everything down so that it starts at 0x100. yeah that took me a while to figure out. its even more unclear when you get through that rom as it calls a BDOS function, which if not implemented will end up moving the PC to 0x0005 and moving forward with gibberish. ive been using this reference for cpm/bdos whenever things cross over to that side, a bunch of diagnostics end up needing at least the print functions. edit: right, thats the FOR_CPUDIAG ifdef on that same page you linked before. those print branches are BDOS functions 2 and 9 on the page i just linked.
|
# ? Aug 16, 2018 04:06 |
|
Illusive gently caress Man posted:I usually interpret "c/c++" as "c++ but used really badly in a c-like way" IME it is always this.
|
# ? Aug 16, 2018 08:27 |
|
|
# ? Oct 11, 2024 07:38 |
|
There is no good way to use c++, only less bad ways
|
# ? Aug 16, 2018 10:10 |