1.  

    I’m using a Hexgears K705A hot-swap board with Kailh BOX White switches and /dev/tty MT3 keycaps. Nice curvy, deep-dish profile, and acceptably clicky switches.

    I also have a vintage NTC Alps White board, which has survived a lot of abuse. Those click-leafs, yum. They don’t make them like they used to.

    1. 2

      Will be fixing the missing files on CVS repositories, once I work out why there are missing files on CVS repositories.

      1. 1

        Should be fixed now.

      1. 11

        Company prescribed me (and everyone) a week off. So, can’t complain. Will likely do „irc bot in rust“ nonsense, for fun.

        Also, we just got two kittens from the shelter.

        1. 4

          I’ve been doing the Rust IRC bot thing myself, definitely good fun!

        1. 3

          For Windows users, I wrote Compactor as a faster alternative to CompactGUI.

          1. 6

            Rust’s monotonic time interface defends against this somewhat, seemingly for good reason:

            // We're seeing panics across various platforms where consecutive calls
            // to `Instant::now`, such as via the `elapsed` function, are panicking
            // as they're going backwards. Placed here is a last-ditch effort to try
            // to fix things up. We keep a global "latest now" instance which is
            // returned instead of what the OS says if the OS goes backwards.
            

            Not that the current time seeming to freeze for minutes or hours seems particularly great either.

            1. 5

              But you left out my favorite part of that code comment. I chuckle whenever I stumble upon this file…

              // And here we come upon a sad state of affairs.
              

              The resigned sigh of a programmer having to hack a fix for broken OS code. :D

              1. 3

                yeah, IIRC we saw this in production for the dropbox sync client on macOS and added our own mitigation. interestingly the rust stdlib includes macOS on its Instant::actually_monotonic list…

                (former dropboxer who worked on the sync engine)

            1. 1

              I think the abstract egress interface-group may not exist so you’d have to specify the interface directly (either inline or as a macro)

              Or define the group in your interface config:

              ifconfig_em1="SYNCDHCP group egress"
              

              I have groups for all my interfaces so I don’t have to hardcode anything in pf.conf.

              1. 7

                I wrote cw as a hopefully-fast wc clone, with multiple code paths for various flag combinations and support for threading. Was a fun little exercise.

                Also note exa is currently languishing, and you probably want to use a fork for the time being.

                1. 3

                  That’s silly. A commit was made in January. It’s easy enough to do a personal build. It’s not ideal, but it’s certainly not the only project like that. Plus many times, a user might want HEAD build anyway. Ideally once a year release would be nice, but as long as commits are still happening, that’s not “languishing”

                  1. 5

                    adjective: languishing — failing to make progress

                    Seems appropriate to me, it’s been 59 weeks since the last release, 32 weeks since the last commit, and there’s a fair few fixes for quite annoying issues that have piled up since.

                    Someone suggesting building your own from a fork of a repository is unlikely to require lecturing on the ease of building your own.

                1. 20

                  On Linux:

                  % ls -l /proc/$$/exe 
                  lrwxrwxrwx 1 leah leah 0 Aug 29 17:28 /proc/3940/exe -> /usr/bin/zsh*
                  
                  1. 2

                    FreeBSD:

                    ❯ procstat -b $$
                      PID COMM                OSREL PATH
                    66249 zsh               1201000 /usr/local/bin/zsh-5.8
                    

                    If you’re in an old version after an upgrade of zsh, it’ll error with No such file or directory, which is one of the mechanisms I use for checkrestart.

                  1. 7

                    Every time a removal of something antique is mentioned, people that haven’t contributed a single line of code would come out of the woodwork with various forms of “I use it” or even a hypothetical “someone could be using it to do $foo”.

                    My favorite recent example: “Add extremely useful calendar(1) application to FreeBSD

                    1. 5

                      Perhaps somewhat ironically considering Jeff’s thesis, we removed calendar(1) in 2017. Somebody did come out of the woodwork to suggest they still use it, but we gave them notice and I believe somebody helped them find an alternative, and then we pulled it out.

                      1. 1

                        My least favourite is the commit that reverts. No prior discussion or review, just an ad-hoc FreeBSD isn't an encyclopedia, and suddenly a tool in surely more than a couple .login files is just gone.

                        There’s an argument for getting rid of cruft, but that’s not the way you do it.

                      1. 14

                        Reading this at the same time as being on Day 2 of installing something from /usr/ports on FreeBSD. Day 1 was wasted because the one small thing I wanted to install tried to install and build 16 GB of dependencies, including building GCC and LLVM from source.

                        I had to start over with a bigger disk. Now on hour 5 of compiling LLVM. jwz used to say about Linux “Linux is only free if your time is worth nothing” FreeBSD is only better if your time is worth nothing.

                        Seriously though, FreeBSD just seems like UNIX from a long time ago, when servers were lovingly crafted by BOFHs and could only be truly understood by a bearded elite. I miss those days, and I can still administer a FreeBSD box just fine, even though I have shaved my beard. But now we’re in the “cattle, not pets” era of operations, and FreeBSD’s days seem numbered.

                        1. 5

                          Why not pkg install <whatever>? - is there a reason not to install a package this way?

                          1. 3

                            I wish. This is the virtualbox drivers and are only available as a port, AFAICT.

                            1. 2

                              doesn’t having the base dependencies for a port installed like via pkg satisfy the requirements for building a port? I’ve built packages on DragonFly and I’ve not had to build llvm or gcc from scratch - only pkg install them once.

                              1. 2

                                Yes, that is assuming you know what the dependencies are. Is there a way to tell ports to tell you what software it depends on, other than going down the entire tree of dependencies?

                                1. 7

                                  make all-depends-list for the full list of build and run-time dependencies. make missing for what’s needed but isn’t currently installed.

                                  1. 1

                                    If memory serves, I believe there is also a way to install dependencies with pkg; I’m not sure if it was a make target or an external tool (been a while).

                                    1. 4

                                      There’s a ports Makefile target:

                                      # install-missing-packages
                                      #               - Install missing dependencies from package and mark
                                      #                 them as automatically installed.
                                      
                                    2. 1

                                      Oh this might come in handy! Thanks!

                                    3. 2

                                      This is my biggest problem with FreeBSD. FreeBSD people advise not mixing ports and packages.

                                      Arch Linux for example has the ABS, which is very similar and to and inspired by the FreeBSD ports tree. Where I believe the ABS is superior is the aim of the ABS is to build a package which is then installed by the package manager.

                                      Then put a front end over make eg $pkg make foo/bar with some flag to install dependencies where possible from binaries. I can only dream

                                      1. 2

                                        oh, I’d just hit make, then cancel out of it when it started grabbing something absurd. When I’ve pkg installed devel packages for something like python, usually that’s enough to grab a fairly large dependency tree that satisfies most cases. Given the nature of dependencies, there’s usually a few that cascade into many and by getting those, you end up shortening your build time by a lot.

                                        I wonder if someone has a command to list out dependencies such that you can do something like pkg install $(list my dependencies). That would probably solve a lot of cases right there. 🙂

                                2. 2

                                  Reading this at the same time as being on Day 2 of installing something from /usr/ports on FreeBSD

                                  I wish someone would update the docs. The advice for new users should be never build anything from /usr/ports. If you even have a /usr/ports on a modern FreeBSD system, then the odds are that you’re doing something wrong. If you want to install a port with options different from the standard package build, then your best bet is to use poudriere. If you’re in a hurry, you can pre-populate the cache with packages that you grab from the package site (LLVM can take a few hours to build on a slow machine).

                                  But now we’re in the “cattle, not pets” era of operations, and FreeBSD’s days seem numbered.

                                  I can’t disagree there. I’d love to see FreeBSD fully adopt UCL, grow an init system that can manage dynamic resource allocation properly, and a decent set of jail management tools so that you can configure everything with a UCL plugin to your favourite orchestration service.

                                  1. 2

                                    So another frustration that I didn’t mention before was the state of the documentation. What the OP says is a good thing is actually quite terrible. The docs are outdated and contradictory.

                                    There are three different documents for hooking up FreeBSD with SSSD, none of them are correct, and they all use out of date information. It’s a frigging mess.

                                    The one good thing is that it finally kicked me in the ass enough to put in a PR for the Terminator INSTALL file

                                  2. 1

                                    I do recommend you do explore the other BSDs too, if you haven’t yet.

                                    Also, please consider running it on real hardware. An old workstation or laptop, or even a raspberry pi will do. The experience just isn’t the same with virtualization or an emulator.

                                    1. 3

                                      I was planning on trying out FreeBSD on my new RPi 4 but sadly it doesn’t seem to be ported to that platform yet.

                                      1. 2

                                        If you want cheap, realiable and be sure to have working laptop for FreeBSD then use one of these: ThinkPad X220 ThinkPad T420 ThinkPad T420s ThinkPad T520 ThinkPad W520

                                        … and they come with great real 7-row keyboard too.

                                        Personally I use 9 years old W520 with 4C/8T, 16GB RAM and large SSD along with that great keyboard and bright 15” FullHD screen it has everything that is needed.

                                        1. 1

                                          I’m using openbsd on a ThinkPad X395. Works fine, except the wireless.

                                      2. 1

                                        Do not use /usr/ports of you do not compile.

                                        Just use pkg(8) for packages.

                                      1. 1

                                        An excellent list. While it is true that many of these have Linux counterparts, some alternatives (like ZFS on Linux) are only well-supported on a small number of Linux distros.

                                        Jails are really interesting. While Linux has good support for cgroups/namespaces to create “containers”, they’re not the same as jails. Tools like bubblewrap (minimal sandboxing tool that Flatpak uses), Firejail, chroot, Systemd-nspawn, LXC, and Podman (unprivileged/rootless and daemonless Docker alternative that supports cgroup v2) all replicate enough functionality for most use-cases, but jails are still quite compelling: they offer the low-overhead VM-like experience of containers while providing stronger sandboxing and less complexity.

                                        1. 3

                                          I also agree that FreeBSD jails is an attractive feature. However, when doing more detailed analysis, I could not find ‘cluster’ management software available for freeBSD Something that automatically brings jails up and down, migrates network traffic to healthy jails, etc. In other words, something that is done in Linux world by Kubernetis, or by a combination of Nomad-Consul-Vault (by Hashi Corp)

                                          I saw the article mentioned https://bastillebsd.org/templates/ , but that seems to be more of installation tool (similar to Ansible)

                                          1. 3

                                            The FreeBSD Journal had an article an issue or two ago about Nomad on BSD w/jails. Jails work fine under Nomad.

                                            1. 2

                                              For Nomad drivers for FreeBSD jails exist. pot appears to be the closest one to something like Docker on Nomad.

                                              Consul and Vault packages exist as well.

                                              1. 1

                                                Thank you. Now I can see why leaning towards Nomad makes sense .. it has FreeBSD support. (I was educating myself on Nomad+Consul vs k8 and I tended to lean against the ‘conventional wisdom’)

                                          1. 3

                                            libxo, part of FreeBSD base, also has a xo command for outputting structured data from shell scripts while still supporting normal plaintext output.

                                            1. 1

                                              Thanks for sharing this, seems really nice! Hopefully, it gets ported to Linux.

                                              1. 1

                                                Have you tried building it? It builds fine under macos, so there is a non-zero chance for the same outcome for Linux. :)

                                              2. 1

                                                Can it be compiled for macos?

                                                EDIT: yep, and it works. :)

                                              1. 1

                                                I really like my Type Heaven, with Topre switches, but I’m not sure if they make them anymore. If I had to get another keyboard, I think I would get a Matias Ergo Pro.

                                                1. 3

                                                  A word of caution against the Matias Ergo Pro: mine had major issues with doubling/tripling key presses, making it virtually unusable. I talked with their support and they shipped me a new connector cable claiming it was the issue, but the problem never resolved. If you look up reviews on e.g. amazon you’ll see I’m not alone.

                                                  1. 1

                                                    The L key on my Matias Quiet Pro started doing that, had to replace the switch.

                                                    The replacement started doing it a few months later. Been too lazy to replace it again. Alps successors these are not :/

                                                    1. 1

                                                      I feel your pain. I think there were 4-5 affected keys on mine before I finally threw in the towel and switched to another keyboard. If you use mac os, I had some decent success using a software fix https://github.com/toothbrush/debounce-mac (though it’s not perfect and you may need to tweak DEBOUNCE_DELAY to get it feeling right)

                                                    2. 1

                                                      Dang, good to know. That sounds maddening. Not even my least favorite keyboard does anything like that. Thanks for the info.

                                                  1. 4

                                                    Did all this stuff need to be a shell? I mean it replaces ls, a command that lists items in the current directory (in my experience, sorted by name by default), with a command that needs to be piped into sort-by name, which means you need to know “name” is a field, making ls equally or more complicated than piping it into sort. And instead of a series of rows you get an unnecessary ascii table. A lot of what this shell seems to do with where, sort-by, get and the like are simply achieved with awk. Can someone explain this project to me? I really must not get what it’s trying to achieve, what is being done that a moreutils-style package couldn’t do?

                                                    1. 5

                                                      The idea is precisely to not have to use languages like AWK to do stuff that requires structure. Traditional Unix shells only work with plain text, however some shells like PowerShell work with objects instead of plain text (plain text is just a special type of object), which are more composable on its own.

                                                      1. 2

                                                        I totally get structure, which is achieved by tools like relational pipes, there is an actual structure transferred from process to process; this appears to be as simple as column names

                                                        1. 4

                                                          It’s certainly not limited to column names - it’s a stream of nestable, typed values. Take du for instance:

                                                          nushell(master)> du crates
                                                          ───┬────────┬──────────┬──────────┬─────────────────
                                                           # │ path   │ apparent │ physical │ directories
                                                          ───┼────────┼──────────┼──────────┼─────────────────
                                                           0 │ crates │   2.0 MB │   2.3 MB │ [table 23 rows]
                                                          ───┴────────┴──────────┴──────────┴─────────────────
                                                          

                                                          path is of type PathBuf, not just a string, apparent and physical are of type Bytes, and directories is a nested table with 23 rows of its own:

                                                          du crates | get directories
                                                          ────┬─────────────────────────────┬──────────┬──────────┬────────────────
                                                           #  │ path                        │ apparent │ physical │ directories
                                                          ────┼─────────────────────────────┼──────────┼──────────┼────────────────
                                                            0 │ crates/nu_plugin_sys        │  13.1 KB │  15.4 KB │ [table 1 rows]
                                                            1 │ crates/nu-plugin            │  13.7 KB │  14.8 KB │ [table 1 rows]
                                                            2 │ crates/nu-test-support      │  19.6 KB │  43.0 KB │ [table 1 rows]
                                                            3 │ crates/nu_plugin_str        │  28.7 KB │  24.1 KB │ [table 1 rows]
                                                          ...
                                                          
                                                          1. 2

                                                            But what’s the difference between a “nested table” with 23 rows and a regular file with 23 lines? UNIX had relational database style operators like join over 40 years ago. They are still in coreutils today. I have literally no idea what this achieves

                                                            1. 2

                                                              Ability to do something vs ability to do something in an easy and consistent way

                                                              1. 2

                                                                But what’s the difference between a “nested table” with 23 rows and a regular file with 23 lines?

                                                                The nested table is an explicit data structure with fields of structured data types, including other tables, and your regular file with 23 lines is a flat ad-hoc blob of bytes that isn’t going to safely, cleanly, or sensibly encode something as trivial as a filename.

                                                                You can’t safely or easily extract directory names from du:

                                                                -% du
                                                                1033    foo bar
                                                                lolwtf
                                                                
                                                                

                                                                And doing anything with these looks like, erm, “fun”:

                                                                -% ls
                                                                foo\ bar\nlol\001wtf\n/
                                                                -% gls
                                                                'foo bar'$'\n''lol'$'\001''wtf'$'\n'
                                                                

                                                                But this works just fine:

                                                                > du | get path | rm --recursive $it
                                                                deleted /home/freaky/code/nushell/x/foo bar
                                                                lolwtf
                                                                
                                                                

                                                                And so does this:

                                                                > ls | get name | rm --recursive $it
                                                                deleted /home/freaky/code/nushell/x/foo bar
                                                                lolwtf
                                                                
                                                                
                                                      1. 2

                                                        Time to work off some technical debt in Compactor, my Windows 10 compression tool. The backend bits need redoing to not be a mess of copy-and-paste crossbeam-channel conditional horror.

                                                        Also working on a Rusty blog post. Third rewrite’s the charm…

                                                        1. 1

                                                          In this message, see that line that contains a word that starts with =21? What is that?

                                                          1. 2

                                                            Quoted-printable. In this particular case, it decodes to !@#%$!@#%

                                                            1. 1

                                                              Thank you! I’m unsure why I didn’t know this; I’ve seen this encoding in emails forever. I wasn’t aware that it was any more complicated than “equal sign plus two hex digits”; I wasn’t aware of the end-of-line rules.

                                                          1. 6

                                                            Still polishing off my followup to Password Generation in Ruby and Rust. Hopefully get it out over the weekend.

                                                            I might bash some more on my new email search tool, try to massage it into something that’s at least minimally useful - it’s more a proof-of-concept right now, albeit quite a fast one.

                                                            I’m also helping out a teacher sort out forms for quizzing students. He’s currently using 123FormBuilder and it’s a bit like the website equivalent of Kowloon Walled City.

                                                            1. 10

                                                              This might be a stupid question, but why not less instead of cat? Cat is not really meant to display files but to concatenate them. I’d definitely like a better pager, but neither w3m or vi in view mode worked for me, so i’m still using less

                                                              1. 5

                                                                Cat is still cat. Bat is like the kitchen sink that just clobbers more? Yeah, I don’t quite understand why this tool is positioning itself relative to cat.

                                                                It is definitely not a clone. But I am all for new, more usable terminal based tools that use what we have at our disposal, more cores, more ram, ssd read/write.

                                                                I’d really like a tool that built an n-gram inverted index of all files below my current dir and allowed me to jump to anything, that showed similar token/phrases/lines, etc. All terminal driven, with an option to load a rich GUI over a local http connection.

                                                                1. 3

                                                                  Although I agree with you, I can see why this would be positioned as an alternative to cat.

                                                                  Quite a lot of people use cat to preview files, and that’s what bat does. I know less and more exist, but for some reason I still find myself using cat. Perhaps other people do the same.

                                                                  1. 4

                                                                    I use cat because, if I’m lucky, the output will fit in my terminal, and I’m ready for my next command; with a pager, I need to press a key to exit out of the pager before I can issue my next command, and the output disappears (in the case of less) as if the pager never ran, so I can’t keep context around.

                                                                    1. 11

                                                                      By the way, less can be configured to act well in these circumstances. I have more as an alias for less -FX. Those two options to less are:

                                                                             -F or --quit-if-one-screen
                                                                                    Causes less to automatically exit if the entire file can be displayed on the first screen.
                                                                             -X or --no-init
                                                                                    Disables sending the termcap initialization and deinitialization strings to the terminal.  This is sometimes desirable if the deinitialization string does something unnecessary, like clearing the screen.
                                                                      

                                                                      I also define $PAGER to be less -FX, so manpages and the like don’t clear the screen once the pager quits.

                                                                      1. 5

                                                                        I second this. -c would be helpful in $PAGER as well so that everything above on your screen stays untouched.

                                                                        Personally, I’ve been rolling with this:

                                                                        $ type le
                                                                        le is an alias for 'less -FcmNqX --follow-name'
                                                                        
                                                                      2. 2

                                                                        the output disappears (in the case of less) as if the pager never ran, so I can’t keep context around.

                                                                        If you want to get rid of this sort of behaviour globally, disable “alternate screen” in your terminal.

                                                                        In tmux, set-window-option -g alternate-screen off. In putty there’s Disable switching to alternate terminal screen under Terminal → Features.

                                                                        1. 1

                                                                          Just tested bat, and the output doesn’t disappear. When you need a specific section from a file (not the whole thing) - using bat over cat and not less makes sense. Neat.

                                                                      3. 2

                                                                        Bat will act like cat if it determines there is no tty. Thus, bat is like less when used interactive and like cat when scripting.

                                                                        Like someone else said, people use cat to dump contents to the terminal so they can refer to it while continuing work.

                                                                        1. 2

                                                                          Proof!

                                                                          Oh.. you can also use it to concatenate files 😉. Whenever bat detects a non-interactive terminal, it will fall back to printing the plain file contents.

                                                                      1. 2

                                                                        I’m going to try and finish off my followup to Password Generation in Ruby and Rust, showing how easy it is to make small changes that significantly improve performance.

                                                                        I might also spend some time on Gutenberg #381, making external link checking more usable and robust.

                                                                        Or maybe I’ll just build more terrible hospitals.