aebletrae [she/her]

  • 2 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: July 23rd, 2023

help-circle
  • For someone seemingly so eager to try out new distros, I’m surprised you haven’t mentioned virtual machines. If the vibes are off, it’s a whole lot less disruptive to find out that way.

    Your experience with drivers won’t be quite the same as a bare-metal installation, but checking out software shouldn’t be a problem.







  • Admittedly, I have much less experience with i3, so I fired up a virtual machine with Debian 11.6 and installed i3 (along with lightdm) and was able to recreate the problem of .profile not being executed when logging in, so this isn’t unique to your particular setup. Great!

    Fortunately, this combination does execute commands in ~/.xsessionrc, so I added:—

    . $HOME/.profile
    

    to that file, then logged out and back in again. That did the trick for me, with the commands in .profile then successfully modifying the PATH variable (and writing additional lines to the execution log files), so I suggest you try creating/modifying .xsessionrc in the same way.




  • Uh, the XiBucks, obviously.

    Look, I get it. Hexbear is a demanding place to be. It expects you to not be a complete asshole almost all the time. You’re regularly tested on knowledge of an emoji system so complex, it’s been known to make London cab drivers cry. If you unthinkingly parrot talking points, you’ll be pounced on with annoying facts and aggressive reasonable concern for the value of other people. And if you emit the slightest Hitler particle, you’ll be outright banned. How authoritarian! Honesty, sometimes I wonder why I signed up, never mind stay around.

    But then I remember that the folks there are a deeply caring lot, who see the problems in the world and actually want to do something about it—even though the goal often seems barely possible—and, in spite of everything, retain a sense of humour and try to make improvements for each other, even if, for now at least, it can only be a :meow-hug:.

    Oh, and the XiBucks, of course. Some of us even get roubles, too!


  • I saw The Wrath of Khan as a kid, quite possibly before seeing any of the series, so there’s never been any question of it not being representative of Star Trek for me, though I can see how someone approaching chronologically might see more of a disparity.

    However, TOS had plenty of deaths, including destruction of starships, as did V’Ger’s, uh, collection of data, so does TWoK really stand apart in that regard? Chekov and Terrell kick off the plot while surveying planets, encountering a strange alien creature, and Kirk and co. find an underground paradise; I see that as fitting the explorative aspects of the show, at least somewhat. The villain is defeated with teamwork, deception, and by outplaying him, common to the original series. And the story raises some ethical questions regarding cheating, playing god, and marooning, again in the tradition of the show. I see the differences as more stylistic than substantial, but as I said, personal history affects my perspective.

    As far as general movie principles go, music can be a strong influence on audiences, and Wrath of Khan has a great score.



  • But those kinds of initialisations belong in .profile (or, if you’re using a weird desktop environment, its own configuration file), particularly if you want .desktop files to work. (In .bashrc, PATH will grow longer in each subshell, which shouldn’t cause problems but is wasteful.)

    So, what desktop environment (GNOME, KDE, Cinnamon, etc.) are you using?

    .profile is executed by login shells for the benefit of it and its subshells, and by DEs like Cinnamon for the benefit of .desktop launchers at login.

    So, have you logged out and back in again since adding these lines to .profile?

    And of course, the .profile has to be executed properly for its configuration to take effect, so it`s useful to know if the problem is with those specific lines, or the file as a whole.

    Add:—

    date >> ~/profile-execution-log-top.txt
    echo $PATH >> ~/profile-execution-log-top.txt
    

    to the top of .profile, and:—

    date >> ~/profile-execution-log-end.txt
    echo $PATH >> ~/profile-execution-log-end.txt
    

    to the bottom of .profile (use alternative paths as you see fit) to monitor that activity. You can test this by sourcing .profile but the real test is logging out and in again. Look at the time when you do this so you can correlate each action with each timestamp in the log files. If .profile is executed to completion, you should have two files with matching timestamps but different PATHs. If you don’t have a matching timestamp in the “end” log file, there’s a problem mid-execution. If neither file is being updated, .profile isn’t being executed at all.






  • Having thought about this some more with practicality and clarity thrown out the window in favour of abstractions, how about this?

    A game is a sequence of moves. Past moves are immutable, future moves unknowable; a singly linked list fits the bill here.

    Each move consists of a player token and a position. The position might ordinarily be thought of as a grid index but, as you point out, it could just as well be membership in one of the potentially winning lines. Either a move is part of one of these lines or it isn’t. This makes the position equivalent to a bit field. If each potential win line is distinct, they could indeed be held sparsely in a set.

    Checking for a win then consists of counting player tokens for each potential win line and checking for crossing the necessary threshold. Filter, sum, max, greater than?, any?

    I think this scheme would be applicable to arbitrary game boards, with none of it requiring mutation. Is that the kind of thing you were after? The reflection/rotation equivalence isn’t present here, but I still think that’s more an artefact of analysis, rather than a property of gameplay.


    1. The ordering of each row should not matter.

    This is true for your abstracted rows, but is maintaining eight sets of three square states, two or three of which must be updated with every move, really a better model than a single sequence of nine, where only one needs to change at a time? It’s more complex to think about, and is less efficient to update. When you throw in steps to canonicalize the rotation and reflection, which may produce different transformations from the input/output grid on the first three moves, you may need to change even more set items with each move.

    It’s true that, mathematically, the mapping from grid to sequence is arbitrary and the only thing that matters is consistency, but if you view programming languages as a way to communicate with humans, then clarity of purpose, rather than mathematical idealism, should be your goal. Use a nine-item array or a three-by-three nested array for the underlying storage and treat your eight win-checking sets as views into that more ordered structure. These views could well be functions that return a set and are themselves held in a set to be applied in any order. Similarly, treat canonicalization as another way to view the underlying board.

    You could sidestep the mutable borrowing by not mutating individual squares. Take a leaf from the functional-programming books and use a function that takes a board and a move and returns an entirely new board. Or takes a board and returns one of the abstracted row sets. There are only nine squares and nine moves. The win-checking views aren’t needed before move six. A bit of copying isn’t going be a problem.