1. 54

    I use ripgrep on at least a daily basis, and not just for work. It is so much easier to use, and faster than standard grep.

    1. 5

      I’ve been a vim user for about 10 years now, and I tried to switch over to Kakoune recently.

      Kakoune is absolutely delightful to use. It just feels so much better than vim. The commands are much more logical, and seem to be easier to recall.

      You can just install Kakoune, and launch it. You don’t need a few hundred lines of vimscript to be productive!

      Also the command completion and file completion functionality is amazing.

      I had to switch back to vim though, because I wasn’t feeling productive enough without some sort of :! support. I run my specs in vim with a mapping that runs rspec in the terminal, and that isn’t possible with Kakoune.

      I would still recommend any vim or other editor users try Kakoune out. You might be pleasantly surprised.

      1. 6

        For Kakoune and Vim, I typically run the editor in one terminal, and have a second terminal open to run tests in. Kakoune has a :terminal command that will launch a terminal running a specified program.

        However, if your test program spits out error messages like gcc (of the form file:line:column: message), you can set the makeprg option to run your test program, and then :make will run your program, pipe the output into a new buffer, and let you hit Enter on any error message to jump straight to the location described. It’s pretty sweet!

        If your test program doesn’t spit out error messages like gcc, well one of my first Kakoune plugins was a hack-and-slash conversion of the standard :make command to handle rustc’s output. It may not be the cleanest code in the world, but it’s pretty comfortable to use and (like the article says) writing a Kakoune plugin is pretty easy to do.

        1. 2

          For Kakoune and Vim, I typically run the editor in one terminal, and have a second terminal open to run tests in. Kakoune has a :terminal command that will launch a terminal running a specified program.

          Yes I’ve actually seen :make before and used it before in Kak. I’ve also used :make in vim, and I’ll never forget how painful errorformat is!

          With Kakoune I didn’t really like the fact that it’s not modal. As in it runs async and you carry on changing code while it’s happening. I like to run my tests and wait for (and see) the output. It seems a bit nit-picky now that I’m typing it out though.

          I may have to try Kakoune again, with an open mind.

          1. 5

            When developing, I normally run Kakoune in IDE mode so the output of :make and :grep etc. appears in the right-hand terminal while I’m working on code in the left-hand terminal.

            If you only had one Kakoune window, and you set both the toolsclient and jumpclient options to point at it, running :make and :grep would switch to the results of those commands so you could watch them run, and then you could switch back to he buffer you were editing.

            I really like test-runs happening in a separate window, though. It’s always the case that I spot an error just after launching the test suite (like remembering you need to buy bread just after getting home from the shops), so it’s convenient to be able to fix it while the test suite is searching for other errors. :)

            1. 2

              This is interesting. Do you have to use tmux for this?

              1. 2

                tmux is certainly a robust way to do it, but Kakoune also supports Kitty, iTerm2 and basic X11 “run a terminal emulator and trust it will appear on screen somewhere”. I’ve worked quite happily in i3 or GNOME, and manually moving my terminals to where they need to be.

              2. 1

                Now that you mention it I too always spot a mistake while the tests are running! Ok this is it, I’m going back to kakoune.

          2. 3

            You can just install Kakoune, and launch it. You don’t need a few hundred lines of vimscript to be productive!

            wat? Are people really using hundreds of lines of vimscript? I think I have 8, and they’re all optional

            1. 5
              $ wc -l .vimrc .gvimrc 
                374 .vimrc
                 36 .gvimrc
                410 total
              

              And that’s not counting third-party Vim plugins.

              To be fair, a lot of that is about tweaking the autoindent and commenting conventions for the dozens of different file-types and formatting conventions I’ve had to edit over the years. The number of lines that would have made a difference on a given day is much fewer.

              (I still have some if v:version >= 600 blocks in there, just in case I ever fall through a timewarp to 2003 and I have to edit text with Vim 5.x again)

              1. 3

                I have 600 lines in my init.vim, almost all of which I wrote myself. Exobrains represent!

                1. 1

                  what… do they do?

                  1. 4

                    Well I can’t show you all my tricks! 😛 Here’s a snippet I find really helpful:

                    " We need to do it as a normal mode injection
                    " Because %! uses the active buffer, not the local one
                    function! SetStatus(statusline)
                      exe "setlocal statusline=" . a:statusline
                    endfunction
                    
                    " visual_words_or_all
                    " Have to make global because statuslines are weird
                    function! g:Exo_vwal()
                      let s:worddict = wordcount()
                      if has_key(s:worddict, "visual_words")
                        return s:worddict["visual_words"]
                      else
                        return s:worddict["words"]
                      endif
                    endfunction
                    
                    augroup md
                      autocmd!
                      function! s:BufRead()
                        let s:sl='%<%n)\ %t\ %m' .
                              \ '%=%1*%{g:Exo_vwal()}%*'
                        call SetStatus(s:sl)
                        if expand('%') =~? '\.talk'
                          setlocal statusline+=/%{g:Exo_vwal()/130}
                        endif
                      endfunction
                      au BufNewFile,BufRead *.md call s:BufRead()
                    augroup END
                    

                    When I’m in markdown files, it shows the wordcount in the status bar. If I have a visual selection, it shows the wordcount of the selection instead. And if it’s a talk I’m writing, then it also shows how long it’d take to speak out the selection (assuming 130 words a minute). I find it really helpful for revising and rehearsing conf talks.

                    Another snippet:

                    function! s:MdFootnote(note)
                      let s:footnote = "[^".a:note."]"
                      let @m = s:footnote
                      norm "mpmm
                      $put = s:footnote.':'
                      norm `m
                    endfunction
                    

                    Lets me add markdown footnotes and drop them onto the bottom of the file without having to break my flow.

                    1. 3

                      Program my text editor to my personal preferences and idiosyncracies?

                      • I have my own colorscheme, because I disagree with Vim about acceptable levels of color use.
                      • I highlight whitespace at the ends of lines.
                      • I disable Q.
                      • I map Enter in normal mode to insert a newline and go into edit mode.
                      • I use a plugin to teach Vim about camel-case words, and I have my own tweaks to this plugin.
                      • I make [[ navigate to the start of current/previous function, without requiring { to be at the start of the line. That’s 41 lines right there.
                      • I highlight timestamps everywhere.
                      • I used to use a plugin that shows me modified lines compared to version control in the left margin. Over time I stripped what I don’t need out of it and added new features. Outlay: 107 lines. This feature in particular I can’t imagine living without. All programming editors should unobtrusively indicate what I changed recently.

                      Sure, you could call all this “optional”. I often start with 6 lines on a new machine. But it’s also nice to have all the comforts of a yurt.

                      1. 1

                        I think I was reacting to the “to be productive” claim, and that kak somehow avoids this. Unless kak happens to have the colour scheme one wants out of the box, etc, I feel like it’s not going to be any different on this front…

                        1. 4

                          Totally agreed with that! But your original response sounded like minimalist status signalling.

                          1. 2

                            Ah, apologies. While I do use vim mostly on the defaults, I’m not against people having configuration. I was more confused by the “vim needs 100s of lines of script to make it usable” attitude.

                            1. 1

                              Maybe I should have said “hundreds of lines to make it usable for me”

                        2. 1

                          I disable Q.

                          One mapping I have:

                          noremap Q @@
                          

                          So Q repeats the last macro I used.

                          1. 1

                            Nice. I use ` for that :)

                    2. 1

                      See sensible.vim, a relatively popular 101-line file that collects “a universal set of defaults that (hopefully) everyone can agree on”. Some random examples of changes it makes to Vim’s defaults:

                      • set laststatus=2 – always show the status line, even when only one window is open
                      • set scrolloff=1 – when the cursor is near the edge of the screen, scroll to show one line beyond the cursor.
                        • It used to default to 0, but Vim 8’s defaults.vim defaults this to 5 for users who have no .vimrc, making this change less necessary.
                      • set formatoptions+=j – delete the comment character (e.g. #) when joining commented lines with J
                      • set history=1000 – increase the number of remembered : commands from 200 to 1000

                      For an example of multiple hundreds of lines of vimscript, see my well-commented personal vimrc, which has a 993-line configuration section followed by a 148-line todo list. I definitely wouldn’t say I need all those lines to be productive, though.

                      1. 0

                        Hah, well I’m sure that’s great for you, but isn’t really representative of vim users.

                        1. 1

                          Um… I’m not going to claim to have proof otherwise, but it’s representative of all vim users I know, and most I read online talk about using vim so that it “works everywhere, always present over ssh on every system, etc” which obviously breaks down if you add hundreds of lines of mods to the base…

                          1. 1

                            My 6 lines are

                            set nojoinspaces
                            set ai
                            set expandtab
                            set tabstop=4
                            set sw=4
                            set showmode matchpairs=(:),{:},[:],<:>
                            

                            This is due to a lack of ambition. I’ve never bothered to learn the entire vim command set. I bet that laziness and lack of interest in learning the entirety of a very complex system is actually pretty common, rather than being “not representative of vim users”. Only way to know for sure, though, is an empirical study.

                            Update: I did an empirical study. This DDG search: site:github.com inurl:vimrc dot files. Top 10 hits, line lengths of .vimrc files in various “dotfiles” repos on github: 108, 611, 8 403, 182, 54, 54, 1743, 422, 202.

                            Interesting, and not what I predicted.

                        2. 2

                          Does :%sh { rspec... } not do this?

                          1. 2

                            I think you mean :nop %sh{ rspec ... } to prevent Kakoune from trying to run the output of rspec as a command, and it probably still wouldn’t do the same thing since it eats the rspec output instead of letting you read it.

                            1. 1

                              I’m not sure what %sh does actually tbh.

                            2. 1

                              I gave it a try 4 years ago: https://lobste.rs/s/v17gol/switching_sublime_text_from_vim_2017/comments/7dbqc1#c_7dbqc1

                              I’d love to learn if the story for any of these pain points has updates! Definitely lots I want to like about Kakoune.

                            1. 1

                              I’ll be taking a bike ride on the Silver Comet. Maybe once, but hopefully twice.

                              1. 5

                                why should you migrate? Because Pleroma is cleaner, leaner and prettier looking. Oh, and we have chats.

                                This fails to mention why you shouldn’t migrate.

                                Because Pleroma is easy to set up, it is therefore easier for fash and nazis to set up. There’s a whole lot of abuse that admins and mods have to deal with coming almost exclusively from Pleroma instances, so rather than dealing with that individually, which is time-consuming, frustrating, and stressful, a lot of mod teams have been blocking pleroma instances on sight. None of this is even mentioning the rumours of unsavory and *phobic opinions that have been voiced by members on the dev team. So it’s not a surprise that marginalized communities will act like this, the mod teams want to protect themselves and their users from having to deal with that kind of bullshit, and this is the option that doesn’t involve constant reports and months of stress added to their (already likely-hectic) lives.

                                1. 24

                                  You’re saying Pleroma is inherently bad because bad actors use it? That’s not a very good argument.

                                  1. 18

                                    FWIW I read it more as a warning that you could get caught in the crossfire due to overworked moderators that make overly-broad policies as a measure of desperation, not “pleroma bad”

                                    1. 8

                                      I think this is a misunderstanding - I’ve avoided migrating to Pleroma despite wanting to host my own instance because

                                      1. a lot of people I’m friends with, including very technical people, have had a terrible time getting assistance from the maintainers, and

                                      2. a lot of the rest of the Fediverse blocks Pleroma instances on sight, or nearly, because of some genuinely awful stuff that the developers have said and because of the preponderance of fashy instances. This is decidedly unfair to users but it’s not something that can be swept under the rug, not is it “politics over technology”.

                                      1. 17
                                        1. The Pleroma folks have only been helpful if anything at all. “My friends” isn’t a valid source.

                                        2. Again, if you’re going to call a group of people “fashy”, the least you could do is provide sources. “Pleroma = Nazi” seems like a running meme on the fedi, always backed by ZERO evidence. Quit spreading FUD.

                                        1. 1

                                          Quit spreading FUD.

                                          I don’t think you understand what FUD means. The point of FUD is to bolster other products, or remove the product from the ecosystem. How does removing Pleroma from the ecosystem make it better? Mastodon already has a monopoly on the fediverse, but regardless – they are both open projects with large contributor bases? So what exactly is gained here?

                                          FUD implies that the person has something to gain from spreading Fear, Uncertainty, and Doubt. What exactly do random people on the fediverse gain from spreading this?

                                          1. 4

                                            What exactly do random people on the fediverse gain from spreading this?

                                            That Mastodon remains the primary Fediversal network and thus shutting down whoever the network’s hivemind slightly disagrees with.

                                            1. 2

                                              To be quite honest, I don’t think “The Mastodon developers want to stop any competition by spreading that the developers of Pleroma are fascists” can be considered any less of a conspiracy theory than you consider “The Pleroma developers are fascists” to be.

                                              Except the latter has a couple of hundred people in my network saying that they have had personal, negative interactions with the Pleroma developers along the lines of fascism. People who have literally nothing to gain from saying this. People who do not give a shit whether or not Mastodon is the primary node.

                                      2. 5

                                        You’re not giving a very charitable interpretation of their post.

                                        Their comment isn’t that Pleroma is bad because bad people use it. Their comment is that, one disadvantage of Pleroma is that many mod teams ban Pleroma instances on sight.

                                        The underlying reason why Pleroma instances are banned on sight might be that bad people use it, but “bad people use it, therefore it’s bad” wasn’t the argument.

                                      3. 5

                                        Because Pleroma is easy to set up, it is therefore easier for fash and nazis to set up.

                                        This is weak and, imo, a bad way to open this (otherwise very much correct) post. It’s not that there are fashy Pleroma instances becuase it’s easier to set up; rather, it’s because the devs are, truly, terrible bigoted people, and because the software is, in my experience, used a lot more by fashy communities than other fediverse software is.

                                        1. 15

                                          That’s funny, my impression always was that Pleroma instances were a lot more pleasant, and their devs seem more interested in federation and otherwise sane technical practices. My theory is that this was because they didn’t promote themselves on twitter as a “twitter with better moderation”, which necessarily leads to a more toxic user base.

                                          1. 15

                                            the devs are, truly, terrible bigoted people

                                            Example of this?

                                            1. 15

                                              It’s all misdirection and FUD. Nobody ever posts examples they just keep saying it and insisting that it’s true.

                                              1. 14

                                                That’s my point, if you can’t show me at least screenshots of someone saying or doing something terrible, I have no reason to believe you. There’s a ton of heresay and second-hand gossip on the Fediverse (and the internet in general) that I take basically no one’s word at face value.

                                            2. 12

                                              it’s because the devs are, truly, terrible bigoted people

                                              Please cite examples of something they’ve done. This is the most bizarre baseless accusation.

                                          1. 2

                                            A neat analogy, but it seems the author is unaware of the Altor SAF lock.

                                            1. 4

                                              I have previously found that if thieves can’t get through the lock, they’ll just take the parts that aren’t locked or just damage your bike out of malice.

                                              1. 3

                                                Indeed. I’m simply pointing out that this arms race is always evolving.

                                              2. 3

                                                A massive 6.2kg $300 lock is probably a poor trade-off for many due to size, weight, and price.

                                                1. 2

                                                  For most, but probably not for the owner of that $7k bike in the top comment on this post.

                                                  1. 2

                                                    Maybe; but adding 7kg to your tour bike is not insignificant, never mind the huge size of the thing. I certainly wouldn’t look forward at hauling that around (especially not when using it as a touring bike) and would probably prefer either getting insurance or accepting the increased risk of theft.

                                                    For an expensive racing bike it’s even worse, as they usually weigh less than 10kg (even my €400 fixie was ~11kg) so you’re basically doubling your weight.

                                                    It all depends on your personal situation, chance of theft (i.e. where you live), what you do with it, and so forth. Generally speaking, I find that the quality of my life is better if I’m not so paranoid about this kind of stuff and just accept that I lose a bike every few years. It sucks, but one bad event every few years is better than spending time/brain cycles on this kind of stuff every day. YMMV of course.

                                                2. 3

                                                  Altor SAF

                                                  https://www.youtube.com/watch?v=1HvMPh6JBBI

                                                  That thing is comically large! But it looks like it does resist the typical angle grinder.

                                                1. 6

                                                  Coincidently I’ve recently read about mailto links not being ideal and I think RSS feeds suffer from a similar problem: links to them are kind of useless beyond signaling their existence. I am much more inclined to plop the website’s URL in the RSS reader than copy the feed URL directly. There used to be the idea of a “feed://” scheme floating around, but I’m not sure if it has caught on.

                                                  1. 8

                                                    Coincidently I’ve recently read about mailto links not being ideal and I think RSS feeds suffer from a similar problem: links to them are kind of useless beyond signaling their existence.

                                                    In my experience, it’s the opposite - if the the feed icon/URL is not featured on the page I have to copy the site address, open the feed reader, paste it, pick the appropriate feed (RSS, Atom, comments, etc.) and finally add. With a direct link, all I need is to click on it and my reader opens automatically.

                                                    I am much more incline to plop the website’s URL in the RSS reader than copy the feed URL directly.

                                                    This is what I’m forced to do because most pages don’t feature direct feed URLs.

                                                    The problem is even worse when it comes to podcasts - one can find links to all sorts of iTunes, Google Play, Stitcher, Spotify, etc. but don’t have any desire to use any of it and frequently have to ask for a direct feed URL.

                                                    1. 3

                                                      if the the feed icon/URL is not featured on the page I have to copy the site address, open the feed reader, paste it, pick the appropriate feed (RSS, Atom, comments, etc.) and finally add

                                                      This bugs me every time I have to do it. Plus, there’s a ~20% chance that the site doesn’t expose any type of feed, so I have to go to a workaround like politepol to follow the site :(

                                                      1. 6

                                                        This bugs me every time I have to do it. Plus, there’s a ~20% chance that the site doesn’t expose any type of feed, so I have to go to a workaround like politepol to follow the site :(

                                                        Don’t get me started about sites** without any type of feed.

                                                        So, you post stuff every so often and would, presumably, like some else to read it.

                                                        Sure.

                                                        Are you expecting me to visit every n days/weeks/months or script it?

                                                        Yeah, why not?

                                                        Thanks, but no thanks.

                                                        ** like with everything in life, there are, of course, exceptions :^)

                                                      2. 2

                                                        With a direct link, all I need is to click on it and my reader opens automatically.

                                                        Ah, that’s cool! Does it work with any old https:// link to a feed?

                                                        1. 2

                                                          Does it work with any old https:// link to a feed?

                                                          Sure, as long as it is being served with the correct media type.

                                                          1. 2

                                                            Huh, on macOS I get three different behaviors in three different browsers for a MIME type of application/rss+xml:

                                                            • Firefox offers to download the file, or open it with… Sublime Text
                                                            • Safari invokes the RSS reader (NetNewsWire)
                                                            • Chrome loads the feed as plain text

                                                            Since I use FF day to day, this behavior might have colored my impression of RSS feed URLs.

                                                            It would be interesting to see how https:// vs. feed://, text/xml vs application/rss+xml behave in the year 2020, and which version (or combination) offers the broadest convenience.

                                                            1. 2

                                                              You can change the file type’s associated program in FF’s Preferences.

                                                        2. 2

                                                          My experience chimes with this. I always copy and paste the feed URL. I even use this extension to show me feed links like Firefox used to.

                                                        3. 1

                                                          Coincidently I’ve recently read about mailto links not being ideal

                                                          That was a fascinating insight into the average user. In every desktop browser I’ve used, right-clicking on a mailto link gives an option of copying the address (often it includes the mailto: prefix, but that’s easy to trim after you paste). I’d never have thought about trying to copy the text because that requires accurately hitting the start and end, whereas right-clicking requires me to hit somewhere in the link. A copy button is potentially a good idea, but I am quite reluctant to encourage untrusted web sites to be able to write things to my clipboard. As far as I know, there are Chrome and Firefox plugins that will allow you to forward mailto links to a webmail client and it surprises me that people who use webmail wouldn’t set these up - I remember this being a problem 20 years ago but largely a solved issue 15 years ago. Does Chrome really not integrate with Gmail?

                                                          The article asks why browsers removed the RSS button. I know why this happened in Safari because Apple talked about it publicly. The user experience for RSS depends on being able to see new things easily. That doesn’t work well when you read feeds on multiple devices unless you have some mechanism for syncing the ‘read’ state across devices. Apple didn’t have that and didn’t want a core feature of the browser to depend on iCloud. The popular RSS readers were all server-side things that kept track of what you’d read centrally. These could ship a browser plugin that detected the RSS feeds and let you add it to your list, so this didn’t need to be core browser functionality. A quick look in the Chrome store implies that only feeder.co actually does this.

                                                        1. 5

                                                          This is impressive, but why not link the homepage or the demo? I was confused about how this graphical representation works until I actually saw it.

                                                          1. 1

                                                            I had the exact same experience. The demo linked by @sebastien was jaw-dropping and would’ve made so much more sense as OP.

                                                          1. 4

                                                            Lots of good things were originally unintended or semi-intended results of technical limitations. The /usr split is still a good idea today even if those technical limitations no longer exist. It’s not a matter of people not understanding history, or of people not realising the origins of things, but that things outgrow their history.

                                                            Rob’s email is, in my opinion, quite condescending. Everyone else is just ignorantly cargo-culting their filesystem hierarchy. Or perhaps not? Perhaps people kept the split because it was useful? That seems a bit more likely to me.

                                                            1. 19

                                                              I’m not sure it is still useful.
                                                              In fact, some linux distributions have moved to a “unified usr/bin” structure, where /bin, /sbin/, and /usr/sbin all are simply symlinks (for compatibility) to /usr/bin. Background on the archlinux change.

                                                              1. 2

                                                                I’m not sure it is still useful.

                                                                I think there’s a meaningful distinction there, but it’s a reasonable decision to say ‘there are tradeoffs for doing this but we’re happy with them’. What I’m not happy with is the condescending ‘there was never any good reason for doing this and anyone that supports it is just a cargo culting idiot’ which is the message I felt I was getting while reading that email.

                                                                In fact, some linux distributions have moved to a “unified usr/bin” structure, where /bin, /sbin/, and /usr/sbin all are simply symlinks (for compatibility) to /usr/bin. Background on the archlinux change.

                                                                I’m not quite sure why they chose to settle on /usr/bin as the one unified location instead of /bin.

                                                                1. 14

                                                                  That wasn’t the argument though. There was a good reason for the split (they filled up their hard drive). But that became a non-issue as hardware quickly advanced. Unless you were privy to these details in the development history of this OS, of course you would copy this filesystem hierarchy in your unix clone. Cargo culting doesn’t make you an idiot, especially when you lack design rationale documentation and source code.

                                                                  1. 2

                                                                    … it’s a reasonable decision to say ‘there are tradeoffs for doing this but we’re happy with them’. What I’m not happy with is the condescending ‘there was never any good reason for doing this and anyone that supports it is just a cargo culting idiot’ which is the message I felt I was getting while reading that email.

                                                                    Ah. Gotcha. That seems like a much more nuanced position, and I would tend to agree with that.

                                                                    I’m not quite sure why they chose to settle on /usr/bin as the one unified location instead of /bin

                                                                    I’m not sure either. My guess is since “other stuff” was sticking around in /usr, might as well put everything in there. /usr being able to be a single distinct mount point that could ostensibly be set as read-only, may have had some bearing too, but I’m not sure.
                                                                    Personally, I think I would have used it as an opportunity to redo hier entirely into something that makes more sense, but I assume that would have devolved into endless bikeshedding, so maybe that is why they chose a simpler path.

                                                                    1. 3

                                                                      My guess is since “other stuff” was sticking around in /usr, might as well put everything in there. /usr being able to be a single distinct mount point that could ostensibly be set as read-only, may have had some bearing too, but I’m not sure.

                                                                      That was a point further into the discussion. I can’t find the archived devwiki entry for usrmerge, but I pulled up the important parts from Allan.

                                                                      Personally, I think I would have used it as an opportunity to redo hier entirely into something that makes more sense, but I assume that would have devolved into endless bikeshedding, so maybe that is why they chose a simpler path.

                                                                      Seems like we did contemplate /kernel and /linker at one point in the discussion.

                                                                      What convinced me of putting all this in /usr rather than on / is that I can have a separate /usr partition that is mounted read only (unless I want to do an update). If everything from /usr gets moved to the root (a.k.a hurd style) this would require many partitions. (There is apparently also benefits in allowing /usr to be shared across multiple systems, but I do not care about such a setup and I am really not sure this would work at all with Arch.)

                                                                      https://lists.archlinux.org/pipermail/arch-dev-public/2012-March/022629.html

                                                                      Evidently, we also had an request to symlink /bin/awk to /usr/bin/awk for distro compatability.

                                                                      This actually will result in more cross-distro compatibility as there will not longer be differences about where files are located. To pick an example, /bin/awk will exist and /usr/bin/awk will exist, so either hardcoded path will work. Note this currently happens for our gawk package with symlinks, but only after a bug report asking for us to put both paths sat in our bug tracker for years…

                                                                      https://lists.archlinux.org/pipermail/arch-dev-public/2012-March/022632.html

                                                                      And bug; https://bugs.archlinux.org/task/17312

                                                                2. 18

                                                                  Sorry, I can’t tell from your post - why is it still useful today? This is a serious question, I don’t recall it ever being useful to me, and I can’t think of a reason it’d be useful.

                                                                  1. 2

                                                                    My understanding is that on macOS, an OS upgrade can result in the contents of /bin being overwritten, while the /usr/local directory is left untouched. For that reason, the most popular package manager for macOS (Homebrew) installs packages to /usr/local.

                                                                    1. 1

                                                                      I think there are cases where people want / and /usr split, but I don’t know why. There are probably also arguments that the initramfs/initrd is enough of a separate system/layer for unusual setups. Don’t know.

                                                                      1. 2

                                                                        It’s nice having /usr mounted nodev, whereas I can’t have / mounted nodev for obvious reasons. However, if an OS implements their /dev via something like devfs in FreeBSD, this becomes a non-issue.

                                                                        1. 2

                                                                          Isn’t /dev an own mountpoint anyways?

                                                                          1. 1

                                                                            It is on FreeBSD, which is why I mentioned devfs, but idk what the situation is on Linux, Solaris and AIX these days off the top of my head. On OpenBSD it isn’t.

                                                                            1. 2

                                                                              Linux has devtmpfs per kernel default.

                                                                    2. 14

                                                                      The complexity this introduced has far outweighed any perceived benefit.

                                                                      1. 13

                                                                        I dunno, hasn’t been useful to me in the last 20 years or so. Any problem that it solves has a better solution in 2020, and probably had a better solution in 1990.

                                                                        1. 6

                                                                          Perhaps people kept the split because it was useful? That seems a bit more likely to me.

                                                                          Do you have a counter-example where the split is still useful?

                                                                          1. 3

                                                                            The BSDs do have the related /usr/local split which allows you to distinguish between the base system and ports/packages, which is useful since you may want to install different versions of things included in the base system (clang and OpenSSL for example). This is not really applicable to Linux of course, since there is no ‘base system’ to make distinct from installed software.

                                                                            1. 3

                                                                              Doesn’t Linux have the same /usr/local split? It’s mentioned in the article.

                                                                              1. 5

                                                                                I tend to rush for /opt/my-own-prefix-here (or per-package), myself, mainly to make it clear what it is, and avoid risk of clobbering anything else in /usr/local (like if it’s a BSD). It’s also in the FHS, so pedants can’t tell you you’re doing it wrong.

                                                                                1. 4

                                                                                  It does - this is generally used for installing software outside the remit of the package manager (global npm packages, for example), and it’s designated so by the FHS which most distributions follow (as other users have noted in this thread), but it’s less prominent since most users on Linux install very little software not managed by the package manager. It’s definitely a lot more integral in BSD-land.

                                                                                  1. 3

                                                                                    […] since most users on Linux install very little software not managed by the package manager

                                                                                    The Linux users around me still do heaps of ./configure && make install; but, I see your point when contrasted against the rise of PPAs, Docker and nodenv/rbenv/pyenv/…

                                                                                    1. 3

                                                                                      Yeah, I do tons of configure make install stuff, sometimes of things that are also in the distro - and this split of /usr/local is sometimes useful because it means if I attempt a system update my custom stuff isn’t necessarily blasted.

                                                                                      But the split between /bin and /usr/bin is meh.

                                                                                2. 1

                                                                                  That sounds sensible. Seems like there could be a command that tells you the difference. Then, a versioning scheme that handles the rest. For example, OpenVMS had file versioning.

                                                                            1. 3

                                                                              Interesting that the author has only had these few pitfalls with iOS clients. I spun up an ejabberd server for me and my friends early last year, as Matrix/Riot proved to be too resource intensive for some of my friends’ phones. I was getting sick of the terrible performance of Riot as well.

                                                                              Those with iPhones tried both ChatSecure and Monal, but both OMEMO and push notifications proved to be incredibly unreliable. I wish I could help contribute to the development effort, but I have no desire to own any Apple products.

                                                                              1. 1

                                                                                Same experience. Spun up a Prosody server for friends and family, the only user that has issues with sync and OMEMO are the folks on iOS. Sometimes they get 0 notifications for 1 message received, other times they get hundreds of notifications. Too bad the Monal and ChatSecure folks don’t join forces.

                                                                              1. 18

                                                                                Torn between “this is a clickbait title, language is irrelevant the important part is using the right algorithm” and “well, having set operations in the standard library does sure help with that”.

                                                                                1. 9

                                                                                  I think the biggest difference is that Python allows you to focus on the task at hand, rather than plumbing like implementing linked lists, dealing with memory, etc. This makes it much easier to use the right algorithm.

                                                                                  The downside is that some “simple” operations in Python can be quite complex under the hood, and that in C you always have a good idea of what exactly is happening.

                                                                                  1. 13

                                                                                    Unless you’re in the habit of looking at the generated assembly, you really /don’t/ though. C as a shorthand assembler was really only a thing on the PDP, and we have been drifting further away from that since.

                                                                                    1. 1

                                                                                      Right, fair enough. I meant that there are (usually) no hidden complexities in C code, and that it’s usually reasonably obvious what the computer will do (although perhaps not “exactly”). In Python, it can be quite easy to create really slow code if you don’t have a good insight in how Python treats your code.

                                                                                      This is mostly an issue with new(ish) programmers, who have experience with only Python (or similar languages) and lack a certain “insight” in to these things.

                                                                                      1. 3

                                                                                        I meant that there are (usually) no hidden complexities in C code

                                                                                        You mean like cache misses? Branch mispredictions? Compiler optimisations you’d never think would happen due to undefined behaviour? Never mind memory safety.

                                                                                        1. 1

                                                                                          You mean like cache misses? Branch mispredictions?

                                                                                          There’s no way to avoid those though, even with assembly. In that regard C’s performance profile is very similar to assembly, and I say that as someone who isn’t impressed with the machine code that modern compilers produce.

                                                                                          The undefined behaviour is a really good point though. GCC 2.95 4 lyfe. :(

                                                                                          1. 1

                                                                                            There’s no way to avoid those though, even with assembly.

                                                                                            True, but I don’t think that changes the fact that I consider “no hidden complexities in C code” to be incorrect. What you’re saying is that there’s no way to avoid it, and my point is that writing C is no silver bullet (or, IMHO, silver. Or a good bullet).

                                                                                          2. 1

                                                                                            I totally get your point, but arp242 talked about hidden complexities, not hidden simplifications.

                                                                                            I’d probably rather have a cache miss than an assignment turned into a deep copy.

                                                                                            1. 1

                                                                                              I don’t consider anything I wrote to be a hidden simplification.

                                                                                              Deep copies only matter if they show up in the profiler, at which point you’ll know exactly where they are.

                                                                                              1. 2

                                                                                                I’m sorry. (I considered compiler optimizations to be hidden simplifications).

                                                                                    2. 4

                                                                                      I’m just mad it was written in C in the first place when sort, uniq, and cut would’ve been just as slow and probably used more memory and taken up multiple process table slots…but would’ve been more UNIXy.

                                                                                      1. 1

                                                                                        This is the logic that gets you C++

                                                                                      1. -6

                                                                                        macOS users are so arrogant. At least they boosted Spectacle, which makes the environment somewhat useful to people like me.

                                                                                        1. 2

                                                                                          Very nice, it looks like Gummi for LaTeX. Though part of me was hoping it was a forgotten remnant of the Mandrake Linux distro.

                                                                                          1. 1

                                                                                            Does Gummi have a live preview? I spent like 20€ a while ago and got me TeXpad, for all my LaTeX adventures and I’ve put the thing through hell but she works just so dang fine. Just doesn’t run on Linux, as with so many great apps. ugh.

                                                                                            1. 1

                                                                                              I haven’t used it since college, but I believe that it did.

                                                                                          1. 3

                                                                                            Sadly my primary language is Java, so this is impossible in that case.

                                                                                            1. 10

                                                                                              At least you try to keep symbol names within the 80 character limit, right? :)

                                                                                              1. 1

                                                                                                Changing the default indentation from 4 to 2 helps a lot.

                                                                                              1. 12

                                                                                                That’s all well and good, but I think it goes against the usual flow of using vi, which (to me) feels optimised for opening, editing, closing, running other commands in the shell, opening again and so forth.

                                                                                                Emacs, OTOH, feels much more like it’s intended to be opened once, then used for a prolonged period of time (an entire login session, perhaps). It has a rich set of buffer-manipulation commands which assist with this, as well as many interactive modes which perform tasks vi users would probably do from the shell (browse the web, say, or read email).

                                                                                                There’s nothing wrong with trying to live in vi, really, but there’s a lot of programming required to bring it the features found in Emacs — and much of that work has already been done for Emacs, and if it hasn’t been, well, elisp is a much nicer language than Vimscript.

                                                                                                I use vi almost every day, but I live in Emacs. For me, at least, living in vi would feel odd.

                                                                                                1. 6

                                                                                                  Though my workflow in vim is as you described, that is merely a personal choice. Vimscript is no longer the only option in mainline vim, and, if you require even more power, the neovim fork aims to allow any language for plugins.

                                                                                                  And much of this usability work has already been done. I am currently in limbo between emacs and neovim; with org-mode drawing me in from one side, and all of my fuzzy-file-finding and project navigating plugin tools pulling me from the other. It’s just as much “programming” to set these things up in emacs.

                                                                                                  1. 2

                                                                                                    all of my fuzzy-file-finding and project navigating plugin tools pulling me from the other. It’s just as much “programming” to set these things up in emacs.

                                                                                                    Do Helm and Projectile not do the trick? Prelude packages them both up nicely.

                                                                                                    If you prefer the vi style, I hear excellent things about Spacemacs.

                                                                                                    1. 3

                                                                                                      I am more saying that I already have that stuff set up in neovim, and it will be just as much work to figure it out in emacs. EDIT: I have tried spacemacs, but it feels heavy-weight and gives me option paralysis.

                                                                                                  2. 4

                                                                                                    I have a friend who uses something in between: He uses ^z to get back to the shell and fg to return to vim. He has multiple vim instances in the background sometimes. Essentially he uses shell jobs instead of vim buffers.

                                                                                                    1. 2

                                                                                                      Binding ^z to fg might have been the single most impactful thing I ever put in my zshrc.

                                                                                                      function rebind-z() { fg }
                                                                                                      zle -N rebind-z
                                                                                                      bindkey '^Z' rebind-z
                                                                                                      
                                                                                                      1. 1

                                                                                                        I do this instead of using vim buffers, I think because I spend most of my time in the shell and not vim.

                                                                                                        Line for line, I write just as much zsh code as anything else.

                                                                                                      2. 3

                                                                                                        I’m currently a heavy vim user, and have made everything (browser, window manager, tmux, shell, etc) use vim-like bindings. This is how I ‘live in vim’ (though not actually always in vim). I’m really curious what your workflow looks like using emacs + vi though. Getting to the point I am at now with everything set up this way was not easy, but on the other hand, using emacs would require me to unlearn a ton of old muscle memory and learn a ton of new muscle memory.

                                                                                                        1. 4

                                                                                                          Take a look at Spacemacs – truly the best of both worlds, plus a mind-opening leader key menu (the “Space” part).

                                                                                                          1. 2

                                                                                                            I’m really curious what your workflow looks like using emacs + vi though.

                                                                                                            Honestly, I’m a bit embarrassed by it: I ought to use emacsclient instead of vi (and in fact on one of my machines I do). Instead, I tend to use Emacs to edit code, documents (LaTeX or Org mode), browse the web (ewe), read documentation (woman), interact with git (Magit), handle projects (Projectile), interact with Common Lisp (SLIME), work in a shell (Eshell) and so forth.

                                                                                                            Meanwhile, I use vi to do quick edits to line-oriented config files, e.g. stuff in /etc, in part because I have an old habit of typing sudo vi /etc/foo rather than editing sudo::/etc/foo with TRAMP (I keep trying to switch completely, but … old habits die hard).

                                                                                                            I would suggest to everyone to not do as I do, but just learn Emacs and use it for everything. If you want vi’s almost certainly better text-manipulation language, then use Viper mode, e.g. as provided by Spacemacs.

                                                                                                          2. 1

                                                                                                            As someone who uses vi for spot-editing and emacs for project work, I work like you.

                                                                                                            Emacs, OTOH, feels much more like it’s intended to be opened once, then used for a prolonged period of time (an entire login session, perhaps).

                                                                                                            With tmux, for me emacs is open until unplanned server reboot or emacs version upgrade.

                                                                                                          1. -2

                                                                                                            So…it sounds like the main thing here is package management. Why do I care about complex package management when I have docker?

                                                                                                            As to keeping things under version control, I have configuration management.

                                                                                                            What’s the advancement here?

                                                                                                            1. 20

                                                                                                              Docker is tremendously complex to run at any sort of scale and introduces a bunch of concerns for an application that may not be necessary. And its original purpose isn’t really to make package management easier, its to isolate processes securely. As such, it tends to be terrible for package management beyond anything trivial, which explains the glut of tools for provisioning containers. (Packer et. al.) I prefer using tools that are built to solve an issue specifically.

                                                                                                              1. 12

                                                                                                                Why do I care about complex package managers where I can put an entire operating system in a jail, where I would still have to worry about complex package managers but now once removed.

                                                                                                                1. 10

                                                                                                                  Docker is addressed in the OP, but essentially Docker container builds are not reproducible. Guix packages have all software dependencies hashed into the build, so they theoretically will never break (I say theoretically because the software is still in alpha), and the system can always roll back to a working version if an update goes south.

                                                                                                                  1. 9

                                                                                                                    Docker is an attempt to solve the same problems, but it does so in an unprincipled way, and as a result it just doesn’t actually solve the problem in a way that’s consistent or reliable.

                                                                                                                    1. 4

                                                                                                                      It never struck me as much of a package manager— I have always thought the intent behind docker was to provide process isolation without the overhead of a VM. Especially since the Dockerfiles are written in an anemic shell script language.

                                                                                                                      1. 5

                                                                                                                        If you attempt to perform builds, then you need to manage packages, whether that’s your intent going into it or not.

                                                                                                                  2. 4

                                                                                                                    What I took away was that the main benefit, apart from the virtues of functional package management, is uniformity, as the entire system is managed with Guile. I haven’t used Docker, so I may be incorrect in stating this, but I do not think Docker applies to some of the use cases listed in the article, such as configuration of the Linux kernel.

                                                                                                                    1. 4

                                                                                                                      To he it’s the prospect of stability that doesn’t conflict with novelty. The classical dichotomy between the two can be seen between something like Debian Stable/Cent OS vs Debian Unstable/Arch, where the latter might update their packages quickly, at the risk of an increasingly wobbly experience, while the former insist on waiting until experience and failure of others indicate safety. Being able to revert any change means that I don’t have to commit a leap of faith when updating, since it’s Ctrl-Z’able and can be fixed, within the intentionally conceived framework (as compared to downloading .deb packages from the internet and manually installing them).

                                                                                                                      The new Libre Lounge podcast talked about a “security”/“ethical” issue in their second conversation, comparing it to other package management systems like NPM on the one hand (as a generally bad example, think of “left pad”) and other containerized (Docker, but also Flatpak or Snap, which (they claim) was intentionally developed to also serve the distribution of propitiatory software).

                                                                                                                      Guix specifically (besides being very close to the FSF) has the interesting aspect of being written in (Guile) Scheme, with references and connections to Emacs –> the system in geared towards an open mentality and encourages to use the rights that free software grants it’s users. You don’t only have the permission to download, read, edit and share changes, but the system gives you the tools and the environment to easily hack for yourself – without having to manually run make or ./configure hundreds of times, installing each dependency one by one, hoping it’s the correct version.

                                                                                                                      I don’t know if this is that convincing, but I rather like this: https://www.gnu.org/software/guix/manual/en/html_node/Using-the-Configuration-System.html#Using-the-Configuration-System + https://www.gnu.org/software/guix/manual/en/html_node/Bootstrapping.html#Bootstrapping. When everything can be reproduced with minimal dependencies (aka. binary seed), that tries to result in the same systems over different platforms (x86 vs RISC V, Linux vs Hurd, Laptop(s) vs Desktop(s), …), I’d be interested in using something like that, and I guess others would too.

                                                                                                                      1. 1

                                                                                                                        None of the advantages and features listed in the article interested you?

                                                                                                                        1. 0

                                                                                                                          Not as compared with existing tools that already solve these problems. It seems like the author of this article hasn’t used configuration management before and is blown away by it.

                                                                                                                          1. 13

                                                                                                                            Is there another distribution except NixOS that lets you roll back your whole system configuration? That does system upgrades atomically? That lets you say “install my same system configuration but using the packages as of August 15 last year?” That lets non-root users install packages? That can take your system configuration and automatically generate a QEMU VM or a USB live disk? That can generate Docker images in a way that’s fundamentally more composable and reproducible than docker build?

                                                                                                                            1. 10

                                                                                                                              There’s a thing that Nix users like to do, which is to classify infrastructures into one of three categories: divergent, convergent and congruent.

                                                                                                                              Divergent infrastructure is what you get when you have no CM. You run arbitrary commands on your systems, you hope you remember what you did, even when do you manage to stay fairly consistent you probably have differences between boxes A and B because you ran apt-get update at different times

                                                                                                                              Convergent infrastructure is what you get with Puppet or (I believe but have not verified) Chef or Ansible or similar: there’s some kind of description of the parts of the system that are “managed”, but it’s sufficiently broad-grained that there may be differences lurking “under the hood”: files that the CM system doesn’t know about may have been updated, rewritten or abandoned by any installed package or previously-installed-but-since-removed package so who’s to say what they contain or whether they’re identical across your fleet? Hopefully they’re functionally identical and 95% of the time they probably are, but … If you’ve ever had to run puppet twice to get the system into the state you wanted it, or had two machines be slightly different because the upstream package server did an update between puppet runs, you’ve experienced the 5%

                                                                                                                              Congruent infrastructure is where, when you apply the configuration, you get the same answer every time. Nix does this; Guix (again, I assume - never used it myself) does this. If you’ve never used it before it could be confused with “traditional” CM, but I think it’s pretty next-level stuff

                                                                                                                              http://www.infrastructures.org/papers/turing/turing.html - a good read

                                                                                                                              1. 2

                                                                                                                                A good read indeed.

                                                                                                                                Though, I would assume that Traugott would be more a fan of Docker than Nix. Docker even resolves the control-loop problem by having a host. Sure you can argue that the host itself still has the problem, but still Dockerfiles are a very controlled and totally ordered way of setting up a system.

                                                                                                                                Update: After some more reading, I find that congruence is not what I want for my little network at home. I want my machines to install security updates from Ubuntu automatically and asap. I do see the value for full-time sysadmins though. They have the time to check and test each update.

                                                                                                                        1. 4

                                                                                                                          So, if you use Oracle JDK for development (the only allowed free use now), you are targeting (in programs that you develop) either

                                                                                                                          • Paid Oracle JDK (rare case, only in ultra-enterprise setting)
                                                                                                                          • OpenJDK

                                                                                                                          And if you develop programs intended to run on OpenJDK, why use Oracle JDK for development and testing? I remember installing Oracle JDK on Linux instead of OpenJDK just because it rendered fonts in IDEs better. I hope fonts are fixed in newer versions of OpenJDK.

                                                                                                                          You can’t even use it to run Minecraft in breaks between app development now.

                                                                                                                          I remember Java having installed on almost every Windows machine. This era has passed and now you must bundle 100 Mb runtime to your 1 Mb app. This could be beginning of the end of Java on desktop.

                                                                                                                          Java Web Start is sane technology, not any way related to applets. JOSM, the primary editor for Openstreetmap still lists it as recommended way to install it. It’s sad that they removed it. It’s also a sign of abandoning Java on desktop.

                                                                                                                          JavaFX failed because it was always marketed as “better applets with animation features from Flash” or “rich internet application platform for corporate kiosks showing sales charts”, and most people didn’t know it’s a GUI toolkit, a replacement for Swing and Java-gnome.

                                                                                                                          1. 1

                                                                                                                            Use the IntelliJ JDK if that matches your IDE.