1. 1

    I’ve read through this guide several times over the years and it’s great. Looking forward to the perpetually-TBD ConfigureAwait section!

    1. 2

      By coincidence, I just exactly finished migrating a huge codebase from .NET Framework to .NET Core and got the front end running natively in linux today.

      Having it run in linux is SO nice. My dev machine runs arch linux with Windows in a qemu VM, and the Windows VM runs builds and uses IIS for hosting.

      However the Windows VM also sucks up a heap of memory and occasionally CPU cycles. So being able to leave it off is very very nice.

      I code in vim, using OmniSharp-vim for C# language services. I actually could already do this with the .NET Framework codebase, using mono. So dropping the mono requirement is nice but doesn’t make much difference to me.

      The BIG thing that I’m stoked about is that I can now debug in Vim, using vimspector with the Samsung netcoredbg DAP adapter. It works really really well. Debugging is the only reason I ever use Visual Studio any more and I’m so happy to be able to do more of that in vim. Visual Studio is a great debugger and I expect I’ll still use it for “heavy” debugging.

      1. 1

        Thank you for sharing about Vimspector and Samsung netcoredbg DAP adapter. I’ll have to make time to investigate those. Debugging and Intellisense are the two main things that keep me using VS Code on Linux.

        1. 1

          I’m not entirely sure what the state of Microsoft debugger licensing is, but the initial reason for looking into the Samsung netcoredbg adapter was due to this issue, where the MS debugger license said you were only allowed to use it in Visual Studio or VSCode. JetBrains made their own debugger in response to this and I suspect Samsung also made this debugger for the same reason.

        2. 1

          any particular reason you still use IIS for hosting?

          1. 2

            I’ve been using it for hosting .NET Framework stuff as it was what we’ve traditionally used in the company and it’s easier for me to work cooperatively with the team when my environment is not too drastically different from others’.

            However my new setup with .NET Core is running its own Kestrel server with dotnet start which is way easier and lighter.

        1. 4

          What are some crustacean experiences with Treesitter?

          I tried it out, despite the warnings about instability, for the refactor plugin. Got this Unity codebase to deal with, and nothing else really provided C# refactoring.

          The refactoring wasn’t project-wide, which caused some woes, though I could repeat the operations a few fimes in separate files and be happy-ish. The dealbreaker is that Neovim would quite often deny insert mode, as if the buffer setting changed BTS somewhere. Restart, my favorite!

          I don’t use treesitter ATM, maybe later.


          LSP is also a mixed bag. Very useful and works nice on my heirloom-grade laptop, even for Unity, but on my desktop it buffers up syntax errors for nearly every keypress and flushes them out so slowly I can jump to Unity and run the unit tests by the time LSP’s done complaining. Sometimes an error is left lingering.

          This is with the same config on both machines, and OS load is always less than you’d imagine, so it’s just weird. Even mono should be the same version.

          No regrets; C# needs this stuff so bad it’s worth the trade-off.

          1. 7

            For typescript it was a game changer. Syntax highlighting in vim never looked quite right, especially in a side-by-side comparison with VSCode.

            I also find the neovim ecosystem to be rich and full of new plugins because of things like tree-sitter support. There’s an entire section dedicated to treesitter enabled colorschemes on neovimcraft: http://neovimcraft.com/?search=tag:treesitter-colorschemes

            1. 3

              FWIW I hit the insert mode bug without treesitter. For the first time, even. Guess it was the wrong tree(sitter?) I was barking up, because of https://github.com/nvim-telescope/telescope.nvim/issues/82#issuecomment-854596669

              Treesitter might be laggy enough or something to trigger the problem more often. Testing that fix now, and maybe I can give Treesitter another shot soon!

              1. 3

                nothing else really provided C# refactoring.

                Could you expand on this? I would expect C# to be the language with best refactoring tools, given that both JetBrains (Resharper & Rider) and Microsoft (Roslyn) have been working on them for more than 10 years at this point.

                1. 2

                  Not if neovim is your goal. The solutions from jetbrains and ms are proprietary

                  1. 5

                    This is factually wrong about ms.

                    Roslyn is MIT licensed, omnisharp makes it speak LSP. For refactors specifically, I’d be surprised if there isn’t non-editor tooling to apply Rosly analyzers as project-wide refactors.

                    1. 3

                      Sure. However actually using omnisharp is another matter. Its definitely not on par with the experience inside of visual studio itself. For example vscode which uses omnisharp provides a pretty demonstrably second class experience compared with rider and visual studio proper. And even then that experience is better than what you get from lsp c# in neovim.

                      An example of this breakdown is that msbuild integration with visual studio is on a whole other level compared to what omnisharp can handle

                  2. 2

                    What @Kethku said.

                    I did find this one refactoring plugin vim-refactor that pulled in a bunch of library-like stuff, less surprisingly conflicted with some of my maps, and didn’t do c# properly in the end.

                    That’s why Treesitter seemed so appealing. I’m sure it’s not such a turd as my experience was, but I also have work to do beside debugging 0d plugins ;)

                    I do really look forward to trying it out again, but I’m happy with my LSP setup (despite the error stuff!) and able to be productive now.

                    1. 5

                      I still don’t understand something I believe. Roslyn is a very mature tool to do analysis and transformation of C# code. Using tree sitter for refactors (which knows only syntax) is like parsing html with regexes, only one level up: using syntax analysis for semantic transformations.

                      I would be surprised if no-one has glued Roslyn to vim, and indeed folks seem to have done that? https://github.com/OmniSharp/omnisharp-vim

                      If, despite all this, “refactoring C# in vim” is still an unsolved problem, then there’s an opportunity for a fairly easy, fairly popular OSS project here. All the hard work of actually doing refactors has been done by Microsoft. What’s left is the last mile of presenting what Roslyn can do in an editor.

                      1. 2

                        Maybe my “repeat in multiple files” is because of syntax being the wrong layer? I’m really not 100% sure!

                        It was palatable, and got the job done, and the dealbreaker was something else.

                        I do have OmniSharp running, but I haven’t seen anything related to proper refactoring in Neovim with it. I could look again and verify I have the latest version, though I did take a quick look before my Treesitter journey.

                        It would be beyond awesome if more native refactoring existed, but I do believe it’s more of an opportunity than an existing feature.

                        1. 5

                          Current OmniSharp-vim maintainer here. All of the OmniSharp-roslyn code actions are available in OmniSharp-vim. OmniSharp-vim doesn’t actually use LSP, as both OmniSharp-vim and OmniSharp-roslyn are older than the protocol.

                          However the OmniSharp-roslyn server does have an LSP “mode” and so is usable without OmniSharp-vim using vim LSP plugins or neovim native LSP. I would expect all code actions to be available via LSP too but I don’t know.

                          I’m curious to know what kind of server-based refactorings we’re talking about exactly.

                          1. 2

                            Hi! And thanks for your maintainership! :)

                            My use case is/was simple: given a code base, rename methods so they’re renamed everywhere. The start of the rename can be a method definition or a usage, and everything will be figured out. Not sure if that’s possible, even, just a wishlist thing ;)

                            I haven’t needed to touch constructor (or other method) argument refactoring, and I’m sure the Treesitter refactor plugin has nothing for this, but could be useful.

                            1. 4

                              In OmniSharp-vim you can do :OmniSharpRenameTo NewSymbolName on either the definition or a usage and it will be renamed everywhere in the solution.

                              Here’s a demo on the OmniSharp-roslyn codebase. The first 60 seconds are the server warming up (it’s a big solution):

                              https://asciinema.org/a/gd6GGiGGtcXjBsXoY0UKrqluB

                              1. 2

                                TIL! Thanks! Now I got a config with treesitter that disables the refactoring prompt in c# in favor of an autocmd map for omnisharp :)

                                Edit: yet to see what needs to be reloaded to get rid if the “does not conrain a definition (though it sure does lol!)” error, but still this is good news :)

                                Edit2: jumping the gun here, :LspRestart seems to be good enough.

                                1. 3

                                  Right, if you’re using LSP and OmniSharp-vim together, you’ll have to find ways of keeping the servers synchronised, because you’re running multiple instances.

                                  1. 2

                                    Yeah, it’s a bit messy but most often only when autocompleting. I approach my neovim pretty much by fixing things as they start to annoy me too much or cause a productivity hit.

                                    Maybe I’ll get that thing sorted some day, but I’m fine for now :)

                1. 13

                  I am intrigued by the framing of the Sturm und Drang about the state of the web as being driven, to some significant degree, by politics internal to Google.

                  1. 26

                    As I stated earlier this week, promo packets are what’ll do in the web.

                    I think a lot of developers simply lack the interest in context to process the realpolitik that shapes and distorts the fabric of spacetime for our industry.

                    If you refuse to understand that Google’s whole business is threatened by adblockers, you probably would be confused at the some of the changes to web extensions webRequest that make that work harder. If you don’t understand the desire to make SEO, crawling, and walled gardens easier AMP probably seemed like a great return to roots.

                    Other companies do this too, of course. If you didn’t know about OS/2 Warp some of the Windows APIs probably seemed weird. If you don’t know about Facebook trying to own everything you do then the lack of email signup for Oculus probably seems strange. If you invested heavily into XNA you probably got bit when internal shifts at Microsoft killed XNA off. If you don’t know about internal Canonical and RHEL shenanigans, systemd and other things probably are a surprise.

                    Developers need to pay as much attention to the business dependencies as the technical ones.

                    1. 6

                      What do you mean by promo packets? I’m not familiar with this term.

                      1. 21

                        When you’re doing a performance review at Google, you can request a promotion. If you do this, you put together a ‘packet’ including the impactful work you’ve done. New work is rewarded heavily, maintenance less so. For senior engineers, shipping major projects with an industry wide impact is a path to promotion.

                        1. 30

                          Which means Google rewards doing something new for the sake of doing something new. It’s tremendously difficult to get promoted by improving older systems. Crucially, you often need to demonstrate impact with metrics. The easiest way to do that is sunset an old system and show the number of users who have migrated to your new system, voluntarily or otherwise.

                          1. 16

                            Ew. Thanks for the insight. But ew.

                          2. 1

                            Is there any material evidence suggesting that someone’s promotion is the reason that chrome will remove alert? Obviously google will push the web in the direction that juices profit, but an individual promotion? Seems like a red herring.

                            1. 6

                              It is often difficult to pick it apart as it’s rarely a single person or team. What happens in large organizations is that there is a high-level strategy and different tactics spring from that. Then, there are metrics scorecards, often based on a proxy, which support the tactics delivering the strategy. This blurs the picture from the outside and means that rarely one person is to blame, or has singular control over the successes.

                              I haven’t followed the alert situation very closely, but someone familiar with large organizations can get a good read from the feature blurb. There is a strong hint from the language that they are carrying a metric around security, and possibly one around user experience. This translates to an opportunity for a team to go and fix the issue directed by the metrics since it’s quantifiable. The easiest way to start might be to work back from what moves the metric, but this is a very narrow perspective.

                              Developers may know what the best things to work on having been a developer in that area for 10 years, but their impact tracks towards those top-level strategies. Management can’t justify promotion because someone else is very focused on metrics that drive the strategy.

                              In lots of places this is called alignment. Your boss may only support X amount of work on non-aligned projects, if you do at least Y amount of work on Y projects. A classic big company alignment example is a talented person in a support department. If they can fix your biggest problem at the source it’d be best to let them do this. However, metrics incentivize assigning them to solving N support cases per week and other metrics designed for lower-skilled individuals instead of working on fixing root causes. Eventually, they leave unless you have smart management taking calculated risks, manage the metrics at the team level so the team is not noticed working the way it wants, seeking paths for talented people to work on the product, etc.

                              1. 1

                                Many of us understand how metrics and incentives at tech companies work. Was just pointing out that it’s a bold claim to assume that chrome is removing alert due to an individual seeking a promotion.

                        2. 3

                          I think about this in terms of my time at Apple – like, people ascribed all kinds of causes to various seemingly peculiar Apple decisions that to those of us on the inside were obvious cases of internal politicking leaking out.

                          1. 2

                            WHATWG is a consortium of multiple companies so I’m curious why everyone is pointing the finger at Google here, or is the assertion that Google has so much power over the WHATWG and Chrome at this point that there’s no ability for other companies to dissent? (And I mean we all know that the W3C lost and WHATWG won so a consortium of vendors is the web.)

                            1. 9

                              The multiple companies are Apple, Google, Microsoft, and Mozilla (https://whatwg.org/sg-agreement#steering-group-member, section 3.1b) Of the three, only Apple develops a browser engine that is not majority funded by Google.

                              1. 4

                                I’m pretty sure Apple develops a browser engine that is majority funded by Google: https://www.theverge.com/2020/7/1/21310591/apple-google-search-engine-safari-iphone-deal-billions-regulation-antitrust

                                1. 5

                                  That’s some pretty weird logic.

                                  The browser engine Apple creates is used for a whole bunch of stuff across their platforms, besides Safari:

                                  Mail, iMessage, Media Store fronts, App Store fronts.. Those last two alone produce revenue about 4x what Google pays Apple to make it the default.

                                  Do I wish they’d get more people using alternatives and pass on the google money? Sure. Is there any realistic chance their ability to fund Safari and/or Webkit would be harmed by not taking the google money? Seems pretty unlikely.

                                  1. 1

                                    I don’t think the stores use WebKit. They didn’t last time I investigated.

                                  2. 4

                                    It’s true-ish. But I’m sure the most profitable company in the world probably doesn’t require that money and would be able to continue without.

                                    1. 3

                                      You don’t become the most profitable company by turning down revenue.

                                  3. 1

                                    Right I was just wondering if folks think the WHATWG is run solely by Google at this point. Thanks for the clarification.

                                  4. 5

                                    The point is that many of those new APIs don’t happen in standards groups at all. Exactly because they’d require more than one implementation.

                                    1. 5

                                      Yes, this. Google’s play here is less about controlling standards per se (ed: although they do plenty of that too) and more about getting everyone to treat Whatever Google Does as the standard.

                                    2. 4

                                      WHATWG was run at inception by a Googler and was created to give Google even more power over the standards process than the hopelessly broken W3C already gave them. That they strong armed Mozilla into adding their name or that Apple (who was using the same browser engine at the time) wanted to be able to give feedback to the org doesn’t change the Googlish nature of its existence, IMO

                                  5. 12

                                    Like it or not, Google is the www. It is the driving force behind the standards, the implementations (other than Safari), and the traffic that reaches websites.

                                    It would be odd if Google’s internal politics didn’t leak into the medium.

                                    1. 6

                                      Right, it’s just … one of those things that is obvious in retrospect but that I would never be able to state.

                                      1. 9

                                        A lot of people seem to think that standards work is a bit like being in a university - people do it for the love of it and are generally only interested in doing what’s best for all.

                                        In reality it’s a bunch of wealthy stakeholders who realize that they need to work together for everyone’s best - they’re not a monopoly, yet - but in the meantime it behooves them to grab every advantage they can get.

                                        As mentioned in the post, standards work is hard and time-consuming, and if an organisation can assign a dedicated team to work on standards, that work will get implemented.

                                        1. 3

                                          Universities work like that too now

                                          1. 1

                                            This is sadly true.

                                  1. 10

                                    FWIW, I’ve personally enjoyed email hosting by Migadu.

                                    1. 1

                                      Same here. Switched after self-hosting mail for a couple years. Can absolutely recommend Migadu.

                                      1. 1

                                        I’m the author of the post. I hadn’t heard of Migadu before, but it almost looks like it would work. The only issue is their Micro plan ($19/year) only allows 200 inbound emails per day. I guess that may not be an issue most of the time, but there are days where I receive more than 200 emails. The inability to control how much inbound email you are receiving makes me hesitant to use such a service.

                                        1. 3

                                          I also use migadu for a family account. The thing I really like about it is that you can add as many accounts as you like for your domain: this@my.domain, that@my.domain, theother@my.domain, it’s so nice.

                                          But yes, the 200-in limit has been my concern too. I subscribe to a few mailing lists and have a worry that one day some big heated mailing list conversation will put me over. This FAQ answer suggests they are lenient and that emails won’t actually be lost (assuming senders follow correct email practices!), but my tentative plan has been to wait and see if I ever get a warning email, and upgrade to the next tier if it becomes an issue. It hasn’t so far, after a year or so.

                                          1. 3

                                            For what it’s worth, it’s not a hard limit. They won’t block the 201st email — if it’s a recurring thing, they’ll ask you to upgrade. This is mentioned in their docs, somewhere. cc @jeremyevans

                                            1. 1

                                              I checked and it is in their documentation. So maybe that would have been a simpler option. I might have switched to Migadu instead of using a VM if I had known about it first. I think the only issue is the next level up from the $19/year plan is the $90/year plan, which is a pretty significant jump. But for someone who isn’t likely to go over their limits, Migadu looks like a really nice option.

                                              1. 1

                                                It’s mentioned in the FAQ answer I linked to

                                                1. 1

                                                  Ah, didn’t notice you’d done that.

                                              2. 1

                                                Re: using multiple addresses at the same domain:

                                                Which email client(s) do you use? Last time I checked, Thunderbird doesn’t put design thought toward this use case. As such it is clunky to use for sending emails from different addresses.

                                                I’m on Evolution now, but always looking for better options.

                                                1. 1

                                                  I primarily use mutt, which I have configured with 4 different email accounts: 1 work, 1 gmail, 2 migadu. So I don’t actually send from different addresses exactly (although I think that is easy to do in mutt), but have commands which switch me completely to a different account and inbox.

                                                  But what I meant about migadu is not that they give you multiple email addresses to send to and from within your domain, but that they let you add as many accounts as you like within that domain. So my daughters get their own email addresses and passwords and can sign into them on whatever mail client they like. And I can give these out to as many of my family as I like (the domain is a play on our surname), as long as I don’t hit the 200/20 limit.

                                              3. 2

                                                Thanks for posting your setup. I’ve been sniffing at things adjacent to this for a while, looking at some other providers for SMTP. mailroute was the one that had looked most promising, but their definition of a “user” would have had me paying heavily for all the aliases I use, so I had not made the jump yet. Tuffmail’s EOL is going to force my hand.

                                                Right now, I’m deciding between Migadu and a setup similar to what you’ve done. I had almost given up on the self hosted setup. Sendgrid could work for me, though. My only heartburn about it is, if they decide to kill off their free plan, it’s a huge jump up to $15/mo while I work out an alternative. Where I’d be flirting with the 200 in/day limit on Migadu, the jump up to the next tier isn’t as nasty if I need to do that.

                                                1. 2

                                                  Really sad to hear about Tuffmail. They were truly the best option.

                                            1. 3
                                              • I work with Git repos, but strictly through Mercurial + hggit. Templates + revsets are the best.

                                              • go file1 file2 … is a little wrapper to open multiple files/dirs with xdg-open. I’ll probably rename this script if I ever have to install Golang.

                                              • h myprogram tries, in order, to open the man page, or run mycommand --help | less flag, or with mycommand -h | less. Basically “I want to read your help page, dammit” with a side order of “in a pager, please, don’t barf it straight into the terminal”.

                                              • addkernel installs the active Conda environment as a one of my user’s IPython/Jupyter kernels. This makes it visible from any Jupyter installation, specifically my main one. This, in turn, lets me maintain one virtualenv with a Jupyter installation + extensions, instead of one Jupyter installation per {conda,virtual}env.

                                              1. 2

                                                h! What a great idea, I’m doing that! Actually, I might call it ;h since I type this often by accident anyway, as a vim user who maps ; to :

                                                1. 1

                                                  Oh yes, nnoremap ; : is an excellent mapping.

                                                  If you have a PageDown key to fall back on, nnoremap <Space> : is also fantastic, and even easier to type. No drawbacks so far in my experience.

                                              1. 14

                                                I use tmux a lot. I like tmux’s splits and windows and sessions, but the main reason I use it is for keyboard text selection and scrolling. I wrote a little about this here, with a demo of what it looks like: tmux lets you select and copy text with your keyboard. I don’t really remember what life was like without it.

                                                I don’t really get the appeal of smart cd, but I have persistent tmux sessions set up for all the projects I work on, so switching directories is usually just switching my tmux session.

                                                I wrote a little thing to hook up fzf to my shell completion. I have different triggers, like .f for “select file” or .c for “select commit,” and when I type .c<TAB> I get a little fzf popup that lets me select a commit and insert it. I know you can just enable fzf integration with shell completion globally, but this has a few advantages:

                                                • it’s much, much, much faster than shell autocomplete (especially for selecting dirty git files)
                                                • it’s deterministic: when I activate completion, I know exactly what choices I’m going to get – I am not at the mercy of whatever shell autocomplete decides I want to do
                                                • I can add new triggers without having to modify a program’s shell completion (if you have not edited these scripts, they are… truly arcane), and I don’t have to worry about missing completion files for random programs.

                                                And I can still use the default shell completion as much as I want; this just adds another option. I did this for years with global shell aliases, which have a lot of problems, but a few months ago I dove in and figured out how to hook it into regular tab-completion. It’s a little complicated, but it works great.

                                                I really like delta; the goto-next-file-header thing is a brilliant hack. But I had to do a lot of work to get output that I liked.

                                                Having nix installed provides a cool super-power that I use a lot: temporary installation of a program. If I heard of something and want to try it out, I can run nix-shell -p fd (for example) and play around with it. And then it “disappears” as soon as I close that shell, so I don’t have to remember to uninstall it. Lowers the barrier of trying random stuff out.

                                                I made a hacky thing to organize all of the scripts in my ~/bin into a single hierarchical command that’s defined by its directory structure, and that automatically parses bash comments to display help lines in autocomplete. (The ability to easily add new subcommands makes nix’s CLI a lot more palatable…)

                                                ngrok is a really nice niche tool if you want to show your local test server to someone else (I’ve used it for sharing blog drafts, for example). There’s a paid version, mostly to combat spam, I think, but the free version is sufficient for anything I would ever do, and it doesn’t require an account or anything.

                                                terminal-notifier is nice if you’re on a Mac… often I’ll run some long command, ctrl-z, then fg ; terminal-notifier -message "done $?". I actually have an alias for that because I do it often enough.

                                                A little different than the rest, but I use iTerm’s “Hotkey Window” almost exclusively. I’m often tabbing between a web browser and a text editor, and keeping my terminal window out of the ⌘Tab history means I never switch to it by accident because I just happened to run git status.

                                                I have more, but I think that’s enough for now…

                                                1. 2

                                                  I’m in a very similar boat regarding persistent tmux sessions, I find this to be an excellent way to maintain structured environments. I just have some simple scripts to set up a session, or attach to it if it already exists.

                                                  I love shell completion for the things where it works, but it’s frustrating when it doesn’t. Your .c fzf commit shortcut sounds like something I could really use, for the reasons you state: I far prefer to be explicit about what I’m looking for, so having control over exactly what I’m completing would be perfect. Looking forward to playing with it, thanks!

                                                  1. 3

                                                    I agree on the persistent sessions but it really bugs me that tmux conflates two sets of functionality:

                                                    • A pseudoterminal that I can disconnect from and reconnect to.
                                                    • A thing that takes over control of my terminal emulator and provides its own windowing system

                                                    My terminal emulator does a really good job at being a terminal emulator. I don’t need something else to replace that. I’ve switched to using abduco instead of tmux because subsequent versions of tmux made it harder and harder and eventually impossible to tell it not to break my terminal’s scrollback. I’m not completely convinced that abduco is an improvement: it doesn’t seem to properly buffer state when I disconnect and reconnect and it manages to break command-line editing in some terminals.

                                                    I’d love to have a reliable thing that just opened a pty and just forwarded everything to it, buffering when necessary, without any feature creep.

                                                    The macOS Terminal provides an environment variable containing a UUID and if you force-quit it then it restarts with all of the windows in the same position and with the same UUID in that environment variable. I use a wrapper around autossh that drops a file in a known location named with this UUID and containing the remote host name. When the terminal restarts, it automatically reconnects my sessions, so I can reboot my local machine and not lose any state. The Windows terminal and konsole do not preserve the UUID across restarts so I have to run abduco -l on the remote machine after a restart to find the sessions I need to reconnect to. I think the macOS terminal copied this feature from iTerm, I wish other terminal emulators would copy it too.

                                                    1. 2

                                                      I think the “buffering when necessary” would be kinda tricky. Like, you could run some graphical program like vim without switching to an alt screen, and it would have to buffer every intermediate drawing character in order to re-create the final state if you attached a new client. I think? Maybe there’s a smarter thing you could do.

                                                      I am also bothered by tmux – especially the copy mode that I love so much. I wish that I could compose my environment out of smaller building blocks – so a session manager, running a multiplexer, with each “window” running a scrollback-buffering-pty-with-text-selection. Then I could swap out one “layer” for a better alternative without needing to re-write all of tmux. ptys are cheap! I’m currently working on an experiment to write a new “bottom layer” – the text selection bit – as an excuse to learn Rust, and fix some of the ergonomic complaints I have with tmux.

                                                      1. 1

                                                        I am also bothered by tmux – especially the copy mode that I love so much. I wish that I could compose my environment out of smaller building blocks

                                                        Hmmm… tmux was originally written to replace the BSD program window(1) which just performed window management in a terminal. Separate tools could be used for copying and so on,

                                                        1. 1

                                                          Anything like this is doing some buffering: It maintains two connections to PTYs, one that talks to the clients (e.g. vim, ls, whatever) the other that talks to the real terminal emulator (or the next step in the chain if, for example, ssh is between it and the real terminal emulator). It reads from one PTY and writes to the other, sitting in a loop. The only extra thing necessary is that if the terminal disconnects then it needs to store any messages that it gets somewhere (ideally in an in-memory buffer that spills to the disk above a certain size).

                                                    2. 1

                                                      tmux lets you select and copy text with your keyboard.

                                                      I love this feature, or at least until it stopped working for me on sway/wl-clipboard. I think it was a recent tmux update.. My attempt to bisect tmux to find where it broke led to it mysteriously working for about a week, then breaking again. I still have no clue why it doesn’t work for me anymore :(

                                                      1. 1

                                                        tmux 3.3 added the copy-command option which makes it easier to hook into the system clipboard… but I don’t know why that would have broken anything. If you aren’t using a custom copy-pipe (or whatever) command, tmux prints escape codes if it detects that your terminal emulator supports them. Maybe something changed with that detection, or your terminal emulator? You can force it on by adding set -g set-clipboard on to your ~/.tmux.conf. But if you have 3.3 you could try set -g copy-command "wl-copy".

                                                    1. 11

                                                      Switching to using Lua for Neovim seems like it’ll be really powerful. I’m just a little scared to make that final jump, because there’s way to really go back to Vim after doing this. I’ve already leveraged a bunch of Neovim-only stuff, but this is a lot more extreme.

                                                      1. 7

                                                        The Lua support in Neovim is one of the things making me eager to look at it. Lua is a fantastic little language and there’s no reason to be stuck with something like vimscript in 2021.

                                                        1. 5

                                                          I looked a bit at lua, and a lot of stuff seemed much more verbose/awkward to me.

                                                          I kinda of like VimScript 😅 There are a few annoying parts (line continuations, ugh, and I still forget that stupid a: sometimes), but overall I find it works fairly well, especially since lambdas (already some time ago) and the method syntax (also some time ago, but never ported to Neovim) were added. It’s a fairly small language that fits its purpose reasonably well.

                                                          It’s perhaps a bit of an acquired taste though.

                                                          1. 4

                                                            Neovim is claiming that lua is much faster than VimScript. I’ve seen VimScript chug on files with just a few hundred lines, so I’m hoping I can convert my heavier functions to lua and get a speed boost.

                                                            1. 2

                                                              I can’t say I ever ran in to issues with this myself; most of the times I ran in to performance issues it’s because you do something like :%s/<something rather complex on a large file>/, but I’m not sure if Lua will really help with that? From what I can tell, most of the performance issues is when people implement stuff like fuzzy matching in VimScript and similar computation-heavy stuff.

                                                              The new VimScript9 is quite a bit faster (but still slower than LuaJIT), but I haven’t really looked at it.

                                                            2. 1

                                                              I kinda of like VimScript

                                                              Wow, this is the first time in twenty years I’ve heard anyone express an emotion about vimscript other than disgust.

                                                          2. 7

                                                            if you keep your dotfiles in source control (which I recommend if you aren’t already), you have nothing to lose. If you make the switch and decide later that it’s not for you, just revert back to the previous version of your config that uses vimscript.

                                                            1. 3

                                                              That only works until you customize further in lua.

                                                              1. 2

                                                                I’m not sure what you mean. Sure, you lose some further custom lua config (until you port it to vimscript), but you won’t end up worse off than you were before you switched if you have your config in source control.

                                                            2. 4

                                                              I have recently switched not only to Lua, but to Fennel as well and I am pretty happy with result. Now I need to port rest of my config from VimL to Fennel.

                                                              1. 2

                                                                Wow, that’s amazing! Did not know Fennel could be used like this.

                                                                1. 2

                                                                  do you notice any delay from having to compile the fennel files to lua on every startup?

                                                                  1. 4

                                                                    Slight, but nothing annoying me. In the past I was trying to cut load time as much as possible, but now I stopped giving a damn. I haven’t tried precompilation though.

                                                                  2. 1

                                                                    If you’re using a lisp for your editor scripting.. At what point does evil/emacs becometthe saner choice, though?

                                                                    1. 3

                                                                      As soon as Evil will learn into all my favourite quirks of Vim. I have tested Emacs in the past and there was always some small nitpick that was missing and was irritating me. Now I get the best of two worlds.

                                                                  3. 2

                                                                    Is there a reason that’s a problem? Neovim is a fork of the vim codebase and migrating to it doesn’t seem all that different from upgrading vim and then using plugins that require the new version as their minimum version. Neovim is basically just vim that is making faster progress on cool new features than mainline vim is.

                                                                    1. 5

                                                                      Neovim 0.5 lets you write your vimrc as a lua script, which Vim8 can’t parse.

                                                                      1. 2

                                                                        The big gotcha I hit with Neovim was that it uses a different format for undo files. I have this in my vimrc:

                                                                        set undodir=${XDG_CACHE_HOME}/vim/undo//
                                                                        set dir=${XDG_CACHE_HOME}/vim/swap//
                                                                        set backupdir=${XDG_CACHE_HOME}/vim/backup//
                                                                        set undofile
                                                                        set undolevels=1000
                                                                        set undoreload=10000
                                                                        

                                                                        This avoids cluttering my working directories with undo / backup / swap files and gives me effectively unlimited persistent undo, my favourite feature of vim. If I run neovim on a file that I’ve edited with vim, it complains. Similarly, if I edit with nvim and then vim, vim can’t read the undo file. I wish they’d change the name of files if they were going to have things for the same purpose as vim but with incompatible formats.

                                                                        1. 3

                                                                          I wish they’d change the name of files if they were going to have things for the same purpose as vim but with incompatible formats

                                                                          This can be achieved with something like

                                                                          if has('nvim')
                                                                            set undodir=${XDG_CACHE_HOME}/nvim/undo//
                                                                            ...
                                                                          else
                                                                            set undodir=${XDG_CACHE_HOME}/vim/undo//
                                                                            ...
                                                                          endif
                                                                          

                                                                          I believe the undofile format became incompatible only very recently, when more information was added to undofiles.

                                                                          1. 1

                                                                            That’s what I did, but it’s annoying that I have to.

                                                                            I was also quite excited by the built-in LSP support, but all of the tutorials I found required incredibly complex configs and didn’t explain how to configure the LSP integration for something like clangd for C/C++.

                                                                      2. 1

                                                                        There are heaps of incompatibilities between Vim and Neovim, and have been for years.

                                                                        https://news.ycombinator.com/item?id=27719968

                                                                      3. 1

                                                                        What are some neovim features that you’ve really liked? I generally see the same things trotted out by fans, like treesitter and in-build LSP, but these aren’t things I’ve felt like I was missing in Vim (I do use LSP, plugins work well for this). I’d love to hear what benefits you have found, as an experienced Vim user?

                                                                        1. 6

                                                                          It’s a bit of a moving target, because a lot of neovim innovations are eventually implemented in vim. That’s what happened with floating windows, async jobs, and terminal emulation. So I guess the feature I really like is being a couple years ahead of everyone else :)

                                                                          There’s also a few smaller things: I really like inccommand, which I don’t think has been ported over yet. And I just found out I can use the lua bindings to do this:

                                                                          local nav_keys = {'h', 'j', 'k', 'l'}
                                                                          for _, key in ipairs(nav_keys) do
                                                                            local c_key = '<c-'..key..'>'
                                                                            vim.api.nvim_set_keymap('n', c_key, '<c-w>'..key, opts)
                                                                            vim.api.nvim_set_keymap('t', c_key, [[<c-\><c-n><c-w>]]..key, opts)
                                                                          end
                                                                          

                                                                          I expect that as I get more comfortable with lua and the neovim API I’ll have more say. I write a lot of custom functions and vimL is one of the worst languages I’ve ever used.

                                                                          EDIT ooh something I just realized I can do:

                                                                          local set_all = function(list)
                                                                          for _, item in pairs(list) do
                                                                            vim.o[item] = true
                                                                          end
                                                                          end
                                                                          
                                                                          set_all {"termguicolors", "hidden", "splitright"}
                                                                          set_all {"number", "relativenumber"}
                                                                          

                                                                          That’ll make it easy to create setting groups.

                                                                          1. 2

                                                                            No, no inccommand in Vim still. I was quite keen on this for a while until I discovered traces.vim which is a lot more powerful.

                                                                            Yeah vimL has its quirks. The actual examples you’ve shown would look pretty similar in vimscript though … although they would use :execute, e.g. exe 'nnoremap' c_key '<c-w>..key. I’ve come to quite like vimL but I realise that puts me pretty firmly in the minority. I hate the line continuations but those are going away in vim9script.

                                                                            It does look like configs will diverge now, to the lua neovim scripts and the Vim vim9script scripts. Which I suppose is good, trying to support 2 diverging editors with a single code-base is annoying, as each add different features.

                                                                            1. 1

                                                                              You can map stuff in loops in regular VimScript:

                                                                              for k in ['h', 'j', 'k', 'l']
                                                                                  exe printf('nnoremap <C-%s> <C-w>%s', k, k)
                                                                                  exe printf('tnoremap <C-%s> <Cmd>wincmd %s<CR>', k, k)
                                                                              endfor
                                                                              

                                                                              For a somewhat creative use of this you can see this ;-)

                                                                              I guess the issue is that a lot of people just can’t be bothered to invest in learning VimScript, which is fair enough. But pretty much anything you can do in Lua you can do in VimScript, and vice versa.

                                                                              1. 1

                                                                                I guess the issue is that a lot of people just can’t be bothered to invest in learning VimScript, which is fair enough. But pretty much anything you can do in Lua you can do in VimScript, and vice versa.

                                                                                Also, there’s more third party Lua libraries. A while back I needed to fill an autocomplete based on information in a YAML file, but couldn’t figure out how to parse YAML in VimScript. I ended up writing a python script to first convert the file to JSON, then use json_decode. It worked in that case but would have been nicer to just import a library and read the YAML directly.

                                                                                1. 2

                                                                                  I think this - the availability of the Lua library ecosystem - is probably a “bigger deal”, looking forward, than the performance/tooling/ergonomics benefits Lua brings over VimScript. I haven’t seen too much adoption of Luarocks packages in plugins yet (though there are some examples, e.g. https://github.com/camspiers/snap), but I expect this to change now that 0.5 is stable.

                                                                                  I will also say that, while anything* you can do in Lua you can do in VimScript, I personally find it much easier to do most things in Lua - partially due to familiarity, but also due to the simplicity of the language and the relative lack of footguns, compared to VimScript.

                                                                                  *In Neovim specifically, Lua provides access to luv, which I’m not sure you can access from VimScript. In my experience, having the libuv event loop and utility functions readily at hand makes it possible to write functionality which would be at least substantially more painful without these tools.

                                                                                  1. 2

                                                                                    I haven’t seen too much adoption of Luarocks packages in plugins yet, but I expect this to change now that 0.5 is stable.

                                                                                    Why do you expect this to change with 0.5? It’s been possible to write Lua plugins since 0.3, with luv becoming available in 0.4. I don’t see anything (besides the hype, maybe? :^) ) in 0.5 that would change the attitude of plugin authors towards Luarocks.

                                                                                    1. 1

                                                                                      It’s true that we’ve had the ability to write Lua plugins for a while now, but there’s been a huge increase in the use of Lua during the later part of the 0.5 development cycle (the past year or so). This, to me, indicates that we may have passed an inflection point in the ease of using Lua for plugin development that will contribute to more people writing Lua plugins, and (potentially) more people using functionality from Luarocks libraries for those plugins (though I admit this also assumes that people need and know about the libraries available through Luarocks).

                                                                                      The hype is another factor, at least at first. And - noting that this runs dangerously close to self-promotion - I think that tools like packer.nvim‘s Luarocks integration (which you can use even if you don’t use packer for plugin management) significantly lower the complexity cost of using Luarocks packages, while also requiring features from 0.5.

                                                                                      1. 2

                                                                                        I see. In my opinion there’s a fundamental issue with the with dependencies where as a plugin author you don’t want to rely on external dependencies (otherwise you’re inevitably going to end up with people opening issues after misconfiguring the dependencies for your plugin…) but vendoring is fairly unattractive too (messes up version control history, you have to manually update everything…). This issue was already there with Vimscript and I don’t think it can be solved by anything else than Vim/Neovim implementing a full-featured plugin manager (which I don’t think it should do).

                                                                                        1. 1

                                                                                          Yeah, that’s definitely true too. I think this is easier with Luarocks because it already supports some basic versioning specification, so you can control what versions of dependencies your users get without needing to vendor. I definitely agree that there shouldn’t be a full-featured plugin manager baked into Vim/Neovim, though - people’s preferences and needs around plugin management are too disparate for there to be a good “one size fits all” option, in my opinion.

                                                                                          1. 2

                                                                                            I think this is easier with Luarocks because it already supports some basic versioning specification

                                                                                            My point was that the package manager that downloads from luarocks itself becomes a dependency, which you want to avoid. So luarocks doesn’t really make things easier there :)

                                                                                  2. 1

                                                                                    One way would be to use Python:

                                                                                    :pyx import yaml, vim; vim.vars['x'] = yaml.safe_load('{"hello": [1, 2]}')
                                                                                    

                                                                                    Or Ruby, Racket, Lua, Tcl, Perl, or even Visual Basic. It’s nice that Vim can interface with all that, but the big problem with that is that a lot of people don’t have the scripting support, and if you want things to work on Linux (all distros), macOS, and Windows is nigh-impossible. In reality It’s all pretty useless if as can never use it and have it work for everyone (the reason I didn’t try :lua is because my Vim isn’t compiled with it, and also, because I don’t really know Lua).

                                                                                    Generally Vim tries to minimize required dependencies, which isn’t a bad thing. The Lua interpreter is pretty small so it could be integrated like libvterm or xdiff instead of linking toliblua. But I guess it’s too late for that now :-/

                                                                          1. 1

                                                                            I found this article quite fascinating, thanks. It reminds me of the git demos like this where they build a git repo up from scratch without actually using any git <command>s. I get a much better understanding of what the tool actually does (docker in this case) by seeing these methods of replicating functionality.

                                                                            1. 39

                                                                              Updates causing a reboot

                                                                              Again, I’ve simply not experienced this. Now, back in the Windows 2000/XP days, yeah I think we all experienced this. However, for many years now, I’ve not seen this happen.

                                                                              I have, many times, left my computer on overnight to come back to it being at the login screen with literally zero intervention. Looking at my update history, I think this happens about twice a month or so.

                                                                              1. 20

                                                                                Oh God! I really wish the author would tell us how in the world they achieved this state!

                                                                                I have a Windows 10 machine that I use for work and it’s driving me nuts. Despite having disabled every single switch that Google told me to disable, this machine will automatically wake up and reboot to install updates if it’s on sleep.

                                                                                Thing is, it doesn’t even work: this is a laptop, that I take with me on the road for my one customer whose stack depends on Windows, so the hard drive is encrypted. It reboots at 3 AM and then I wake up to… the Bitlocker prompt, which is followed, of course, by a good half hour of “hang on”. Should I seriously believe that nobody at Microsoft ever tried to update a computer with an encrypted hard drive?

                                                                                It’s driving me nuts because the reason why that machine is on sleep is that it runs a diverse array of rather arcane applications, some of which aren’t exactly top-notch and lack various features like, uh, workspace management. So it takes me like 20 minutes to start up all of them and set things up back the way they were, so it’s easier to just let the laptop sleep.

                                                                                On a tangential note: I think this is a hole that Microsoft have dug themselves into.

                                                                                20 years ago there was really no question of whether you wanted to upgrade to one of the service packs. At best you’d wait two or three weeks to let early adopters find any of the truly bad, hard drive-wrecking blunders, but after that you’d update.

                                                                                Nowadays, when you reboot after an update, you may boot to a more secure system with the latest security patch. Or a full-screen ad for Microsoft Edge that you have no idea how to hide, oh, and it’s set itself to be the default browser (guess who had to drive halfway across town in the middle of the pandemic because their parent had to teach online classes and they didn’t know how to make the ad go away – then drive back again because “they couldn’t find Firefox”). Or a brand-new version of Candy Crush Saga on Windows 10 Pro (I’ve given up wiping it, I now accept it as a fact of life, the way I accepted My Briefcase on Windows 95).

                                                                                Of course nobody trusts the updates now, so now it’s a silent, subversive war, in which Microsoft has to find new ways to force updates because the users have been burned so many times they will never update on their own (fool me once etc. etc.) and everyone else tries to figure out ways to dodge them, at least until they can get their work done.

                                                                                1. 6

                                                                                  I have had similar rage, and eventually wrote a little utility to just solve the problem: https://github.com/wheybags/Win10BSFixer

                                                                                  Every 10 seconds, it checks if the windows update service is running, and if it is, kills and disables it. Have had zero problems since, and it does allow you to pause the update blocking and manually update when you want to.

                                                                                  1. 2

                                                                                    You are my new favourite programmer now!

                                                                                2. 6

                                                                                  Very common. Many, many times this has messed up cryptomining for me. I haven’t used windows for mining, or for anything for awhile now, so maybe that has changed in the last year or two.

                                                                                  1. 22

                                                                                    Very common. Many, many times this has messed up cryptomining for me.

                                                                                    I never thought I’d look on this behaviour as a good thing, until now.

                                                                                    1. 2

                                                                                      It’s still not. The real problem, giant mining firms with hundreds of thousands of GPUs calculating useless hashes 24/7, know how to get around it. It makes literally zero difference whether slylax puts their GPU to use overnight every now and then. Hell, they may even use their desktop as a crypto mining thermostat for all we know, in which case it’d make literally no difference compared to any other form of resistive heating.

                                                                                  2. 5

                                                                                    This was my major gripe. I never felt comfortable leaving the machine on a long running process overnight, even if I had remembered to go to the updates menu and disable updates for 7 days, which is the maximum AFAIR.

                                                                                    After having switched to Linux with Windows running in a VM for the few things I need, my machine runs faster and lighter, the fans spin less and I get more battery life. And I trust my computer again.

                                                                                    1. 1

                                                                                      The cancer is making its way to Linux, though. Ubuntu snaps have a similar “updates happen by our command and you can delay them a bit but that’s it” philosophy. It is infuriating if you are managing the rule lists for host-level intrusion detection.

                                                                                    2. 4

                                                                                      It even wakes itself up in the middle of night to do some updating and then reboots itself, only to end up in Linux because of the dual-boot. And it’s not exactly easy to convince it not to do that.

                                                                                      1. 3

                                                                                        I think this also depends on whether and how the IT department manages this. It is hard to discover who is responsible for this.

                                                                                        1. 3

                                                                                          This is my personal desktop, so my IT department is me.

                                                                                        2. 3

                                                                                          I own a windows 10 machine that I boot about once a month and it feels like I always have to do an update which requires a reboot. So, at least in my experience, this update/reboot thing is absolutely common.

                                                                                          1. 3

                                                                                            Updates causing a reboot

                                                                                            Again, I’ve simply not experienced this. Now, back in the Windows 2000/XP days, yeah I think we all experienced this. However, for many years now, I’ve not seen this happen.

                                                                                            I have, many times, left my computer on overnight to come back to it being at the login screen with literally zero intervention. Looking at my update history, I think this happens about twice a month or so.

                                                                                            Same here. Worse, I’ve lost work because of it more than once. Much more recently than the Win 2000/XP days.

                                                                                            About a year ago, when I got a document that I could only handle on Windows for some reason, fired up my not-too-frequently used Windows machine with Outlook on it, and read/started composing a reply. This was a bit earlier than my normal workday, around 4:30 AM. When I walked upstairs around 5:30 to make myself some more coffee and returned to my basement office around 5:50, the machine was sitting there, rebooted. It discarded my in-progress draft response. It didn’t save it to my IMAP drafts folder. It didn’t save it to a local drafts folder. It was just gone.

                                                                                            I’ve been using computers long enough to know I shouldn’t walk away from even a laptop without saving, but this age of auto-saved drafts has made me soft.

                                                                                            I think this phenomenon is especially bad for systems that don’t get booted and used all the time, which may account for the seemingly outsized perception of the problem by people who primarily use other OSes. If it’s been more than a couple weeks since I booted a VM, I feel like I need to allow an hour for it to update, reboot, update again and settle down post-update before I can really use it.

                                                                                            1. 4

                                                                                              I think this phenomenon is especially bad for systems that don’t get booted and used all the time, which may account for the seemingly outsized perception of the problem by people who primarily use other OSes.

                                                                                              This is exactly the issue with my gaming PC.

                                                                                              I’m really cooling off on the idea of a gaming PC as of late because of BS like this. When I finally do arrange a time with friends to play every 2-3 weeks, it’s a dice roll whether W10 will pull some inane crap like this because you actually had the gall to boot it up and use it: “you need to update! You have to wait an unspecified amount of time!”

                                                                                              What I really want to know is: what exactly is it doing after it applies updates? It seems like it just sits there for 5-10 minutes “finalizing” settings.

                                                                                              The absolute worst: W10 thinking it is okay to upgrade your video driver while you are using it. Most games/apps just crash outright because they aren’t designed to handle this.

                                                                                              1. 3

                                                                                                I’m really cooling off on the idea of a gaming PC as of late because of BS like this. When I finally do arrange a time with friends to play every 2-3 weeks, it’s a dice roll whether W10 will pull some inane crap like this because you actually had the gall to boot it up and use it: “you need to update! You have to wait an unspecified amount of time!”

                                                                                                Same for the XBox 360. It would disable a lot of features (e.g. networking) if you didn’t update (maybe it still does). We were not very regular gamers, so we would often start the XBox after a couple of weeks to call family on Skype with the Kinect camera. Only to disappoint them that they had to wait 30-60 minutes while the XBox fetches some update.

                                                                                                1. 2

                                                                                                  what exactly is it doing after it applies updates? It seems like it just sits there

                                                                                                  One of the most annoying aspects of Windows updates is that user profile data seems to need migration to the latest schema. For whatever reason, this can’t occur during the system update and is instead ran the next time that user logs in. Which means updating in the middle of the night hardly saves me any time.

                                                                                                  1. 2

                                                                                                    If I’d guess, I’d say that user profile stuff is probably encrypted with the user’s password, so it has no way to read the user profile until the user logs in and it has the password. That would make sens to me at least.

                                                                                                    Not that that’s an excuse. There are definitely solutions here which would move the schema migration time to a less inconvenient time than right as you’re logging in, or ways to make the schema migration process faster. (Or ways to keep the user profile schema stable across most updates.)

                                                                                                  2. 1

                                                                                                    I’ve found that like 99% of the time, I can get a game to run on Linux now. I still sometimes reboot into Windows to play a game with friends if it’s a game I haven’t played before, but after that initial session, I usually go back into Linux and spend some time getting it to run in my main set-up. So far, there’s one game we’ve tried to play which I haven’t gotten to run in Linux - and that’s not due to a technical limitation, but because the anti-cheat detects that it’s not on Windows somehow and therefore disables online functionality.

                                                                                                    In a surprising amount of cases, all it takes is literally just downloading the game on Steam and letting Proton automatically do its thing. Sometimes, I have find an installer on lutris.com, but then it usually works fine once installed.

                                                                                                    I wish “getting the game to work on my system” wasn’t a thing I had to spend time on. But overall, it’s much nicer to have to do that once per game than to have to boot into Windows and deal with its updates, an environment I’m less used to, losing all my Linux state, etc.

                                                                                              1. 8

                                                                                                This really puts into perspective how complex Vim really is. And yet, when using it, it never feels complex; it feels natural, simple, and intuitive, which just shows how well designed it is. The user can take advantage of so much, and switch between many different states, and it’s all presented in a way that rarely ever feels bloated or overwhelming.

                                                                                                1. 6

                                                                                                  I didn’t learn vim until I joined a company where it was a mandatory part of the workflow. I’ve been using it now for about 18 months. I would say I’m decent with it.

                                                                                                  It definitely still feels complex. p can be used to paste something from the registers in normal mode, but in insert mode I have to use ctrl+r " to accomplish the same thing. ctrl+w is the motion for window-based actions in normal mode, but in insert mode it deletes the word before the cursor (an action I accidentally perform constantly). Any sense of intuition anybody feels about it is hard fought and earned from years of intentional, focused use on it.

                                                                                                  Just now, in the process of writing this post, I had to go look up the exact syntax for looking up exactly what ctrl+w did in insert mode. The syntax for that was apparently :help i_CTRL-W. I haven’t had much opportunity to dig into the documentation to try to learn more complex actions because whenever I do, I feel stymied by the crunchiness of it all. When the process of looking up how things work is overwhelming, I think it’s fair to say that the system is neither inherently intuitive nor particularly well-designed.

                                                                                                  I understand why people feel strongly about their enjoyment of vim or emacs, but I often wish I could just go back to VS Code.

                                                                                                  1. 9

                                                                                                    First, as someone who loves vim, someone being forced to use it sounds like torture, and a really silly strategy for a company, let devs use what they’re comfortable with!

                                                                                                    The help is, in my opinion, the best documentation of any tool I’ve ever used. There are some tricks to using it effectively though. In this case yes, you found the correct command to get to the right place in the help, but I find this shortcut much easier to remember/intuit: :h i^w. The i is the mode, and ^ indicates CTRL. Another example is :h ^w^J to find the help for the normal mode command to move a window to the bottom of the screen.

                                                                                                    In addition to the reference manual, which is what you get when you use the :help command to find particular commands/motions/options/regex tools etc., there’s also the user manual, which has a completely different style and can be read start-to-finish like a book. It’s very readable and is full of examples and in-depth descriptions of workflows. :h user-manual

                                                                                                    For an overview of the help system itself, :help helphelp is a good place to start.

                                                                                                    1. 3

                                                                                                      I appreciate this cool and useful post - and I will take it all to heart - but I do want to point out the unintentional hilarity that to learn more about the help system I have to scream help into the void over and over again.

                                                                                                      1. 2

                                                                                                        I love it. You can shorten it a bit but that’s one that I prefer to write out in full. It’d be nice if you could choose to use all caps…

                                                                                                        1. 1

                                                                                                          :help!

                                                                                                          E478: Don’t panic!

                                                                                                    2. 4

                                                                                                      Yeah, the default bindings / syntax for Vim can be a bit awkward at times. I was moreso referring to how I never feel like I have to keep a mental map in my head of what mode(s) I’m currently in and how they relate to one another. I think some binds make more sense for some than others, because people naturally adapt differently to different workflows. Per your ctrl+w example, I’m the exact opposite, in that I regularly use ctrl+w in insert mode (in fact while typing this reply I tried pressing ctrl+w to delete a word and accidentally closed the browser tab :P ), but I have the window-management keys remapped to be quicker and easier to use.

                                                                                                      I disagree with your conclusion that you finding it difficult to look things up in the documentation shows that the system isn’t well designed. Perhaps not “intuitive”, though that was a miscommunication on my part, I meant intuitive as in once you know how to do things and it’s in your muscle memory it feels natural. Once you learn the general syntax for the help pages, looking stuff up is relatively straight-forward, and the jump stack can be used to go back and forth between pages (C-o to pop/go back, C-i to push/go forward). Once again though, everyone thinks and works differently, and the solution that is easy and intuitive for one may be cumbersome and overwhelming for another.

                                                                                                      1. 2

                                                                                                        I barely even think of vim as being modal anymore since I just use it as a sequence of commands. For example, if I want to insert the word “foo” under the cursor, I’ll hit “ifoo”. So the mental process is not “press i switch to insert mode and do a bunch of stuff then press esc to switch to the other mode”, but rather just “do an insert of this text, terminated by the esc key”.

                                                                                                        This way, there’s no thinking about mode - it is just always doing commands - and it helps understand exactly what operations like undo and repeat last command will actually do to the document.

                                                                                                        This mental model also helps compose things better… and avoids bothering with the other weird commands like ctrl+w (which i didn’t even know was a thing until you mentioned it lol).

                                                                                                      2. 3

                                                                                                        It helps that most people don’t use most of these modes: I’ve been using Vim for 10 years and don’t think I’ve ever even needed to know about select mode.

                                                                                                        1. 2

                                                                                                          This really puts into perspective how complex Vim really is. And yet, when using it, it never feels complex; it feels natural, simple, and intuitive, which just shows how well designed it is.

                                                                                                          Oof, I have to disagree hard here. Vim has a lot of good things to offer, but natural, simple and intuitive are definitely not on that list. Vim is incredibly complex and clunky. The good ideas behind it could have been implemented in a much more elegant way.

                                                                                                          After using Neovim for five years I got so fed up with it that I even started a project to write my own editor. But fortunately I had not spend much time on it before I discovered Kakoune. (Actually, that was not luck. I discovered it when doing some research for my own project.) I am still in the transitioning phase, but so far I really like it.

                                                                                                        1. 9

                                                                                                          Maybe not everyone knows this, but instead of pressing ESC in vim, which is kind of far, you can do Ctrl+[, it will send the same signal to vim.
                                                                                                          Looking at the ASCII table (man 7 ascii) you’ll instantly know why, control is interpreted in terminals as nullifying the 6th and 7th bit:

                                                                                                                 033   27    1B    ESC (escape)                133   91    5B    [
                                                                                                          

                                                                                                          This is also the reason why ESC often shows as ^[.

                                                                                                          1. 2

                                                                                                            Isn’t that even worse from the RSI-avoidance point of view?

                                                                                                            1. 2

                                                                                                              I have caps lock mapped to ctrl, so ESC is just a small movement away for my little fingers. Not sure if that helps RSI avoidance, but it’s a bit less stretching around.

                                                                                                            2. 2

                                                                                                              That’s very interesting, I did not know that.

                                                                                                              1. 2

                                                                                                                Or use something like xcape and turn Ctrl into ESC.

                                                                                                                1. 4

                                                                                                                  Even better, bind caps lock to ESC (when tapped) and CTRL (when chorded) using e.g. caps2esc on Linux or AutoHotKey on Windows. This has dramatically reduced stress I was experiencing in my left forearm, as my wrists sit at a much more natural angle.

                                                                                                                2. 2

                                                                                                                  Switching caps and esc is also really good tho! How often do you need to caps, really?

                                                                                                                1. 9

                                                                                                                  I changed from qutebrowser. Using this as my daily driver now, it’s amazing! I am posting this comment from nyxt :)

                                                                                                                  1. 7

                                                                                                                    Could you give a comparison? What has been better about nyxt? What didn’t you like about qutebrowser?

                                                                                                                    I am posting this comment from qutebrowser :)

                                                                                                                    1. 3

                                                                                                                      Qutebrowser is really nice, there’s nothing I actively dislike except maybe chromium based and python scripting.

                                                                                                                      Nyxt just immediately made sense to me and it is fast and works well for all websites I visit regularly. Also it is basically made for running on a guix system. The thing I like the most about it … aesthetics and common lisp?

                                                                                                                      I guess it is also conceptually cleaner.. the keybinds that were different from qutebrowser were easily discovered / rebound and using a buffer model rather than tabs was familiar from emacs/vim. Honestly the big thing is I can see myself hacking on it, whereas qutebrowser with chrome and python always felt as a stopgap measure.

                                                                                                                      Tl;Dr lots of nothing.

                                                                                                                  1. 12

                                                                                                                    My main thought is that we should stop using corporation-friendly licenses. We don’t have to be so easily exploited.

                                                                                                                    A surprising amount of OSS is made by former big tech developers. They can afford to subsist on meagre revenue—for a time—because their pay and stock options have left them free of debt and with well-stocked savings accounts. … Scratch away at the surface of pretty much any active OSS project that has no discernible revenue, and you either get a burnout waiting to happen, or you’ll find a formerly well-paid dev coasting on savings.

                                                                                                                    Why not both? Google’s interference in my FLOSS projects and spare-time activities burned me out, but at the same time they had made me a financial offer I couldn’t refuse, and so they ended up funding my work even as they tried to prevent me from releasing it.

                                                                                                                    1. 7

                                                                                                                      Why not both? Google’s interference in my FLOSS projects and spare-time activities burned me out, but at the same time they had made me a financial offer I couldn’t refuse, and so they ended up funding my work even as they tried to prevent me from releasing it.

                                                                                                                      Can you share the details of this interference, and throffer?

                                                                                                                      1. 5

                                                                                                                        Yes, but I don’t like talking about it, so I’m going to only give an abbreviated summary.

                                                                                                                        • I was a starving-artist university student working on university campus
                                                                                                                        • Google offered me an unreasonably good salary if I were to drop out
                                                                                                                        • After I’ve worked at Google for a year, they demanded that I relicense repositories like Bravo and Typhon and assign copyright to them, and threatened me with legal action
                                                                                                                        • The resulting stress accelerated my burnout and I eventually left Google
                                                                                                                      2. 7

                                                                                                                        My main thought is that we should exclude non-people from licenses. I’ve added a clause to the GPL for my software that only allows the software to be run and distributed by and on behalf of natural persons.

                                                                                                                        If you want limited liability for whatever it is you’re doing it with you need to pay me.

                                                                                                                        1. 9

                                                                                                                          Which makes it neither Free Software nor Open Source.

                                                                                                                          I very much doubt the FSF appreciates you using their license as base for yours.

                                                                                                                          1. 4

                                                                                                                            The FSF also holds the copyright to the text of their licenses, and does not allow modification. From the GPLv3:

                                                                                                                            Copyright © 2007 Free Software Foundation, Inc. https://fsf.org/

                                                                                                                            Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

                                                                                                                            1. 12

                                                                                                                              You can legally use the GPL terms (possibly modified) in another license provided that you call your license by another name and do not include the GPL preamble, and provided you modify the instructions-for-use at the end enough to make it clearly different in wording and not mention GNU (though the actual procedure you describe may be similar).

                                                                                                                              https://www.gnu.org/licenses/gpl-faq.html#ModifyGPL

                                                                                                                            2. 2

                                                                                                                              And yet it’s both for people. Raytheon is welcome to ask for a license.

                                                                                                                              1. 5

                                                                                                                                If the license does not allow them to use the code to begin with, it is neither an Open Source nor Free Software license. Not even freeware.

                                                                                                                                You’re free to use whatever license you choose (as long as you respect the licenses of any code you use, of course). But, like that, it will amount to yet another form of shareware, and nothing more.

                                                                                                                                I suspect your intent would be better served by the Affero license, but ultimately I’m neither you nor know what your intent is; I can only guess.

                                                                                                                                1. 7

                                                                                                                                  My intent is to give power to people and not corporations. That it seems impossible for a huge number of people to understand why someone who values freedom of people might not value freedom of corporations would be worrying if not completely expected given the amount of corporate propaganda we are exposed to.

                                                                                                                                  My license is open source for people. That it isn’t for corporations is a feature, not a bug.

                                                                                                                                  1. 4

                                                                                                                                    Your license is not Open Source. Stop using these words.

                                                                                                                                    Other than that, you’re free to use whatever shareware terms you’ve come up with.

                                                                                                                                    1. 5

                                                                                                                                      It’s open source for people 😇

                                                                                                                                      1. 2

                                                                                                                                        Open Source has a definition - https://opensource.org/osd

                                                                                                                                        Free Software has a definition - https://www.gnu.org/philosophy/free-sw.en.html

                                                                                                                                        A license that restricts who can use the program is not a Free nor Open Source software license.

                                                                                                                                        1. 9

                                                                                                                                          “Open Source” was in usage long before OSI came up with the term, a quick Usenet search and you’ll find usage of it throughout the 90s. Besides, I reject the notion that any organisation or person has the authority to single-handedly define language in the first place. I’m sure that if Google or Apple were to try to the same thing people would be up in arms about it.

                                                                                                                                          1. 2

                                                                                                                                            Google nor Apple are charities nor community initiatives? It’s not like it’s the Technical Dictionary of Dianetics and Scientology, they’re just explicitly defining the terms “Open Source” or “Free Software” to avoid confusion. The reason the OSD was put together is to stop the confusion on what it actually means - otherwise the MIT license and “ethical” source licenses are in the same category, when they’re designed to achieve completely different things.

                                                                                                                                            1. 9

                                                                                                                                              Google nor Apple are charities nor community initiatives?

                                                                                                                                              So? Why does that matter?

                                                                                                                                              This reminds me of the time when I asked the Dutch cancer foundation how they got my phone number, which they are legally obliged to tell me, as I was sure I never gave it to them yet they called me anyway. Their explanation was “we’re a charity”. Good for you, but that doesn’t mean the law doesn’t apply to you and can harvest/buy my data from unknown sources (I never did find out where they got it from) or engage in other dubious behaviour.

                                                                                                                                              Besides, the OSD was written by a single person in 1997 (or 1998? I forgot), and the Free Software definition was written by a single person as well (who is also notoriously impervious to feedback I might add). The reality of the matter is that both terms are and always have been frequently used in ways that was not the intention of those authors as both are a common adjective + common noun, the combination of which has been independently coined dozens of times, if not more frequently, before the so-called “official definition” was written down. If they wanted to “avoid confusion” they should have picked something which isn’t confusing. It’s nice that a community formed around these terms, but that doesn’t mean you get the authority to decide how ~8 billion people use the language.

                                                                                                                                              otherwise the MIT license and “ethical” source licenses are in the same category

                                                                                                                                              I don’t see a problem with that.

                                                                                                                                              1. 1

                                                                                                                                                The whole charity anecdote is a red herring as this isn’t a legal issue nor one of “dubious behaviour”. They’re both in software generally well-supported definitions as demonstrated by people’s willingness to define their licenses as Free Software or Open Source respectively.

                                                                                                                                                otherwise the MIT license and “ethical” source licenses are in the same category

                                                                                                                                                I don’t see a problem with that.

                                                                                                                                                You don’t see a problem with the MIT license being bunched in with the Cooperative Non-Violent Public License, two completely different licensing models entirely?

                                                                                                                                                1. 3

                                                                                                                                                  My point was that being a charity isn’t important and a, well, red herring. Red herrings for everyone! 🐟

                                                                                                                                                  Why should the license be problematic? For a lot of people “open source” just means “access to the source code”. That this means something different to you is okay, but that discussions like this are held on a regular basis on e.g. HN demonstrates that this definition is very far from universal.

                                                                                                                                                  The licensing obligations between e.g. MIT and GPL are vastly different as well, and even between fairly similar licenses there can be details that differ and have a large impact. Basically, you need to read the license text (or a summary thereof) anyway to know what you can and can’t do.

                                                                                                                                                  At any rate, I already wrote an article about this entire thing last year which has a Lobsters discussion, so I won’t repeat it all here.

                                                                                                                                        2. 2

                                                                                                                                          Your “license” sounds like one of those ethical source licenses. It is neither free nor open source — don’t misuse those terms.

                                                                                                                                          1. 2

                                                                                                                                            Your “license” sounds like one of those ethical source licenses.

                                                                                                                                            This license is based on the BSD 3-clause license, but with specific exclusions for using licensed code to promote or profit from:

                                                                                                                                            violence, hate and division,

                                                                                                                                            environmental destruction,

                                                                                                                                            abuse of human rights,

                                                                                                                                            the destruction of people’s physical and mental health

                                                                                                                                            Yeah, no.

                                                                                                                                            As I said, it’s open source for people 😇

                                                                                                                                            1. 2

                                                                                                                                              I meant it’s in the same vein as ethical source licenses.

                                                                                                                                              As I said, it’s open source for people 😇

                                                                                                                                              Okay, assuming you aren’t trolling by incessantly repeating yourself, aren’t corporations made up of people? They aren’t like, some mechatronic evil beast or something. How will your license hold up legally?

                                                                                                                                              1. 5

                                                                                                                                                I am made of cells yet I’m not a cell. The law still has the distinction between a natural and legal person.

                                                                                                                                                How will your license hold up legally?

                                                                                                                                                The same way the GPL did.

                                                                                                                                                If they manage to win a court case that shows it’s not legally binding then they have been using software without a license and will need to negotiate for one going forward. I have no idea why so many programmers thing that if you ‘hack’ the legal system you magically remove all protections it provides.

                                                                                                                                                1. 3

                                                                                                                                                  There’s precedent in the USA that you don’t lose rights through association. If I, as an individual, have a right then I don’t lose that right by being a member of a company. What does it mean it a license grants right to a person, to all employees of a company, but not to the company as a whole?

                                                                                                                                                  I presume since you want to be like open source, you’re talking about licenses that cover distribution and modification, not end-user license agreements (EULAs)? If I can modify your code and distribute the result as an individual, a company can pay me to modify and distribute your code. If you want to place restrictions on use then that’s a very different matter. There have been a load of ‘free for non-commercial use’ licenses and they’re always a bit tricky because the boundary between commercial and non-commercial use is difficult to define. Is someone working for a charity but paid a salary engaged in commerce? Is someone who writes a blog and sticks ads on to cover some of the hosting costs engaged in commerce? Am I engaged in commerce when I update an open source project that counts some companies among its downstream users?

                                                                                                                                                  1. 3

                                                                                                                                                    All the questions you ask here are quite easily answered by looking at what assets are owned by who on an assets sheet. This is not esoteric gnostic scripture open to interpretation, it is a basic document provided by any half decent accountant.

                                                                                                                                                    If you are using a piece of software on your corporate laptop, during your work day, doing work that is being charged to the corporate account than you are clearing not acting on the behalf of a person.

                                                                                                                                                    You can still provide services to a corporation by running the software for them on your own machine, one owned by John Doe as clearly stated on his tax form. Since you are, as stated, providing them a service and not distributing the software to them.

                                                                                                                                                    If you are redistributing the software it is quite easy to tell if you can by looking at who owns the copyright on it. If it is “John Doe, Person” then knock your self out, if it is “Doe Corp Inc.” then it’s a corporation and needs to negotiate a license.

                                                                                                                                                    Your tax rates very much depend on exactly which entity is doing what and as you can expect there is a very rich set of legal precedents for anything you can imagine.

                                                                                                                                                    There have been a load of ‘free for non-commercial use’ licenses and they’re always a bit tricky because the boundary between commercial and non-commercial use is difficult to define.

                                                                                                                                                    Which is why I’m making the distinction between natural persons and legal ones. A distinction that we have been able to make for close to 500 years and one that is at the basis of our tax law. It is something you have to legally declare to the government each year and trivial to check. And impacts the tax rate you pay greatly.

                                                                                                                                                    1. 1

                                                                                                                                                      If you are using a piece of software on your corporate laptop, during your work day, doing work that is being charged to the corporate account than you are clearing not acting on the behalf of a person.

                                                                                                                                                      So if I require employees to bring their own laptop then I’m allowed to use your software? In a BYoD world, that’s not even unusual.

                                                                                                                                                      You can still provide services to a corporation by running the software for them on your own machine, one owned by John Doe as clearly stated on his tax form. Since you are, as stated, providing them a service and not distributing the software to them.

                                                                                                                                                      So if I am an independent contractor, I can modify and redistribute your software, but if I’m an employee then I can’t? That’s great, tax law is more favourable to corporations hiring contractors than employees already!

                                                                                                                                                      If you are redistributing the software it is quite easy to tell if you can by looking at who owns the copyright on it.

                                                                                                                                                      Uh, this is software that you’ve released, so it will have your copyright on it, not copyright of whoever is redistributing it. If my employees need to own copyright for modifications, that’s fine too. Companies have been using similar work-arounds for the US government not being able to own copyright for almost a century. The simplest way of making this work is for the employee to own the copyright and assign the enforcement rights to the company.

                                                                                                                                                      Your tax rates very much depend on exactly which entity is doing what and as you can expect there is a very rich set of legal precedents for anything you can imagine.

                                                                                                                                                      Tax law is completely different from copyright law and has a lot of corner cases that are very tricky to enforce (see: Uber).

                                                                                                                                                      Which is why I’m making the distinction between natural persons and legal ones. A distinction that we have been able to make for close to 500 years and one that is at the basis of our tax law. It is something you have to legally declare to the government each year and trivial to check.

                                                                                                                                                      Corporations are made up of natural people. Creating a license that grants rights to individuals but removes those rights from the individuals when they act as members of a collective that also counts in some cases as a legal person (which, by the way, is not a single concept even in US law, it’s a large mesh of loosely related things) is going to be incredibly hard and will almost certainly not stand up on court.

                                                                                                                                                      The rule of thumb I’ve learned from dealing with lawyers on IP issues is quite simple: if something seems obvious and clear, I probably don’t understand it. You should probably have a conversation with an IP lawyer about this: I suspect you will discover a similar rule.

                                                                                                                                                      1. 3

                                                                                                                                                        Are you a lawyer? Because I had one check my license and he ok’d it.

                                                                                                                                                        So if I am an independent contractor, I can modify and redistribute your software, but if I’m an employee then I can’t? That’s great, tax law is more favourable to corporations hiring contractors than employees

                                                                                                                                                        Or, and this is the crazy part, they pay for the license the exact same way they license every piece of software from Microsoft, Apple, Amazon and Google, either on prem or in the cloud.

                                                                                                                                                        1. 1

                                                                                                                                                          Are you a lawyer? Because I had one check my license and he ok’d it.

                                                                                                                                                          What questions did you ask him? In my experience, lawyers will correctly answer the questions that you ask but often won’t try to guess the questions that you mean to ask. Did you discuss any of the scenarios that I outlined? Did you say ‘is there a way that a corporation could violate the intent of the license without breaking the letter of it?’.

                                                                                                                                                          I’m also really suspicious of this claim, because lawyers never ‘ok’ a license, they always give caveats. You can write anything you want in a contract, a good lawyer will tell you what lines of attack someone challenging it in court will attempt and how likely they are to succeed. If they just say ‘this is fine’, then you should be very nervous if it’s anything other than an off-the-shelf contract that’s been tested in court before: it’s probably a sign that you need a better lawyer.

                                                                                                                                                          Or, and this is the crazy part, they pay for the license the exact same way they license every piece of software from Microsoft, Apple, Amazon and Google, either on prem or in the cloud.

                                                                                                                                                          That really makes me doubt that your lawyer understood what you’re trying to do. Software that they pay a license fee for has an end-user license agreement. This is a completely different category of license to an open source license (which covers distribution and modification but explicitly does not restrict use in any way).

                                                                                                                                                          If you have written an EULA, then it’s possible that it may stand up. There’s conflicting case law around EULAs, because they’re contracts of adhesion, which is a fairly murky area in general. Open source licenses are on simpler gounds because they don’t try to restrict use (you may be able to argue that the right to use is implicit in receiving a copy of the software from a suitably licensed distributor) and only deal with modification and redistribution (which, by default, are disallowed in copyright law and require an explicit license). You are free, on receipt of a piece of open source software to refuse to accept the license and still use the software. If you redistribute it or modify it then you either accept the license or the default provisions in copyright law kick in (i.e. it’s not allowed unless you can demonstrate fair use / fair dealings to mount an affirmative defence).

                                                                                                                                                          But it also doesn’t answer my question. If I can work around your license by hiring an independent contractor to make the changes I want, why would I pay for it?

                                                                                                                              2. 4

                                                                                                                                Liability is the key concept here. A corporation sheds liability from its employees and managers, which empowers them to act beyond the typical ethical context of a human. (There’s not really a better explanation for how the lowest-level employees of a corporation can directly commit crimes on a regular basis; the story of Uber is instructive.) Because these folks are not necessarily operating according to societal norms, we should be careful about extending the legal fiction of personhood to their employer.

                                                                                                                                The sibling argument is an excellent example of how this entire philosophical exploration can be easily preempted if we allow ourselves to agree with corporations that corporations are just like ordinary humans. There is some powerful memetic blindness inflicted by corporate propaganda.

                                                                                                                                The main reason that Free Software cannot exclude corporations, in the USA, is because of corporate personhood in the context of copyleft as a strategy for ensuring that Free Software stays free. Non-copylefted Free Software is still Free Software, but can be made unfree by selfish folks; copyleft is a legal option for preventing those folks from acting. However, since corporate personhood is a legal fiction, it is enforced by the same system as copyleft, which requires copyleft licenses to consider corporations as people.

                                                                                                                                1. 3

                                                                                                                                  However, since corporate personhood is a legal fiction, it is enforced by the same system as copyleft, which requires copyleft licenses to consider corporations as people.

                                                                                                                                  I’m not sure if you’re being descriptive of current popular licenses, in which case you’re correct, or prescriptive, in which case you’re not. A software license can easily be formulated to only apply to natural persons. Since biological existence, or lack there of, is not a protected group you can enforce contracts that exclude legal persons from your license.

                                                                                                                                  I largely agree with the rest of your post.

                                                                                                                                2. 0

                                                                                                                                  I hope you never distribute a binary using github, or a CDN.

                                                                                                                                  I hope you never want to have your software packaged in a linux distribution.

                                                                                                                                  I hope you do not want anybody in academia or working on any project bigger than themselves using your code.

                                                                                                                                  If these are in fact your wishes, then congratulations, you have outsmarted all the people who just want their stuff to make the world a better place.

                                                                                                                              1. 6

                                                                                                                                Alternatives 1 and 2 describe the unexpected benefits I have experienced with living on the other side of the world from my office, with a 12-hour time difference.

                                                                                                                                When I have questions, i start writing an email, but I know I won’t get answers until the next day, so I leave it open. By the end of the day the email has been refined until either all questions have been answered anyway, or the remaining questions are, hopefully, clearly thought out and well communicated.

                                                                                                                                Similarly, people asking me questions know that I won’t answer until I wake up, and they won’t get the answer until they start the next day, so they make sure to ask me clear questions.

                                                                                                                                I have a friend who uses a similar technique, without the aid of the time difference. He simply tells Outlook not to pull in mail until 5 PM. This at first seems obscene, but as soon as people get used to it they start communicating more clearly with him for the same reasons.

                                                                                                                                1. 10

                                                                                                                                  Interesting that the discussion around this all sort of seems to assume that the maintainers are choosing not to fix bugs and therefore must be bad at running their projects.

                                                                                                                                  That’s probably true pretty often. But I think it’s also often true that open-source projects have a small, more-or-less-fixed time budget for maintenance that does not expand at the same rate as the growth of the user base, whereas the volume of bug reports does expand along with the user base. Over the years I’ve frequently been surprised to learn that some piece of software I use constantly was the product of one person working solo and it wasn’t even their day job.

                                                                                                                                  If I publish something I wrote in my spare time to scratch an itch, and it happens to get popular enough to generate more bug reports than I can handle in the few hours a week I’m able to spend on the thing, what are my options, other than quitting my job and working full-time on bug fixing? Do I delete the popular repo that people are finding useful enough to file lots of bug reports about, in the name of reducing the number of unhealthy projects in the world? Do I just let the bug list expand to infinity knowing I’ll never have time to clear the backlog? Do I spend my project time reviewing historical bug reports rather than working on the code?

                                                                                                                                  In theory, of course, a project that gets bug reports should have lots of people volunteering to fix the bugs. But the quantity and quality of community contributions seems to vary dramatically from one project to the next.

                                                                                                                                  1. 23

                                                                                                                                    It’s not about not fixing bugs. That’s expected, normal, fine. Maintainer does not owe me labour. Closing issues that aren’t fixed is just an FU to the users, though. Let the issue stay until someone fixes it, hopefully someone being affected by it.

                                                                                                                                    1. 7

                                                                                                                                      Exactly this. I was raised in a world where SFTW or RTFM was an acceptable response, and so put effort into providing good issues. Having a bot drive by and close/lock my still open issue is a slap in the face with a wet fish.

                                                                                                                                      1. 1

                                                                                                                                        SFTW

                                                                                                                                        I’ve never seen this acronym before? What does it mean?

                                                                                                                                        1. 1

                                                                                                                                          It was meant to be STFW, but I can’t type.

                                                                                                                                          1. 2

                                                                                                                                            Search The Fucking Web

                                                                                                                                            (I had still never seen this one and had to look it up … by searching the web)

                                                                                                                                            1. 3

                                                                                                                                              Ironically this becomes more difficult as the GitHub bug pages show up first and are locked/closed due to being old.

                                                                                                                                    2. 8

                                                                                                                                      What’s the downside of letting the open bug list expand?

                                                                                                                                      1. 14

                                                                                                                                        Eh. Caveats first:

                                                                                                                                        1. I’m not a fan of simple auto-closing stale bots (roughly: I think the incentives are misaligned, and ~stale is a not-quite-right proxy of a few real problems, and it is trying to work around some limitations of using the GH issue system for triage)

                                                                                                                                        2. but I am a big fan of having a way to punt unactionable issues back to the reporter, and let automation close the issue if the reporter never responds or return it to the triage queue if they do

                                                                                                                                        That out of the way: in a busy long-term project, a stack of open bug reports comes with ongoing logistical overhead. GH’s UI/X exacerbates this, but some of it just comes with the territory.

                                                                                                                                        • This cost is an aggregate of: maintainer time spent managing the requests, the opportunity-cost of that time, the motivation it saps from the maintainers as they spend more time doing paperwork and less time making electrons dance, and the despair that comes from feeling obliged to play Sisyphus on an ever-growing mountain of reports (or the guilt that comes with having to ignore the reports).
                                                                                                                                        • Each person helping with bug triage will be paying a pretty similar cost unless you have tools/processes for de-duplicating logistical effort (unlikely for most volunteer efforts).
                                                                                                                                        • This cost is somewhat proportional to the amount of time each triager is able to invest. If you have 100 contributors doing 1 hour of triage a week, there’s going to be a lot more duplicate effort in the reports they read than if you have 2 people doing 50 hours of triage a week.
                                                                                                                                        • As the pile grows, efficiently pairing people with reports that are the best use of their time will get both harder and more important to your success.
                                                                                                                                        • At scale, the high-leverage maintainers most-likely to have the authority (whether literally the permission, or just the reputational capital) to go around closing reports manually will usually have more critical things to invest their time in. Those the task actually falls to aren’t as likely to be empowered to weed the garden.
                                                                                                                                        • Unless you’re willing to declare bug-bankruptcy or use automation (i.e., ideally #2 above–though obviously also a stale-bot), weeding out old dead-weight reports with the same care/consideration you’d usually run triage with can be (ironically?) a massive ongoing timesink in its own right.

                                                                                                                                        Reports don’t have to be bad or obsolete to contribute to this cost. 10 or 20 brilliant suggestions may be an asset if you can find time to implement 1 a year for the next 5 years. 1000 brilliant suggestions may be an albatross if the extra logistical overhead fritters away the time and motivation you need to implement one.

                                                                                                                                        It doesn’t, of course, apply to all reports equally. It’s better to have a single long-lived “darkmode pls” issue with gobs of comments and reactions than to deal with someone opening a new one every few days.

                                                                                                                                        1. 7

                                                                                                                                          Similar to not cleaning up your house. Increased cognitive load and ugliness.

                                                                                                                                          1. 8

                                                                                                                                            This. I am constantly surprised how many people dismiss the paralyzing effect of 2.4k open issues, even if they all make sense in some way. Resources are limited.

                                                                                                                                            1. 8

                                                                                                                                              Wouldn’t auto-closing issues be like just hiding everything under the bed in this analogy?

                                                                                                                                              This all looks like the consequence of bad tooling to me.

                                                                                                                                              1. 1

                                                                                                                                                Yes. The issue trackers we have need the following features.

                                                                                                                                                1. accept issues
                                                                                                                                                2. comments on issues
                                                                                                                                                3. occasional attachments to issues (need? Maybe not)
                                                                                                                                                4. assigning people to issues
                                                                                                                                                5. lifecycles as makes sense for your team and organization (open, closed, or on the other extreme: open, ready, in work, in testing, merged, in production, closed)
                                                                                                                                                6. tags on issues for classifications
                                                                                                                                                7. filtering on reporter, tag, assignee, and status, including default filtering.

                                                                                                                                                You do that, you fit 99% of people’s needs.

                                                                                                                                                Imagine if github had a tag “maintainers will not address” and the automatic filter (currently set to only show issues where their lifecycle is at “open”) only showed “open & not(tag:will-not-address-but-might-merge)”

                                                                                                                                                People would be happier to tune that automatic filter for their own needs, and this would allow a tag to banish the issue from a maintainer’s headspace.

                                                                                                                                            2. 5

                                                                                                                                              Mostly that there will be a certain number of old bugs that get fixed or rendered irrelevant as a side effect of some other change, and searching through the bug database will become less useful if a sizable portion of the bug reports reflect an obsolete reality.

                                                                                                                                              I’ve occasionally run into this on existing projects, in fact: I will search for some error message I’m seeing, find a bug report with some discussion that includes workarounds people used, and only after wasting time trying those workarounds and digging into why they’re not working for me do I discover that the bug they were talking about is in a part of the code that no longer even exists.

                                                                                                                                              Of course, in those kinds of cases, issues being auto-closed by a stale bot wouldn’t have helped much; I’d have still found them and probably still tried the obsolete workarounds. I don’t have a perfect answer for this either!

                                                                                                                                              1. 8

                                                                                                                                                I haven’t heard a good case for a stale-bot. In the article it says “to reduce the number of open tickets”, but it doesn’t explain why that is a good thing – the number could be reduced to zero by not having a bug tracker at all!

                                                                                                                                                Perhaps it is a UI thing, and Github should display the number of “active” open tickets, for some activity metric.

                                                                                                                                                1. 4

                                                                                                                                                  I turned a stale bot on for a popular project because I thought it would be a more honest communication of the likely fate of old GitHub reports - “this is stale and we aren’t planning to triage or address it further”. Few others perceived it that way and, after a few months, the bot was removed.

                                                                                                                                                  The triage work is substantial - we spend easily 120 hours a week on community question/support/defect/feature-request triage. I’d love to do more but of course there are fixed dollars and hours to allocate across many priorities.

                                                                                                                                                  Anyway, that was my reasoning, which turned out to be incorrect.

                                                                                                                                          1. 10

                                                                                                                                            (and why it’s the language I’m familiar with)

                                                                                                                                            1. 4

                                                                                                                                              What does this comment mean, and why is it so highly upvoted? The author writes about their experiences with 3 different languages/transpile stacks (Typescript, Elm and F#/Fable), describing pros and cons in terms of personal preference. Were you hoping for more?

                                                                                                                                              1. 2

                                                                                                                                                I don’t know I found the article disappointing because in the end he picked F# not because it’s objectively the best option, but just because he’s used it many times and is familiar with it. That’s an excellent reason to pick a language for your own project, but there’s not much I can learn from that. Likewise he didn’t pick TypeScript simply because he’s not familiar with it and was apparently confused by it.

                                                                                                                                            1. 5

                                                                                                                                              I’m aware of pass and tried it before I came to this setup, but I want to put more info than just a password string in my files, so that’s why pass doesn’t fit my need.

                                                                                                                                              You can store whatever you like in a pass file. The program expects the first line to be the password, and you can have whatever you like after that. I typically just format mine like this:

                                                                                                                                              <password>
                                                                                                                                              username: <username>
                                                                                                                                              url: <url>
                                                                                                                                              notes: <blah blah>
                                                                                                                                              

                                                                                                                                              It’s a simple matter to make a pass directory into a git repo (and pass has helper tools to make this even easier), and then the ecosystem will happily use git to handle password syncing to devices. The android app, for example, syncs passwords over git.

                                                                                                                                              I do understand experimenting with building your own versions of things for the fun and learning opportunities involved, I do this a lot, but in this case I think pass actually is the answer to all of your needs.

                                                                                                                                              1. 1

                                                                                                                                                I’m not OP, but I posted this article mainly to get the discussion started on this topic. Your comment is exactly the kind I was hoping to read, thanks!

                                                                                                                                                For context, I’ve been trying to use pass for password management (as part of the larger goal of moving away from Google-ecosystem); and one thing I’d like to figure out is automatic Syncthing-based sync to Android, but that’s not super important because, as you say, git would also work.

                                                                                                                                                1. 1

                                                                                                                                                  I just had a look at the android app git repo, and they recently added automatic password synchronisation (via git) but then rolled it back - I expect it’ll be added again soon. Personally I don’t change passwords that often and manually hitting the “synchronise” button works for me (and git pull/git push from the desktop). But syncthing is certainly also possible.

                                                                                                                                                  The android app also has a browser autofill feature which is really nice, and there are addons/userscripts for desktop browsers too. I also really like the passmenu script which I use from rofi in i3, so I think the ecosystem tooling is certainly not to be overlooked.

                                                                                                                                                  1. 1

                                                                                                                                                    the git stuff works very well, in my experience using it the last ~4 years. It’s not automatic, but it becomes fairly easy to commit and push when I do add/change them, and pull if I notice a pw is not available (because it was added elsewhere) or wrong (because it was chagned elsewhere). having it source control also means I never lose a password, even if I changed it in pass and for some reason the site or app didn’t actually change it (it has happened..)

                                                                                                                                                1. 4

                                                                                                                                                  Not being an English native speaker, the first time I reflected about that was when reading SICP, which mentions wizards casting spells.

                                                                                                                                                  Then I though about typecast being a special spell.

                                                                                                                                                  1. 4

                                                                                                                                                    I remember reading Harry Potter in French (being a native English speaker) and reading jeter des sorts and thinking “jeter means throw and cast is just another way of saying throw in English and you cast spells and whoa…” My mind was blown. I had never thought about spells being “thrown” in English, like “cast” had a distinct meaning there.

                                                                                                                                                    1. 2

                                                                                                                                                      Haha incredible to see that even JKR can help us visualize concepts in our daily work!

                                                                                                                                                      Each time I think about throwing an error, I think about throwing something in the trash, like there’s something bad being thrown out.

                                                                                                                                                      1. 2

                                                                                                                                                        I’ve learnt so much English from learning other languages (Danish and Spanish in my case). You suddenly start seeing etymological connections everywhere.

                                                                                                                                                        I read Kidnapped by Robert Louis Stephenson a few years back and came across loads of old Scottish words I had never seen in an English book before, but recognised them all from Danish.

                                                                                                                                                        Also, I’m a big fan of Harry Potter as a language learning resource! Haven’t tackled Latin or ancient Greek yet though…

                                                                                                                                                    1. 1

                                                                                                                                                      That looks nice and with markdown the spellchecking becomes a lot easier in vim than with LaTeX. The last time I wrote a longer text in LaTeX with vim, spellcecking was not so nice. Things may have improved in the meantime though.

                                                                                                                                                      1. 1

                                                                                                                                                        What was your problem? Was it spellchecking in general that was the problem, or was it trying to spellcheck LaTeX keywords?

                                                                                                                                                        1. 1

                                                                                                                                                          the latter, but it has been a long time since I tried

                                                                                                                                                          1. 2

                                                                                                                                                            That sounds like a plugin issue: the filetype syntax should mark prose as contains=@Spell and keywords as contains=@NoSpell, see :h spell-syntax

                                                                                                                                                            1. 2

                                                                                                                                                              I think I had a similar issue with word count in Emacs counting LaTeX tokens. I write humanities essays not scientific ones so I kept the editor but got around the problem by writing in markdown instead.

                                                                                                                                                            2. 1

                                                                                                                                                              The problem is that LaTeX is a Turing-complete language and so you can’t tell if a word in the source will actually appear in the output without compiling the entire document (which Vim’s spellcheck does not do!). For example, consider something like:

                                                                                                                                                              \figure[caption={My shiny figure}]{somefig.pdf}
                                                                                                                                                              

                                                                                                                                                              The spell checker should check the string ‘My shiny figure’, but not ‘somefig.pdf’. I think this example works in vim, because there is some hard-coded knowledge of figure, but if you wrap it in another macro that breaks. For most of my books, I used macros like this:

                                                                                                                                                              \clisting{someexample.c}{1}{42}{An example of a thing}
                                                                                                                                                              

                                                                                                                                                              This would insert lines 1-42 of someexample.c with a caption looking something like this: “Figure 5: An example of a thing [from someexample.c]”. The spell checker just tried to check all of these words, so I’d end up with red highlighting on someexample.c.

                                                                                                                                                              1. 1

                                                                                                                                                                Absolutely, LaTeX is a great piece of software but it’s a shame regardless of the technical reasons why it doesn’t work the way people want or expect. I never really liked real-time spellchecking anyway, so tend to stick my finished document through aspell or something and rely on human proofreaders. Obviously for a lot of things this is pretty overkill. I wonder if it would be feasible to have an extension which did go through and compile the file to show spelling corrections in the right place? I presume so, but I doubt it’d be elegant or efficient.

                                                                                                                                                                1. 2

                                                                                                                                                                  I don’t really write using LaTeX, I write with a set of semantic macros that happen to be implemented in LaTeX (I also wrote a tool to translate them to XHTML for ePub a while ago). That makes it a bit more tractable for editors.

                                                                                                                                                                  I keep hoping SILE will gain more traction. I met Simon at FOSDEM a few years ago and he’s done exactly what I wanted to do if I ever had a spare year or so: he’s gone back to all of the Knuth papers about typsetting in TeX and implemented the algorithms that Knuth said he wanted to implement but couldn’t because of the CPU constraints. For example, TeX uses a really nice dynamic programming algorithm to lay out words in a paragraph but uses a simple greedy algorithm for laying out paragraphs on a page because Knuth calculated that he’d need over 1MiB of RAM to implement this for something the size of one of his books with TeX. SILE runs on systems where 1MiB of RAM is considered a tiny amount so can happily use that. It’s also implemented in Lua, whereas most of TeX is implemented in a horrible environment where Knuth looked at a Turing machine and thought ‘yup, that’s the abstract machine programmers want’, so it ends up being a lot faster but still makes it possible to hook into any part of the system and replace bits.

                                                                                                                                                                  SILE has many nice features, but the most relevant is that it completely decouples the input markup language from the rest of the pipeline. If you want to handle custom annotations, you write specific hooks for them in Lua, but you can write XML, TeX-style markup, or any other markup language that can encode those annotations. This eliminates a lot of the problem editors have with TeX: the interleaving of program and markup.

                                                                                                                                                                  1. 1

                                                                                                                                                                    I’d forgotten about SILE, after reading quite a lot and using it a little a year or so ago. I do like the project, especially its drive to update TeX to use modern features. It looks like it does a decent job at a lot of things, so I might look into using it more frequently, just to be another person to be able to testify for it (as I said above, I don’t have particularly complicated typesetting needs).