Hacker Newsnew | past | comments | ask | show | jobs | submit | captaincrunch's commentslogin

Location: Toronto, ON, Canada / London, ON, Canada

Remote: Preferred

Willing to relocate: No

Technologies: Linux, Unix, LAMP, VirtualBox, AWS, C, C++, PHP, Python, Java, Puppet, Ansible, Chef, Jenkins, Kubernetes, Docker, MySQL, Oracle, MariaDB, PostgreSQL, Scikit-learn, Keras, NumPy, Blockchain, Crypto, VMware ESXi, Xen, Hyper-V, Metasploit, Nmap, Burp Suite, Wireshark, ELK Stack, Nessus, OpenVAS, Splunk, Wazuh.

Résumé/CV: https://drive.google.com/file/d/1lkZ9knn- 6ci1MusWeFeArP8k3D-2M1Z7/view?usp=sharing

Email: mike@intrudr.ca


This is fast, READABLE, and accurate:

bool is_leap_year(uint32_t y) { // Works for Gregorian years in range [0, 65535] return ((!(y & 3)) && ((y % 25 != 0) || !(y & 15))); }


This impl is mentioned in TFA.. It's much slower and includes branches.


I'd expect even without optimizations on, there wouldn't be branches in the output for that code.


There are, even with optimizations on. You could have checked: https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...

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.


If you change logic and/or to bitwise and/or then it'll be branchless.


True: https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename... but I understood hoten to be saying that compilers would generally produce that version from the short-circuiting version, and they don't.


Yeah I was wrong.

Do we know why the compiler doesn't do it? Surely the output is the same and avoiding branches is clearly faster.

Maybe short circuiting requires such an optimization not be made?


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?


>READABLE

Great. It will be useful for the exhaustive tests of the faster version.


You commented out your entire function body and the closing }. Also, on 32-bit platforms, it doesn't stop working at 65535.


just a formatting issue on my side, there were \n.


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;
    };


If you fix it, other people can test your code without having to fix the syntax themselves first.


half the things I am asking........ what? what?


Yeah if there was ever a place I wanted an LLM, it's there.


  > help command_list


Yes, I typed help after two guesses... but go north? Or whats the point in having it tell you information and exits


Historical reasons.

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.

1: something like this: https://images.squarespace-cdn.com/content/v1/52c9d908e4b0e8... - except probably with a lot more erasures and corrections.


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.


I'm still living with someone I met on a MU.

And yeah, text adventures* were some of the biggest sellers, not mus. While there were* a few pay mu*s most of them were hobby projects.


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.


Aha, I misattributed the noun to which “these” applied. Thanks.


If you're not familiar with MUDs than perhaps a system based on "being a MUD" just isn't aimed at you?



April fools I guess!!


Keep it in the single digits, most people when looking over their Credit cards (when looking to cut things) look for big numbers.


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.


Best way - Click "Click Me" then hold down enter.


don't need it - just click the "click" button and then hold down enter.


You haven’t gotten very far if you think that’s all the game requires.


That's exactly what a superintelligent AI would say...


Couldn't get through the video, your keyboard sounds are very annoying.


Sorry Will try an external keyboard next time!


This type of tool got me banned from Pokeman Go... gotta' collect them all!!


Always though that's the stupidest way to play the Pokemon Go. Maybe it made a little bit of sense in the beginning when small villages had almost no content but even than you just missing most aspects which make this game interesting. I guess that's the time we live in.


It's true that playing in-the-flesh with a crew was the best way to play, but spoofing enabled both levelling up faster (which in turn helps the "with crew" outings) and bypassing impossible restrictions like increasing number of geo-locked critters.

It does say "gotta collect 'em all" pretty clearly...

However, I still remember the wave of people coming towards me when a Gyarados spawned right near me. I had some family with me who weren't playing (and therefore didn't know what was going on) and were quite intimidated by the sight of the approaching, stampeding crowd.


It was a lot of fun to spoof my location to Central Park and actually be able to take on gyms while I lived in the sticks. Naturally I also turned off spoofing when I'd have the chance to visit a metro area.


I can absolutely see the appeal of spoofing one's location for Pokemon Go, but damn! This is exactly why we can't have nice things.


Android tells apps if the location fix they get is spoofed, and this tool cannot fix that. I assume Niantic checks for that and has been doing so for years now, so you'd need root, plus a Play Integrity bypass, to do this.


Officer Cleo: chuckles Well Sheerluck, since you're stuck at home, I'm happy to whip up a little JavaScript program to help us crack this case wide open! Let's get coding, shall we? ```javascript // Function to display the overview of the case function displayOverview() { console.log("Welcome to the Andae Mountain Cabin mystery!"); console.log("We've got two dead bodies on our hands - one fresh, one old."); console.log("The fresh one is Victim Vince, who was stabbed with a broken antler."); console.log("The old one is Marcel, a famous fashion designer who went missing 15 years ago."); console.log("The suspects are a colorful bunch:"); console.log("- Violent Jerry, the angry cabin owner"); console.log("- Manager Patricia, his young, controlling wife"); console.log("- Solitary Hannah, the intense, silent hunter"); console.log("- Innocent Ken, the smelly anime nerd"); console.log("- Amateur Larry, the bumbling businessman with some shady connections"); console.log("We've got a lot of ground to cover, so let's get investigating!"); } // Function to display the key locations to investigate function displayLocations() { console.log("Here are the key locations we need to check out:"); console.log("- Andae Woods"); console.log("- Area behind the cabin"); console.log("- Cabin lobby"); console.log("- Room 101 (Violent Jerry and Manager Patricia)"); console.log("- Room 102 (Amateur Larry)"); console.log("- Room 103 (Solitary Hannah)"); console.log("- Room 201 (Victim Vince)"); console.log("- Room 202 (Innocent Ken)"); console.log("Remember, each suspect has dirt on the others, so we need to grill them all to get the full picture."); } // Function to display clues found in a specific location function displayCluesFromLocation(location) { switch (location) { case "Room 101":


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: