Threads for jeromenerf

  1. 1

    Well, multiple files are a mess. I tend to source machine specific script from a common shell config files. I have maybe 5 or 6 different setup where I use this common set of dot files. Makes it portable.

    1. 16

      I haven’t used Sublime Text since around 2010 but decided to install this latest version to try it out. I’m actually blown away by the speed and efficiency - beyond simply the startup speed.

      1. 10

        Yeah, how everyone got so excited by VS Code is beyond me. Sublime Text is the real deal :D

        1. 32

          Hm I think this should be pretty obvious, no? It’s pretty clear that ST is faster and more robust, but it’s also obvious that VS has more semantics-aware features. Some people value features over speed.

          It’s beyond me how people can love any specific editor? Editing text sucks everywhere except in kakoune, only IntelliJ has enough polish&power to work efficiently with large projects, everyone except VS gets plugin ecosystem wrong, nothing but Emacs has efficient keyboard drive UX outside of mere editing, and only vim is installed on the server you ssh to.

          1. 2

            (That’s not real love, it’s mostly Stockholm syndrom).

            1. 17

              Eh, close. There’s a concern I’ve seen in many devs (including, in my younger years, me) that, if you’re not using the best tooling, then you’re doing it wrong. But if you spend a lot of time trying to decide what is The Best Tool, and then really learning it, then you end up feeling a really strong need to defend whatever choice you end up making. After all, you don’t want to admit you wasted that time by making the wrong decision, do you? The more time you spend defending your choice, the more you start to identify with the choice, which in turn makes you very resistant to anything that challenges you, and very quick to overly emphasize anything positive.

              Anyway, that’s a long way of saying that the mindset that results in people loving editors is less Stockholm Syndrome, more political cult, but you’re not far off.

              And besides, we all know that the best editor is unconditionally and with no qualifications ed.

            2. 1

              Editing text sucks everywhere except in kakoune

              I would be very interested to hear more on this if you’re willing. For context I use (neo) Vim or Vim bindings with other editors/IDEs.

              1. 2

                See Why Kakoune section from this document: https://kakoune.org/why-kakoune/why-kakoune.html

                The TL;DR is that we write ciw in vim, but iwc in Kakoune, and this gives you immediate visual feedback about what exactly you are going to c

                1. 1

                  Kakoune’s grammar is object followed by verb, combined with instantaneous feedback, that means you always see the current object (In Kakoune we call that the selection) before you apply your change, which allows you to correct errors on the go.

                  I find great value in rich feedback (syntax errors, typing errors etc) from an editor/IDE so bringing this to the actual text operations is very interesting.

            3. 4

              A friend of mine told me; people use electron-based editors and then are blown away with the speed of something that isn’t electron. Like obviously with something like editors, being written in say C(++) for example, is going to be faster than something that runs off web technology.

              1. 2

                A proper MRU ctrl-tab and a built in split terminal easily togable without lifting my hands from the keyboard did it for me.

                Opening file in project using quick open and a command palete, were also requirements of mine, but other editors already had these. Sublime being one of them.

                I have been wanting these simple features in an editor since before vscode existed. Vscode offers me that, I use it. I would be fine with other editor offering them too.

                Their multi edit support is also ofnmy liking and I.ve been including it in my work flow more and more often.

            1. 4

              https://codeberg.org/dnkl/foot is a good wayland terminal. It’s packaged in debian and it doesn’t mind old graphic cards.

              1. 4

                Really nice document.

                OpenSCAD is a gem for those with little patience with GUI tools. I draw my projects on an iPad and I design on openscad. I just can’t get anything done (on Linux) with libre/freecad, sweethome3d or sketch up …

                I like using an external text editor, so here’s how, from the official doc: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_an_external_Editor_with_OpenSCAD

                1. 5

                  I would go with a second hand laptop. It is cheap, performant, not too big in clam mode, standard port wide and has a resale value if you don’t need it for long.

                  1. 3

                    I have been using thinkpads with Linux for 18 years now, from a r40 or x24 to a t470. Cheap second hand, good support, great keyboard.

                    M1 seems nice but I don’t need it. Same for 5G, 500bhp cars, 4K selfie camera. I may enjoy them on day. I don’t need it tomorrow.

                    Going back to my stuff.

                    1. 11

                      Unicode provides many useful icon-like characters, you know the arrows, music notes, squares and triangles … no social media icons of course.

                      Good thing is, if you have the correct compose sequence for it, you can see the character in the code.

                      1. 6

                        I have chosen websockets over sse for quite a few projects because of windows antivirus and firewall that would block sse / long polling in a weird way. No issues with websockets.

                        1. 5

                          Thanks for all the suggestions and it’s great to hear all the different ideas people have tried and sometimes kept because they work for them.

                          I’m going to start by taking olly’s advice (thanks!) and using keys on the home row or thereabouts - with a key being held down to activate them. I was wondering if having both my keyboard and editor be modal would be confusing and it sounds like it is.

                          I didn’t mention anything other than being on a non-qwerty layout. For posterity, I’m on a Redox board with a layout ‘inspired’ by Workman. I’ve re-arranged the letter keys somewhat and I’ve left most of the keys around the edge unmapped, with my plan being to minimise finger stretching and use layers for numbers and less-common symbols.

                          I made myself a little on-screen keyboard app so I can see my layout and which keys I’m pressing (they highlight as I type) and can avoid peering down all the time - and I’m busy with typing tutors trying to get my WPM back up. No wrist pain at all so far but I’m at less than half usual speed!

                          1. 4

                            The keyboard and the layout aren’t as important as posture and hygiene (drink water and exercise).

                            Get some pro opinions on the matter o/

                            1. 1

                              You’re welcome, happy to help.

                              If you’re going to use a key on your left hand to activate the movement layer, another tip I have it is to also have left handed arrows at sdfg. That way, you can still use arrow keys with one hand in case you’re eating a sandwich or something.

                              I started with an ergodox, I think it’s similar to the Redox. After a while I did exactly the same and disabled most of the keys. Then a few months later I switched to the corne keyboard and it’s great.

                              I agree with jeromenerf’s points, but still it’s a really cool feeling to get a setup working really nicely for you. I guess split keyboards help as well.

                              1. 2

                                I’m already fine on the suggestions from jeromenerf but yes they are indeed requirements too if you haven’t got them right.

                                My wrist pain has also lessened since I stopped resting my wrists/hands and now keep them raised, like I’m playing the piano, and since I moved to a split, tented layout (initially with two Apple keyboards).

                                After I started disabling keys, thinking “I don’t really want to stretch for those” I then started wondering why I’d bought a keyboard with so many keys. But it doesn’t matter as they’re not in the way of anything… though I could tuck my Apple trackpad closer in at the centre if there were fewer… I’ll probably end up on a Corne in a year or two!

                            1. 3

                              I could recommend utilizing the thumb keys more and offloading work from pinkies. For instance, Shift is a very heavily used modifier and I really like having it on my most accessible thumb key. If you don’t want to lose an existing key, mod/layer taps are a very useful feature (although sometimes you need to tweak it to get it working to your liking). I am comfortably using a 36-key keyboard thanks to these features + combos (aka chording).

                              1. 3

                                I’m looking at using autoshift to offload most of my shift use. I started with it enabled, but it was really messing me up so I disabled it. I will probably end up using it though.

                                I do have a gergoplex kit coming in the mail soon. Once it gets in and I solder on all the switches I will write about it and how I adapted my config to it.

                                1. 1

                                  Autoshift sounds very useful but I admit I haven’t given it a proper shot. When I tried it required me to change my workflow for Vim/Vimium since I tend to hold down keys for scrolling (bad habit).

                                  Good luck with your Gergoplex, it’s a fun experience optimizing your workflow for 36 keys! Also it is not on QMK master yet, but I have been using this branch successfully.

                                2. 1

                                  Interesting, why that? I have just mapped backspace to my left pinky (Capslock) on an Ergodox and it feels very natural to me.

                                  1. 2

                                    Pinky is the weakest finger, so requiring holding it down is less comfortable. You also have to move off the home key positions to reach the outermost column. In contrast, thumbs are pretty strong and you don’t have to contort your hand when holding down a thumb then pressing other alphas.

                                    There are even layouts which move the most frequent alpha, e.g. E to the thumb: https://precondition.github.io/pressing-e-with-the-thumb

                                    1. 2

                                      I do appreciate thumbs keys, previously on an ergodox and now on a Planck. I can’t recommend the SZA ”EZ” products enough.

                                      That said, the thumb is not really at ease on this keyboard. I find that while it’s strong, the movement required to tap the keys is not the most natural. That being pinching, in an plane orthogonal to the other fingers. As a consequence, I find that turning the keycaps around (with the slope facing the user) helps a bit.

                                      It’s great at holding modifiers though. My setup is such that each thumb has two tap/hold keys lower(esc), os(space), shift(return) and compose(BS). I often press two modifiers with the same thumb.

                                      I also kept the lateral and symmetrical control and shift, just for the occasional ZZ, etc.

                                      The moonlander has a tilted thumb cluster, that should help with that. However those keyboards are so big that holding a key with the thumb makes it problematic to reach the distant keys. In the end, I prefer the Planck/preonic for factor, even with my big hands.

                                    2. 1

                                      I feel like this is less keys that are tapped on their own and more an issue for modifier keys; it can cause strain on some people’s hands to reach a far key while the pinky is holding down shift/alt/super/etc.

                                  1. 8

                                    It still bothers me personally, though, when they then share what they did with others as a means of inspiring others to do the same. Then more people end up doing something that doesn’t help at all.

                                    Same. There are better things you can do than optimize your website. You can easily save much more than 47 kWh / year by turning off the lights in rooms you aren’t using. A 10 watt LED bulb on for 8 hours a day uses nearly 30 kWh / year, and your rooms probably have more than a single 10W bulb.

                                    Looking at sources of greenhouse gas emissions in the US paints a clearer picture. The top 3 are:

                                    • transportation (28%)
                                    • electricity (27%)
                                    • industry (22%)

                                    That link has plenty more breakdowns if you take the time to read. Get a bike. Drive less. Fly less. Buy local produce. Save electricity. Contact your electricity company and see if you can opt-in to green energy only. Teach other people to do the same!

                                    And most of all, VOTE! Get other people out to vote. More people voted in the US 2020 election than ever before, but nearly 100 million eligible voters still didn’t vote.

                                    1. 5

                                      There are better things you can do than optimize your website.

                                      That’s a false dilemma… surely someone who does all those better things and optimizes their website has done more than someone who merely does all those better things?

                                      The existence of better alternatives doesn’t exclude the good of still acting on the “less better” alternative.

                                      1. 7

                                        Sure. The classic “not as bad as” rhetoric: there is always a good reason not to change.

                                        That said, low impact improvements should also be low effort, as to not compromise the ability to deal with higher impact actions.

                                        1. 1

                                          I’d argue that writing more energy efficient code is relatively low effort and (if that code is particularly widely used) can be relatively high impact.

                                          1. 2

                                            I find it interesting in that in all of these discussions “energy efficient code” is left intentionally vague. I figured it was some sort of stalking horse for Rust, but it was never explicitly stated.

                                            1. 5

                                              I am looking at papers like Energy Efficiency across Programming Languages, and as a language designer, this paper has prompted me to examine Pascal more closely (I’ve already looked at C and Go as well) to try to understand how I can make my languages more efficient.

                                              1. 1

                                                Not when I use the term … “more energy efficient code” could be in any language, and it might be as simple as adding a cache in front of a relatively costly request.

                                        2. 7

                                          You had me until the bit about voting. It seems out of place here. Maybe you meant “support leaders who want to reduce greenhouse gas emissions”?

                                          1. 3

                                            I certainly meant support leaders who want to reduce greenhouse gas emissions, especially by voting for them. :)

                                            1. 3

                                              It’s not at all out of place; increased participation in a democracy results in greater clarity and force behind the mandate presented to whomever gets elected.

                                              What a “leader” wants to do is irrelevant once their electorate has spoken loudly… participation is volume.

                                              1. 6

                                                It’s out of place for this site, where politics are generally regarded as off-topic.

                                                1. 8

                                                  That “generally” is doing a lot of work here; I see far less “politics” in encouraging people to vote generally than I would in encouraging them to support a particular candidate or agenda, which is what your correction would do… moreover the topic in this case is “things you can do to mitigate climate change that are (in the commenter’s eye) better than optimizing your website” and both “participate in the electoral process” and, indeed, “engage in political activism” are extremely on-that-topic. Trying to broaden this to being a meta conversation about the site generally is wandering off topic.

                                            2. 4

                                              You brought up a good point regarding LED-lights. Only 9% of domestic electric-usage is for illumination, and didn’t really move at all despite the push for LED instead of incandescent lamps in the last decade. Why is that?

                                              People have become complacent. They keep their LED-lights on because they think they’re not wasting energy with it. LEDs still need roughly 15% (~1/6th) of the energy an incandescent lamp needs, and I’ve seen so many houses where people just keep their lights on in every room or have permanent garden illumination (my neighbours for instance, who never go into their garden). Back with incandescent lamps, people tended to turn them or keep them off, so if we assume a 6-fold increase of LED-light-usage, it didn’t really change anything. This might be an observation limited to Germany, but maybe somebody here can relate.

                                              What really brings the point home, I think, is the fact that incandescent lamps still emit the superior light (CFR 100, enough said) and are much much more lightweight in resource usage than LEDs. The longer LED-lifespan of “20.000 hours” only relates to the diode itself, while often a capacitor or something else fails much more earlily. My Danish quality lightbulbs are at roughly 10.000 hours now and still working great.

                                              Conclusion? I’ll keep using incandescent lights and see light as a luxury that is to be cerished. It’s a problem that people are getting used to “constant illumination” everywhere, because it’s wasteful.

                                              1. 3

                                                And most of all, VOTE! Get other people out to vote. More people voted in the US 2020 election than ever before, but nearly 100 million eligible voters still didn’t vote.

                                                Why bring this up? Not everyone is American. Agree with the rest of your comment otherwise.

                                                1. 2

                                                  Americans who don’t vote as a percentage of total world population appear to be roughly the same as the percentage of web users who will experience a given website without javascript (because of loading problems, or having it turned off).

                                                  I think it’s fair to discuss both groups, even though they are substantial minorities :).

                                              1. 6

                                                Morality is a fuzzy concept to be thrown casually into propositional logic. The benchmark for what is or is not immoral is not well defined.

                                                Given this assertion, it would seem reasonable that if running code produces greenhouse gasses, and greenhouse gasses contribute to global warming, then running code contributes to global warming.

                                                Premise five seems relatively uncontroversial, though to simplify let us just consider the length of time some piece of code takes to run (in a similar way we assess algorithmic complexity). If an efficient version runs in 1 minute, and an inefficient version runs in 1 hour, it stands to reason that the inefficient version would consume more electricity.

                                                If all code in existence today were rewritten in the most climate efficient form such that its functionality was not changed, how much less resources would be used?

                                                1. 2

                                                  Read https://en.wikipedia.org/wiki/Jevons_paradox

                                                  TLDR: efficiency allows for increased usage.

                                                1. 3

                                                  sway feels snappier than i3 on the same laptop (x220). There is no tearing nor flickering when opening ‘ closing / moving windows, something I have honestly not noticed on i3 particularly. The keyboard latency seems also reduced. All in all, it feels snappy. Mini;ni; I have yet to find a terminal that allows for mouse plumbing.

                                                  1. 1

                                                    I never buy computers, tools and cars new for my personal use. I always buy new for consumables, accessories and for professional purpose.

                                                    I have occasionally bought refurb, which can be new old stock, unused.

                                                    This often means that I buy a base system that I need to restore, clean, upgrade … This is often cheaper because I can do the necessary work. This is kind of a way of life. This is also why I don’t do it for professional activities.

                                                    1. 6

                                                      As much as I like Org and the redesign of its website, I don’t think that it’s on-topic without at least an article relating the work done.

                                                      1. 3

                                                        This is the closes I could find for that: https://orgmode.org/list/87ft61l19p.fsf@bzg.fr/T/#mb63281a4a4fcc120742484caa5b6c9276fbf0e91

                                                        Is it possible to replace the link?

                                                        1. 2

                                                          “Hi Everyone, just a quick note from me: Regarding the intermediate state, there are a few teething issues that have appeared when deploying the site on orgmode.org.* If we could hold off from announcing this on some of the more high-traffic forums till these get sorted out that would be appreciated :) We want people to get the best possible first impression of the revamp after all. Timothy.”

                                                          1. 1

                                                            Further down the page:

                                                            These issues have now been fixed! Go wild :P

                                                            Also, you probably meant to reply to @zge’s comment, not its parent.

                                                        1. 6

                                                          I sometimes find it hard to belive that this guy started using Emacs just over a year ago.

                                                          1. 4

                                                            … and that his beard grew proportionally to his experience. Great beard and great content I must say.

                                                            1. 3

                                                              He’s literally becoming a graybeard as we speak, wow!

                                                          1. 7

                                                            In scenarios which precise better optimization of which tools are available, sure, let’s use containerd (for example) instead of Docker in our production machines for running Kubernetes.

                                                            But, sometimes, “monolithic” tools make sense. I want to use containers in my development workflow, which has a lot of requirements (running, building, inspecting…), what I need? Just Docker. It’s a no-brainer. And thanks to the OCI specification, that setup can generate images that run in production with a different set of tools.

                                                            People tend to call monolithic to stuff like if it were an obviously bad thing, but those exists because, sometimes, it just makes sense to have some set of functionalities tied together in a single package that is easier to reason about than a multitude of different packages with their different versions.

                                                            1. 4

                                                              I would be more sympathetic to this argument if Docker wasn’t a gigantic pain in the ass to use for local development.

                                                              1. 3

                                                                I agree. Docker belongs on the CI server, not on your laptop. (Or in prod, for that matter.)

                                                                1. 1

                                                                  how’s that?

                                                                  1. 3
                                                                    1. It’s slow
                                                                    2. It’s a memory hog
                                                                    3. It makes every single thing you want to do at least twice as complicated
                                                                2. 2

                                                                  But, sometimes, “monolithic” tools make sense

                                                                  I would even say than it’s the correct approach for innovation, right after R&D and through product differentiation. They went through that quite well. Docker’s problem is no longer an architecture nor an implementation problem, more that their innovation has evolved into a commodity.

                                                                1. 7

                                                                  More things to look forward to:

                                                                  • Reliable, durable keyboard that can work outside a cleanroom.
                                                                  • Never having to upgrade to Catalina.
                                                                  • Being able to install gdb!!!1!

                                                                  I’m jealous! Curious to hear how the trackpad compares, though.

                                                                  1. 3

                                                                    Trackpad works great, not as great as macOS’s. But on thinkpad you get the track point and on bsd systems, you may rely less on the mouse anyway.

                                                                    1. 2

                                                                      The current MBP keyboards are back to the ones that were on the original pre-retina Air/MBP, which is to say they’re fantastic. This is no comfort to the people who bought the last 2 or 3 gens, though.

                                                                      1. 1

                                                                        Huh, good to know! I hadn’t been able to find a straight verdict on them on the internet.

                                                                    1. 1

                                                                      What about bluetooth, audio and video?

                                                                      1. 4
                                                                        • bt is not supported
                                                                        • audio is great
                                                                        • video is limited by hardware support, intel recommended
                                                                      1. 2

                                                                        Ok I need advice. I used to exclusively use a Macbook Pro (and still use it frequently), I generally agree with this article, I have a lot of experience (and LOVE) running FreeBSD servers, I write a lot of C code and have no problem porting software, I like the MIT/BSD license over GPL, and I run Ubuntu now on my Thinkpad/desktop (which I use more frequently than my Macbook), is it worth it to switch to OpenBSD?

                                                                        OSes I’ve used so far (clientside):

                                                                        • OS X, easy, gets out of your way, lots of nice proprietary stuff. Quality is slowly degrading over time though. And brew sucks. Maybe the arm laptops will change my mind.
                                                                        • Ubuntu, I love APT/dpkg and know it like the back of my hand, installing proprietary stuff is pretty easy, sane defaults, easy to Google stuff, most software with linux compatibility usually has a Ubuntu .deb or a ppa, and generally gets out of my way. Only real con is the warts that come from Linux and the occasional weird decision by Canonical
                                                                        • Slackware, it was nice but lack of a package manager is kind of annoying
                                                                        • Arch Linux, it was fun when I was in high school but now I don’t really care what WM I use and I hate the rolling release model
                                                                        • Jailbroken iOS, my favorite OS by far, apt/dpkg + BSD base + Mobilesubstrate = amazing

                                                                        And just to be clear I don’t care about Free as in Freedom™ when it comes to my personal computers. I just want a well designed OS that will make me as effective as possible, and can run proprietary Linux binaries. And I want to do VFIO and play games in a Windows VM in QEMU

                                                                        1. 4

                                                                          is it worth it to switch to OpenBSD

                                                                          I should probably say this with a nixpkgs contributor hat on, but:

                                                                          Maybe you should add NixOS and Guix to your candidates. Most of the OSes that you have used, use traditional package managers. Nix and Guix provide a lot over that: declarative system configurations, per-project virtual environments, atomic upgrades/rollbacks, and the ability to have multiple versions/build configurations of a program/library on the system. Given your requirements, you would probably like Nix more, because it also packages proprietary software (so e.g. installing CUDA is not a problem) and provides stable releases besides the rolling unstable.

                                                                          You can also install Nix or Guix on an existing Linux distribution to test the waters (macOS too, but it has issues more regularly).

                                                                          It may not be for you, but it’s at least worth considering.

                                                                          1. 3

                                                                            +1 to NixOS. :)

                                                                            I love the culture of people putting up their entire system configurations, defined end to end, up on public repos. Here is mine: https://github.com/shazow/nixfiles

                                                                            When something doesn’t work, it’s very easy to find examples of other peoples’ setups as a reference. If we have the same hardware, you can use my configurations (or subsets) to replicate my experience precisely. If something breaks, it’s easy to get help on a problem by pointing to my configuration. Not to mention how easy it is to roll back!

                                                                            I don’t think I can ever go back to a “traditional” operating system without these mechanics.

                                                                            1. 1

                                                                              Yah I’ve heard of Nix and it looks cool but I never really found APT/dpkg lacking or restrictive. I’ll probably try it out in a few years

                                                                            2. 1

                                                                              I would like to point out that choosing NixOS as a daily driver has the downside of requiring you to learn an entire new ecosystem to be able to figure out why something went wrong, or how to make it do what you want.

                                                                              This means that you end up having to learn both nix the language, which is relatively easy, as well as nixpkgs the packaging library, which I’ve found to be ridiculously and immensely difficult. The documentation is still lacking (for example, but has improved over time), as is any easily accessible tooling for discovering what can be done that isn’t “read the entire source for this package and trace how it would get built”.
                                                                              (There’s also the NixOS configuration library that I have not yet needed to understand the internal workings of.)

                                                                              However, the community is pretty much always happy to help out, and asking people has always resulted in useful (and sometimes explanatory) answers.

                                                                              So in the end NixOS is what I use. Perhaps it’s just that I’ve gotten used to digging through nixpkgs to fix my problems and don’t know how other packaging systems work, or maybe I’m hoping that one day I’ll actually rely on all of the benefits that I’ve supposedly been given, but I’m sticking with it for the time being.


                                                                              Additionally, I would assume that Guix needs a similar commitment to use, but at first glance (from a while ago, when I last looked at it) it seemed there was more effort put into documentation. However, I’m not well versed in Guix to any extent, and so I don’t have anything knowledgeable to say about it.

                                                                            3. 3

                                                                              I just want a well designed OS that … run proprietary Linux binaries.

                                                                              Then you are not a match for openbsd.