1. 11

    To be fair, the article brings up some strong points, but in the end it all depends on your norms. It’s obvious why suckless disregards systemd, you all know our philosophy. If you’re happy with systemd, keep using it. We won’t be knocking on your door and demand you to uninstall it.

    Just don’t complain when Red Hat in the form of Lennart Poettering et. al. centralizes more and more subsystems of the userspace. They started with PulseAudio and systemd, who knows what will come next. What’s really shocking is the indifference toward this hostile (due to corporate interests) takeover. The Linux community has voluntarily put on shackles on itself, and when they sense them in a few years we, and many many others, will have told you so.

    Yes, systemd solves some problems, but can we really stomach the baggage it brings to the table? Can’t we as a community come up with a better solution? We have our own proposal: The suckless core, a set of different tools to manage your userspace needs. You can replace any component you like, write your own and improve it. We do not claim it’s an end-all solution, it’s just a proposal. Systemd claims to be an open standard and is theoretically reimplementable as an interface, but have you seen any serious attempt to reimplement this beast?

    The flexibility of the userspace is Linux’ both biggest strength, due to adaptability, and weakness, due to fragmentation. We should not throw it away and accept that it’s a difficult problem that needs to be solved differently than with centralization.

    1. 1

      What’s really shocking is the indifference toward this hostile (due to corporate interests) takeover. The Linux community has voluntarily put on shackles on itself

      feel free to not like systemd, but debian, at least, voted overwhelmingly to keep systemd as their main init system. What you call “centralization” is what I call having a computer that actually works. systemd wouldn’t be popular if it didn’t solve real problems that real people have.

      1. 4

        What you call “centralization” is what I call having a computer that actually works.

        The only systems I have ever had that had literally undebuggable problems were computers running systemd. I followed all of the instructions on the arch wiki, and any I could scrounge up elsewhere, and I still have no idea why my one computer running systemd decides to hang for literally 30 minutes randomly on boot, I still don’t know why the other computer, a thinkpad, takes 5 minutes to start up despite having dependency management (compared to my other, much older thinkpad running alpine linux, which takes about 30 seconds to boot up to a terminal, after I toggled with it and removed some blocking processes that are ready by the time I log in anyway), I still have no idea why my network will randomly fail on another computer running Ubuntu, or sometimes the entire computer will just freeze up, leaving me to remember the sysreq keys to reboot it, and sometimes they fail entirely and I just have to power cycle! I have been running linux on almos all these computers for a little over ten years and the only times I have ever had problems of this sort were after systemd was introduced.

        I would love to live in this world where, magically, systemd just works.

        Even putting all of that aside, whenever I try to futz about with init scripts on the only piece of hardware I have systemd that works reliably, my Pi W, I realise how horrifying the systemd init process is! There are about 3 different places unit files can reside, some of them are symlinks, some of them override others, and (last time I checked) there isn’t a sure way to figure out what part is overriding another part.

      2. 1

        I agree with most of your points, but indifference? There’s been a pretty vocal opposition to PulseAudio, systemd, etc. Problem is the big bodies like Red Hat just keep going on this course.

        Luckily there’s still enough distributions without systemd. I’m personally fond of Void Linux and use OpenBSD on my servers. (Since I can finally play most of my Steam library on Linux I’m not going to make it harder again on myself in that respect.)

        1. 1

          Maybe I was a bit unclear in this regard. With indifference I addressed the “majority” and those that just accepted this situation. I remember back when Debian adopted systemd there were, of course, the Devuan-forkers, but many many developers who just let it happen and still let it happen, given Debian is currently in the process of rediscussing this choice.

          1. 6

            many many developers who just let it happen

            If by letting it happen you mean “explicitly chose to make it happen”; let’s not frame Debian’s adoption of systemd as a thing some people snuck through in through some relatively obscure vote. It was voted for once, adopted and the second, more recent vote reaffirmed to continue with systemd.

      1. 49

        Honestly I think that suckless page is a terrible criticism of systemd. It’s the kind of rantings that are easy to dismiss.

        A much better – and shorter – criticism of systemd is that for most people, it does a lot of stuff they just don’t need, adding to a lot of complexity. As a user, I use systemd, runit, and OpenRC, and I barely notice the difference: they all work well. Except when something goes wrong, in which case it’s so much harder to figure out systemd than runit or OpenRC.

        Things like “systemd does UNIX nice” are rather unimportant details.

        I’m a big suckless fan, but this is not suckless at their best.

        1. 10

          A much better – and shorter – criticism of systemd is that for most people, it does a lot of stuff they just don’t need, adding to a lot of complexity.

          How many things does the Linux kernel support that you don’t use or need, and how many lines of code in the kernel exist to support those things?

          1. 3

            a lot, and it’s also a criticism of linux. but sometimes people must use linux, and now sometimes people must use systemd.

            linux’s extra features are also much better modularized and can be left out, unlike systemd’s.

            1. 2

              linux’s extra features are also much better modularized and can be left out, unlike systemd’s.

              But they can. The linked article describes that many of the features that people wrongly claim PID1 now does are just modules. For example you don’t have to use systemd-timesyncd, but you can and it works way better on the desktop than the regular server-grade NTP implementations.

              1. 1

                I’m sorry but how does syncing time every once in a while get much improved by systemd-timesyncd? NTP is like the least of my worries.

                1. 2

                  Somehow my computer was insisting on being 2 minutes off and even if I synced manually and wrote to my BIOS RTC clock NTPd and chrony were insisting on messing it up (and then possibly giving up since the jump was 2 minutes). Both these daemons feel like they aren’t good matches on a system that’s not on 24/7.

                  1.  

                    sounds like a configuration issue and nothing to do with the program itself. what distro did you use ntpd and chrony with? what distro are you using systemd-timesyncd with?

                    by default, void linux starts ntpd with the -g option which allows the first time adjustment to be big.

            2. 2

              If we’re going there, we might as well mention that Linux supports a whole freaking lot of hardware I don’t need. Those are most probably the biggest source of complexity in the kernel. Solving that alone would unlock many other thing, but unfortunately, with the exception of CPUs the interface to hardware isn’t an ISA, it’s an API.

              1. 5

                If we’re going there, we might as well mention that Linux supports a whole freaking lot of hardware I don’t need.

                While, simultaneously, not supporting all the hardware that you want.

                I think it’s a good example that the Linux model is culturally inclined to build monolithic software blocks.

                1. 7

                  While, simultaneously, not supporting all the hardware that you want.

                  Ah, that old bias:

                  • Hardware does not work on Windows? It’s the hardware vendor’s fault.
                  • Hardware does not work on Linux? It’s Linux’s fault.

                  We could say the problem is Linux having a small market share. I think the deeper problem is the unbelievable, and now more and more unjustified, diversity in hardware interfaces. We should be able by now be able to specify sane, unified, yet efficient hardware interfaces for pretty much anything. We’ve done it for mouses and keyboards, we can generalise. Even graphics cards, which are likely hardest to deal with because of their unique performance constraints, are becoming uniform enough that standardising a hardware interface makes sense now.

                  Imagine the result: one CPU ISA (x86-64, though far from ideal, currently is it), one graphics card ISA, one sound card ISA, one hard drive ISA, one webcam ISA… You get the idea. Do that, and suddenly writing an OS from scratch is easy instead of utterly intractable. Games could take over the hardware. Hypervisors would no longer be limited to bog standard server racks. Performance wouldn’t be wasted on a humongous pile of subsystems most single applications don’t need. Programs could sit on a reliable bed rock again (expensive recalls made hardware vendors better at testing their stuff).

                  But first, we need hardware vendors to actually come up with a reasonable and open hardware interface. Just give buffers to write to, and a specification of the data format for those buffers. Should be no harder than to write an OpenGL driver with God knows how many game specific fixes.

                  1. 7

                    Nah, that’s not what I’m implying. It’s not Linux fault, it’s still a major practical sore from a users perspective. I’m well aware that this is mainly the hardware vendors fault in all cases.

                    Also, it should be noted that Linux kernel development is in huge parts driven by exactly those vendors, so even if it were Linux fault, there’s a substantial overlap.

                    It’s still amazing how much of hardware is supported in the kernel, of very varying quality and is committed to be maintained.

                    1. 3

                      It’s still amazing how much of hardware is supported in the kernel, of very varying quality and is committed to be maintained.

                      One thing that amused me recently was the addition of SGI Octane support in Linux 5.5, hardware that’s basically extinct since 2 decades and was never particular popular to begin with. But the quixotism of this is oddly endearing.

                      1. 2

                        was never particular popular to begin with

                        Hey, popular isn’t always the best metric. SGI’s systems were used by smart folks to produce a lot of interesting stuff. Their graphics and NUMA architecture were forward-thinking with me still wanting their NUMAlink on the cheap.The Octanes been behind a lot of movies. I think the plane scene in Fight Club was SGI, too. My favorite was SGI’s Onyx2 being used for Final Fantasy given how visually groundbreaking it was at the time. First time I saw someone mistake a CG guy for a real person.

                2. 2

                  Device drivers are the most modular part of the kernel. Don’t compile them if you don’t want them

                  1. 1

                    True, but (i) pick & choose isn’t really the default, and (ii) implementing all those drivers is a mandatory, unavoidable part of writing an OS.

                    I don’t really care that the drives are there, actually. My real problem is the fact they need to be there. There’s no way to trim that fat without collaboration from hardware vendors.

                    1. 1

                      Well mainstream distribution kernels are still built modularly and the device driver modules are only loaded if you actually have hardware that needs them, at least as far as I understand it.

                      I don’t really care that the drives are there, actually. My real problem is the fact they need to be there. There’s no way to trim that fat without collaboration from hardware vendors.

                      Yeah that is a big PITA. It’s getting worse, too. It used to be that every mouse would work with basically one mouse driver. Now you need special drivers for every mouse because they all have a pile of proprietary interfaces for specifying LED colours and colour patterns, different special keys, etc.

              2. 6

                And there are no real alternatives to a full system layer. I like runit and openrc and I use them both (on my Void laptop and Gentoo desktop). When I use Debian or Ubuntu at work, for the most part I don’t have to worry about systemd, until I try to remember how to pull up a startup log.

                systemctl/journalctl are poorly designed and I often feel like I’m fighting them to get the information I really need. I really just prefer a regular syslog + logrotate.

                It’d be different if dbus had different role endpoints and you could assign a daemon to fulfill all network role messages and people could use NetworkManager or systemd-networking or … same with systemd being another xinitd type provider and everything get funneled through a communication layer.

                Systemd is everything, and when you start going down that route, it’s like AWS really. You get locked in and you can’t easily get out.

                1. 5

                  As a note to those reading: there is murmur of creating a slimmed down systemd standard. I think it’d satisfy everyone. Look around and you’ll find the discussions.

                  1. 4

                    I can’t really find anything about that at a moment’s notice other than this Rust rewrite; is that what you mean?

                    Personally, I think a lot of fundamental design decisions of systemd make it complex (e.g. unit files are fundamentally a lot more complex than the shell script approach in runit), and I’m not sure how much a “systemd-light” would be an improvement.

                    1. 16

                      As someone who just writes very basic unit files (for running IRC bots, etc). I find them a lot simpler than shell scripts. Everything is handled for me, including automatically restarting the thing after a timeout, logging, etc. without having to write shell scripts with all the associated bugs and shortcomings.

                      1. 12

                        Have you used runit? That does all of that as well. Don’t mistake “shell script approach” with “the SysV init system approach”. They both use shell scripts, but are fundamentally different in almost every other respect (in quite a few ways, runit is more similar to systemd than it is to SysV init).

                        As a simple example, here is the entire sshd script:

                        #!/bin/sh
                        ssh-keygen -A >/dev/null 2>&1 # Will generate host keys if they don't already exist
                        [ -r conf ] && . ./conf
                        exec /usr/bin/sshd -D $OPTS
                        

                        For your IRC bot, it would just be something like exec chpst -u user:group ircbot. Personally, I think it’s a lot easier than parsing and interpreting unit files (and more importantly, a lot easier to debug once things go wrong).

                        My aim here isn’t necessarily to convince anyone to use runit btw, just want to explain there are alternative approaches that bring many of the advantages that systemd gives, without all the complexity.

                        1. 2

                          I have never tried it. But then, if it’s a toplevel command, not even in functions, how can you specify dependencies, restart after timeout, etc.? It seems suspiciously too simple :-)

                          1. 3

                            Most of the time I don’t bother with specifying dependencies, because if it fails then it will just try again and modern systems are so fast that it rarely fails in the first place.

                            But you can just wait for a service:

                            sv check dhcpcd || (sleep 5; exit 1)
                            sv check wpa_supplicant || (sleep 5; exit 1)
                            exec what_i_want_to_run
                            

                            It also exposes some interfaces via a supervise directory, where you can read the status, write to change the status, roughly similar to /proc. This provides a convenient platform-agnostic API in case you need to do advanced stuff or want to write your own tooling.

                            1. 23

                              No offense, but this snippet alone convinces me that I’m better off using systemd’s declarative unit files (as I am doing currently, with for similar uses than @c-cube ‘s). I’ve never been comfortable with the shell semantics generally speaking, and overall this feels rather fiddly and hackish. I’d rather just not have to think about it, and have systemd (or anything similar) do it for me.

                              1. 5

                                Well, the problem with Unit files is that you have to rely on a huge parser and interpreter from systemd to do what you want, which is hugely opaque, has a unique syntax, etc. The documentation for just systemd.unit(5) it is almost 7,000 words. I don’t see how you can “not have to think” about it?

                                Whereas composition from small tools in a shell script is very transparent, easy to debug, and in essence much easier to use. I don’t know what’s “fiddly and hackish” about it? What does “hackish” even mean in this context? What exactly is “fiddly”?

                                Like I said before, systemd works great when it works, it’s when it doesn’t work. I’ve never been able to debug systemd issues without the help of The Internet because it requires quite specific and deep knowledge, and you can never really be certain if the behaviour is a bug or error on your part.

                                1. 11

                                  Well, the problem with Unit files is that you have to rely on a huge parser and interpreter from systemd to do what you want, which is hugely opaque, has a unique syntax, etc. The documentation for just systemd.unit(5) it is almost 7,000 words. I don’t see how you can “not have to think” about it?

                                  To me it seems a bit weird to complain about the unit file parser but then just let the oddly unique and terrible Unix shell syntax just get a free pass. If I were to pick which is easier to parse, my money would be on unit files.

                                  Plus, each shell command has its own flags and some have rather intricate internal DSLs (find, dd or jq come to mind).

                                  1. 2

                                    The thing with shell scripts is that they’re a “universal” tool. I’d much rather learn one universal tool well instead of many superficially.

                                    I agree shell scripts aren’t perfect; I’m not sure what (mature) alternatives there are? People have talked about Oil here a few times, so perhaps that’s an option.

                                    1. 8

                                      The thing with shell scripts is that they’re a “universal” tool.

                                      But why do you even want that in an init system? The task is to launch processes, which is fairly mundane except having lots of rough edges. With shell scripts you end up reinventing half of it badly and hand-waving away the issues that remain because a nicer solution in shell would be thousands of lines and not readable at all.

                                      I would actually my tools to be less turing-complete and give me more things I can reason about. With unit files it is easier to reason about and see that they are correct (since the majority functionality is implemented in the process launcher and if bugs there are fixed it fixes them in all unit files).

                                      I actually don’t get the sudden hate for configuration files, since sendmail, postfix, Apache, etc all have their configuration formats instead of launching scripts to handle HTTP, SMTP and whatnot. The only software I have in recent memory that you configure with code is xmonad.

                                      1. 1

                                        I wrote a somewhat lengthy reply to this this morning, but then my laptop ran out of battery (I’m stupid and forgot to plug it in) so I lost it :-(

                                        Briefly: to be honest, I think you’re thinking too much about SysV init style shell scripts. In systems like runit/daemontools, you rarely implement logic in shell scripts. In practice the shell scripts tend to be just a one-liner which runs a program. Almost all of the details are handles by runit, not the shell script, just like with systemd.

                                        In runit, launching an external process – which doesn’t even need to be a shell script per-se, but can be anything – is just a way to have some barrier/separation of concerns. It’s interesting you mention postfix, because that’s actually quite similar in how it calls a lot of external programs which you can replace with $anything (and in some complex setups, I have actually replaced this with some simple shell scripts!)

                                        I agree the SysV init system sucked for pretty much the same reasons as you said, and would generally prefer systemd over that, but runit is fundamentally different in almost every conceivable way.

                                      2. 4

                                        This is hardly unique to systemd unit files, though.

                                        /etc/fstab is a good example of something old. There’s nothing stopping it from being a shell script with a bunch of mount commands. Instead, it has its own file format that’s been ad-hoc extended multiple times, its own weird way of escaping spaces and tabs in filenames (I had to open the manpage to find this; it’s \040 for space and \011 for tab), and a bunch of things don’t wind up using it for various good reasons (you can’t use /etc/fstab to mount /etc, obviously).

                                        But the advantage? Since it doesn’t have things like variables and control flow, it’s easy to modify automatically, and basic parsing gives you plenty of useful information. You want to mount a bunch of different filesystems concurrently? Go ahead; there’s nothing stopping you (which is, of course, why systemd replaced all those shell scripts while leaving fstab as-is).

                                        In other words: banal argument in favour of declarative file formats instead of scripts.

                                    2. 3

                                      I don’t know what’s “fiddly and hackish” about it?

                                      It’s fiddly, because you can’t use any automatic tool to parse the list of dependencies, and it’s hackish, because the build system doesn’t know what it’s doing, it just retries starting random services until it matches the proper order. It’s nondeterministic, so it’s impossible to debug in case of any problems.

                                      1. 3

                                        You can pipe it through grep, c’mon dude. And framing it as “starting random services” is just wrong, that’s the opposite of what’s happening.

                                        1. 4

                                          And framing it as “starting random services” is just wrong, that’s the opposite of what’s happening.

                                          This doesn’t look very convincing ;)

                                          Well, you can cat the startup script and see the list of dependencies if you’re only worried by one machine. But from the point of view of a developer, supporting automatic parsing of such startup scripts is impossible, because it’s defined by a Turing-complete language.

                                          Again, it’s still fine if you’re an administrator of just one machine (i.e. you’re the only user). But it’s not an optimized method when you have farms of servers (physical or VMs), and that’s the majority of cases where UNIX systems are used.

                                          Also it’s easier to install some rootkit inside shell scripts, because it’s impossible to reliably scan a bash script for undesirable command injections.

                                      2. 2

                                        While I agree that systemd.unit files syntax sometimes is weird and I would much more prefer for it to use for example TOML instead, I do not think that shell syntax is any better. TBH it is even more confusing sometimes (as @Leonidas said).

                                      3. 6

                                        I’d rather just not have to think about it, and have systemd (or anything similar) do it for me.

                                        Don’t be surprised when you pay the price this thread speaks of for the privilege of thinking slightly less ;)

                                        1. 8

                                          Sometimes abstractions are, in fact, good. I am glad I don’t have to think how my CPU actually works. And starting services is such a run-off the mill job that I don’t want to write a program that will start my service, I just want to configure how to do it.

                                        2. 3

                                          Dependencies in general are a mistake in init systems: Restarting services means that your code needs to handle unavailability anyways – so use that to simplify the init system. As a bonus, you ensure that the code paths to deal with dependencies restarting gets exercised.

                              2. 2

                                I really like systemd’s service files for the simple stuff I need to do with them (basically: execute daemon command, set user/group permission, working dir, dependencies, PID file location, that’s it). But there are other aspects of systemd I dislike. I wish someone would implement a service file parser for something like OpenRC that supports at least those basic systemd service files. It would ease cooperation among init systems quite a bit I think and make switching easier. It would also ease the life of alternative init system makers, because many upstream projects provide systemd service files already.

                              3. 3

                                A much better – and shorter – criticism of systemd is that for most people, it does a lot of stuff they just don’t need, adding to a lot of complexity.

                                This sort of computing minimalism confuses me. Should we say the exact same about the computing platforms themselves? x86 has a lot of things we don’t need so we should simply use a RISC until you need just the right parts of x86… That motherboard has too many PCI slots, I’m going to have to rule it out for one with precisely the right amount of PCI slots… If you can accomplish the task with exactly a stick and a rock why are you even using a hammer, you fool!

                                1. 3

                                  It’s not ‘minimalism’ that makes me balk at systemd’s complexity. It’s that that complexity translates directly to security holes.

                                  1. 2

                                    It’s really a long-standing principle in engineering to make things as simple as feasible and reduce the number of moving parts. It’s cheaper to produce, less likely to break, easier to fix, etc. There is nothing unique about software in this regard really.

                                    I never claimed to be in favour of absolute minimalism over anything else.

                                1. 5

                                  As someone who deals with Gameboy modding and creation of music (LSDJ, Nanoloop) the author of the blog post seems to mix and match the best features of the original Game Boy (DMG, Dot Matrix Gameboy) and the Game Boy Pocket (GBP):

                                  • In 1989 the DMG came out, the GBP came out in 1996.
                                  • It is by no means tiny. It is a surprisingly chunky device (which I assume is by design because it is pretty empty inside). The GBP is tiny in comparison but it is larger than most phones these days.
                                  • It is powered by 4 AA batteries, not 2, thus pretty heavy. Yes, it runs for 30h. The GBP on the other hand takes 2 AAA batteries and runs way shorter. You can’t have it both ways.
                                  • Even the pictures don’t match up, the large image is a DMG, but Yokoi in the picture is holding up a GBP.
                                  1. 0

                                    I’ve always wanted to learn Haskell, the only thing preventing me is the ridiculous size of the GHC. :/

                                    1. 5

                                      Can you elaborate on what you mean by ridiculous size of GHC?

                                      1. 3

                                        Not OP but:

                                        GHC:

                                        $ sudo pacman -S ghc
                                        Packages (2) ghc-libs-8.6.5-1  ghc-8.6.5-1
                                        
                                        Total Installed Size:  375.35 MiB
                                        

                                        Ruby:

                                        $ sudo pacman -S ruby
                                        Packages (2) rubygems-3.1.2-4  ruby-2.7.0-1
                                        
                                        Total Installed Size:  14.16 MiB
                                        

                                        Python:

                                        $ sudo pacman -S python
                                        Packages (1) python-3.8.1-4
                                        
                                        Total Installed Size:  80.64 MiB
                                        

                                        C/C++:

                                        $ pacman -S gcc
                                        Packages (3) binutils-2.33.1-2  libmpc-1.1.0-2  gcc-9.2.0-4
                                        
                                        Total Installed Size:  174.21 MiB
                                        

                                        Rust:

                                        $ sudo pacman -S rust
                                        Packages (5) icu-65.1-2  libedit-20191231_3.1-1  libxml2-2.9.10-1  llvm-libs-9.0.1-1  rust-1:1.41.0-1
                                        
                                        Total Installed Size:  324.50 MiB
                                        

                                        Java:

                                        $ sudo pacman -S jdk-openjdk
                                        Packages (1) jdk-openjdk-13.0.2.u8-1
                                        
                                        Total Installed Size:  93.03 MiB
                                        
                                        1. 1

                                          I doubt parent meant installation size. In what circumstances would installation size of the compiler be the only thing preventing them from learning the language?

                                        2. 2

                                          As mentioned by wezm, the installation size. I know it sounds weird, but I don’t really want to learn a language that requires an ecosystem that big. I prefer small, simple languages instead.

                                          1. 1

                                            Then, maybe, you haven’t “always wanted to learn Haskell”?

                                            1. 1

                                              I always had wanted to, and still do. If a new toolchain comes out that’s smaller in size, then nothing would be stopping me from using haskell. Until then…

                                          2. 1

                                            Install debian. Then compare the installation sizes of ghc, gcc, python, ruby, go and java.

                                            1. 2

                                              The comparison with Java is a bit unfair, since developing with latter (or any language built on top of the JVM, like Clojure) will end up downloading nearly the entirety of the Internet into your ~/.m2 folder.

                                        1. 2

                                          I am left wondering why there still hasn’t been some “I write in language X and it compiles down to shell” tool in widespread use.

                                          I’m not a fan of all the transpiling and webpack shenanigans, but I’d be so much onboard for “write in Rust or other sensible language and output as shell”.

                                          1. 2

                                            I am left wondering why there still hasn’t been some “I write in language X and it compiles down to shell” tool in widespread use.

                                            Batsh? It compiles down to Shell but also Windows Batch, which is kinda neat.

                                            Personally I use Shexp which while not a language, allows to essentially build shell-like scripts in OCaml and I suppose such solutions exist in other languages as well, like Python which the user might have already installed, so replacing shell scripts becomes practical.

                                            1. 1

                                              Good points, I think I read about shexp at some point, but it’s only close to what I mentioned, not exactly it.

                                              • a normal language that people actually use and where I can leverage the ecosystem
                                              • widespread use ;)
                                            2. 1

                                              The other way around seems quite interesting too: compile shell scripts to C or Rust or whatever. With special optimizations for simple uses of tools like sed, grep, cut, etc.

                                              1. 1

                                                Interesting? yes. Good for legacy scripts? Probably. Solving my problem of not wanting to write shell scripts? Nope ;)

                                                1. 1

                                                  It would help with my tendency to only want to write shell scripts!

                                            1. 10

                                              I’ve been thinking more and more of “leveling up to bsd”. I’m not bothered by this a lot, but json? JavaScript and JSON are my tools, love it, but please not on a linux system service. I might just be too old, but I think unless we move lot of other tools to read and output JSON, we’ll have a mess where those system tools don’t work with each other.

                                              Another thing for me is the desktop use case, as mentioned in other comments. My media files are too big to live on a stick and even if the stick is the cloud, I probably still have to use cloud anyway, and sinceI’m a linux user, it’s half expected of me to then just mount the cloudstick in /mnt anyway and link to it. My work is all in the git repo, on migrating systems I just need basically the dotfiles, once per system.

                                              Butt on the other hand, the possibility to “hand off work” from desktop to laptop, to have my IDE plugins be totally personalized, to just resume browsing from phone to the PC… Why stop the future? In some not-so-distant utopia, I’m walking around with the said stick and just renting nearby computation as I move, my work never pausing for such peasant triviality like changing toa different computer.

                                              In any case, I hope they don’t make a mess :)

                                              1. 6

                                                I’m not bothered by this a lot, but json? JavaScript and JSON are my tools, love it, but please not on a linux system service. I might just be too old, but I think unless we move lot of other tools to read and output JSON, we’ll have a mess where those system tools don’t work with each other.

                                                So you would prefer a bespoke text format where you need to write a parser out of sed, cut and awk instead of a structured text format that already is widely adopted and has tools like jq to deal with it?

                                                Plenty bad can be said about JSON, for sure, but what would be a sensible alternative to store structured information? TOML? Or even, gasp YAML? Or maybe you’d be happier with GNOME2-style XML?

                                                1. 9

                                                  No, I’ve just meant that the traditionalist in me (the “I might just be too old” part hints at that) thinks we shouldn’t have to have jq available for “system service”. You need this at boot time. At boot time, you don’t want to import other tools than what already is there. Or, that is how I thought of it. So this was not about json itself, just about depending on another format in a system service.

                                                  1. 8

                                                    So you would prefer a bespoke text format where you need to write a parser out of sed, cut and awk instead of a structured text format that already is widely adopted and has tools like jq to deal with it?

                                                    conversely: it’s quite amazing that one can build a parser just out of a shell pipeline, isn’t it? :)

                                                    Or maybe you’d be happier with GNOME2-style XML?

                                                    as much as i dislike it, xml has nice properties given the right tools. i’ve used tdom recently and was pleasantly surprised. json for more complex usage is still full of hacks and afterthoughts, life $ref, json-schemas, etc. (xml was over designed from the start, though).

                                                    1. 5

                                                      conversely: it’s quite amazing that one can build a parser just out of a shell pipeline, isn’t it?

                                                      Those parsers tend to suck. What happens when your file format is tab-delimited, and someone injects a tab as contents into one of the fields? (the answer is that a lot of stuff breaks)

                                                      1. 2

                                                        what happens when i have an extra/missing delimiter in json? if one is lucky the parser tells you roughly where the position of the error is, ironically most of the time as line number :)

                                                        still, this isn’t my point. the fact that you can create a makeshift parser by putting together some otherwise unrelated tools is still amazing and helpful, especially for manual tasks which are not going to be repeated often.

                                                  2. 6

                                                    Both FreeBSD and OpenBSD are a breath of fresh air with regards to documentation and simplicity compared to Linux, so they’re definitely worth checking out.

                                                    On the other hand, you might lose some convenience compared to Linux if you use proprietary software that has Linux support (f.e. Dropbox, Steam). It’s a bit like using Linux 20 years ago :-D

                                                    1. 3

                                                      I’ve interacted with JSON in a hobby project and I’m seeing it as a format for external data feeds at work. In neither case is JS involved.

                                                      JSON is basically structured text now, filling the same niche as XML.

                                                      1. 3

                                                        Yes, it’s super easy to use, I get that. That was not my point.

                                                        1. 2

                                                          OK. What form of structured text would be more appropriate, in your opinion?

                                                          1. 3

                                                            I’d prefer a format that supported comments. Probably toml, but there’s also some JSON variants that do.

                                                            1. 1

                                                              That’s a good point. I’d like to see an example of this proposed file, if it’s a dozen entries the key names may be enough to comment the format.

                                                    1. 3

                                                      If you want to know how CD reading and writing is done on a hardware level, there is an interesting channel on YouTube called Technology Connections where a lot of the history of CD is discussed in a pretty accessible way. There’s also lots of videos on rather obscure technology like the CED, a vinyl video format.

                                                      1. 5

                                                        This seems like a pretty domain-specific browser. Reading the interview, I’m not sure if there are plans to ever make a general browser similar to Firefox or Chromium.

                                                        That’s not necessarily a bad thing; perhaps it’s time for a “browser-light”. I actually worked on something like this a while ago (the goal being the ability to just read basic HTML).

                                                        1. 3

                                                          Leonidas mentioned Dillo, but there is also Netsurf which works really great on site that does not requires a lot of JS or CSS3.

                                                          1. 2

                                                            Isn’t that sort of the approach of browsers like Dillo? It can be used to render HTML mails in Claws-Mail for which it is kinda perfect.

                                                            1. 1

                                                              It’s also something you can do in a couple of hundred lines of Java, using libraries like Cssbox or WebView, or in C++ using Qt.

                                                              1. 4

                                                                If I see correctly WebView is Chromium-based, which defeats the whole purpose of having a fast and tiny minimal browser.

                                                                1. 0

                                                                  What you see is essentially incorrect. WebView, like Chromium, is both small and fast if certain conditions are true, which they are by default in WebView.

                                                                  In a nutshell: If the code is already present in memory and many expensive features are disabled, what remains of Chromium is both small and fast. And on the minus side: won’t support expensive and bulky things like WebRTC.

                                                                  (IIRC WebView is Chromium on most phones, not all.)

                                                                  1. 2

                                                                    Maybe I misunderstand your argument but to me it seems “why have a tiny embedded browser when you can have Chromium, which, if you have Chromium loaded already is small and fast”. But not everybody runs Chromium (in particular, I just want to have basic rendering of HTML in Claws Mail), so I don’t get the point really.

                                                                    Care to elaborate?

                                                                    1. 2

                                                                      A misunderstanding, perhaps.

                                                                      arp242 mentioned “general browser”, “browser-light” and “goal being to read basic HTML”. I pointed out that all three are easily doable using commonly available opensource libraries to render the HTML, namely webview on android, cssbox on other java platforms and qtwebkit on both real OSes and windows. I know that more such libraries do exist.

                                                                      1. 1

                                                                        My goal with my own browser (which was just a 1-day project) was to render just enough HTML/CSS to make stuff readable, and little more; basically the goal was to make a “graphical text-based browser”. I like browsers like lynx, but find the monospaced font too hard to read significant amount of text with, and miss a few GUI conventions (like the way scrolling works).

                                                                        This is quite a different approach from WebView, which still implements a “full” browser (which can be considered both a good or bad thing, depending on goals; I also built a very minimal browser on top of WebView btw).

                                                                        Hope this clarifies what I meant.

                                                                        I know about links -g, but it has a few issues; I forgot what as it’s been a few years, but I think some sites I wanted to view didn’t work well enough.

                                                                        I’ve never been able to get netsurf to run; it always segfaults for me (on multiple machines). I never investigated in depth so I don’t know the cause of that.

                                                                        I forgot what the issue(s) with Dillo are; but I’m sure I tried it and found something or the other lacking.

                                                                        1. 1

                                                                          FYI, and yes, this is a digression. Here’s a screenshot of a HTML: email Paypal sent me recently, rendered on my mobile phone: https://arnt.gulbrandsen.priv.no/tmp/paypal-mobile-mail.png

                                                                          You don’t need to understand the actual text, just to look at the style. Textish, don’t you agree? One font size and it’s right for the screen, sparing use of colour, hardly any sign of Paypal’s corporate style. Paypal doesn’t mean to send email that looks quite so plain. The rendering process was to first clean the HTML using Jsoup, then do some irrelevant things, then show it using WebView. One of the great joys of the libraries that are available nowadays is that one can combine them to get complicated custom functionality with often very little work.

                                                          1. 7

                                                            Calling a non-portable (at least not to Apple Watches, Raspberry Pi, and microcontrollers) Windows API through a superficial .NET shim doesn’t sound like .NET everywhere since you don’t actually use any of it, more like a complicated way to build a PE executable.

                                                            It is still a fun hack though.

                                                            1. 2

                                                              The C# program is still running though, no? It’s still written in C#, and compiled to a native EXE with the .NET tool chain.

                                                            1. 16

                                                              A lot of the problems in PHP are really fundamental without easy fixes, not without the “Python 3 of PHP”. Slapping on a few features and syntax sugar is nice and all, but it won’t fix any of that.

                                                              I’ve seen countless bugs because of magic conversion between associative and indexed arrays, extremely basic error checking and functions are still broken, it’s still very easy to add critical security bugs, and so forth, and so forth.

                                                              There are still countless “wtf?!“s left. There is no easy fix for this, but PHP’s stdlib is a complete mess and liability.

                                                              I don’t strictly disagree you can write good software with it, but on the other hand a lot of things are also much harder than they need to be. A certain subset of problems is impossible to solve. For example, a function to generate a temporary name with a fixed file extension (fooXXXXXXX.html) is impossible to implement in a guaranteed race-free way as far as I know (solving this problem inspired my fopen() post above; but I’ll gladly be shown wrong on this).

                                                              Of course, it’s “probably good enough”, but why settle for that when you can have “guaranteed correct” with literally every other mainstream language?

                                                              The value of PHP was in that it ran really well on shared hosting, and I think it was a stroke of great insight back in the day. Things that are “wtf”s now – like the php.ini – made a lot of sense in that context, too, but now we’re stuck with it. I don’t see the value PHP gives us. I don’t want to tell other people what language they “should” be using, but it just seems like a sunk-cost thing to me to be honest. As an industry, we would probably be better off without it in the long run IMHO.

                                                              1. 4

                                                                PHP’s strengths are how easy it is to make quick hacks quickly (similar to Perl) and get it running without any ceremony (if you have a web server with PHP, you can just upload it somewhere and it Just Works, no application server with reverse proxy needed). This is why it survives; I agree that the language’s warts pull you to writing flawed code though, especially once you need to start scaling.

                                                                1. 4

                                                                  Isn’t Python, Ruby, or Perl just as good for that? I mean, you can point at “but I don’t like X or Y” and okay fair enough, but is it really “better” in any meaningful way?

                                                                  Admittedly, I’ve been out of the loop of PHP for a few years, but I often found it quite hard to get running due to the massive php.ini file which controls a lot of deep aspects of PHP. At least you no longer have to set the bloody timezone in there any more.

                                                                  1. 2

                                                                    For the “just copy the file to htdocs” workflow, I think only Perl comes close to that use case; Ruby is so Rails oriented nowadays. I’m not confident to say much about Python web stuff since I don’t know it though.

                                                                    1. 1

                                                                      You don’t need to use Rails with Ruby, just like you don’t need to use Laravel with PHP. It’s just common (in both cases) because it works well. Sinatra is a much small web framework that also works quite well for many cases (about 2k lines of code, IIRC).

                                                                      I do agree that using PHP can have a lower ramp-up time in some common “quick scripts” cases, but on the other hand, some of those cases are also rather hard to get right with PHP (specifically, I’m thinking of mail() being rather hard to use securely so that your contact form won’t be abused to send out spam). I’m not entirely sure just how much value there is in that (and it’s also not exactly what this article is talking about, either).

                                                                      1. 1

                                                                        For python you mostly can’t but there is a cgi module in the standard library (probably a bit painful to use cleanly)

                                                                    2. 2

                                                                      if you have a web server with PHP

                                                                      Is that nowadays a common case still? mod_php was an Apache thing and even Apache has been declining over the years so it might actually be easier to find a server that can run Perl or Python as CGI since at least the latter is nearly guaranteed to be installed in any case.

                                                                      I don’t have any numbers though, so if anyone has recent information on how common it is to have PHP hosting, I’m all ears.

                                                                      1. 3

                                                                        Wordpress is still going strong, and I think every el cheapo hosting provider that offers some sort of shared hosting is still using Apache with PHP (think DirectAdmin or CPanel)

                                                                    3. 2

                                                                      I agree with this. When my employer gave me an opportunity to do a Greenfield PHP project, I accepted it with the thought that “hey, it’s 2019, and I’ve heard of many good developments in PHP recently, so maybe it’s not so bad anymore.”

                                                                      I did everything right (as far as I could tell), followed modern best practises, etc. PHP is still so bad for the reasons you mention.

                                                                      1. 1

                                                                        “guaranteed correct” with literally every other mainstream language?

                                                                        ::bitter laughter::

                                                                      1. 2

                                                                        For some reason I can’t get it to render Copenhagen at all, no matter which spelling I try to use. It works with other European cities though.

                                                                        1. 1

                                                                          Also weirdly can’t do Greek cities, but can do all the other European cities I tried.

                                                                          1. 3

                                                                            I was trying Athens in Greece and I am getting only the Athens in the United States.

                                                                            It seems that it uses this search engine for OpenStreetMap data, https://nominatim.openstreetmap.org/. The query for Athens in the search engine, https://nominatim.openstreetmap.org/search?format=json&q=Athens, seems to return as the first result the Greek city, but somehow the results are filtered? I am not sure.

                                                                            1. 2

                                                                              This is a good pointer, if I look up cities that work (Rome, Amsterdam, Stockholms kommun (the county)), they have a city outline in the search results, whereas the ones that don’t work (Copenhagen, Athens, Stockholm (the city)) have no outline in Nominatim.

                                                                              1. 1

                                                                                The code filters the results to only those with osm_type of relation. It looks like it should be updated to work with things that have an osm_type of node as well, but how big a change to the code would be required to do that is unclear to me.

                                                                                What annoys me about modern Javascript projects is that it’s way harder to modify them live in the website and just see what happens. It should be possible for me to open the console on the linked web page and replace that function with one that allows node as well then just see what happens when I type in ‘Athens’. But to test out a change I’d probably have to clone this repository, compile the code, start a web server… how is this different from a non-web application exactly?

                                                                          1. 4

                                                                            This is a case of improper data modeling, but the static type system is not at fault—it has simply been misused.

                                                                            The static type system is never at fault, it behaves just like the programmer tells it to. But this is kind of handwaving over the very point this article attempts to address. This particular case of “improper data modeling” would never be a problem on dynamically-typed systems.

                                                                            Bad analogy time: it is pretty much like advocating the use of anabolic steroids, because they make you so much stronger, but when the undesired side effects kick in, you blame the hormonal system for not keeping things in balance.

                                                                            1. 9

                                                                              Bad analogy time: it is pretty much like advocating the use of anabolic steroids, because they make you so much stronger, but when the undesired side effects kick in, you blame the hormonal system for not keeping things in balance.

                                                                              To me it feels like that’s exactly what proponents of dynamic typing often do “I can write all code super fast” and then when people say there’s issues when it is accidentally misused (by another programmer or the same programmer, in the future) it is always “you should’ve used more hammock time to think about your problem real hard” or “you should’ve written more tests to make sure it properly handles invalid inputs”.

                                                                              1. 5

                                                                                You are not wrong and this is just a proof that the debate around type systems is still too immature. There is certainly a component of dynamism in every computer system that programmers crave, and it usually lives out of bounds of the language environment, on the operating system level. Dynamically typed languages claim to offer that dynamism inside their own environment, but most of the programs don’t take advantage of that.

                                                                                There is no known definitive argument on either side that would definitively bury its respective contender. Programmers sometimes seem too afraid of some kind of Tower of Babel effect that would ruin the progress of Computer Science and I believe that the whole debate around static and dynamic type systems is just a reflex of that.

                                                                              2. 2

                                                                                This particular case of “improper data modeling” would never be a problem on dynamically-typed systems.

                                                                                I think this is addressed in the appendix about structural vs nominal typing. In particular, very dynamic languages like Python and Smalltalk still allow us to do such “improper data modelling”, e.g. by defining/using a bunch of classes which are inappropriate for the data. Even if we stick to dumb maps/arrays, we can still hit essentially the same issues once we get a few functions deep (e.g. if we’ve extracted something from our data into a list, and it turns out we need a map, which brings up questions about whether there’ll be duplicates and how to handle them).

                                                                                Alternatively, given the examples referenced by the author (in the linked “parse, don’t validate” post) it’s reasonable to consider all data modelling in dynamically-typed systems to be improper. This sounds a bit inflammatory, but it’s based on a core principle of the way dynamically-typed languages frame things: they avoid type errors in principle by forcing all code to “work” for all values, and shoehorning most of those branches into a sub-set of “error” or “exceptional” values. In practice this doesn’t prevent developers having to handle type errors; they just get handled with branching like any other value (with no compiler to guide us!). Likewise all dynamic code can model all data “properly”, but lots of code will model lots of data by producing error/exceptional values; that’s arguably “proper” since, after all, everything in a dynamic system might be an error/exception at any time.

                                                                                Side note: when comparing static and dynamic languages, it’s important to remember that using “exceptions” for errors is purely a convention; from a language/technology standpoint, they’re just normal values like anything else. We can assign exceptions to variables, make lists of exceptions, return exceptions from functions, etc. it’s just quite uncommon to see. Likewise “throwing” and “catching” is just a control-flow mechanism for passing around values; it doesn’t have anything to do with exception values or error handling, except by convention. I notice that running raise 42 in Python gives me TypeError: exceptions must derive from BaseException, which doesn’t seem very dynamic/Pythonic/duck-typical; yet even this “error” is just another value I can assign to a variable and carry on computing with!

                                                                                1. 1

                                                                                  The point I was trying to make is that, in the example mentioned in the article, the reason why the type description was inaccurate at first has only to do with the fact that the programmer must provide the checker information about UserId‘s subtype. On a dynamically-typed system, as long as the JSON type supports Eq, FromJSON and ToJSON, you are fine, and having to accurately determine UserId‘s subtype would never be a problem.

                                                                                  So I do understand the appeal of static typing in building units, but not systems, especially distributed ones, and this is why I believe the article is myopic, but dynamic language advocates do a terrible job in defending themselves. Having to process JSON payloads is the least of the problems if you are dealing with distributed systems; how would you accurately type check across independent snippets of code in a geographically-distributed network over which you have no control is a much more interesting problem.

                                                                                  1. 1

                                                                                    On a dynamically-typed system, as long as the JSON type supports Eq, FromJSON and ToJSON, you are fine, and having to accurately determine UserId‘s subtype would never be a problem.

                                                                                    That’s not true. At some point your dynamically typed system will make an assumption about the type of value (the UserId in this case) that you’re applying some function to.

                                                                                    1. 1

                                                                                      For practical purposes, it is true. The system internals indeed need to resolve the dependency on that interface, indeed, either with fancy resolution mechanisms or attempting to call the function in a shoot-from-the-hip fashion. But it is not common between dynamic language implementations that the programmer needs to specify the type, so it is not a problem.

                                                                              1. 18

                                                                                I feel resource constraints are gone now. People built apps to send text back and forth that use 1.5GB memory with a constantly active CPU.

                                                                                I hate it.

                                                                                1. 8

                                                                                  I do not think resource constraints are gone, but I do believe there is a growing separation between software that is resource-aware and software that is not. Right now my system monitor is reporting the memory usage of the five programs I am using (at the moment) as:

                                                                                  • chromium-browser : 431.7 MB
                                                                                    • Approximately 30 tabs open, most of which are inactive.
                                                                                  • firefox : 352.3 MB
                                                                                    • One tab open, active.
                                                                                  • spotify : 324.6 MB
                                                                                  • mate-terminal : 45 MB
                                                                                  • vim : 12.1 MB

                                                                                  Comparing Vim to Firefox is like comparing apples to oranges, and I think it would be ridiculous to say that Firefox requiring ~30x as much memory makes it ~30x worse of an application as Vim. But I do feel that the divide between these two is much greater than the divide between a web browser and a text editor was twenty years ago. I don’t know whether that is a good thing or a bad thing overall, or if it really even matters in the grand scheme of things, but it does feel different.

                                                                                  1. 9

                                                                                    The comparison Firefox vs Vim might be a bit unfair, given how people have basically made the browser an operating system and therefore the browser needs to provide somehow everything. But then compare Spotify (a media player, only capable of playing one song at a time and playlists plus some browseable database) with a player with a local library or an MPD player and then you realize what a mess it is. But of course the times where you could build your own FOSS clone of ICQ or Spotify are mostly gone.

                                                                                    1. 6

                                                                                      I think your comparison of Spotify vs $OTHER_MEDIA_PLAYERS is much better than of my Firefox vs Vim comparison.


                                                                                      I understand where you are coming from when you say that browsers were basically made an operating system, but I do think it is important to note that current browsers offer significantly less functionality than the OSs I use on a daily basis at the cost of equal or greater memory usage. It doesn’t seem like you are trying to hold a particularly strong position that BROWSER == OS, but if such a position was strongly asserted I would contend that a noticeable gap in functionality vs memory footprint exists. That’s just my opinion though.

                                                                                      1. 1

                                                                                        I think modern browsers offer functionality roughly comparable to minimalistic OSes, except resources are very virtual and sandboxed.

                                                                                      2. 0

                                                                                        So, we’d compare Firefox to Windows or Linux when they’re idle. Back when I checked that, the Ubuntu builds were around the same size in memory. So, that fits.

                                                                                    2. 6

                                                                                      I just posted something in a web editor and it has ~500ms input lag (rough estimate; certainly far too much to be comfortable). Resource constraints are far from gone, people just accept stuff like this for some reason 🤷‍♂️

                                                                                      1. 4

                                                                                        Agreed. What increased every year is our tolerance to broken stuff (and requiring a ludicrous amount of resources is one such example).

                                                                                        The only thing that changed is that people managed to stack the pile of shit that is software development even higher. I can’t wait until that tower comes tumbling down.

                                                                                        Recommended talk.

                                                                                        1. 2

                                                                                          Software is immutable. Why must the tower crumble?

                                                                                      1. 4

                                                                                        Are the popup windows similar to Neovims floating windows as used e.g. in git-messenger?

                                                                                        1. 3

                                                                                          Git messenger was nice, just installed that plugin.

                                                                                          1. 1

                                                                                            Yes, and the plugin you have pointed to is using them.

                                                                                            1. 1

                                                                                              Can’t see anything about vim 8.2 there and the last change I see is talking about 8.1.

                                                                                              1. 8

                                                                                                All of these features have been in development for a while; the first commit for popup windows is 8.1.1364 (May 2019). The tagging of 8.2 is kind of arbitrary.

                                                                                                I actually maintain a Vim ChangeLog with more specific version numbers: https://www.arp242.net/vimlog/

                                                                                                1. 1

                                                                                                  Thanks, that is very useful and good-looking overview.

                                                                                          1. 5

                                                                                            I enjoyed these musings. For me, I think what makes Python a great language is the standard library. Pretty much anything you might ever want to do is built right in.

                                                                                            1. 2

                                                                                              I think more and more for most developers, the standard library is crucial. Syntax is easier to pick up than a new standard library. I remember looking at Phoenix/Elixir a few years ago and thinking “wow, for most projects I’d probably just use rails because where are all the gems?”.

                                                                                              Makes me wonder what would cause another major language (of the scope of python or java) emerge. I guess we saw that with golang, where the stdlib was big enough and it filled a sweet spot between c and dynamic languages.

                                                                                              But it does seem like a great standard library is table stakes now.

                                                                                              1. 1

                                                                                                In some ways, I think Python’s popularity is in spite of it’s standard library. It’s so inconsistent, it’s really hard to remember function & module names. It is rich, for sure, but it’s hard to navigate without help from Google.

                                                                                                1. 4

                                                                                                  It is also quite terrible, which prompted a cleanup in Python 3 to some degree. For many years it was just a dumping ground of sort of useful libraries people in the early days wrote (asyncore & asynchat) never to be updated ever again, and then it had like 3 libraries to talk HTTP, each with their own uniquely bad API. The standard library was where project went to die, like how many command argument parsers does one need in the standard library? Why would Python adopt a Java-style logging framework, that feels completely alien?

                                                                                                  1. 2

                                                                                                    That is an interesting perspective. When I first started using Python I read:

                                                                                                    keep this under your pillow

                                                                                                    Under the library reference link in the main docs and took it literally. I could imagine it being difficult to navigate but I’ve read most of it so many times that its second nature at this point.

                                                                                                    I think this has made me spoiled because I am consistently disappointed when every other standard library does not have every imaginable use case already implemented. :)

                                                                                                  2. 0

                                                                                                    Not related to Python, but Go has one of the best standard libraries I’ve ever used.

                                                                                                  1. 6

                                                                                                    For me the most fun in a long time (but by now also many years ago) has been learning a bit of Factor. They way concatenative languages like Factor are very different from imperative languages or even functional is quite mindbending. You are almost forced to write everything in pointfree style, which for these languages is 100% idiomatic. Also the environment reminds me a bit of image based systems and you can inspect the implementation of everything easily, in the integrated universal help system.

                                                                                                    It is a bit of a shame that it got on the back-burner since its primary author ascended into Apple, but in my opinion still the most fun stack-based language.

                                                                                                    1. 2

                                                                                                      Personally, I’ve been exploring APL recently. The way you solve problems in array languages is completely different than in other programming languages. I don’t think that they’re quite ‘there’, for problems outside their scope (stats/financial)—although obviously you can take them wherever—but I think that they are, in many ways, ahead of the competition, having found something that the standard complement of c#/java/python/js missed.

                                                                                                      1. 1

                                                                                                        Factor is an extremely cool language & environment. That Slava went to Apple is probably the biggest reason why I’m taking Swift seriously.

                                                                                                      1. 24

                                                                                                        The inevitable fate of languages with no definition of done: an ever-decreasing bar to language additions.

                                                                                                        1. 17

                                                                                                          I like that the most recent C standard added no new features.

                                                                                                          1. 2

                                                                                                            It was only bugfixes, clarifications to language and bringing the de jure wording for some features into line with the de facto meanings?

                                                                                                            1. 5

                                                                                                              Basically. C18 is a “bugfix release” for C11. C2x isn’t supposed to add too much either, mostly decimal arithmetic, IIRC.

                                                                                                          2. 5

                                                                                                            I would have so much respect for a language designer who just said “that’s it, it’s done.”

                                                                                                            1. 7

                                                                                                              Doesn’t this describe lua?

                                                                                                              1. 6

                                                                                                                Or even more, Standard ML, which comes with a spec and not a reference implementation.

                                                                                                            2. 4

                                                                                                              Isn’t one of Ruby’s goals “developer happiness”?

                                                                                                              It’s hard to go from this to a language spec, and well at some point you have to handle the conflicts between developers who enjoy a simple language, versus those who like to ad[oa]pt every shiny features of their week-end programming tools.

                                                                                                              IMHO, adding more stuff to Ruby will only make it worse, unless the core team start taking cues from Rust’s development model.

                                                                                                              1. 16

                                                                                                                you have to handle the conflicts between developers who enjoy a simple language

                                                                                                                Developers who enjoy a simple language would have left Ruby long ago.

                                                                                                                1. 4

                                                                                                                  Ruby was never a simple language and Rails started using every niche behaviour there was. It was only capable of writing good inner DSLs to hide this.

                                                                                                                  1. 3

                                                                                                                    Which is why - despite being a professional Rubyist for years - I reach for a Lisp these days when coding.

                                                                                                                    1. 1

                                                                                                                      I think a lot did, and Ruby (MRI) is not getting simpler.

                                                                                                                      1. 5

                                                                                                                        Also, a lot of awesome people joined. We overemphasize leavers, because they are usually already at the top of the community.

                                                                                                                        Ruby is also larger than ever, even if its growth is somewhat on a plateau.

                                                                                                                    2. 13

                                                                                                                      unless the core team start taking cues from Rust’s development model

                                                                                                                      I think Rust is on a similar feature death march, it just hasn’t been going on for long enough to make it readily apparent.

                                                                                                                      1. 1

                                                                                                                        Isn’t one of Ruby’s goals “developer happiness”?

                                                                                                                        I’ve most often heard this expressed as “principle of least surprise”.

                                                                                                                        Kind of tough to keep to that and yet evolve the language in a meaningful way. See my response to @soc for my weak theory that major changes should just get a whole new language name.

                                                                                                                        1. 6

                                                                                                                          Note that Matz has himself said that the measure for surprise is his surprise.

                                                                                                                          1. 3

                                                                                                                            That makes a lot of sense and explains a bunch, in that it makes the decisions he made to evolve the language more cogent as his own personal sensibilities around language design evolved.

                                                                                                                            While there’s no principle of least surprise corollary per se, I think you can certainly make comparisons to Guido with Python. He went to work at Dropbox and Google, and worked on GINORMOUS code bases where type hinting is a huge help, and was also on a type theory kick, so he evolved the language in that direction despite the pitchforks and torches carried by large chunks of the community.

                                                                                                                      2. 4

                                                                                                                        So I’m unsure as to whether I’d go quite as far as you do in this statement but I’d actually been thinking that this reminded me a lot of all the controversy in the Python community around some of the more tectonic language changes like the addition of type hinting in Python 3.

                                                                                                                        I’m almost to the point where I feel like language designers who want to make tectonic changes should be honest with themselves and their audience and just change the language’s name.

                                                                                                                        For instance, well written Python 2 and well written, idiomatic, heavily type hinted Python 3 feel very different to me and to many others fans. This isn’t necessarily a bad thing, but maybe we could suck some of the pointless “Who moved my cheese?” controversy out of the conversation and focus on what’s different and maybe better or worse instead.

                                                                                                                        Ruby’s evolution has certainly been contentious - the syntactic sugar borrowed from Perl is part of what attracted many of us to the language initially (Yes I was a Perl guy in the 90s. So were many of us. No shame :) but when Matz realized how problematic it could be in the modern context and moved away from it, a whole lot of code broke and there was a whole lot of unhappy, even if ultimately many people agreed it was a good idea.

                                                                                                                        1. 2

                                                                                                                          I think I’d regard this ongoing feature creep in language as just as sleazy as those online services that keep adjusting their privacy agreement after you have signed up to collect more and more data on you.

                                                                                                                          In the end, if language designers were honest they should probably give their “new” language a new name. I assume that the “immediate adoption” of reusing the name of an existing language is too enticing though.

                                                                                                                          1. 4

                                                                                                                            These languages are open source while say Github/Google/Facebook aren’t. The whole point of open source is that users have control.

                                                                                                                            If enough people really care, they can fork it, and forks matter (XEmacs, etc.).

                                                                                                                            I’m one of those people who doesn’t really see the value in Python 3. But it actually provides the perfect opportunity for someone to fork Python 2, because it’s stable, and it has a stable set of libraries.

                                                                                                                            I haven’t seen very serious efforts to do this, which indicates to me that the community doesn’t care enough. (A few people have tried, to their credit, but overall the message is clear.) Lots of people will complain about things but they don’t want to put in the effort to fix them or even maintain the status quo.

                                                                                                                            1. 2

                                                                                                                              I think I’d regard this ongoing feature creep in language as just as sleazy as those online services that keep adjusting their privacy agreement after you have signed up to collect more and more data on you.

                                                                                                                              The way you phrased this shines a light on an interesting facet of this whole discussion: The contract between a language’s designer(s) and its user community.

                                                                                                                              From the designers perspective, this is their bat and ball, but it seems like at least some users don’t see it that way.

                                                                                                                              1. 2

                                                                                                                                I haven’t seen very serious efforts to do this, which indicates to me that the community doesn’t care enough. (A few people have tried, to their credit, but overall the message is clear.) Lots of people will complain about things but they don’t want to put in the effort to fix them or even maintain the status quo.

                                                                                                                                Trick being you need to fork not just the language but the ecosystem. HUGE parts of the Python ecosystem have pointedly abandoned 2 and made incompatible changes, so everything your fork eats is frozen in time. Pretty high price to pay unless, as you say, you really, REALLY care.

                                                                                                                          1. 3

                                                                                                                            Isn’t evil the actual vim mode for emacs, and spacemacs just a collection of a bunch of packages that happens to include evil?

                                                                                                                            1. 2

                                                                                                                              Correct. Also, every time I tried Spacemacs it barfed about installing one plugin or another (it changes every time). Not the friendliest intro to Emacs, LOL.

                                                                                                                              1. 3

                                                                                                                                I liked what Spacemacs did but every time wondering whether the next update will just hose your editor was not a great experience. While I was using it, they even added a “revert update” option, so it looks like I’m not the only one who experienced this.

                                                                                                                            1. 4

                                                                                                                              I wouldn’t be surprised if the boring Haskell language subset would probably be a language pretty close to SML, but pure.

                                                                                                                              1. 6

                                                                                                                                and, sadly, lazy.

                                                                                                                                1. 7

                                                                                                                                  I get upset when people talk about laziness strictly as a bad thing, while for me it’s almost purely a good thing. In my 3 years of full-time commercial Haskell development, I’ve used laziness countless times to simplify my code greatly and never have I been bitten by it performance wise. I have spent zero seconds debugging strictness issues.

                                                                                                                                  1. 7

                                                                                                                                    Fair enough, I was unecessarily dismissive. I personally find lazyness hard to reason about, and I think it requires heroic efforts from the compiler to get good performance. OCaml gets you pretty fast programs with very little optimizations in comparison. But indeed, there’s a lot of elegance in lazy functions.

                                                                                                                                    1. 5

                                                                                                                                      I do sometimes talk about laziness as a bad thing but I have a specific argument in mind when I do this: eager languages are more expressive in that they can express lazy structures whereas lazy languages cannot express eager structures. There is a fundamental duality between data versus co-data in computer science: the former is about inductively building bigger structures out of smaller ones whereas the latter is about (co-inductively) building smaller things out of (infinitely) big things.

                                                                                                                                      In Haskell, one works with co-data and pretends that it is data. For instance: a natural number by its very definition cannot be infinite: any inhabitant of the type ℕ must be a natural number you can write down; it should be a finite thing made up from gradually smaller things. Consider the following definition

                                                                                                                                      ∞ : ℕ
                                                                                                                                      ∞ = ∞ + 1
                                                                                                                                      

                                                                                                                                      In both Haskell and SML you can write something like this but an attempt to evaluate it should get the program immediately stuck in an infinite loop. In Haskell, however, this is not the case because it is treated as co-data due to laziness. So ℕ really behaves like co-ℕ, the dual of ℕ. The situation is the same for lists: you can never write the type of lists in Haskell, only co-lists (i.e., streams) (of course here, I am hand-waving over the extremely important question of what one means by equality; by a suitable definition of equality you can look at them as the same thing).

                                                                                                                                      There exists a fundamentally co-inductive type in almost every language: the function type. It is built into the language and its inhabitants are inherently co-data rather than data. Using function types you can express many other co-data: for instance the type of lists over some type A in Haskell can be represented by a type like ℕ → A + Unit in SML; the idea is that this is like a list you can force into existence as you observe it which is the meaning Haskell assigns to ordinary lists.

                                                                                                                                      Agda for instance allows the user to express their precise expectations from a type as it supports co-inductive types so in that sense it is superior to both. It also supports co-pattern matching: the dual of pattern matching, an extremely convenient tool for dealing with co-data. If we are to choose between SML and Haskell, though, there is a sense in which SML is superior.

                                                                                                                                      Check this article out if you are interested in reading more: https://existentialtype.wordpress.com/2011/04/24/the-real-point-of-laziness/.

                                                                                                                                      1. 3

                                                                                                                                        What are the strictness issues that are hard to debug? All cases I can think of (forgetting that rectypes isn’t the default, or forgetting to thunk something) blow up fast, usually at compile time, and are fairly straightforward. What am I missing?

                                                                                                                                    2. 3

                                                                                                                                      In addition to purity, the most obvious differences that come to mind are:

                                                                                                                                      • laziness (I like it, like enobayram)
                                                                                                                                      • typeclasses vs. modules
                                                                                                                                      • higher-kinded types (although sounds like modules allow for an approximation?)

                                                                                                                                      I’d maybe also toss in generics as a great feature that doesn’t get as much press, although I think you need DeriveGeneric to really leverage the full power there.

                                                                                                                                      Taken as a whole, my impression is that these lead to a pretty different programming style compared to ML-descended languages, but I don’t have any experience with ML-family languages so can’t really say.

                                                                                                                                      1. 15

                                                                                                                                        Having used both ML and Haskell, I can guarantee that the programming styles they encourage are very different.

                                                                                                                                        ML encourages you to use types to describe states. If you have a long computation, you define a data type for each intermediate state, and a function for each computation step. To ensure that steps may only be chained in ways that make sense, you use abstract data types. The hallmark of good ML programming is designing abstract data types in such a way that third parties may not create invalid values.

                                                                                                                                        Haskell encourages you to use types to describe computations. If you identify a pattern that several computations follow, you formalize the pattern as a higher-order function parameterized by the varying parts, which may be either explicit function arguments or implicit type class dictionaries. To ensure that your patterns are reasonably universal, you demand that they satisfy laws that can be stated as equations. The hallmark of good Haskell programming is identifying the most generally useful patterns that computations follow.

                                                                                                                                    1. 6

                                                                                                                                      The “GNU generation” bit hasn’t aged particularly well, if anything I see the influence of GNU disappearing further and further.

                                                                                                                                      Apple is removing GPL stuff whenever they can, Android was never GNU at all, Clang has turned into a realistic alternative to GCC (and the competition made GCC better), Musl seems to become a more and more popular alternative to Glibc and Guile has lot less adoption than Lua. So having a non-GNU/Linux system is pretty much feasible/trivial.

                                                                                                                                      1. 8

                                                                                                                                        GPL licensed software is doing quite well in the enterprise, cloud, and web application space. AWS and GCP (and to a lesser but still very relevant degree, Azure) all rely quite heavily on Linux and the GNU userland. The Linux desktop doesn’t have anything like the market share compared to Windows or Mac but you won’t find many dev tools that aren’t cross-platform for all three.

                                                                                                                                        The examples you listed (Android and Apple) are consumer products shipped by companies who would prefer the benefit of integrating and shipping open source software without the burden of having to contribute back to the community in some minimally meaningful fashion.

                                                                                                                                        1. 6

                                                                                                                                          I was specifically talking about GNU projects, not GPL projects. The only GNU projects without a serious non-GNU contender these days are what, coreutils and Emacs? The former could be replicated with moderate effort but there is little point to it and the latter is an editor.

                                                                                                                                          My point being that GNU as operating system (as in GNU/Linux) has become less and less important, since it very much feasible to run a fully featured non-GNU/Linux operating system.

                                                                                                                                          1. 14

                                                                                                                                            The only GNU projects without a serious non-GNU contender these days are what, coreutils and Emacs?

                                                                                                                                            Ahem…

                                                                                                                                            1. 15

                                                                                                                                              Isn’t MATLAB a serious non-GNU contender to Octave?

                                                                                                                                              1. 0

                                                                                                                                                No, because Octave is a free replacement for Matlab and Matlab is not a free replacement for Matlab.

                                                                                                                                                There are no serious non-GNU contenders for free Matlab replacements.

                                                                                                                                                1. 1

                                                                                                                                                  What do you mean by “free” in “free Matlab replacements”? I don’t think something has to be free (as in beer) to be a serious contender to a free (as in speech) application…

                                                                                                                                                  1. 3

                                                                                                                                                    The only free that matters to someone whose avatar is a baby gnu.

                                                                                                                                              2. 1

                                                                                                                                                If our baseline is “compatible-with-MATLAB” then yes, Octave doesn’t really have any serious competition in that space (bar MATLAB itself).

                                                                                                                                                But if we’re looking at numeric/scientific programming environments, then Julia, Python + Jupyter are strong contenders.

                                                                                                                                                1. 1

                                                                                                                                                  Yep, that is exactly the baseline. There’s lots of Matlab code out there that will be relevant for all foreseeable future. It needs to run on something and that something can’t be nothing but Matlab.

                                                                                                                                              3. 4

                                                                                                                                                How is having a competitor bad? If anything having competition means projects don’t stagnate to internal politics and actually innovate. It’s a shame that there is only one really viable kernel for gnu systems these days. The world would be a lot better of there were several.

                                                                                                                                                1. 2

                                                                                                                                                  It’s a shame that there is only one really viable kernel for gnu systems these days.

                                                                                                                                                  GNU/kFreeBSD and GNU/kNetBSD are/were a thing. But apparently, there is not much interest in these.

                                                                                                                                                  1. 1

                                                                                                                                                    Debian GNU/FreeBSD is still developed (albeit at a very slow rate) but Debian GNU/NetBSD never matured enough to have a release before it was inevitably abandoned.

                                                                                                                                                2. 4

                                                                                                                                                  Ghostscript, Make (and I am not talking about build-systems, but Makefile interpreters and runners), gettext, R, Nano, ncurses, and as we count coreutils, then AWK, sed, and tar.

                                                                                                                                              4. 6

                                                                                                                                                I think that the existence of non-GNU Linux variants isn’t coming at the cost of GNU/Linux. It’s a separate market that grows independently and still supplies good patches in the projects shared by both.

                                                                                                                                                1. 1

                                                                                                                                                  Android was never GNU at all,

                                                                                                                                                  Well, the kernel used to boot Android phones is Linux / GNU GPLv2 .. but I get your point; noting in ASOP or any of the core apps is GPL

                                                                                                                                                  1. 6

                                                                                                                                                    GNU/Linux specifically refers to the kernel Linux plus the GNU userland (compiler collection, coreutils, libraries, etc). Android isn’t running the GNU operating system.