• 0 Posts
  • 47 Comments
Joined 2 years ago
cake
Cake day: July 5th, 2023

help-circle



  • What’s the word? I started looking but realized I have better things to do. Before I stopped I did find “nips” and “chow”, both of which have completely unrelated, normal meanings. Hell, I didn’t even know “chow” could mean anything other than food until I read the definition in the dictionary file.

    There are several other racist, sexist, and generally rude words in there too. There is even a slur which has been used against me, and it’s defined as such (one meaning among many), but I say leave them. Well, maybe “cunt” could go without being missed.



  • I don’t think that even C++ is that bad. Like a lot of shows and music acts, I think it’s more the toxic fan base than the thing itself that really sucks. I’ve had the same feeling with a certain kind of JavaScript programmer.

    *Edit for clarity: I’m not saying that the entire C++ community is toxic, just a vocal segment of it, in line with the other examples I gave.

    The added difficulty with this in programming is that it can be much harder simply to ignore them, because you may be forced to work with them, or stuck needing to learn something from them (shudder).


  • Tail recursion in particular is usually just turned back into a loop at the compiler, and typical modern architectures implement a call stack at the hardware level, which allows you to do limited-depth recursion, but breaks like in OP if you try to go too deep.

    Yes, in my experience this is what the term “recursion” means in a programming context; it doesn’t usually refer to a mathematical ideal. That was what tripped me up.




  • Redkey@programming.devtoProgrammer Humor@programming.devNot incorrect.
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    1 month ago

    Sure, but as far as I’m aware, no other large group of LISP users exists. My contention isn’t that most AI researchers use LISP now, but that most LISP programmers are (were?) AI researchers.

    I’ve been trying to learn about early AI work, and I’m finding that to get any practical details you’re almost guaranteed to have to wade through LISP code, although at least it’s usually pretty well commented.



  • I use 10ten (previously Rikuchamp) for Japanese. I don’t think it does full translation, but it gives thorough dictionary lookups (from WWWJDIC) as mouseover tooltips. Very useful if you’re trying to learn the language, but maybe not so much if you just want to read stuff quickly. I think it’s now available for every major browser, but I mostly use it on FF.





  • 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.