1. 18

    I’m a longtime Thinkpad user, and I can’t say he’s wrong, but he also doesn’t give them their due.

    I use Thinkpads first of all because of the trackpoint; I really dislike trackpads, and as a proficient touch-typist I dislike taking my fingers off the home keys. Also, the keyboards have consistently been among the best laptop keyboards. Next, one thing to really like about Thinkpads has always been that replacement parts for the things that most need to be replaced are easily available and usually stay the same over several generations of models in a line. Also Thinkpads are designed to be easy to open and swap parts. And of course the build-quality is usually quite good even if there have been some problems. The main reason that people are loyal to Thinkpads is that they (so far) have always been able to rely on these things being true.

    Need a new laptop? If the above criteria are important to you, a Thinkpad is a safe choice.

    1. 4

      I do indeed like the TrackPoint as I pointed out - but I miss the flexibility trackpad gestures provided. I never developed the home row style, but that’s probably because I learned touch typing on my own. The keyboard is nice, but not nice enough I’d consider it to the exclusion of other things.

      Parts commonality isn’t really that common across generations. Ultimately, ThinkPads are the same as any other business laptop like a Latitude - if not worse in regards to things like service time. (Oh, and do enjoy your Wi-Fi card whitelist.)

      And sure, serviceability is nice, but I can’t think of a time I had to open up a laptop other than the self-inflicted (i.e I bought a laptop without a wi-fi card). Machines are pretty reliable outside of normal wear and tear. By the time you do need to upgrade/repair, the system is like seven years old, massively obsoleted, new parts won’t likely fit, and you’re better off replacing it anyways.

      (A funny irony of the X220 hagiography crowd is that I think the X240/T440 improved serviceability for things someone might actually want to do, like blowing out dust or replacing the fan - just remove the bottom cover. But oh no, it made changing RAM harder!)

      As mentioned in the article, I buy ThinkPads because they’re predictable - but they’re not a panacea.

      1. 3

        I switched from an MBP to a thinkpad last year because I wanted linux. I have the same touchpad gestures that I used on mac working with libinput-gestures. Of course it needs manual setup and of course the touchpad isn’t nearly as good, but it works.

        1. 3

          same touchpad gestures that I used on mac working with libinput-gestures

          That’s not nearly the same, it does discrete events in response to a complete gesture, which is not really good.

          GNOME Shell, KDE Plasma, and (thanks to me :D) Wayfire natively support actual continuous workspace swipes, where you actually move between workspaces with your fingers and can “play” with them like on macOS.

          And pinch-to-zoom/rotate and various swipes generally work in applications on Wayland, support is very common in GTK apps, e.g. you can pinch in EoG, Evince, Epiphany, etc. And in Firefox as of recently!

      2. 3

        Is all the repairability still true for all of the ThinkPad series? Or are we still mostly talking about the T series?

      1. 7

        What are some interesting use cases for this?

        1. 7

          The most interesting one currently is paying people to crowdsource large data sets. We just ran a couple large bounties that paid $25k and $10k:

          https://www.dolthub.com/blog/2021-02-15-election-bounty-review/

          https://www.dolthub.com/blog/2021-03-03-hpt-bounty-review/

          There’s another one going on for $10k right now.

          But most people who are paying us money for the product are using it as an application server, basically to replace MySQL or postgres. They want to be able to manage versioning of their production database like git.

          There’s a ton of use cases though, it’s a really cool product.

          https://www.dolthub.com/blog/2020-03-30-dolt-use-cases/

          1. 2

            Are there any real-world analysis being done on DoIt’s election precinct data?

            1. 2

              Not that I know of, but it’s only a month old.

              We recently announced we’re going to be partnering with OpenElections to fill out the rest of the data for 2020, so a more complete set of data might spur further interest.

              https://www.dolthub.com/blog/2021-02-24-open-elections-followup/

        1. 9

          Now that both XML and YAML are frowned upon as configuration formats, are TOML or Starlark acceptable choices?

          1. 9

            TOML and HCL

            1. 10

              Just. Use. Json.

              1. 42

                JSON doesn’t support comments though, and generally isn’t especially easy to deal with manually IMO. There are some variants which improve on this, but if you’re going to use a “kinda like JSON but not really”-format then you might as well use something explicitly designed to be a configuration format.

                1. 7

                  JSON supports strings, therefore JSON supports comments.

                  I just use fieldName_ for a comment string. All field names in my config are camel case so if there’s an underscore it’s a comment. People are thinking too much about this. It’s standard to use camel case in js so if it’s not that, then it’s something else.

                  1. 16

                    People are thinking too much about this. It’s standard to use camel case in js so if it’s not that, then it’s something else.

                    JSON isn’t JavaScript. In other languages, which also consume JSON, it is generally idiomatic to use underscores and not camel case.

                    Additionally, having extra random “comment” fields in your objects is unsightly, and increasingly difficult to read for humans – and nigh on impossible to then do proper strict schema checks (to avoid misspelt properties, say) on the result.

                    1. 5

                      Are these not for configs? What does it matter if comment fields are in config objects? Do you not have a syntax highlighter/prettyfier? Can you not just make validators for config objects?

                      If you’re dealing with JavaScript Object Notation I don’t see why you aren’t using camel case for that portion of your code and even if there were a good reason, pick a delimiter or suffix that works in your case.

                      This is starting to sound like people being disorganized rather than tool failure. If so much structure is needed for your projects then why not just use protobufs? They support comments in the traditional sense and go everywhere.

                      1. 5

                        Camelcase isn’t mandatory in JS and while many of the codebases/libraries are camelcased (especially now after prettier), I have worked on many codebases with underscore delimiters. Pretty common in organizations where existing products have been written in non-JS languages.

                    2. 10

                      Good heavens, that’s just ugly and unreadable.

                      1. 10

                        JSON specification does not preserve order of keys, thus generating/modifying configs by software can lead annoying situation where those “docstrings” and values are not next to each other. Depends on the platform though, obviously.

                        1. 3

                          I do this too. But then if I have type checking on JSONs, I need to update the grammars there to support those comments. But it’s a decent workaround for the current situation.

                        2. 3

                          That’s true.

                          An approach I had been using is relying on a config language eg HOCON [1]) + config language embeddable ‘interpreter’ (eg LighBend/Config [2] .

                          When selecting the above combo, I was looking to minimize repetition of config values and ability to use same config file from multiple languages.

                          The above translated into needs for for hierarchical inheritance, support for ‘truthy’ values, support overrides (by environment variables, or by extra ‘includes’), support for arrays. And the ‘embeddabiltiy’ into a variety of common programming language (eg C++, Java, Python, C#, JS)

                          HOCON also has a syntax highligter for jetbrains, so makes working on larger configs, easier.

                          It certainly lacks sophistication of Dhall, with it is incredible ability to show semantic diffs.

                          [1] https://en.wikipedia.org/wiki/HOCON [2] https://github.com/lightbend/config

                        3. 24

                          As a human readable configuration format? No thank you.

                          1. 13

                            JSON is not great for long strings that contains newlines, though, like PEM certificates.

                            1. 3

                              JSON supports an arbitrary set of data structures. It’s a good choice of ~8, but arbitrary.

                              It does not support enums. It does not support sets. It does not support maps….

                              So what ends up happening is you end up needing to define a grammar anyway (and if you don’t you’re setting yourself up for pain), so at that point, why use JSON?

                              Now of course, for pragmatic practical reasons I wouldn’t tell anyone to stop using JSON today-you’d be fired. But in 5-10 years I wouldn’t be caught dead using JSON.

                              1. 15

                                It’s also, depending on the interpreter, good for silently mangling integers that exceed 53 bits in size.

                              2. 3

                                Use edn. Easier to write than json, no commas bogging you down, and I believe you can comment.

                                1. 1

                                  Edn is nice. It does have comments. No multidimensional array syntax, but otherwise seems okay.

                                2. 3

                                  JSON doesn’t encode numbers well. By specification they cannot be NaN or Infinity and in many implementations integers will be silently mangled if their magnitude is greater than about 2^53.

                                  1. 1

                                    Personally, I prefer Lua for configuration files.

                                    1. 1

                                      I’m with you. JSON’s simple pervasiveness and no-surprises syntax still outweigh the negatives others are pointing to.

                                    2. 3

                                      Amazon’s Ion is a superset of Javascript (including comments) and has great library support. http://amzn.github.io/ion-docs

                                      1. 3

                                        I think it’s worthwhile to differentiate between configuration languages and other serialization formats or in other words to really look at what use cases they were designed for/how they were born.

                                        I i think right now toml and UCL (and HCL) are great proven, well designed formats for classical configuration needs.

                                        YAML was designed to be kinda close to something a human even in non tech would write (in an email). It absolutely makes sense for things like metadata for static sites. It’s like a nature language, so like them it has multiple ways of saying no. Just like your chatbot would have

                                        But as everything this comes with a price. I don’t think it’s so much about X vs Y for absolutely everything. I think with YAML it’s more a development of “hey I know YAML and X also uses YAML”. I think it’s in good faith of course, but I think we too rarely take a step back to really make a choice based on what the goal is. For example I am a fan of the development of using things like protobuf, but there’s certainly a lot of cases where json is a way better option and neither make good candidates for configuration. But if there’s always a UI in front of it (think a game) or a maximum of portability and just a hand full of options (name, color icon or something) I can totally imagine JSON to be something to consider.

                                        I think YAML also sufferer from the fact that it originally comes from a time where the largest player was XML and the scripting languages wanted to have an alternative for that. Once done it for simple metadata style content makes sense and just like JSON people would end up using it to store configuration even though that not always made sense.

                                        And now it certainly is overused. While I really hope that HCL/UCL and TOML pick up and become the standard way of configuring software I very much hope we don’t end up trying to make them golden bullets and use them for stuff they were not designed for or turn them into huge standards for every use case people can come up with, because that’s when people feel the need to create something new and simpler again restarting the cycle.

                                        1. 2

                                          TOML is great as an init file but an XML replacement it does not make.

                                          JSON is really a betamax vs VHS kind of situation… we’ve had S-expressions for a long time now and they are the clear winner in every way.

                                          You can make convenient denotations for different datastructures by putting a symbol in front of the opening parens like #(this is a vector).

                                          Semicolon marks the start of a comment, you could do a commented block with ;(this is a block comment)

                                          Finally, and most importantly, there are canonical S-expressions that can have binary data and be streamed over networks. Furthermore it’s relatively simple to have a standard projection from any S-expression to a canonical one. Using the vector from before as input we get: (6:vector4:this2:is1:a6:vector) as the canonical representation. This we can sign and hash and work with in various ways.

                                          What more do you want? Schemas? Sure we can do those.. just as was done for XML (which is just violence when you contrast it with sexps..)

                                          Edn is not good enough in my opinion. It’d be much better to have just pure sexps.

                                          1. 1

                                            I like the idea of S-expressions, they are very nice in theory. In practice, they have two problems:

                                            • Users need quite a bit more training to edit S-expressions than INI or TOML files.
                                            • It’s not manager-friendly to introduce “sex-pressions”.
                                          2. 2

                                            Use Tree Notation. You get zero types (just strings, which are arranged in a grid so editable by any text editor OR spreadsheet). Then you just define what types you need on top of that.

                                            Don’t need booleans? Don’t add them. Don’t need floats? Don’t add them. etc.

                                            Need sets? Add them. Need maps? Throw them in your cart.

                                            It’s the “a la carte” of notations.

                                            1. 4

                                              In your own words, tree notation is a “half-baked” idea. I like the idea, but whenever I stick it in the oven it sprouts just as much complexity as any other configuration / markup / data representation language.

                                              1. 1

                                                Totally. And boy were there some bad sprouts that needed to be weeded out. Some of this year’s harvest is quite delicious though.

                                                I hope someday soon it will “just work”.

                                                The base notation seems mostly settled (at least in 2-dimensions, though there is still some interesting experiments with multi-headed parsers), but best practices in building higher level Tree Languages are still evolving at a decent clip.

                                            2. 2

                                              Jsonnet?

                                              1. 2

                                                I find Dhall a good balance between expressive power and generating simple structures. And you get types, too.

                                                1. 2

                                                  I agree on toml because unlike json it is not only human readable but also writable.

                                                  I use the filesystem, at one file per key, and dirs for organizing, which makes it easier to edit even with basic tools, and also to diff against defaults.

                                                  1. 1

                                                    Has anyone played with Nickel?

                                                  1. 13

                                                    One of the Factor devs here. Feel free to ask any questions you might have, and I’ll do my best to answer.

                                                    1. 6

                                                      What do you think is the over arching goal for factor? Were you trying to solve a particular problem which was not solved well by other languages?

                                                      1. 9

                                                        I’m not the inventor, so I wasn’t trying to solve any particular problem as such. I just really liked what I saw.

                                                        For me, Factor provides a sweet spot of easy and very powerful metaprogramming, a simple runtime, and incredible introspectability. The feel of doing development in it is somewhere near a Lisp Machine, since all objects have graphical representations, you have a full REPL with compiler the entire time, and yet you still compile down to fully native code at all times. This makes doing incremental development extremely easy, and I think the amazingly rich standard library and GUI toolkit (for a language with its user base, at least!) speaks to its productivity. And unlike, say, Pharo/Squeak Smalltalk (an old haunt of mine), it uses normal text files for code, so I can use traditional tooling like Git and GitHub to manage development.

                                                        These days, I write a lot less in Factor. Most of that’s due to real life taking precedence as I get older, some of that’s due to other languages closing the gap quite a bit. (Things like Jupyter, or Swift Playgrounds, did not exist when Factor was created, for example.) But Factor remains my preferred environment when I’m trying to learn a new concept or explore a domain I’m not terribly familiar with. Most recently, I had a blast using it for Cryptopals, for example.

                                                        1. 2

                                                          These days, I write a lot less in Factor. Most of that’s due to real life taking precedence as I get older, some of that’s due to other languages closing the gap quite a bit. (Things like Jupyter, or Swift Playgrounds, did not exist when Factor was created, for example.) But Factor remains my preferred environment when I’m trying to learn a new concept or explore a domain I’m not terribly familiar with. Most recently, I had a blast using it for Cryptopals, for example.

                                                          Not to make light of anyone’s excellent work, but whenever I’ve explored Factor this matches what I’ve seen. The community was incredibly vibrant and active a few years back, but recently activity seems to have really fallen off across the board.

                                                          Am I mis-perceiving things or are you not alone in having moved on in some respects to other languages and environments?

                                                          1. 5

                                                            Eh, it’s mixed. Yes, things have slowed down: Slava left, the company using Factor commercially folded, and a lot of us (such as me) have kids and stuff that make coding for fun harder.

                                                            On the other hand, there’s actually a lot of work going on (largely driven by @erg) to make the syntax and runtime a bit more standardized, there have been a number of library improvements from Alexander Iljin, when people have needed more libraries they’ve added them, and so on. If you look at the core repo, you’ll see there honestly been a tremendous amount of activity since the last release. Sure, the pace may be slower, but it’s steady.

                                                            In other words: I don’t think development has stalled, but I think it’s stabilized. For me, that’s great: Factor’s library grows and its stability improves, but things are generally where I left them. I know that same kind of things draws a lot of people to the Common Lisps as well, which also have a slower churn rate.

                                                            1. 2

                                                              I guess I was referring less to the language itself than to the ecosystem around it - blog posts and the like. But you’re right, none of this is an actual measure of a project or community.

                                                              1. 2

                                                                Blog posts are definitely down, but the mailing list is still quite active. I think it depends a bit where you look. But yes, I hear your point.

                                                      2. 3

                                                        Factor is a dynamic language and that makes sense to me: You have values on the stack that know their own types. When you are going to use a value, you check it’s type.

                                                        How do you think a statically typed concatenative language would look? My intuition is that it would be like a reduce operation over all of words in the program. I think I’m a bit hung up due to the lack of formal parameters.

                                                        1. 4

                                                          How do you think a statically typed concatenative language would look?

                                                          Probably exactly like our (optional) static typing. Do note that the compiler could do a lot more than it currently does for optimizations, but you can play with optimized. to see what it’s able to pull off. For even relatively complex cases that involve fixnums, it can basically do ops on straight machine words.

                                                          1. 1

                                                            That is neat! Is it used a lot in practice?

                                                            How is the data stack implemented in Factor? Is it just an array of pointers? Or does it use the top bits to determine the types? Tried looking at the repo, but wasn’t sure what file it might be in…

                                                          2. 3

                                                            There was also cat from Diggins and Kleffners thesis

                                                          3. 2

                                                            On the “See some example programs” page, the example program links all give me a 502 error.

                                                            1. 1

                                                              How related is concatenative programming related to array programming (APL)? I feel that some of the concatenative combinators seem familiar to transformers in Nial

                                                              1. 1

                                                                Can the REPL run in a console? I installed the factor package from AUR, and factor-vm seems to only be able to open its own graphical window.

                                                                1. 3

                                                                  I can’t speak to whatever Arch is doing, but I just double-checked that plain factor on my box kicks off a command-line REPL, so I’m not sure what’s going on with their package.

                                                                  That said, I would strongly discourage using the vanilla command-line REPL; you’re missing so much awesomeness. If you really badly want to use a terminal for whatever reason, I would strongly suggest at least using FUEL (our SLIME workalike) in Emacs.

                                                                  1. 1

                                                                    ArchLinux doesn’t install a plain factor (perhaps because the name collides with the factor binary from the coreutils package). There is /usr/bin/factor-vm which is a symlink to /usr/lib/factor/factor. The latter also opens a GUI thing, but I just found out I could factor-vm -run=listener to get a TTY thing, so that’s cool.

                                                                    Thanks.

                                                                    1. 3

                                                                      That’s exactly the reason why the factor binary is renamed in the package. Source: Arch Linux packager here.

                                                                      It is kinda sad that there hasn’t been any new releases in years, so if you want to have the new features you’re better off with factor-git.

                                                                      1. 1

                                                                        Thanks, I’ll switch to factor-git.

                                                                        1. 1

                                                                          I’m not thrilled with that, but there’s an (in my opinion, wrong) attitude that our next release needs to be Perfect™, which means it’s forever delayed. The good news is, as you said and @kas is now doing, that Git is honestly quite stable, so that’s probably the route most people should go for now.

                                                                          1. 1

                                                                            I think cutting a release would also send out a signal that Factor is not dead. I can confirm that git is quite stable so maybe there could be a point where tagging a new release might make sense.

                                                                            In any case, thanks for maintaining Factor. I’m not actively using it any more but honestly due to the whole environment and community this was the most fun learning a programming language I’ve ever had, especially a completely different paradigm.

                                                                  1. 2

                                                                    Because the fact is that in most applications today I can press ctrl-+ and ctrl– repeatedly until the text is just the size that’s appropriate for my need at this moment, and that’s real progress.

                                                                    1. 6

                                                                      Great read! I use scp quite a lot. It sounds like I should learn sftp.

                                                                      1. 15

                                                                        I’d really recommend rsync instead. As the article mentions, it’s essentially a drop-in replacement for scp and it’s much more performant in most use cases.

                                                                        1. 8

                                                                          This. Also, while rsync can be used like a drop-in scp replacement, it can do a lot more than that and for copying or syncing whole trees or filesystems there’s nothing better. Just as ssh is the swiss-army knife of secure connections, rsync is the swiss-army knife of file tree copying / moving / duplicating. It’s well worth becoming thoroughly familiar with its command-line options.

                                                                          1. 5

                                                                            rsync is a bit painful about when it copies files or directories and where exactly they will end up in what situations. I came to prefer https://github.com/DragonFlyBSD/cpdup because its UI is safe enough for me.

                                                                            1. 3

                                                                              You only have to remember one basic Unix rule: foo is the directory itself and foo/ is the contents of the directory

                                                                          2. 2

                                                                            Doesn’t rsync require a server, or at least rsync binary to be present on the remote machine?

                                                                            1. 2

                                                                              No server required on remote, but yes you do need the binary on remote. I haven’t had any problems with it not being installed places I need, but you may have some different targets than I do. There are a couple of statically compiled copies of rsync you can drop in for different arches.

                                                                            2. 1

                                                                              rsync can’t do what scp -3 does, can it?

                                                                              1. 1

                                                                                Can’t say I’ve ever used -3. So without -3 it sounds like it tries to copy directly from one remote to another, but with -3 it’ll copy to the local machine and then pass the file through to the remote? If I understand correctly, then I believe you’re correct, rsync has no builtin capabilities for handling copying between two remotes. You’ll have to setup port forwards.

                                                                            3. 7

                                                                              sftp behaves very similarly to ftp when it comes to commands, plus any recent releases come with tab completion for both local and remote files.

                                                                              All you’ll probably ever need is put filename, get filename, put -r folder, get -r folder, ls, lls, cd, lcd. You can also run commands locally like “!vim filename”.

                                                                              It’s very easy to get used to.

                                                                              1. 2

                                                                                Tried it out today. Seems nice and easy to use

                                                                            1. 2

                                                                              What is it? Edit: OK, after clicking around for a while I’ve seen hints that it’s a port or reimplementation or something like that of the SGI desktop environment for Linux and/or BSD. I’ve seen other sites that weren’t very clear on what they are actually about, but this one takes the cake… if you don’t know what MaXX is apparently they are not eager to tell you.

                                                                              1. 1

                                                                                A closed-source reimplementation of SGI’s IRIX Interactive Desktop, by special permit of SGI.

                                                                              1. 9

                                                                                I wish for this submission to have more about it in the title.

                                                                                1. 5

                                                                                  The very first story submission guideline is “Do not editorialize story titles, but when the original story’s title has no context or is unclear, please change it.” It conveys what it needs to as it is, I’m not sure what else you would add without editorializing.

                                                                                  1. 4

                                                                                    I disagree that the story title has sufficient context and clarity to be presented as-is.

                                                                                    1. 2

                                                                                      My feeling falls under

                                                                                      when the original story’s title has no context or is unclear, please change it.

                                                                                      Adding “A secure runtime for JavaScript and TypeScript” would not be editorializing

                                                                                      1. 2

                                                                                        “Deno 1.0: A Node reboot”..?

                                                                                        1. 12

                                                                                          That’s definitely editorializing.

                                                                                          1. 2

                                                                                            “A potential Node successor”, then? The article doesn’t use the word ‘reboot’, but apart from that it positions Deno as

                                                                                            • Deno is intended for the niche now served by Node
                                                                                            • Deno builds on what the authors learned while building Node
                                                                                            • Deno does things that Node does, but better
                                                                                            • Deno, being a new project, can fix things that can not easily be fixed in Node itself

                                                                                            Hell, even the name is an anagram of Node.

                                                                                            I’m not asking you to endorse the word ‘reboot’ like I do; but why does it feel like ‘editorializing’ to you; in other words, feel like it’s more like opinion than description?

                                                                                    1. 24

                                                                                      I tried Spacemacs for a bit, but it broke almost every time I tried to update or install on a new system. I then tried DoomEmacs, which seemed like a step in the right direction, except that had it’s own suite of problems. Overall my general impression of Emacs is that it’s a bloated piece of legacy software that people keep tacking things on for reasons that I can’t understand. I see VSCode going the same route, just in JS instead of Lisp and C.

                                                                                      1. 18

                                                                                        Emacs is that it’s a bloated piece of legacy software that people keep tacking things on for reasons that I can’t understand.

                                                                                        Because it has everything I need, except that one little thing, and I can tack that one on by just whipping up some Lisp functions. What’s so hard to understand?

                                                                                        1. 3

                                                                                          The idea that everything needs to be crammed into the text editor is the concept that I don’t understand and does not work for me. I don’t care if it works for you, but my experience with emacs has not been pleasant and I do not intend to go back.

                                                                                          1. 5

                                                                                            It helps if you think about it kind of the otherway around. It’s a highly flexible tool that also has a text editor.

                                                                                            1. 4

                                                                                              The idea that everything needs to be crammed into the text editor a single program is a concept that I don’t understand and does not work for me.

                                                                                              1. 8

                                                                                                You know how people make jokes like “Emacs is a great operating system; if only it had a good text editor”?

                                                                                                It makes a lot more sense when you realize that’s not actually a joke.

                                                                                                1. 6

                                                                                                  Did you ever try “vanilla” Emacs? (+EVIL if that’s your thing? Non-modal editing is half the reason why I use Emacs but that’s obviously just a personal preference)

                                                                                                  I’ve used Emacs for a very long time and a few years ago I thought I’d give Spacemacs a try, largely because I was thinking of declaring .emacs bankruptcy and having everything pre-configured looked like a good idea. My experience mostly matched yours – lots of things kept breaking, and since the whole thing is pretty complex, it broke in ways that I didn’t really want to debug. Figured I’m way better off just doing my own thing. Most things are pretty plug’n’play these days, I just (require some thing or another, and the rest is my personal configuration. My current emacs config files, which cover the (very substantial) subset of spacemacs that I use, are maybe 300 lines, at most? And I can’t remember the last time I “fixed” something in it.

                                                                                                  I tried mg and some uemacs flavours back when I was going down the suckless rabbithole and valiantly avoided bloat in the name of purity and Unix philosophy. Nowadays I kindda like emacs’ “bloat”. It’s not like I activate all of it and every piece of bloat is one less thing that I have to write myself when I need it.

                                                                                                  1. 1

                                                                                                    If I recall I tried a minimal setup with just a package manager and EVIL mode, but still didn’t really care for it. The default emacs keybindings don’t work for me, they make my hands hurt so I at least need EVIL mode.

                                                                                                    My comment about emacs bloat is also both about the plugin ecosystem and the codebase of emacs itself. Even the emacs developers are afraid to touch certain parts of the code (in particular, the rendering engine) because it’s overly complicated and brittle, and that’s also caused some issues for me.

                                                                                                    1. 2

                                                                                                      Why the “plugin ecosystem” (by which I assume you mean packages)? Sure, you have comprehensive and extendable modes (Org, Gnus, SLIME, etc.) but most packages really aren’t “bloated” in any sense of the word.

                                                                                                      And the issue with the rendering engine is historical/related to the fact that emacs has multiple front-ends. The reason it’s not experimented with too much is so that issues are avoided, so I’m not sure what you’re talking about?

                                                                                              2. 3

                                                                                                If you look at what one does on a computer, perhaps in the past more so than now, a lot of it is manipulating text.

                                                                                              3. 1

                                                                                                And why do you need a terminal emulator and a calendar in a text editor??

                                                                                                1. 6

                                                                                                  In case you’re serious:

                                                                                                  A terminal emulator with editing abilities is actually quite nice. In Eshell, for example, I can search output, highlight certain patters (either manually or automatically) or “flush” the output of a previous command. Copying and editing is just as easy The same is true for any debugger or a repl.

                                                                                                  And I guess I could live without a calendar, but I still like to have it because it’s not part of a text editor to me, but an iterative computing environment, just like a DE to some and a shell to others. And having something like a calendar or a calculator integrated into a unified workflow is something I think even non-Emacs users can relate to.

                                                                                              4. 3

                                                                                                it’s own suite of problems

                                                                                                Like what?

                                                                                                1. 5

                                                                                                  The UI would randomly break (especially with Magit), EVIL mode would occasionally fail to switch modes properly and space (the default leader) couldn’t be typed, as it would activate the leader UI in all cases and never make it into the buffer as a character. That last issue was a problem with Spacemacs too.

                                                                                                  1. 3

                                                                                                    The UI would randomly break (especially with Magit)

                                                                                                    With or without Evil?

                                                                                                    1. 8

                                                                                                      With Evil. I never ran without it, it’s whole reason I considered Emacs in the first place. It easily has the best vim emulation layer out there. Every other one I’ve used has had quirks that made them virtually unusable for me.

                                                                                                      1. 3

                                                                                                        magit was built without evil in mind, in fact, if it’s not because of vim, there’s no reason for evil at all

                                                                                                2. 3

                                                                                                  Overall my general impression of Emacs is that it’s a bloated piece of legacy software that people keep tacking things on for reasons that I can’t understand.

                                                                                                  Its worth pointing out just how old Emacs is. Emacs was first release in 1976 making it 44 years old. So for comparison lets take another editor that was released the same year: vi. vi has had major re-implications and forks to add additional extensible. Emacs has been largely unchanged but changes the internal components that make up the editor.

                                                                                                  1. 4

                                                                                                    There have been many forks of Emacs over the years; that we have (basically) only one implementation now is just an artifact of history.

                                                                                                    1. 4

                                                                                                      Yeah very true. I actually mentioned this in my original post, but I edited it out because I had 3 paragraphs of text where I said very little.

                                                                                                1. 7

                                                                                                  Because of the brackets? I never quite understood how this can be found aesthetic or intuitive to be honest:

                                                                                                   (defun factorial (n)
                                                                                                     (if (= n 0) 1
                                                                                                         (* n (factorial (- n 1)))))
                                                                                                  

                                                                                                  Python is not my favorite language either, but this looks just so much better:

                                                                                                  def factorial(n):
                                                                                                      if n == 0:
                                                                                                          return 1
                                                                                                      else:
                                                                                                          return n * factorial(n-1)
                                                                                                  
                                                                                                  1. 14

                                                                                                    My suspicion is that you haven’t spent enough time with it.

                                                                                                    Over the years I’ve used languages with wildly different syntax (Lisp, Haskell, Ada, Python, Erlang) , and after a few months with any of them, my eyes and brain filter out the syntax and all I really think about is the semantic structure and what the code’s doing.

                                                                                                    I think it’s part of the reason people are so persnickety about code formatting - consistent formatting makes common idioms and syntax elements easier to read at a glance.

                                                                                                    1. 4

                                                                                                      I actually agree that it looks better, but I think that’s besides the point. For me the benefits of the S-expression syntax outweigh what I feel a is minor cost in aesthetics. Those benefits include: simplicity through uniformity, no ambiguity, and interchangeability of code and data (meta-programming).

                                                                                                      1. 3

                                                                                                        This is a matter of subjectivity for anyone who’s experienced with programming. For instance, I find the Lisp version much more beautiful. The indentation “flows” in a way that is much more curvy and less blocky than the majority of other languages - less so in the example that you gave, but in the general case.

                                                                                                        Why do I think that it’s more beautiful? Because, even though I wrote Python and C for 4 years, I discovered and wrote Common Lisp for 5 years after that, and my tastes have changed. I think that it’s more interesting to ask beginners which syntax they prefer.

                                                                                                        (not relevant to my point, but you might be interested to know that after you’ve written Lisp for a few months, the parentheses fade from your perceptual awareness. Lisp programmers read code mostly using indentation - we don’t count parentheses)

                                                                                                        1. 1

                                                                                                          Your Python snippet is longer than Lisp one while not conveying extra complexity. Another way to say, less elegant.

                                                                                                          1. 1

                                                                                                            Oh? Lisp: 29 tokens, Python: 24 tokens. If I count python indentation as a token, then python goes up to 28 or 30 tokens (more if 2 indentations on a row equals 2 tokens), which seems like a off-by-one error rather than clear win for either :)

                                                                                                            1. 1

                                                                                                              I don’t think that calling Lisp parens “tokens” is very accurate, because (1) they’re pervasive (more so than newlines by far) which leads to (2) tooling+experience causes them to perceptually vanish.

                                                                                                              In other languages, you notice every parenthesis. In Lisp, you notice few (but you do notice some). I perceive that code fragment as:

                                                                                                              defun factorial (n)
                                                                                                                if (= n 0) 1
                                                                                                                  * n (factorial (- n 1
                                                                                                              

                                                                                                              I agree that there is no clear winner, though, even if you fix the Lisp formatting:

                                                                                                              defun factorial (n)
                                                                                                                if = n 0
                                                                                                                  1
                                                                                                                  * n (factorial (- n 1
                                                                                                              

                                                                                                              (note the unmatched open parens) I think that much more interesting examples involve larger and more complex code, which allows you to (reasonably) compare Lisp macros against the abstraction features of other languages.

                                                                                                          2. 1

                                                                                                            Clojure:

                                                                                                            (defn factorial [n]
                                                                                                              (if (zero? n)
                                                                                                                  1
                                                                                                                  (* n (factorial (dec n)))
                                                                                                                  ))
                                                                                                            
                                                                                                            1. 1

                                                                                                              Tbh, when you use it enough all you see is this anyway:

                                                                                                              defun factorial (n):
                                                                                                                 if (= n 0):
                                                                                                                    1;
                                                                                                                     * n (factorial (- n 1));
                                                                                                              

                                                                                                              Which amounts to about the same as python.

                                                                                                            1. 9

                                                                                                              I’ve just started using Spacemacs over Vim so I could get access to Racket mode after I was recommended to try it by fellow Lobsters.

                                                                                                              Spacemacs is great! Evil mode works just as I expect it, the actual status lines and such make sense and aren’t completely ugly, SPC-SPC gets you to a fuzzy command search, and as Emacs commands are verbose, most of the time I can totally guess what I want: SPC-SPC-wrap shows me toggle-word-wrap which was indeed what I wanted. When I open a file with a format that is recognized but I don’t have the plugin for, I’m immediately prompted if I want the plugin and away it goes.

                                                                                                              I might have been able to hack such an environment together in Vim, but after 6 years of Vim, I never made it even half as usable.

                                                                                                              I think it’s 100% OK to treat things like Emacs as base foundations, and then build on top of them. Just like how Debian is a rock solid foundation, and Ubuntu gets built on top. Let the Emacs people be slow and make things work for them and not get all bent out of shape on use numbers. Have those things layered on top be the ones that grow users.

                                                                                                              1. 4

                                                                                                                Same-ish but with doom-emacs, which is lighter (I think?) and does all of the above.

                                                                                                                1. 3

                                                                                                                  I’ve just started using Spacemacs over Vim

                                                                                                                  I wonder how long you stick with it. I started using Emacs with Spacemacs, but over time I encountered so many bugs and slowness that I quit.

                                                                                                                  Then I started just with vanilla Emacs + Evil and gradually added packages. I stole the idea from Spacemacs to bind commands to SPC-something with general.el and which-key. Now I have my own little Spacemacs which is fast and rarely breaks. [1]

                                                                                                                  Spacemacs is a good gateway drug though. I would newcomers to Emacs definitely recommend to start with Spacemacs, because it shows what is possible with Emacs.

                                                                                                                  [1] Most of the configuration, some language-specific parts are in different files: https://github.com/danieldk/nix-home/blob/master/cfg/emacs.nix

                                                                                                                  1. 3

                                                                                                                    Spacemacs, but over time I encountered so many bugs and slowness that I quit

                                                                                                                    I had that issue with the main branch, but the devel branch rarely gives me any problems and I experience non of the slowness that plagued the main branch (for me).

                                                                                                                    1. 1

                                                                                                                      I’ve been using spacemacs for about 4 years. WFM.

                                                                                                                    2. 1

                                                                                                                      What does hitting Tab do for you in your Spacemacs setup? Coming from Vim, having it often do nothing drives me batty.

                                                                                                                      1. 1

                                                                                                                        Let the Emacs people be slow and make things work for them and not get all bent out of shape on use numbers.

                                                                                                                        I wonder if those percentages include spacemacs and other layers on top of emacs. I would expect them to include them, as those people are also “using emacs”, maybe less directly, but it’s certainly emacs they’re running.

                                                                                                                      1. 3

                                                                                                                        Emacs is great, and in a modern configuration, like Spacemacs, it’s even greater. It’s a uniquely powerful application or environment, more programmable and configurable than anything else in it’s league and in Lisp (!!) which is also experiencing a renaissance with Clojure and Racket. Despite its age and idiosyncrasies, emacs is a breath of fresh air in world of increasingly dumbed-down GUIs and opaquely complex uncustomizable environments.

                                                                                                                        But it certainly is showing its age and could really use rethink of, well almost everything. The problem is, can that even be done without breaking the zillions of packages that make it great today? Perry Metzger gave a talk[1] about this question at 2019 Emacscon entitled “Emacs, the Editor for the next 40 years” that charts a path forward, although not all that clearly. For improved performance, there is now possibility of compiling elisp to native code[2], and although it’ll need a bit more polish, it actually works today! RMS himself in the LWN article points out that the X display code needs a complete overhaul “by an expert”, and I would add that we should take that opportunity to generalize it for Wayland. Who will step up to that herculean task?

                                                                                                                        Meanwhile, for its fans emacs today, with all its warts, provides something that nothing else can do, and I think that’s more important than popularity.

                                                                                                                        [1] https://media.emacsconf.org/2019/26.html

                                                                                                                        [2] http://akrl.sdf.org/gccemacs.html

                                                                                                                        1. 12

                                                                                                                          His central point appears to be that Canonical and similar OS vendors want a packaging format with sandboxing so they can have an “App store” without having responsibility for the safety of packages in that store. The sandboxing features of snaps and flatpaks wouldn’t be necessary if users got their packages directly from software vendors because they would “already have a trust relationship” with them.

                                                                                                                          Huh? How does that work? I should get my software only directly from producers whom I have an established trust relationship with? This is patent nonsense. Even if we allow that established software producers have an incentive not to do anything naughty in order to not risk damage to their reputation, I might still want to use or try out packages from new companies or individuals in whom I have no such confidence. And even relatively trust-worthy suppliers can make mistakes, have bugs, get hacked, etc. Furthermore, trust-worthiness today is not very stable… there are lots of established actors who will do naughty things if they think they can get away with it, and the bigger they get the more they seem to think they can get away with.

                                                                                                                          Bottom line… there is no scenario where sandboxing newly installed software is not of significant benefit to the end user, regardless of whether we get our packages from “App stores” or directly from producers. We do need packaging formats that address that need.

                                                                                                                          1. 5

                                                                                                                            Bottom line… there is no scenario where sandboxing newly installed software is not of significant benefit to the end user, regardless of whether we get our packages from “App stores” or directly from producers. We do need packaging formats that address that need.

                                                                                                                            I am not an expert, but if I understand Flatpak, one could set any privileges one want to the application. They are hidden in the configuration file. So when the average user download a Flatpak, I guess he doesn’t look at the Flatpak configuration file which might give the Flatpak the same privileges as any other “natively” installed application.

                                                                                                                            So as a user, you end up “trusting” someone else.

                                                                                                                            1. 1

                                                                                                                              flatpak install prompts you to accept the transaction before proceeding, which includes the accepting the package’s permissions. Can’t recall what graphical frontends do.

                                                                                                                              1. 1

                                                                                                                                Can the user add/remove permissions upon installation? (even if this leads to a crippled installation)

                                                                                                                                1. 2

                                                                                                                                  I don’t think so. I believe permissions can be marked optional but if they don’t have that status you can’t get rid of them. That doesn’t change the fact that permissions are visible (I was responding to @Royi suggesting that they’re buried in configuration files).

                                                                                                                            2. 4

                                                                                                                              We do need packaging formats that address that need.

                                                                                                                              What I don’t understand is what a packaging format has to do with sandobxing. The end user needs to sandbox all applications (if she so desires), not only those that the distributor decided so. A hostile distributor may force a leaky sandboxing for his application, defeating the whole purpose of sandboxing.

                                                                                                                              1. 1

                                                                                                                                If your distributor is hostile, you are already lost.

                                                                                                                                1. 1

                                                                                                                                  Not at all if you OS supports sandboxing of applications.

                                                                                                                                  Besides, being “hostile” is in the eye of the user. For me, auto-updates are an extremely hostile behavior and financially onerous (cf. expensive connection via a phone tether). Thus, snaps are hostile by definition, yet I cannot “sandbox” the auto-update thing.

                                                                                                                            1. 9

                                                                                                                              This is a nice enumeration of language features and it hints at the larger truth. The real civilizational value of Haskell is being quite literally the only language laboratory in which genuinely novel ideas about programming can be tested, refined and deployed in the wild. Haskell will absolutely never have many users, but it has enough users to vet the good ideas and the bad ideas from both an academic and industrial perspective. The really good ones work their way downstream and its contributions enrich the entire software ecosystem.

                                                                                                                              I’ve come to really appreciate the language extension model that Simon put in place decades ago, and its place as a great economic engine of progress in software.

                                                                                                                              1. 7

                                                                                                                                Haskell is being quite literally the only language laboratory in which genuinely novel ideas about programming can be tested, refined and deployed in the wild

                                                                                                                                Nothing against Haskell, but it’s just not true. Most truly novel ideas are first tried in research languages/dialects, and far from all of them make it, or even can make it into Haskell.

                                                                                                                                Haskell also doen’t have a decent module system after decades. ;)

                                                                                                                                1. 7

                                                                                                                                  Nothing against Haskell, but it’s just not true. Most truly novel ideas are first tried in research languages/dialects, and far from all of them make it, or even can make it into Haskell.

                                                                                                                                  You’re missing the point:

                                                                                                                                  in which genuinely novel ideas about programming can be tested, refined and deployed in the wild

                                                                                                                                  No one is asserting that all interesting PLT ideas first show up Haskell exclusively, sdiehl’s point is that the extension system and culture allows for testing out more experimental ideas along with solid production-tested features in an existing language used in industry in a way that is unique in the current ecosystem.

                                                                                                                                  And stating that Haskell doesn’t have a decent module system glosses over the fact that typeclasses fulfill a lot of the same function in Haskell. And that’s not to mention that Backpack exists–it’s not like members of the Haskell community are unaware of the existence of modules or don’t see their value, but Haskell provides a different model with different tradeoffs.

                                                                                                                                  1. 5

                                                                                                                                    Yes precisely, there’s plenty of interesting work that is done in *ML dialects too. It’s just that in Haskell things get tossed into the language and out to industrial users a lot faster because it’s all opt-in extensions. There are pros and cons to this model but it is very much the Haskell Way and quite unique in the space of all languages.

                                                                                                                                2. 7

                                                                                                                                  Haskell […] being quite literally the only language laboratory in which genuinely novel ideas

                                                                                                                                  That’s a bit too absolute, I think. There are many other languages that are exploring genuinely novel ideas, and I would argue that Lisps, in particular Racket, still make better “laboratories” because of the ease with which you can explore new semantics. Haskell is has done a great job at opened up a specific space of new possibilities in type systems and their relationship with category theory while remaining a very practical and high-performance programming language at the same time, and that is excellent, but there are still completely different directions worth exploring as well.

                                                                                                                                1. 2

                                                                                                                                  silverblue has been a really interesting ride for someone looking for a home between conventional linux installs and nix. The benefits of the mature Fedora+rpmfusion repositories with ostree have made me feel like I’ve finally found a combination of stable/rolling that matches up to the lifestyle I want to have with my tooling.

                                                                                                                                  1. 1

                                                                                                                                    Tell us more… are you using Silverblue in combination with nix?

                                                                                                                                    1. 1

                                                                                                                                      No, I was examining nix, the issue for me was the “trust” in the packaging (nix packages are largely what I’d say are “hobbyist” right now, there is not as much rigor in the packaging pipeline as say {debian, fedora}, specifically a lot of them are lagging behind upstream). So silverblue is a weird mix of being able to “compose” your system, but utilize existing packaging ecosystems (fedora).

                                                                                                                                      1. 1

                                                                                                                                        I wondered about that too, but I think they are referring to shared capabilities (immutable /, atomic updates/rollbacks). As far as I know, it’s not yet possible to create top-level directories on Silverblue such as Nix needs (unless you use a wrapper that uses user namespaces).

                                                                                                                                        That said, it’s of course possible to create a container with Fedora Toolbox and run Nix in that.

                                                                                                                                        I am a Nix(OS) user. But I also find Silverblue very interesting. For people who do not want to go over the steep learning curve of Nix, it offers some of the same benefits, while the whole Fedora experience is very smooth.

                                                                                                                                    1. 10

                                                                                                                                      Both ML and Smalltalk are definitely not dead, they’ve just evolved into language families whose members have different names. The ML family has Standard ML, OCaml, and Haskell, and the Smalltalk family has Pharo, GemStone, GNU Smalltalk, and others. These all may not have hugely wide adoption, but they are actively used in both academia and industry, and continue to grow and evolve.

                                                                                                                                      1. 5

                                                                                                                                        It was eaten by machine learning.

                                                                                                                                        The semantic web was all about adding meta-information to the information on the Web so that it would be useable by machines. That turned out to be a lot of work, and then AI started making a comeback and it occurred to people that it would be much easier to just make the machines try to learn to interpret the information instead of us interpreting it for them. So all the effort started to go there instead of to the semantic web.

                                                                                                                                        TFA is not wrong. It correctly lists the many reasons why the semantic web never really got of the ground, it is right to point out that it was always an idealistic dream. But it misses completely that was the rise of machine learning that killed the dream.

                                                                                                                                        1. 3

                                                                                                                                          Eh I’d disagree with you here. ML presence in the web is absurdly non existant. Even Google crawlers are filled regex patterns rather than ML code.

                                                                                                                                          I don’t think ML is involved in this at all except maybe for web scraping but that only came about because programmable web was never adopted and if anything became less machine accessible than in 2002.

                                                                                                                                        1. 2

                                                                                                                                          Ah yes instead of templating things and using macro expansion we’re going to make our lives easier by using logic programming instead.

                                                                                                                                          Unfortunately, I’m not smart enough to understand any logic programs I’ve ever seen, so I’ll have to stick with macro expansion.

                                                                                                                                          1. 4

                                                                                                                                            Often the big problem with logic programming isn’t getting it to run, but getting it to run fast. A lot of confusing stuff in production logic code are optimizations.

                                                                                                                                            If we’re working in a restricted domain, we can presumably minimize performance traps, so it should be easier to understand.

                                                                                                                                            1. 1

                                                                                                                                              As someone vaguely aware of logic programming but who’s never managed to find a use case for it, do you have any suggestions for further reading?

                                                                                                                                              1. 2

                                                                                                                                                Mostly speaking from secondhand discussions with logic folk and my experience with constraint solving, so I don’t have anything to recommend, sorry :/

                                                                                                                                                1. 2

                                                                                                                                                  https://github.com/larsyencken/marelle is using prolog for system configuration

                                                                                                                                                2. 1

                                                                                                                                                  For you maybe. I straight up struggle to understand logic programmes and have never succeeded at writing anything more than exercises for university courses.

                                                                                                                                                  I think it’s a paradigm that excludes more people than templating does.

                                                                                                                                                3. 4

                                                                                                                                                  There’s no logic programming involved in cue. Cue is just a configuration language that uses a novel approach for “reducing boilerplate” and making it possible to validate that a configuration conforms to a set of defined constraints. Or to put it in even plainer language, it has some kind of types and does some kind of templating. The “kind of” is new, so yes, you’ll have to make some effort to understand it at first. As with anything.

                                                                                                                                                  1. 2

                                                                                                                                                    The article sure makes it sound like logic programming:

                                                                                                                                                    CUE is based on a different model of logic programming that makes it well suited for configuration. The language’s foundations make tasks like validation, templating, querying, and code generation first class features. CUE is designed around graph unification where sets of types and values can be modeled as directed graphs and then unified

                                                                                                                                                    1. 3

                                                                                                                                                      A different model of logic programming, it’s the first sentence in your quote. Did you actually read any of the examples? They read like typed YAML with struct merging. It’s like logic programming because of how the values and types in structs merge together: you can’t contradict yourself and you can’t be ambiguous. CUE schemas look much more like SQL column types and CHECK constraints than classic logic programming.

                                                                                                                                                      // contradiction, 1 is not a string
                                                                                                                                                      { key: string } & { key: 1 }
                                                                                                                                                      
                                                                                                                                                      // contradiction, 1 is not 2
                                                                                                                                                      { key: 1 } & { key: 2 }
                                                                                                                                                      
                                                                                                                                                      // no contradiction, 2 is an int
                                                                                                                                                      { key: int | 1 } & { key: 2 }
                                                                                                                                                      
                                                                                                                                                      // ambiguous, is key 1 or 2?
                                                                                                                                                      { key: 1 | 2 }
                                                                                                                                                      
                                                                                                                                                      // not ambiguous, 1 is more specific than int
                                                                                                                                                      { key: int | 1 }
                                                                                                                                                      

                                                                                                                                                      As in the original post’s examples, this kind of merging gets used primarily for templating.