• 0 Posts
  • 48 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle

  • The morality system was a huge disappointment for me. You said most of what I wanted to say, so I’ll be brief.

    Right near the start of the game, an NPC outlines the Way of the Open Palm vs. the Way of the Closed Fist, more or less the same way you described them. And I was so excited to see a morality system in which both sides were morally defensible positions. But from the very first Closed Fist follower you meet (just minutes later), they may as well all be monacle-wearing moustache-twirlers who punctuate every sentence with “mwah-ha-ha!”

    The worst example that I remember is a bootlegger who’s essentially holding a town hostage. Far from following either philosophy as described, he’s just plain evil, and in fact I easily came up with (IMO solid) arguments for actually swapping the game’s morality labels on the player’s options. But no, one option is clearly “evil”, so that’s Closed Palm, while the other is obviously “good”, hence Open Palm.


  • Whoops! When I looked at the second time that the shift value is calculated, I wondered if it would be inverted from the first time, but for some reason I decided that it wouldn’t be. But looking at it again it’s clear now that (1 - i) = (-i + 1) = ((~i + 1) + 1), making bit 0 the inverse. Then I wondered why there wasn’t more corruption and realized that the author’s compiler must perform postfix increments and decrements immediately after the variable is used, so the initial shift is also inverted. That’s why the character pairs are flipped, but they still decode correctly otherwise. I hope this version works better:

    long main () {
        char output;
        unsigned char shift;
        long temp;
        
        if (i < 152) {
            shift = (~i & 1) * 7;
            temp = b[i >> 1] >> shift;
            i++;
            output = (char)(64 & temp);
            output += (char)((n >> (temp & 63)) & main());
            printf("%c", output);
        }
    
        return 63;
    }
    

    EDIT: I just got a chance to compile it and it does work.


  • I first learned about Java in the late 90s and it sounded fantastic. “Write once, run anywhere!” Great!

    After I got past “Hello world!” and other simple text output tutorials, things took a turn for the worse. It seemed like if you wanted to do just about anything beyond producing text output with compile-time data (e.g. graphics, sound, file access), you needed to figure out what platform and which edition/version of Java your program was being run on, so you could import the right libraries and call the right functions with the right parameters. I guess that technically this was still “write once, run anywhere”.

    After that, I learned just enough Java to squeak past a university project that required it, then promptly forgot all of it.

    I feel like Sun was trying to hit multiple moving targets at the same time, and failing to land a solid hit on any of them. They were laser-focused on portable binaries, but without standardized storage or multimedia APIs at a time when even low-powered devices were starting to come with those capabilities. I presume that things are better now, but I’ve never been tempted to have another look. Even just trying to get my machines set up to run other people’s Java programs has been enough to keep me away.




  • It’s not a really big thing, but it is a pet peeve of mine (and some others); the name of the series isn’t “Dues Ex” but “Deus Ex” (day-us ex), as in “deus ex machina” (day-us ex mack-in-a).

    “Deus ex machina” literally translates as “God from (the) machine”, and originally referred to a type of stage prop used in ancient plays, then in more modern times the term came to refer more generally to the sort of plot device that used that prop, which is a previously unmentioned person or thing that suddenly appears to save the heroes from an otherwise inescapable threat. At some time in the 60s or 70s it started to become popular to use it in a more literal sense in sci-fi stories about machine intelligence or cyborgs.





  • Did you read all the way to the end of the article? I did.

    At the very bottom of the piece, I found that the author had already expressed what I wanted to say quite well:

    In my humble opinion, here’s the key takeaway: just write your own fucking constructors! You see all that nonsense? Almost completely avoidable if you had just written your own fucking constructors. Don’t let the compiler figure it out for you. You’re the one in control here.

    The joke here isn’t C++. The joke is people who expect C++ to be as warm, fuzzy, and forgiving as JavaScript.






  • That was my first take as well, coming back to C++ in recent years after a long hiatus. But once I really got into it I realized that those pointer types still exist (conceptually) in C, but they’re undeclared and mostly unmanaged by the compiler. The little bit of automagic management that does happen is hidden from the programmer.

    I feel like most of the complex overhead in modern C++ is actually just explaining in extra detail about what you think is happening. Where a C compiler would make your code work in any way possible, which may or may not be what you intended, a C++ compiler will kick out errors and let you know where you got it wrong. I think it may be a bit like JavaScript vs TypeScript: the issues were always there, we just introduced mechanisms to point them out.

    You’re also mostly free to use those C-style pointers in C++. It’s just generally considered bad practice.



  • As someone who has often been asked for help or advice by other programmers, I know with 100% certainty that I went to university and worked professionally with people who did this, for real.

    “Hey, can you take a look at my code and help me find this bug?”
    (Finding a chunk of code that has a sudden style-shift) “What is this section doing?”
    “Oh that’s doing XYZ.”
    “How does it work?”
    “It calculates XYZ and (does whatever with the result).”
    (Continuing to read and seeing that it actually doesn’t appear to do that) “Yes, but how is it calculating XYZ?”
    “I’m not 100% sure. I found it in the textbook/this ‘teach yourself’ book/on the PQR website.”



  • Back in the olden days, when we used kerosene-powered computers and it took a three day round trip to get IP packets via the local stagecoach mail delivery, we still had games even though Steam didn’t exist yet. :b

    We used to transfer software on these things called disks. Some of them were magnetic, and some of them used lasers (you could tell them apart because for the laser ones it was usually spelled “disc” with a “c”).

    Anyway, those dis(k/c)s mostly still work, and we still have working drives that can read them, and because the brilliant idea of making software contact the publisher to ask if it was OK to run had only just been invented, we can generally still play games from the period that way. Some people kept their old games, but others sell them secondhand, which I believe the publishers still haven’t managed to lobby successfully to be made illegal, unless I missed a news report.

    Even if you can’t get the original physical media for a game, sites like GOG sell legal digital downloads of many old games, which are almost always just the actual old software wrapped in a compatibility layer of some kind that is easy to remove, so you can usually get the games running natively on period hardware/software. Finally, some nicer developers and publishers have officially declared some of their old games as free for everyone to play.

    There are still legal options for playing old games on old systems.