1. 1

    Although I am intrigued, the article doesn’t really talk about the implications for existing large C codebases.

    1. 3

      They do have a paragraph starting with “Real-world code” (Hafnium hypervisor). While it is certainly real enough for me, it probably isn’t large enough.

    1. 1

      These abuses are just one aspect of why ASIC-resistant Proof of Work is a bad idea. I guarantee you nobody is bothering to mine Bitcoin this way, because SHA256-HMAC isn’t remotely competitive on GPUs or CPUs anymore. It’s not even worth stealing cycles. Black hats are probably mining Ethereum (GPU) or Monero (CPU).

      1. 1

        From an energy usage standpoint, all mining is bad, but ASIC mining is particularly bad, since energy was used up to make devices that can’t be repurposed for more useful computations.

      1. 6

        This is one of the nice things about Perforce. You can do this git plan workflow already by creating a pending change list and giving it a description. Just drag files you’ve marked for edit/add/delete to the appropriate pending CL.

        The one improvement I’d make to this git plan extension is the ability to add changes to each plan incrementally.

        1. 1

          That’s a good suggestion. Good tool over all.

        1. 2

          Seems like a pretty bad implementation. The nice thing about using merkel tree is that you can validate signatures securely with only a subset of the signed data.

          1. 2

            Seems like they heard of Merkle Trees, but never understood the idea behind. The scheme they are using is the same as if one would run shasum over the whole volume.

            1. 16

              There are a lot of smug posts in this thread, so I’m just going to reply to you:

              It’s exactly the same characteristics that dm-verity (which is what Android uses now for the base system image) has on Linux: There is a hash in a single block and that is the root of the Merkel tree. Small updates in this kind of scheme are very difficult to do right because a power failure at the wrong time can leave your system in an inconsistent state that will appear as tampering.

              Almost as importantly, the root hash needs to be checked during boot to ensure that no one has tampered with your disk. If you allow arbitrary updates then you need to do some local signing and getting the security of that is incredibly hard. To avoid that, you’d need to provide a block-level transactional update mechanism that would apply snapshots on top of a block device in an existing known state (somewhat akin to zfs send / receive). That’s not impossible, but it still has all of the problems involved with serialising the updates correctly, so you’d want block-level journalling for updates in addition to this.

              None of this is trivial engineering work. The Linux equivalent of this, dm-verity, has been in the kernel for years and remains read-only.

              1. 4

                To avoid that, you’d need to provide a block-level transactional update mechanism that would apply snapshots on top of a block device in an existing known state (somewhat akin to zfs send / receive).

                You would think a tech company with a $1T market cap would be able to pull this off but apparently not!

                1. 1

                  They seem to have pulled it off, but not as well as they probably will.

                2. 2

                  The reason for my smug comment comes from this article: https://eclecticlight.co/2021/01/09/boot-disk-layout-on-intel-and-m1-macs-high-sierra-to-big-sur/. The layout for Big Sur suggests that what is sealed is a snapshot of a volume in a volume group. Thus, it’s not the whole disk that is protected, but just one part. Also, signing and the root of the merkle hash are store in volume’s metadata, not at the root of the disk. Thus, my reasoning is the following: if we have a snapshot, which is read only, what prevents us from making a clone of the said snapshot, applying several changes, verifying that the accompanied changes match the advertised new root hash, making a snapshot of that clone, and then doing an atomic update to the new sealed volume? Note that I’m not talking about arbitrary updates, but updates that could be signed by Apple (signing the changes + new merkle hash).

                  1. 1

                    So a sort of blue green System folder?

                    Start spreading that idea around and I’m sure some linux people will make it happen.

            1. 3

              Imagine being the mathematician whose discovery gets sudden real world usage after decades. There must be no greater high.

              1. 5

                Either that or incredible fist shaking at all the years people ignored you :)

              1. 21

                The article never mentions the, in my humble opinion, most important part of good logging practices and that is structured logging. Without it you end up with weird regexes or other hacks trying to parse your log messages.

                1. 4

                  As a sibling post notes, if you use structured logging you’re mostly throwing away the idea that the entries must be easily parsable by a human. If that’s the case, and we’ll need a custom method of displaying the structured logs in a human friendly way, I believe we should forego plain text all together and gain the benefits of logging directly to binary.

                  1. 5

                    You can do human readable structured logging if you use key="value" formats inside text messages. Some people still prefer json, but there is a middle ground.

                    1. 2

                      If you need just key=value, that’s not really structured in my opinion.

                      1. 4

                        Why not?

                        1. 2

                          Because the amount of information added by this format would be infinitesimal over a line based logger with manual tokenization. The reason why you’d want a structured logger is to allow proper context to a message. Unless you’re working with simple cases, the structure that would offer such context is more than one level deep.

                          1. 3

                            Hmm, definitely not.

                            Structured logging is about decorating log events with just enough of a schema to make them machine parseable, so that searching, aggregating, filtering, etc. can more than a crapshoot. Deeply nested events significantly increase the complexity of that schema, and therefore the requirements of the consumer.

                            By default, structured logs should be flat key/value pairs. It gets you the benefits of richer parseability, without giving up the ability to grep.

                  2. 2

                    Excellent point. That’s become such second nature to me by now, that I forgot to even mention it!

                    1. 2

                      I’m surprised it wasn’t mentioned, but the larger advantage of passing a logger around to constructors is the ability to then have nested named loggers, such as

                      Battery.ChargingStatus.FileReader: Failed to open file { file: "/tmp/battery charge", error: ... }
                      Battery.ChargingStatus: Failed to access status logs, skipping report
                      
                      1. 1

                        On top of that, structured logger if implemented properly, can often be faster and be operated at granular levels (like the other comments pointed out, sometimes you do want to on-fly turn on some logs at some locations, not all logs at all locations).

                        1. 1

                          I love structured logging, with one caveat: the raw messages emitted (let’s assume JSON) are harder for me to scan when tailing directly (which I usually only do locally as we have better log querying tools in the cloud), in contrast to a semi-structured simple key-value format. Do you all use a different format than JSON? Or a tool that transforms structured logs to something more friendly to humans, eg. with different log levels displayed in different appropriate colors, eg. JSON syntax characters diminished, for local tailing?

                          1. 5

                            At Joyent, we used the Bunyan format. Each line in the file was a separate JSON object with standard properties, some mandatory and some optional, and freeform additional properties. We shipped a tool, bunyan, that was capable of acting as a filter that would render different human readable views of the JSON. For example, you would often run something like:

                            tail -F $(svcs -L manatee) | bunyan -o short
                            

                            It also had some rudimentary filtering options. It also had a relatively novel mode that would, instead of reading from a file or standard input, use DTrace probes for different log levels to allow you to dynamically listen for DEBUG and TRACE events even when those were not ordinarily present in the log files. The DTrace mode could target a particular process, or even all processes on the system that emitted Bunyan logs.

                            1. 1

                              Hi, what were the required fields? Was it just a unique request ID? Thanks for sharing about bunyan. Even though it’s been out for a while I was unaware of it.

                            2. 5

                              Do you all use a different format than JSON? Or a tool that transforms structured logs to something more friendly to humans, eg. with different log levels displayed in different appropriate colors, eg. JSON syntax characters diminished, for local tailing?

                              We use JSON and the only tools I use are grep and jq. And although I am pretty much still a novice with these two, I found that with the power of shell piping I can do almost anything I want. Sometimes I reach for the Kibana web interface, get seriously confused and then go back to the command line to figure out how to do it there.

                              I wrote a simple tutorial for the process, just a couple of weeks ago.

                              1. 1

                                If you rely on external tools to be able to make sense of your logs, why not go all the way, gain the speed and size benefits that binary logs would bring, and write your own log pager? I feel like the systemd folks had the right idea even when everyone was making fun of them.

                                1. 3

                                  I don’t think the average employer would be happy subsidizing an employee writing a log pager instead of implementing something that would bring a tangible result to the business. The potential money savings by using binary logs probably doesn’t outweigh the new subs/increased profits of churning out more features.

                                  1. 1

                                    To me that sounds like an excuse. The world is not made up of only software that is beholden to the all mighty shareholder.

                                    1. 1

                                      I mean, yes, if you’re developing something in your personal time, go bananas on what you implement.

                                      But I also know my manager would look at me funny and ask why I’m not just shoving everything into CloudWatch/<cloud logging service>

                                  2. 2

                                    I’m sure most problems with systemd journals are fixable, but they’ve left a very bad taste in my mouth for two main reasons: if stuff gets deleted from under them they apparently never recover (my services continue to say something like “journal was rotated” until I restart them), and inspecting journals is incredibly slow. I’m talking magnitudes slower than log files. This is at its worst (I often have time to make a cup of tea) when piping the output into grep or, as journalctl already does by default, less, which means every byte has to be formatted by journalctl and copied only to be skipped over by its recipient. But it’s still pretty bad (I have time to complain on IRC about the wait) when giving journalctl filters that reduce the final output down to a few thousand lines, which makes me suspect that there are other less fundamental issues.

                                    I should note that I’m using spinning disks and the logs I’m talking about are tens to hundreds of GB over a few months. I feel like that situation’s not abnormal.

                                    1. 1

                                      If you rely on external tools to be able to make sense of your logs, why not go all the way, gain the speed and size benefits that binary logs would bring, and write your own log pager?

                                      It’s hard to imagine a case at work where I could justify writing my own log pager.
                                      Here are some of the reasons I would avoid doing so:

                                      • Logs are an incidental detail to the application.
                                      • Logs are well understood; I can apply a logging library without issues.
                                      • My application isn’t a beautiful and unique snowflake. I should use the same logging mechanisms and libraries as our other applications unless I can justify doing something different.
                                      • JSON is boring, has a specification, substantial library support, tooling, etc.
                                      • Specifying, documenting, and testing a custom format is a lot of work.
                                      • Engineering time is limited; I try to focus my efforts on tasks that only I can complete.
                                      1. 2

                                        Logs are an incidental detail to the application.

                                        I think this is trivially disproved by observing that if the logs stop working for your service, that is (hopefully!) a page-able event.

                                        Logs are a cross-cutting concern, but as essential as any other piece of operational telemetry.

                                        1. 1

                                          Logs are a cross-cutting concern, but as essential as any other piece of operational telemetry.

                                          I rely heavily on logging for the services I support but the applications I wrote for work have only error reporting. They are used by a small audience and problems are rare; I might get a crash report every 18 months or so.

                                          1. 1

                                            Ah, yeah, I presume the context here is services.

                                    2. 1

                                      Agreed. jq is a really nice tool. It made the decision to transition to using JSON for logging very easy.

                                    3. 3

                                      Don’t use JSON, use logfmt.

                                      1. 1

                                        Yes! Logfmt is the good stuff. But it’s only semi-structured. Why not use JSON and a tool to transform to logfmt (with nested data elided probably) when needing to scan as a human?

                                        1. 1

                                          Logfmt is fully structured, it just doesn’t support nesting, which is an important feature! Structured logs should be flat.

                                  1. 21

                                    The responses to this post are pretty spot on. Asking people to hand-edit XML files to do UI design is stupidly backwards and I can’t even…

                                    1. 18

                                      … poster proceeds to edit HTML and CSS in an IDE, watching results in a browser.

                                      1. 9

                                        Yes, this blog post is missing the part where another better tool is recommended.

                                        1. 5

                                          Yes, we should be drawing mini ASCII art instead:

                                          "H:|-[button1(200)]-(>=10)-[button2(200)]-|"
                                          
                                          1. 3

                                            Do Apple developers still use this?

                                            1. 3

                                              No, that was the first version of auto layout. I remember using this syntax for one year, iOS SDK 6 I think? Tools / SDK releases are annual just like phone hardware, and we’re on SDK 14 now, so it has been a good while. Anyway there was one initial year where Interface Builder, the visual layout tool, made constraints hard to get right, and that year my teams did constraints in code. We came around to IB again when they improved it a year later.

                                              The primary ways to define constraints now are either to draw them in Interface Builder or use a new more expressive and type-safe code syntax. If I recall, that was new with SDK 8. I believe all of this was pre-Swift.

                                              However the true new hotness is SwiftUI, which is a React-like declarative UI system that tends to operate in flexbox-like stacks and permits specific, dynamic layout in ways other than a system of linear equation constraints, so your don’t then have to debug them for over- or under-definition. SwiftUI cannot yet do everything, so adoption is slow, but that’s the state of the art over in Apple dev world.

                                              Suffice to say, VFL is ancient history.

                                              1. 2

                                                I suspect it’s not very popular these days. VFL dates back to the time before Swift when ObjC would have forced extremely bracket-y APIs. With Swift we get more fluent APIs.

                                                Many new projects probably start with SwiftUI, a completely new UI toolkit. It’s still limited, but nice where it works. Most UIKit/AppKit apps use Interface Builder, Xcode’s graphical GUI builder. Of those that prefer UIs in code (I certainly do), many probably use a third party wrapper around auto layout, such as SnapKit:

                                                box.snp.makeConstraints { (make) -> Void in
                                                    make.size.equalTo(50)
                                                    make.center.equalTo(container)
                                                }
                                                

                                                Or they use Apple’s newer anchor API which is almost as nice:

                                                NSLayoutConstraint.activate([
                                                    box.widthAnchor.constraint(equalToConstant: 50),
                                                    box.heightAnchor.constraint(equalToConstant: 50),
                                                    box.centerXAnchor.constraint(equalTo: container.centerXAnchor),
                                                    box.centerYAnchor.constraint(equalTo: container.centerYAnchor),
                                                ])
                                                
                                          1. 8

                                            One of the most interesting bits was a callout to python2.7 at the end implying that it’s now a great tool for reproducible science code because they’ve finally committed to not changing it. Ironic that it’s final death blow might instead be the thing that makes it live forever.

                                            1. 2

                                              It seems to me that software ecosystems would be so much nicer if hacking had never been invented. You could keep using the same tried and true software forever if you wanted.

                                              1. 1

                                                At some point, building python 2.7 could become impossible.

                                                1. 1

                                                  As long as you keep a copy of the source code and the source code of the dependencies, you should always be able to build it. This article mentions guix as a useful tool for reproducible builds and also mentions a number of websites which archive source code. If you no longer have access to at least one architecture which was supported by the last release of python 2.7, it may become slightly more difficult, as you will need to write an emulator first.

                                              1. 8

                                                Well, yeah, I would expect that the language creators’ definition of the word “possible” excludes what you can do with unsafe due to the likely chance of nasal demon aviation.

                                                1. 3

                                                  Indeed. It’s called unsafe for a reason.

                                                  1. 2

                                                    To be even more pedantic, there aren’t any strings being modified - bytes are not strings.

                                                    1. 1

                                                      But all strings are bytes.

                                                      1. 1

                                                        But the assertion in the title was not that bytes are immutable.

                                                        1. 1

                                                          It’s all about perspective.

                                                      2. 1

                                                        strings.Builder turns a byte slice into a string. Read its source sometime – it’s pretty neat (and concise).

                                                        1. 2

                                                          You can even use assembly in Go, but it isn’t covered by backwards compatibility promise, similar as with unsafe. The strings.Builder OTOH is under promise to be kept working every time Go internals change in important ways.

                                                    2. 3

                                                      I remember once someone said something similar about Python strings, and I thought, “this I have got to see,” and it turns out they were using ctypes to yank out the underlying C-string pointer and screw with it. I mean…yes? Play stupid games, win stupid prizes.

                                                      There are times it’s essential that some data is really and truly immutable. But you can do that even in C, just by making sure you allocate a string carefully and then mark the page it’s in as read-only. Saying Go (or Python, or Java, or…) strings are immutable is talking about what guarantees you can rely on within the language, not what you can accomplish by abusing the runtime.

                                                      1. 1

                                                        nasal demon aviation

                                                        Well this made my day.

                                                      1. 8

                                                        I’ll be improving the network protocol for the game I’m working on. I’ll also be trying to get the OpenBSD hypervisor (vmm) running some Linux distro so I can do the few things Linux can do that OpenBSD can’t.

                                                        1. 3

                                                          Woah! That’s an interesting idea fro a game.

                                                          1. 2

                                                            Thanks! I hope it’ll be fun to play.

                                                        1. 8

                                                          I don’t really have this problem; almost everything that ends up in my inbox generally matters, and the unread emails is almost always below a few dozen emails (but usually smaller, 10 at the most). I’m not sure what I’m doing different from you or what kind of unwanted emails you’re getting?

                                                          1. 3

                                                            One problem I have is that I receive more emails meant for other people who think their email address is my email address. I get reminders for choir practice in Atlanta, deals at a Ford dealership in West Virginia, dentist appointment reminders, and tons of advertising for stores I don’t know about. It’s a never-ending fight to mark as spam or unsubscribe. In a single day, I get one or two emails meant for me and 20-25 meant for other people.

                                                            1. 2

                                                              I never get these. I think it depends on the address how many of these you get.

                                                          1. 10

                                                            Don’t worry, Google will soon start showing the expected (but incorrect) domain name in Chrome.

                                                            1. 2

                                                              Sarcasm?

                                                              1. 5

                                                                I don’t think it is, even if it is, it’s not far from the truth of google hiding paths in the url bar

                                                            1. 7

                                                              long time K-9 user, I switched to FairEmail early this year. K-9 started having problems not showing notifications for new mail last year, I put up with it for months because the issue was active on their tracker. after long enough I just had to switch so I could know when I receive mail. FairEmail has been pleasant so I don’t see myself going back even if this means they’ve fixed that problem, it has about the same feature set but the notifications work.

                                                              1. 15

                                                                I just tried FairEmail and I put this in the category of begware. It is being advertised as free and open source but as soon as you set it up and view your inbox, there is a notice pinned to the top asking you to support the author by buying the pro version. You can hide this, but only for two weeks.

                                                                I don’t have a problem with someone developing free/open source apps and asking for a donation, or even releasing a free version and a pro version with more features. I don’t begrudge the author wanting to make a living either. But be up-front and honest about your intentions with the user. Having a persistent nag notification that you only find out about after going through the non-trivial work of setting up your email accounts really rubs me the wrong way.

                                                                1. 1

                                                                  i had forgotten about the nag since i read most of my mail straight from the notification. that’s a very fair criticism and is something i don’t condone myself. i think i’ll switch back to K-9 now that a new stable is on the horizon.

                                                                2. 4

                                                                  I’ve tried FairEmail for a while and uh.. it feels so cluttered and unintuitive. Threading just doesn’t work right. The screen with many mails from a thread together is very frustrating to navigate.

                                                                  1. 2

                                                                    i rarely have threaded email chains in my personal account so i had kinda glanced over this.. but looking at one, yeah, that’s clunky. i mostly just read mail so i haven’t experienced the UX for things like sorting/tagging, composing, etc.

                                                                    1. 1

                                                                      To be fair, K-9 doesn’t get threading right either (if you’re a participant, your sent emails aren’t together with your received emails). This is with version 5.600.

                                                                      I still use it though.

                                                                      1. 1

                                                                        Add a feature request! Currently k9-mail always puts a copy of sent mail in the Sent folder, but it could put replies in the same folder as the mail being replied to.

                                                                  1. 1

                                                                    Would it be a crazy idea to add some basic regular expression support?

                                                                    1. 3

                                                                      Logarithmic scale circles have been used in these bubble maps because a few points are much larger than the others. Absolute scale circles are more accurate in showing the current situation. Of course maybe the goal is to encourage early action and accuracy per se is not the goal.

                                                                      1. 4

                                                                        Log scale can be used with heat maps.

                                                                      1. 13

                                                                        I always say this, but if you’re argument is

                                                                        Vim is everywhere.

                                                                        (emphasis mine), then you can’t also claim

                                                                        It’s ultra customisable

                                                                        1. 8

                                                                          I agree. A lot of his other criticisms can be addressed via the customisation. Vim now has plugins to speak LSP, so it can have syntax highlighting and cross-referencing that is exactly the same as Visual Studio Code. As long as you install everything, on every machine you use.

                                                                          I’ve written four books, a PhD thesis, 150+ articles, a bunch of scientific papers, and a few hundred thousand lines of code in vim. I mostly use it for two reasons:

                                                                          1. A lot of development I do is on remote machines. Being able to edit code or build from any terminal is useful. I would probably replace a lot of this with the VS Code remote extension if it were open source (unfortunately, the server part isn’t and so it’s limited to a depressingly small set of supported platforms at the moment).
                                                                          2. My fingers are used to vim and sulk if I am not in vim (sorry, vim mode in other editors is not the same.

                                                                          For text (of the human-readable kind), I think vi’s modal interface is actually a good things (one of the very few things I disagree with Jef Raskin about), because writing and editing are separate tasks and you are more productive if you completely separate them in your workflow. For code, it’s not really a benefit and I mostly use it to avoid having to retrain my fingers.

                                                                          The one feature that I miss on non-vim editors is unlimited, persistent, branching undo. This was something we tried to duplicate and make general with Étoilé. If I edit some code with vim and it was, at some point in the past, in a working state, I can always go back and find that, even if I’ve rebooted a few times. This makes me a lot more comfortable experimenting without regular VCS commits. Ideally, I’d want an editor with automatic git integration that would create a stream of git commits for my in-progress changes and then squash them when I did a named commit (or, even better, leave them in a local branch and merge the squashed version into that).

                                                                          1. 1

                                                                            Ideally, I’d want an editor with automatic git integration that would create a stream of git commits for my in-progress changes and then squash them when I did a named commit (or, even better, leave them in a local branch and merge the squashed version into that).

                                                                            Couldn’t you basically do that with some buffer auto commands in Vim, where it would need to detect what “branch” you’re on and the commit all the changes? And a “squashcommit” git alias to then commit (pardon the pun) to this timeline?

                                                                            1. 4

                                                                              There’s this: https://github.com/bartman/git-wip

                                                                              I’ve used this in the past and it worked really well for me.

                                                                              1. 2

                                                                                Yup, though with Vim’s branching undo I’d want that branching to also be reflected in the git history, so if I do ‘undo’ a bunch of times and then start typing again, there’s a git branch that reflects my prior state that I can go back to (and, ideally, as we did with Étoilé, allow easy cherry-picking from other undo branches). But what I really want is that exposed with a nice GUI in a graphical editor. I rarely use vim’s branching undo because I can never remember the commands.

                                                                            2. 4

                                                                              Why can’t you claim that?

                                                                              1. 9

                                                                                Because if you customize vim a lot (custom keybinds, functions, plugins, whatever, …) then you will build muscle memory and habits that are tied to your vim setup. With that in mind, using vi on OpenBSD or vim.minimal on ubuntu server would still be a pain, because you’d lack all the customisation from your local setup.

                                                                                To sum it up, vim is installed everywhere, but your customisations are not, so you can only benefit of one of these advantages at a time.

                                                                                1. 4

                                                                                  This is where Emacs shines. With Evil and Tramp, one can use the familiar customised vim keys while editing files remotely, as long as the remote system has SSH.

                                                                                  1. 6

                                                                                    Just FYI, vim has remote editing as well.

                                                                                    1. 2

                                                                                      As @swehren mentioned, vim can edit remote files by specifying path as “ssh://host:/path/to/file”. I don’t know how this works with your emacs plugin, but this is definitely not ideal. I use vi to administrate my dns/mail/http servers, and even though I could easily edit file comfortably from my local machine, I still need to login on the remote end to restart services, read logs, etc… The only use case I see is to edit PHP files remotely, and even then this would be bad, because you cannot use autocompletion of filenames, and saving files takes longer due to network latency.

                                                                                      Navigation file structure and editing files locally is still the easiest option IMO. And this is also why OpenBSD added mg(8) to the base system !

                                                                                      1. 7

                                                                                        Tramp is not so much a plugin, as a “Transparent Remote (file) Access, Multiple Protocol”. When connected via one of the various methods (inline, external or GVFS-based) you get to do almost everything as you would on a local system (therefore “transparent”). That means you can also use M-! or Eshell to run commands, copy files, diffs, etc. without having to worry where what is.

                                                                                      2. 1

                                                                                        I found evil to not include all the things my vim setup has, but won’t remember what until I try to use them again.

                                                                                      3. 1

                                                                                        Good point. Maybe this calls for splitting up my vimrc into two files, a .basic.vimrc which has commonly used configuration not tied to plugins or installed programs and my regular .vimrc which would source the former.

                                                                                        The .basic.vimrc can then be copied wherever I need it.

                                                                                        1. 2

                                                                                          A different solution is to go with an empty ~/.vimrc (the simple existence of this file automatically set “nocompat”, so you get a full vim experience), and try your best to use it like this. Vanilla vim is already real powerful as an editor, and once its default keybinds and mechanism enter your muscle memory, you’ll realize just how futile many plugins are.

                                                                                          I did that for years (working on personal C projects mostly), and it was great. I then switched to vis 2 years ago, and never looked back. It mixes vim with sam, so you get multiple selection and cursors on top of vim, which is neat. As it really ressemble vim, I can apply my muscle memory to defaukt vim as well, except for the substitute command (which is :x/foo/ c/bar/ in vis).

                                                                                          The fact I commited to using default vim for so long helped a lot switching to vis, as it doesn’t have the same plugins (though it can be extended in lua).

                                                                                          1. 1

                                                                                            Good suggestion, however gvim is incredibly ugly without any color schemes and I really like being able to copy-paste with ^C and ^V.

                                                                                      4. 4

                                                                                        Heavily cutomized vim very quickly starts looking nothing like vanilla vim. It’s infeasible to carry around your dotfiles everywhere (though there are ways you can bring subsets of your configuration everywhere), and the more customizations you have, the less effective you’ll be without them. It has to do with the emphasis on macros and simple keybindings that vim has and the muscle memory that requires.

                                                                                        1. 1

                                                                                          See my other comment on a potential solution: https://lobste.rs/s/wpmmbt/should_i_use_vim_full_time#c_gg386z

                                                                                      5. 2

                                                                                        In practice, I think I disagree. I use vim on production machines and sundry random boxes with little customization, and I use local copies with dozens of plugins and a stack of custom keybindings. There are occasional frustrations, but not especially overwhelming ones.

                                                                                        “Being able to use roughly the set of vi features plus some niceties” remains a fairly portable skillset. I might have a different experience if I’d overridden the core vi-style semantics of the interface all that much, but apart from a couple of bindings I haven’t, and I’d suggest that best practice is to leave most of that stuff in place and augment it rather than replacing it. That’s why there’s a convention of prefixing things with the leader key and so forth.

                                                                                        1. 1

                                                                                          As always, it’s a gradient. I was thinking more of people customizing to look like this, remapping hjkl, etc.

                                                                                          And besides, I was just talking about the argument. Practice is a different thing, but when you see people who have only used vim try to use vi and seem just as confused as a newcomer, then I do think that there is a difference worth mentioning.

                                                                                      1. 9

                                                                                        But here is where the problem lies, it’s surprisingly rare that I find myself editing only one file at a time.

                                                                                        And that’s why Emacs exists. It even has a best-in-class set of vim keybindings. And it has a wonderful extension language. It’s a Lisp Machine for the 21st century!

                                                                                        1. 15

                                                                                          That just means he needs to learn more Vim. It does indeed support tabs, and splits too, and IMO does it better than most IDEs. And you can get a file tree pretty easily too with Nerdtree. I have no issues with editing a bunch of files at once in Vim. Features like being able to yank into multiple registers is much more of a help there.

                                                                                          1. 8

                                                                                            I suspect one problem people have with vim and editing multiple files is that they only know about buffers, which can be a little tricky to work with, but I don’t think many people realise it does actually have tabs too.

                                                                                            I frequently open multiple files with vim -p file1 file2 which opens each file in a tab, and you can use gt, gT, or <number>gt to navigate them. There’s also :tabe[dit] in existing sessions to open a file in a new tab.

                                                                                            I generally find this pretty easy to work with and not much harder than doing something like Cmd-[ / Cmd-] as in some IDEs.

                                                                                            1. 3

                                                                                              There is some debate on whether tabs should be used this way in Vim. I used to do it this way and then I installed LustyJuggler and edited all my files without tabs.

                                                                                              But if it works for you, more power to you!

                                                                                              1. 3

                                                                                                As a sort-of an IDE power user, I would argue that editor tabs are a counter-productive feature: https://hadihariri.com/2014/06/24/no-tabs-in-intellij-idea/.

                                                                                                1. 2

                                                                                                  That said, while you can work with tabs like this, that’s not entirely the idea of them. Tabs in Vim are more like “window-split workspaces” where you can keep your windows in some order that you like. With one buffer in one window per tab you do get a pretty similar workflow to tabs in other editors, but then again you could get a similar workflow with multiple buffers in one window even before Vim got tabs.

                                                                                                  Guess tabs fall in the tradition of vim naming features different than one would imagine: buffers is what people usually understand as files, windows are more like what other editors call splits and tabs are more like workspaces.

                                                                                                  1. 4

                                                                                                    Oh, to be clear I don’t have one buffer per tab. I do tend to use them more like workspaces as you say. Typically each of my tabs has multiple splits or vsplits and I’ll go back and forth between buffers - but having tabs to flip back and forth between semi-related things can be useful on a smaller screen too.

                                                                                                2. 3

                                                                                                  One of the reasons why I love vim is that I find a lot easier to edit multiple files at once. I can open then with :vsp and :sp and shift-ctrl-* my way around them very fast, with NERDtree I can open a directory folder in any of these windows, locate the file, and there you go, I have them arranged in whatever way I want. It makes it super easy to read the multiple files and copy things around. I like my auto-complete simple, I find autocomplete distracting, so I just use ctrl-n, but I’m aware this is a fringe opinion, if you want a more feature rich autocomplete, You complete me works pretty fine for people that like these. Also, I can open any terminal with :terminal… My vim usually looks more like this https://i.redd.it/890v8sr4kz211.png nothing with to do with 1 file per time.

                                                                                                  Does vim makes me super faster than everyone else? Probably not, it’s just a text editor, but it’s very maleable and I’ve been coding for many years now and I haven’t ever seen the need to not use it. When I need to work on a new language I just install a bunch of new plugins and things get solved.

                                                                                                  Nothing against VS Code, but it’s also only super powerful with the right plugins and configurations, there’s more of it out of the box, but without them it would also just be a simple text editor.

                                                                                                  1. 2

                                                                                                    What’s a good resource to start learning emacs?

                                                                                                      1. 1

                                                                                                        I gave emacs a try through mg(8), a small editor that ressemble emacs a lot (no LISP though) and is part of the default OpenBSD system. It comes with a tutorial file that takes you on a tour to discover the basics of emacs, starting with the navigation. This is like vimtutor, and it’s great !

                                                                                                        It also let you discover emacs as a text editor, AND NOTHING MORE! Which is refreshing and helped me reconsider its usefulness for editing text 😉

                                                                                                    1. 2

                                                                                                      I’m wrapping up a 30 minute Rust presentation for my company, to be given during lunch on Friday. Honestly I can’t wait until this is all over with because I can’t stand the attention.

                                                                                                      After that, I’ll be working on some UI stuff for the open source game my friend and I have been working on in our free time. We started in 2016 and I’m very much hoping it’ll be ready this year.

                                                                                                      1. 1

                                                                                                        The fact that personal accounts may be the keys to important repositories that are part of a shared infrastructure creates a “too big to fail” problem.

                                                                                                        Regardless of what this person did, there needs to be a way to manage community and have tools to deal with people violating the terms. But OTOH taking action against someone’s personal behavior shouldn’t disrupt other people’s projects. So the real problem here may be finding a way to avoid bus factor == 1. Now that GitHub also owns npm, they can look into figuring out how to responsibly separate (banned) person from the repos they maintain.

                                                                                                        1. 5

                                                                                                          They could have made his account read-only. No comment ability.

                                                                                                          1. 3

                                                                                                            Now that GitHub also owns npm, they can look into figuring out how to responsibly separate (banned) person from the repos they maintain.

                                                                                                            Why not simply sell repositories to the highest bidder, regardless of ban or not? (I think NPM made some inroads there already.)