Brainfuck would like to have a word
post
I spent 4-6 hours the other day trying to figure out the equivalent of Hello World for a MediaWiki parser function extension.
In theory, they have a quick start guide, but that documentation has so many errors, and I spent ages jumping between PHP and a JSON configuration file I barely understood.
At least it's working now. Now time to figure out how the heck to properly interact with the MediaWiki database!
(Perhaps once I'm a bit more confident in MediaWiki development, I'll see if I can tidy up some that documentation.)
It looks like they're going for "machine code" being directly putting numbers in memory, but if you know what you're doing that's pretty much just assembly in an obscure op-code dialect.
That looked like machine code on a 8-bit micro, perhaps the Commodore 64 or VIC-20 (based on the screenshot and 40x20 text). So that would be the 6502. Child's play compared to what you'd need to do on a modern chip.
Child's play compared to what you'd need to do on a modern chip.
I don't think it's the chips, but the operating environments. Modern CPUs offer dozens of multipurpose registers and many more instructions and addressing modes compared to those old, low-cost CPUs, which should make things easier, not harder. But no-one's building old-style dedicated systems around modern CPUs; our code now has to play nice with firmware, OS, libraries, and other processes, including resource management and preempting.
Compare a single-gear go-kart to an automatic sedan. Getting top performance out of the go-kart on a closed track is difficult and requires nuance. If we could drive the automatic sedan around the same closed track, we could easily demolish the go-kart, and not just with raw engine power. The improved acceleration, braking assist, and power steering are enough. But when we drive the sedan we're usually doing it on public roads with traffic signals, intersections, speed limits, and other road users. That's what's more difficult.
It's the machine language monitor on the 40-column screen of the Commodore 128 (or, more likely, an emulator of the same). I had a whole part about that, BASIC DATA statements full of numbers, and about how anyone with any sense actually used an assembler even back then in an original draft of my comment, but decided to keep it brief.
BASIC DATA statement? Wow you were so lucky. On my ZX81 we had to enter them as characters in a REM statement that was the first line of code so we knew their address so that we could execute it. Address Space Layout Randomization? Couldn't work on the ZX81!
Well assembly helps out a lot, like with jumps and mnemonics and more. Machine code is brutal.
If you are programming on a computer and not punching holes in paper you are just a little bitch script kiddy.
https://en.m.wikipedia.org/wiki/Computer_programming_in_the_punched_card_era
+++++++++++[>++++++>+++++++++>++++++++>++++>+++>+<<<<<<-]>+++
+++.>++.+++++++..+++.>>.>-.<<-.<.+++.------.--------.>>>+.>-.
all 3 comments