Just a basic programmer living in California

  • 2 Posts
  • 103 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.




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





  • I’ve done that too, and it’s not the same IMO. Ansible doesn’t put entries in the boot loader for older system states you can boot into in case you break something. It’s possible that Ansible configurations aren’t idempotent. The exact versions of packages that get installed can’t easily be managed with Ansible if you’re also regularly updating packages. There’s lots of stuff that is much easier to configure with NixOS and Home Manager. I found my Ansible configs were always out of date, which doesn’t happen with NixOS where editing the config file is how you make any system changes.


  • Oh yeah, I should clarify that - and I might have overstated the issue.

    When you roll back, either by selecting an old entry in the boot menu, or using the nixos-rebuild command you do get an exact replica of the packages from the generation you rolled back to regardless of whether you use channels or flakes. So that’s good.

    The issue comes up in scenarios like these:

    • Something’s not working for you with the latest nixpkgs. You roll back to, and that fixes things. But the next time you run nixos-rebuild switch you get packages from the current channel state again, the one that wasn’t working, and things break again.
    • You want to roll back nixpkgs, but keep your latest configuration changes.
    • You want to go back to an earlier state by getting the old version of your configuration files instead of using the generation manager. For example if you keep your configuration version-controlled with git, reverting to an earlier commit of your configuration history, and running nixos-rebuild switch

    In all cases if you’re using flakes you can roll back nixpkgs by using an older version of the flake.lock file which lets you time-travel nixpkgs independently of changes to other configuration files. With channels you can’t manage the nixpkgs revision with your configuration files. You have to go through some manual steps to reset the channel to the nixpkgs commit you want. It can get more difficult if the commit you want was garbage collected from your local system in the meantime. See https://discourse.nixos.org/t/how-to-roll-back-channel-to-currently-active-version/43161

    In my experience upstream nixpkgs rarely break things, and reverting to an earlier nixpkgs revision is not the best answer. But every once something happens, like a failure in hydra means some package isn’t in the binary cache, and it’s too much for me to build locally (this happened with Electron a few weeks ago), so I can’t use the latest packages until hydra catches up; or there’s some configuration update I need to make for the latest packages, and I don’t have time to work on that for a bit.


  • I think there are arguments for NixOS for a casual user despite the learning curve reputation. But there are also downsides to consider.

    The pros:

    • There is a good, user-friendly installer that makes it easy to get a working system
    • From what I can see setting up KDE is pretty easy - there are configs online that you can paste into configuration.nix without modification
    • NixOS is good for gaming with proprietary drivers and Steam - again it’s a matter of pasting a few lines of configuration
    • Like with other distros it’s easy to recover if something breaks
    • Unlike with other immutable distros you get a lot of options for tinkering with your system, and experimenting. You can dip your toes into the advanced stuff, going from casual user to Linux expert at your own pace, with the safety line of being able to roll back changes at any time.
    • If you stick to the basics you can have a very stable, very update-to-date system without much difficulty.

    The cons:

    • To get the full safety of rolling back a previous point in time you need to ditch channels, and instead use pinned nixpkgs revisions. The best way to do that is probably using flakes - but whatever strategy you use you need to depart from the setup the installer gives you, and learn enough to remake your configuration.
    • You’ll find contradictory instructions depending whether they’re written for use of channels or flakes.
    • Going beyond the basics of installing packages, and using premade NixOS modules gets you into the infamous learning curve. For example I’m guessing that managing kwin scripts declaratively in Nix config might be an adventure. But managing them by hand the way you do in Fedora might be the same. (I haven’t tried this, so I’m not sure.)
    • There is some stuff you have to know, like if you want to run binaries that weren’t built for Nix you want to set up nix-ld first.
    • If you’re building software you have to learn to do things the Nix way because of the lack of FHS. That’s great for Nix fans like me, but frustrating for some.
    • There is no graphical software center, nor automatic updates. You have to use the workflow of installing stuff by editing your config file, and get used to using search.nixos.org to find stuff. This is a pro from the perspective of having a stable system that can be rolled back to earlier states, but might feel less user friendly than a GUI workflow.

    Even if you set up flatpak (which is easy to set up tbf) you’re probably going to be managing flatpaks using the CLI.

    It would be easier for me to recommend NixOS if the installer set up a flake configuration with more niceties pre-installed, like nix-ld. The next best thing would be a de facto standard flake starter configuration for people to copy. But like I said, I think there is a case.







  • My work is using Coderabbit, and I’ve found its feedback to be pretty helpful - especially since I’m working with a language I don’t have a whole lot of experience with (Python). I check what it tells me, but it has taught me some new things. I still want human reviews as well, but the AI can pick up on detail that is easy to skim over.

    It doesn’t cover bigger picture stuff like maintainability, architecture, test coverage. Recently I reviewed a PR that was likely AI generated; I saw a number of cases where logic duplication invited future bugs. (Stuff like duplicating access predicates across CRUD handlers for the same resource, repeating the same validation logic in multiple places.) Also magic strings instead of enums, tests of dubious value. Coderabbit did not comment on those issues.

    I’m also getting feedback from Sonarqube on the same project, which I think is static analysis. It’s much less helpful. It has less to say, and a lot of that is pointing out security issues in test code.


  • I did the swipe to complete an -ing suffix, and yes, I see the appeal!

    Entering punctuation is a bit slow using long-presses on the apostrophe key. Maybe I can get used to using the symbol layer instead.

    Oh! You can swipe from the 123 key to type a symbol from the symbol layer in one gesture! That’s great! It even works for comma! Kinda accidentally - given the comma position I’m swiping over question mark, backspace, comma which gets a net result of typing just the comma. I wish it would go back immediately to the ABC layer.

    Moving the cursor by holding and dragging from space feels better than the similar feature in gboard!

    I miss the gboard backspace feature where you can hold and drag to selectively delete.