I just completed "Space Image Format" - Day 8 - Advent of Code 2019 #AdventOfCode #AdventOfCode2019 https://adventofcode.com/2019/day/8
@JJFlash day_9.... In the can!
@Absinthe Yeeeeah! Same for me! Went to bed late again, but it's okay! 😁 Had to refactor the VM, and that damned relative mode...! But in the end I solved that in a decent way, I think...
Now to understand Day 10... 😳
@JJFlash I was working so late I had a == instead of = in my relative mode code for 2 hours. I am not 100% happy with the code now. I am passing a lot of things in and out that would be better off in a class or globalized or something. But for now it works. I saw what the next one is, and I am not ready what that is going to take. But I am trying to shift my sleep cycle for the time zone changes so we'll see if I get to do another one or not
@Absinthe = and == is one of the things that Freebasic/Quickbasic doesn't have, the assignment or compare operator is derived from context. I know that == has its advantages in other languages, but I still see it mainly as a nuisance 🙂
If it can be of any inspiration to improve your code, this is mine: https://github.com/JJFlash-IT/Advent_of_code/blob/master/2019/01-09/Day09.bas
I feel the way I handled the various parameter modes to be a decent compromise; I'm self-taught so I'm not that sure, and I surely don't want to brag 😁
@Absinthe I was working on it on late hours as well, so maybe I understand what you mean... It's the desire to see it working NOW that tricks us into working tired and risking introducing bugs (it also happened to me) 🙂
Today's puzzle is still over my head, I think I'll skip it for now, or maybe I'll spoil it by looking for clues on Reddit, I don't know...
I should be happy that I managed to stay "synced" with the puzzles all these days, in the other editions I did worse...
@JJFlash funny thing, when I do C/C++ or other curly brace languages I usually put the literal on the left of the == so to say
if (0 == var )
But if you do that in Python the linters complain. Of course, that doesn't help with = ...
The new one, confuses me a little with what they are describing, and reading the examples didn't come up with the numbers in my mind that they were saying. I will have to read it more carefully while I am actually awake :)
@Absinthe "if (0 == var )" nice trick to intercept a single = put by mistake! Interesting!
I also learned what a linter is just now 😀 I don't see why it should complain, the order in which one specifies constants and variables in a compare expression shouldn't matter...
Day 10: I also couldn't figure out anything by looking at the examples, especially the one with the capital and lowercase letters... And also: should I use some form of pathfinding or not? 🤷♂️
@Absinthe I see! 😃 I'm starting now on Day 9, maybe you can start on it too? 😁