@vaporeon_ today I wrote an AviSynth script and I spent several minutes trying to figure out what part of it was wrong, and turns out I was calling the wrong variable because I didn't name them distinctly enough

so remember when you were talking about variable names and I was all "nah I'm built different"?

haha yeah...

Follow

@The_T @vaporeon_ I once wrote a sorting algorithm with three variables named gorp, sorp, and norp and it was hell

@wallhackio @vaporeon_ the tldr of what I did wrong

I'm combining the videos of two people

The initial versions of the videos, I named B and CM

I didn't name the latter one C because I'm largely reusing a chunk of script, and in that one, both people had a name that started with C, so they were C and CM

When I got to the end, after making all the changes to CM, I called the final clip C

and then I stacked B and CM together

instead of B and C

and couldn't figure out why it was saying they didn't match in height

@wallhackio @vaporeon_ I think I could have called it CFinal, or even just re-assigned it to CM since I wasn't using CM anymore

@wallhackio @The_T My Mastodon client has this line of code:

/* Blorp should be long enough for either pointer or integer */
typedef unsigned long long blorp;

And the blorps are used throughtout the code!
I wasn't trying to give it a bad name, I just never came up with a good name, and blorp at least is memorable...

@wallhackio @The_T Yesterday, I finally did some work on my FORTH interpreter again, after many months of either lacking motivation or being busy

I needed to make the number-printing routine call the double-length division function instead of single-length division

I remembered that I had implemented double-length division (it's something that I had to implement myself because that computer doesn't have any division nor multiplication in hardware!), but hadn't integrated it with anything yet

BUT: past Vaporeon didn't document what arguments the double-length division takes on the stack and returns on the stack :blobfacepalm:

I really didn't want to try to figure out again what the most complicated part of my entire program does, so I decided to just try 123. 10 // and saw that it did the correct thing, but that was a stupid mistake to make, it costs nothing to leave a comment like / D1 N1 -- D1%N1 D1/N1 SMH

@vaporeon_ @wallhackio I literally have no idea how I would tell a computer to do division

@The_T @wallhackio It was quite frustrating to implement and it needs entire 61 instructions, so it wastes half a page of memory on a computer that only has 4096 words of memory...

I do wonder whether that's because I am a bad programmer or because it really can't be done better

@vaporeon_ @wallhackio semi-related but I love reading about, how programmers on early game consoles had to come up with tricks for how to do things with that old hardware.

Possibly not as old or limited as what you're working with?

@The_T @wallhackio Might be comparable TBH, I'm working on a minicomputer from the early 1970s that has 4096 words of memory, but I've heard that early microcomputers (so the sort of computer that people would actually play games on at home) also had memory that's measured in kilobytes
I don't know whether or not they have multiply/divide instructions, though, TBH I don't know a lot about early microcomputers, I like the BIG stuff (it's funny how a minicomputer is big by modern standards, it's the size of a cupboard) that you'd have in an office running UNIX or something like that

@vaporeon_ @wallhackio oh I was mostly thinking of, at earliest the NES, but especially the SNES and Genesis

which would be loads more powerful than than 1970s computers; they were limited in scope but they focused that scope intensely

but comparable PCs of the era were running Doom and even eventually Quake. (Which, Doom is kind of a masterpiece in doing way more with hardware than it's intended to do. So much math in that game to make it go.)

@vaporeon_ @wallhackio I always come back to this one article from a developer at Treasure, who made a bunch of amazing but not terribly well known games, talking about why they loved the Mega Drive (Genesis) more than the SNES. timeextension.com/features/gun

@vaporeon_ @The_T @wallhackio iirc the nes cpu was intentionally forced to drop certain math-related instructions since it was an unlicensed clone of another company's processor, and those instructions would've infringed on a patent! yeah, nintendo illegally copying stuff... :blobwhistle:

@vaporeon_ @The_T @wallhackio i looked it up, it's a clone of the 6502 and lacks (binary coded) decimal mode

@onfy @vaporeon_ @wallhackio instead of mocking Nintendo for doing illegal stuff, we should praise that kind of stuff as some of the few ethical things they've done

@The_T @vaporeon_ @wallhackio i am slightly fascinated at the obsession japan specifically seems to have over copyright and the contrast with many japanese companies being full of various types of infringement early on

@onfy @vaporeon_ @wallhackio I am way too tired and haven't eaten dinner (it's in the oven, so I did all the work already) but there is a LOT to talk about when it comes to Japan's cultural views on this kind of stuff and how much it differs from western culture

@The_T @vaporeon_ @wallhackio could probably write a book, but eat first! (not that i'll be here to read it soon)

@vaporeon_ @wallhackio unrelated note, but just because I just did this; when I need to test a section of a video to make sure it all looks right (rather than encoding the whole thing which takes hours and having an error be clear in the first 5 minutes of the video)

so, like, remember how most people who aren't programmers think "when will I ever use math in my daily life"

well at least I use basic math to go "ok let's try the first 30 minutes. 30 times 60 seconds times 60 frames per second" to get the number I need to clip

(when I was younger and doing this, we mostly did videos at 30 FPS, so I had to do times 30...)

...

I guess I also use math while cooking. Lots of fractions there, in American cooking. Even though I've found converting "cups of [ingredient]" (mass) to "grams" (weight) has yielded much more consistent cooking results...

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.