• 1 Post
  • 313 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle
  • The thing about the MPW Shell is it was sort of the only game in town if you actually wanted a command line with the classic Mac OS. (There’s an awesome little emulator called SheepShaver if you ever want to explore it btw.) Well, I suppose there was A/UX. I thought it was a miracle when that came out. You have to realize in those early days a good chunk of the operating system itself was actually baked in to ROM. (You had to do desperate things to squeeze a GUI out of such limited resources as existed back then!) So to this day I have no idea how they managed to spin off a 'nix despite that.

    Anyways. I wonder, if you made some sort of template format today, to what extent you could write some sort of conversion tool that would scrape a man page or whatever to rough it in and then you could tweak it to get what you want? man pages aren’t super standardized in their format I guess, so it’s probably more trouble than it’s worth. I like to use Python’s argparse when rolling out scripts myself, and its --help format is pretty rigid given that it’s algorithmically generated. Might be more plausible with something like that? I had a quick look just now to see if you can drill down into the argparse.ArgumentParser class itself to pull out the info more directly, but it seems a rather opaque thing that doesn’t expose public APIs for that. Oh well…


  • This reminds me of something from my ancient past. Back in the early-ish days of Apple, there was a development system called MPW (Macintosh Programmer’s Workshop) which included its own little kludgy shell.

    The weird thing about it though was while you could enter commands on the command line like in any shell, you could prefix them with the word commando (presumably a portmanteau of “command” and “window”) and this window would pop up showing various buttons, checkboxes, etc. correponding to command line options. When you ok’d the window, it would generate the command line for you.

    I’m rather hazy about how all this worked, but I think there was some sort of template language to define the window layout if you wanted to add commando support for your own tool? And presumeably, as you say, you could restrict what’s possible with the window interface as you deemed fit?



  • You can always combine integer operations in smaller chunks to simulate something that’s too big to fit in a register. Python even does this transparently for you, so your integers can be as big as you want.

    The fundamental problem that led to requiring 64-bit was when we needed to start addressing more than 4 GB of RAM. It’s kind of similar to the problem of the Internet, where 4 billion unique IP addresses falls rather short of what we need. IPv6 has a host of improvements, but the massively improved address space is what gets talked about the most since that’s what is desperately needed.

    Going back to RAM though, it’s sort of interesting that at the lowest levels of accessing memory, it is done in chunks that are larger than 8 bits, and that’s been the case for a long time now. CPUs have to provide the illusion that an 8-bit byte is the smallest addressible unit of memory since software would break badly were this not the case, but it’s somewhat amusing to me that we still shouldn’t really need more than 32 bits to address RAM at the lowest levels even with the 16 GB I have in my laptop right now. I’ve worked with 32-bit microcontrollers where the byte size is > 8 bits, and yeah, you can have plenty of addressible memory in there if you wanted.






  • I started in C and switch to C++. It’s easy to think that the latter sort of picked up where the former left off, and that since the advent of C++11, it’s unfathomably further ahead. But C continues to develop and occasionally gets some new feature of its own. One example I can think of is the restrict key word that allows for certain optimizations. Afaik it’s not included in the C++ standard to date, though most compilers support it some non-standard way because of its usefulness. (With Rust, the language design itself obviates the need for such a key word, which is pretty cool.)

    Another feature added to C was the ability to initialize a struct with something like FooBar fb = {.foo=1, .bar=2};. I’ve seen modern C code that gives you something close to key word args like in Python using structs. As of C++20, they sort of added this but with the restriction that the named fields have to come in the same order as they were originally defined in the struct, which is a bit annoying.

    Over all though, C++ is way ahead of C in almost every respect.

    If you want to see something really trippy, though, have a look at all the crazy stuff that’s happened to FORTRAN. Yes, it’s still around and had a major revision in 2018.


  • Many renewables are stuck in the “interconnection queue,” a long line of projects waiting to get connected to the grid. According to Lawrence Berkeley National Laboratory, more than 1,500 gigawatts of power, mostly renewables, are waiting for approval to connect. (That’s more than one-third of all the power produced in the United States.)

    That is really unfortunate. I’m in Canada, but it wouldn’t surprise me if we are in the same boat. Where I live, there is a lot of wind and solar going in, but my understanding is that this is in part because it’s one of the rare areas with an under-capacity grid that is not too far from several major urban centres.

    And you can see how important the grid layout is in that solar farms are popping up mostly along large transmission corridors, presumably to allow for easier connection. This is less evident with wind, since geography plays a bigger role in where you want to put a wind farm for optimal results.

    It makes me speculate that renewables like wind and hydroelectric (including pumped hydro storage) which are less negotiable in terms of location compared to solar are more likely to be waiting a long time on this interconnection queue? I don’t know if that is actually the case though.




  • If I were chronically sad in the evenings, I would actually bring it up with the doctor. I wouldn’t make a special appointment for it necessarily unless its progressing towards suicidal thoughts or something, but during a regular visit I would bring it up. I’m no stranger to mood disorders, and frankly, I wish I had approached a professional sooner about it. Would have saved a lot of grief not just for me but for family members who also suffered through my episodes.

    For something that seems too minor for a doctor visit, I would suggest speaking to a pharmacist. They are readily available without appointment or long waits, and have an encyclopedic knowledge of all sorts of over-the-counter remedies that are backed up by an advanced degree in medicine. Definitely an underutilized resource. Of course they may well suggest you talk to a doctor, but in my experience at least, they give thoughtful consideration to what you have to say and make such a recommendation not out of some lazy buck-passing but rather a genuine concern for your condition. So you would do well to heed their advice, whatever it might be.



  • I’m with you on this one. There are lyrics on almost every single track for crying out loud. Throw us instrumental lovers a bone won’t you? Songs that are lyrically driven but are otherwise super-repetitive instrumentally tend to put me to sleep.

    What I love about concerts is when the band goes off script and just starts jamming. Even a 5-minute drum solo will have me grinning ear to ear, and that’s what I’ll be remembering on the way home.


  • I think I could get very nervous coding for the military, depending on what sort of application I was working on. If it were some sort of administrative database, that doesn’t sound so bad. If it were a missile guidance system, on man! A single bug and there goes a village full of civilians. Even something without direct human casualties could be nerve-wracking. Like if it were your code which bricked a billion-dollar military satellite.

    Speaking of missile guidance systems, I once met someone who worked a stint for a military contractor. He told me a story about a junior dev who discovered an egregious memory leak in a cruise missile’s software. The senior dev then told him “Yeah, I know about that one. But the memory leak would take an hour before it brings the system down and the missile’s maximum flight time is less than that, so no problem!” I think coding like that would just drive me into some OCD hell.




  • In terms of consoles, I got the most enjoyment out of Super Nintendo. I think that’s in part because my kids were still young at the time and we played a lot of coop mode games on it before they got older and their tastes started diverging from mine.

    It was the golden age of platformers I guess, and the focus was still solidly on game mechanics over production. I especially liked Bomberman. The gameplay was just perfect the way the challenge scaled naturally even as you got upgrades or added a 2nd player. Literally a blast!