I am capable of coding (25 years+) but just started playing with Claude Code, its actually pretty good. I have all the data in the DB (AI generated data)
I didn't find any way to get a compiler to generate a branchless version. I tried clang and GCC, both for amd64, with -O0, -O5, -Os, and for clang, -Oz.
There are cases where the optimization wouldn't be safe (like i < n && a[i] != k) but this is not one of them. Maybe the compiler is just dum. Or maybe avoiding branches is not clearly faster in cases like this? Have you measured this particular case?
This website eats newlines, unless you double them (one of the annoying features of markdown).
You can use codeblocks by putting 4 spaces before each line:
int main() {
// this should be properly formatted
return 0;
};
This is a MUD, which stands for "multiple user dungeon"; what's more useful is that it's based on a form of game called a "text adventure". Once upon a time back in the eighties these were some of the biggest sellers of the game industry! They would present a small world to explore, often a mostly-abandoned one because that's easier to do. You'd wander around, map the world (usually on paper, by hand! [1]), and discover creatures, characters, and items sitting around it, waiting for you to interact with them.
A lot of them were in the form of exploring some kind of dungeon; D&D was popular among nerds, and "what if the computer did all the record-keeping" was a popular thing to explore. Which explains why this is a "multiple-user dungeon" even if nothing in it is described as dank, underground rooms full of monsters and treasures.
Directions are given as compass directions because that's the very first text adventure did ("Colossal Caves"), and nobody ever found anything better - a few games tried forwards/left/right/back but it was very confusing to keep track of which way you were pointing.
In practice a lot of muds really ended up more like chat servers with a sense of place; instead of being in a "channel" with other people, you're in a "room", which might have a "bulletin board" on it for less-ephemeral discussions than the general chatter among players. There might be monsters to fight and puzzles to solve somewhere off in the map but nobody engaged with them. Instead they just hang out and chat, and roleplay.
I learned how to program in MUDs, made friends (including my first girlfriend, online dating was very different 35 years ago), and (mostly) had a great time. The death threats weren’t much fun, especially since he lived 2 hours from me.
I am curious about your “biggest sellers” comment. What was sold, and by whom?
MUDs were fun because, as a kid who read various magical fantasy series, there would inevitably be a server that was spun up attempting to recreate the world and magic system. Because it was just text, it made it far easier to do fan works like that. It's something kids today probably can't imagine. Really enjoy Twilight? You can join as server and make a character who's a [N]ormal Teenager, [W]erewolf boy, [C]enturies-old Sparkling Vampire. And you'd have a whole list of skills and progression for 100 levels. Wheel of Time had several different competing codebases with differing versions of channeling.
It was an entertaining way to learn C as a kid, and programming new weird spells made one feel like an actual wizard.
I think there's still some space for MUDs in the world. You could build a programming/literacy class around just teaching kids how to navigate and interact within that world, how to be a god/mod/admin within the world using its tools, and how to modify it and compile it with their desired changes.
My guess would be Zork and the other Infocom games which at the time were huge because they could be played on the very limited PC's of the 80's and were top 10 selling games. Myst is basically a graphical "text style" adventure that was huge in the 90's and drove lots of CD-ROM sales and was a top seller for like a decade.
Hm. Yeah, sounds good for retention. I mostly struggle with the initial pricing now though.. someone suggested a lower number like $4.99 as initial offering and then once it ramps up, to do small jumps until even maybe $9.99.
reply