hallettj

Just a basic programmer living in California

  • 17 Posts
  • 377 Comments
Joined 2 years ago
cake
Cake day: February 23rd, 2024

help-circle


  • My family uses Discord heavily, and I’ve set up a number of different distros and window managers at different times, all using Wayland, and I have not seen this issue. I think that includes running in browsers using Xwayland, and using native Wayland - but I’m not 100% sure because I’ve been running browsers in native Wayland mode for a long time, while my family members usually use the Discord Electron app.

    There might be some more specific issue on your system, like a pipewire misconfiguration? Do you use pipewire?


  • In the earlier days of Wayland I was not able to reproduce the custom keyboard mappings that I set up with xkb. Xkb worked, but only in windows running under Xwayland. I know the common xkb presets, like changing caps lock to a control key, are reproduced in Wayland implementations. I had really custom mappings that required more general remapping capability.

    I fixed my setup by building a keyboard with a microcontroller that I can program with ZMK. It’s a better setup, although it did take more time, effort, and money. The bottom line is I’m enthusiastic about Wayland, even though I had to find another way to reproduce one of my favorite features.


  • hallettjtoComic Strips@lemmy.worldYou can do anything...
    link
    fedilink
    English
    arrow-up
    33
    arrow-down
    1
    ·
    10 days ago

    A big part of the problem is that we don’t measure externalities well. Like teachers and artists produce way more value than they’re paid for. Instead we only reward value that can be directly measured by your boss, and that value is compensated at as low a level as the boss can get away with.




  • I use a chat interface as a research tool when there’s something I don’t know how to do, like write a relationship with custom conditions using sqlalchemy, or I want to clarify my understanding on something. first I do a Kagi search. If I don’t find what I’m looking for on Stack Overflow or library docs in a few minutes then I turn to the AI.

    I don’t use autocompletion - I stick with LSP completions.

    I do consider environmental damage. There are a few things I do to try to reduce damage:

    1. Search first
    2. Search my chat history for a question I’ve already asked instead of asking it again.
    3. Start a new chat thread for each question that doesn’t follow a question I’ve already asked.

    On the third point, my understanding is that when you write a message in an LLM chat all previous messages in the thread are processed by the LLM again so it has context to respond to the new message. (It’s possible some providers are caching that context instead of replaying chat history, but I’m not counting on that.) My thinking is that by starting new threads I’m saving resources that would have been used replaying a long chat history.

    I use Claude 4.5.

    I ask general questions about how to do things. It’s most helpful with languages and libraries I don’t have a lot of experience with. I usually either check docs to verify what the LLM tells me, or verify by testing. Sometimes I ask for narrowly scoped code reviews, like “does this refactored function behave equivalently to the original” or “how could I rewrite this snippet to do this other thing” (with the relevant functions and types pasted into the chat).

    My company also uses Code Rabbit AI for code reviews. It doesn’t replace human reviewers, and my employer doesn’t expect it to. But it is quite helpful, especially with languages and libraries that I don’t have a lot of experience with. But it probably consumes a lot more tokens than my chat thread research does.


  • hallettjtoNeovim@programming.devMapping to <Esc>
    link
    fedilink
    English
    arrow-up
    1
    ·
    21 days ago

    For the r case I think you need to set the mapping in “operator pending” mode, which you get by putting "o" in the same position you already have "!".

    I don’t know what the issue is with command mode.

    There is plenty of precedent for custom escape bindings, often using jk or jj. You might be able to find examples to get an idea of the best way to set up those bindings.

    There might be an issue with <C-space> in particular if it has existing mappings in certain modes. I know that auto-complete plugins often use that mapping to make the completions menu appear. There might be some interaction with that mapping specifically with plugins you’re using, or with built-in behavior. I suggest experimenting with a different mapping to narrow down whether problems are due to the way you are writing mappings, or to a specific interaction with that key sequence.


  • The problem with appealing to episode details is that the transporter is presented very differently in different episodes depending on the needs of the story. That’s fine for storytelling, but it means we can’t pin down a fixed set of rules for how transporters work. To ponder philosophical questions we have to invent rules by picking and choosing presentations of the transporter that seem most interesting, and filling in gaps with our imaginations.

    Yes, there’s the episode where Barclay is conscious during transport. But there are contradictory presentations where Scotty puts himself in stasis in the ship that crashed on the Dyson’s sphere, and M’Benga putting his daughter in stasis. In those cases neither has memories of time during transport.

    There is the episode where Picard uses the transporter to convert himself into an energy being to try to live in a space cloud. The story is the transporter converts matter to energy, and energy in Star Trek is another possible state of living existence. Thus continuity. But there is a contradictory episode of DS9 where crew members’ physical and neural patterns have to be stored in computer memory, not “pure energy”, and we see holosuite character versions of them.

    So there’s either no suicide booth problem, or there is. You get to pick depending on which scenario you feel like talking about.




  • hallettjtoLinux@lemmy.worldbluetooth+multiuser system
    link
    fedilink
    English
    arrow-up
    3
    ·
    24 days ago

    I’ve got a solution for a situation that is temptingly similar, but unfortunately probably not helpful for your specific case since I’m using partitions instead of user accounts. I have a separate partition for work (specifically a second SSD) because my employer insisted I install remote access software, and that’s not going on my personal partition. I ran into a problem where my Bluetooth MAC is the same on both partitions (because it’s the same device), but only one partition has the pairing keys for my headphones. On the other partition the headphones see the computer as an already-paired device, so refuse to pair again, but can’t connect either due to lack of a key.

    I fixed the problem by copying the pairing state files from one partition to the other, and now my devices connect seamlessly either way. I think those files are in /var/lib/bluetooth/<BT-Adapter-MAC-address>, but my memory isn’t super clear.



  • It’s about the Dutch-style bike intersection, specifically the first one built in Montreal. It sort of extends bike lanes through the intersection. Instead of bikes and cars mixing in the entire square area of the intersection, there are concrete curb islands inside each corner of the intersection separating car lanes from bike lanes. Turning cars have to go around the inside of the islands, which makes drivers slow down which adds safety. Bike lanes are on the outer sides of the islands which reduces the distance cyclists have to ride where they might intersect with a car since cyclists are protected by the islands for parts of the crossing through the intersection. There are other interesections that use the same idea, but apply it to pedestrians rather than bikes.

    Drivers complain that the design is a “labyrinth”. The video argues people will get used to it when there are more of these.

    Left turns are intended to be two-phase, like with unprotected left-turn boxes. First you ride straight across the intersection. Then you stop in a box in the perpendicular bike lane on the other side, which is protected by one of those islands. The box provides space to turn left before stopping. Then when you get a green light for that direction you proceed.

    Some cyclists seem to be confused about how left turns are supposed to work. One cyclist merged into traffic before turning, performing the turn in the car lane. Another cyclist crossed both lanes of car traffic before the intersection, rode across the intersection in the bike lane, but going the wrong direction, and finally turned left into the bike lane on the other side.




  • I haven’t gotten much into flake-parts, but my understanding is that it creates a module system very similar to NixOS modules and Home Manager modules. Except that instead of defining a system configuration, flake-parts modules define flake outputs.

    So I don’t think you would use it in your NixOS configuration. If your configuration uses a flake there might be use cases for using it at the flake level. For example your flake defines a nixosConfigurations output, which is a set with an attribute for each host. If you had some unusually complicated code in that flake output you might use flake-parts to modularize it.

    Or I suppose flake-parts is largely aimed at simplifying per-system outputs like packages and devShells. Once again, if you wanted to split those definitions over multiple files flake-parts can do that. Or you can use it just to get flake-parts’ eachDefaultSystem helper if you don’t want to use equivalent functionality from flake-utils, or the built-in genAttrs function.

    Although I love the NixOS module system, I haven’t used flake-parts because I haven’t had a case where I want reusable modules in the context of flake outputs. Usually my flakes are a pretty uncomplicated combination of genAttrs, basic devShells, basic overlays, and package expressions that I build with callPackage.