1. 7

    „Police in my country is shit so let’s rename this project (used by people from all around the world).”

    Honestly If I was bbatsov I’d permaban author of the isssue and anyone who upvoted it. They apparently don’t think reasonably. It’s waste of time to discuss with people who think newspeak will fix anything.

    1. 2

      Banning people for a single disgression (if you want to call it that way) is disingenious. There have been similar discussions about naming in projects started by core team members or years-long contributors. And even if you don’t call it disgression but simply “having an opinion” there’s no need to ban them unless they start getting impolite. And when I read the linked issue even the “change the name”-people were maybe upset, but not aggressive or banworthy (for the most part).

    1. 7

      When it comes to blocking ads, I go all the way: uBlock Origin with all the bells and whistles activated, cookie-blocker, cookie-consent-blocker, privacy badger, cookie autodelete, etc., but most importantly, SponsorBlock, where a community of enthusiasts identifies sponsor clips in youtube-videos, marks them and auto-skips them for everybody else. If you think that these sponsors take long to get “detected”, you’re wrong: I’ve not seen a single sponsor since I’ve been using it, even on videos only a few minutes (!) old.

      Sponsors are getting increasingly annoying and widespread on YouTube. I don’t think that content should be free, and youtubers need a way to monetize their videos, but using ad blocking technology might push them to much saner models like Patreon.

      I see it like this: Every ad-served user wastes a set amount of time and is annoyed, but only contributes like 0.001€ per view. If only one in 5000 viewers is a regular supporter on patreon with 5€/video (which is not uncommon), the youtuber gets the same amount of reward and everyone benefits from it. The patreon supporter gets a few perks on top, but most importantly, no one has to sit through ads. Another thing is, that since the adpocalypse on YouTube, the YouTubers are getting demonetized for even little things. And those ad-friendly-guidelines will get stricter and stricter. Going away from ad-revenue will not only bring benefits to the viewers, it will also bring back independence to the videomakers.

      Some people blame me for blocking ads, but I just can’t be arsed to sit through them. Every time I use another person’s phone, it really shocks me how bad ads on the internet have become. Those people using iDevices can’t even install ad blockers, which shows how bad a walled garden can harm your experience.

      1. 8

        I probably won’t install SponsorBlock.

        The main reason is that most of the arguments I made against ad blocking don’t apply here. Sponsored video clips are unlikely to exploit vulnerabilities (the video creator, and likely the video host, have reencoded the clip they were provided, so any malformed video is probably gone by now). They can’t track you, since they cannot make any outgoing web requests, and they cannot change after the video has been produced. And because they’re unable up change after the video is put out, they’re also unlikely to link to fly-by-night malware operations; starting from scratch as a direct video sponsor is too much work.

        They’re still annoying, but I’m sorry, the time and effort it takes to install and configure an ad blocker takes too much work just for a minute or two per video.

          1. 4

            It’s not as simple as a five minute initial setup. Ad blockers incur a variety of other costs:

            • I’m not nearly smart enough to make good points on capitalism in general, but I know people who see ad blocker as a moral hazard. I do have to justify myself to others.

            • Ad lists aren’t 100% reliable. There’s the risk of someone inserting a “sponsor segment” that messes up the video, either because they disagree on what constitutes a sponsor segment (does product placement count?) or because they’re just trolling.

            • If I switch browser, I need to re-install the add-on.

            • If the browser upgrades, the add-on might break.

            • If the video website upgrades, the add-on might break it.

            • The add-on might be compromised. Ask about the Stylish incident.

            Clearly worth it for the script-carrying ad networks (I am not going to take on a security hazard just up prop up your business), but not so obvious for video sponsors.

        1. 2

          Thank you for this, I never heard about SponsorBlock and I already love it!

          1. 1

            If only one in 5000 viewers is a regular supporter on patreon with 5€/video (which is not uncommon), the youtuber gets the same amount of reward and everyone benefits from it. The patreon supporter gets a few perks on top, but most importantly, no one has to sit through ads.

            This is a great point. This is a really good article on that topic by Tim Carmody.

            Those people using iDevices can’t even install ad blockers

            This isn’t really true: iOS has supported ad blockers (“content blockers”) since September 2015. Granted, these are only used for web content—they’re active in Safari and in all embedded web views but they can’t apply restrictions to non–web view content in apps. Overall, though, I don’t think it’s fair to say that iOS doesn’t support ad blockers.

          1. 3

            I wonder if similar process will ever happen to my huge Kakoune config (currently ~600 LOC excluding plugins)…

            1. 9

              Personally I usually stick to POSIX scripts and I use following template:

              #!/bin/sh 
              # Author:
              # License: Unlicense
              
              set -euf
              
              log() {
                  printf '\033[32m->\033[m %s\n' "$*"
              }
              
              die() {
                  log "$*" >&2
                  exit 1
              }
              
              usage() {
                  echo "${0##*/} ARGS
                  desc
                  "
                  exit 0
              }
              

              set -f is not always desirable but I think it’s good default.

              1. 17

                And the corollary: The first line of your shell script should be

                #!/bin/sh
                

                If you need bashism for something complex that needs to be maintainable, use #!/usr/bin/env bash as the article suggests, but 99% of ‘bash’ scripts that I’ve seen are POSIX shell scripts and work just fine with any POSIX shell.

                1. 16

                  And the corollary: The first line of your shell script should be

                  I disagree, enormously. There are some specific, isolated, and extremely uncommon situations where it’s important you target sh; the rest of the time, you are constraining yourself for no appreciable benefit.

                  In particular, if you did go and change the interpret to /bin/sh, you also need to change the second line, since (at least) pipefail is a bashism.

                  1. 3

                    I think being constrained to a smaller and simpler set of features is the appreciable benefit.

                    This applies doubly if somebody is going to have to maintain this code.

                    1. 2

                      One does not necessarily follow the other. I’ve seen horrific apparently-posix-sh scripts with the most unmaintainable contortions to avoid using a widely known bash feature that would make the code far more legible. Eg bash arrays.

                      1. 1

                        I don’t disagree; often there is no nice way in posix sh to do something that a bash array could. But I’ve found that once you begin to feel a desire for any kind of data structure in your program, it’s probably time to switch to a more robust programming language than (ba)sh.

                        1. 2

                          I generally agree. When I look back at my professional career (16 years and counting), I’ve spent a remarkable amount of it essentially writing bash scripts. Which is surprise.

                          Most recently, for containers which can’t have a larger interpreter inside them for space reasons, ruling out Python etc

                    2. 1

                      In particular, if you did go and change the interpret to /bin/sh, you also need to change the second line, since (at least) pipefail is a bashism.

                      Thanks. I have little experience with non-BASH shells and I didn’t want to assume that this would work in on a non-BASH script. Good to learn that it doesn’t.

                    3. 14

                      Good POSIX shell reference here:

                      http://shellhaters.org/

                      1. 5

                        Fair point. I am trying to target the 100%. It feels to me that’s it’s best to program against bash than risk in failing in a corner case on a shell which I never tested my script against.

                        1. 2

                          For 99% of shell scripts its a non issue. A lot of people use things like arrays in bash when simple quoted strings work on every shell. Writing portable across multiple bourne shell interpreters is easier than you think it is. Most of my scripts run under any of ksh/zsh/bash/sh with zero changes. And testing wise… there isn’t much to test tbh, outside of -o pipefail only works for zsh and bash. Generally the -u catches those cases anyway.

                          What kind of corner case are you thinking of? Also as yule notes, run shellcheck on your scripts when writing them. That will reduce your edge cases significantly.

                          1. 4

                            The annoying thing is that bash doesn’t disable bash extensions when invoked as sh. A couple weeks ago, I had to debug why a script written by a colleague didn’t work. It turned out that he used &> to redirect both stderr and stdout to a file. I didn’t even know this existed, and he didn’t even know it wasn’t portable. The nasty part is that this doesn’t cause an error. Instead, foo &> bar is parsed as foo & (not sure what happens to the > bar bit; file is created but not hooked up to stdout of foo), which causes race conditions with whatever comes next relying on foo having already completed.

                            Of course, with #! /usr/bin/env bash in the script, this wouldn’t have been a problem on my machine, but I maintain that it would be more productive if bash disabled all of its non-POSIX extensions when invoked as sh. More commonly, you see people use [[ ... ]] instead of [ ... ]. I’m still not even sure how [[ is different from [.

                            1. 1

                              I’m still not even sure how [[ is different from [.

                              I vaguely know that and I switch out Bash for Python as soon as even simple string or array manipulation kicks in. My reasoning is that programs always become more complex over time. You start with simple string manipulation and soon end up with edge case handling and special cases. Best to switch to a language like Python which supports that.

                              1. 1

                                I think (among other things) [[ disables word splitting, i.e. you can use variables without needing to quote them. At least that’s how it works in ksh.

                          2. 4

                            Are they though? POSIX shell is so extremely limited that most scripts end up with some bashisms in them, if only to send a string to a program’s stdin. foo <<< "$var" is so much nicer than printf "%s" "$var" | foo (and no, you can’t use echo because POSIX is so vague that you can’t correctly tell echo to treat an argument as a string and not an option in a portable way)

                            I’ve made the mistake of thinking my script is POSIX, using #!/bin/sh, and then hearing from Ubuntu users that it doesn’t work in Dash. (I’ve also had problems where my script actually is POSX, but dash is so riddled with bugs that it still didn’t work on Debian-based systems.)

                            1. 6

                              That’s why it’s a good idea to always lint your scripts with shellcheck. It will catch all bashisms when you set shellbang to /bin/sh

                            2. 3

                              In which case -o pipefail is undefined, at least according to shellcheck.

                              In any case I find running shellcheck on shell scripts to be really valuable. You don’t have to follow it blindly, but it has some very good hints.

                              1. 1

                                shellcheck is my favorite linter for bash scripts as well. It sometimes feels a bit aggressive but I prefer that as opposed to making a mistake.

                              2. 2

                                I respectfully disagree, using the /usr/bin/env method requires bash, so you can use all the bashisms you want, and require users of your scripts to have bash installed.

                                For 95% (wild-ass guess) of Unix users, this is the case. For the rest, if you’ve stated the requirements clearly, they’ll either accept the requirement or form a large enough crowd with pitchforks to force you to change.

                                1. 2

                                  *BSD, Solaris, and Android don’t have bash installed by default and it isn’t part of their base systems so it isn’t available until /usr/local is mounted and can’t be used anywhere in early boot. Ubuntu uses dash as /bin/sh, but does install bash by default. Embedded Linux systems typically use busybox or similar and so don’t have bash.

                                  95% of Unix users probably covers all Android users, so that’s not a particularly useful metric. The interesting metric is the set of people you expect to use your script. If it’s GNU/Linux users, that’s fine. If it’s people running large desktop / server *NIX systems (macOS, *BSD, Linux), bash is probably available easily but it may not be installed on any given system so you’ve added a dependency.

                                  By all means, if you depend on bashism then use bash. In general, I’ve found that my shell scripts fall into two categories:

                                  • Simple things, where the POSIX shell is completely adequate and so there’s no reason to use anything other than /bin/sh.
                                  • Complex things where I actually want a rich scripting language. Bash is a pretty terrible scripting language, but it’s a much lighter weight dependency than something like Python so I’ll often use bash for these things.

                                  I use bash as my interactive shell on FreeBSD, so I don’t really mind having it as a dependency for things, but I consider it somewhat impolite to add dependencies in things I distribute when I don’t really need them.

                                2. 2

                                  Why #!/usr/bin/env bash as opposed to #!/bin/bash tho? I’ve seen that done for ruby scripts, and I figured it’s because maybe ruby is in /usr/local/bin, but isn’t bash always in /bin/bash?

                                  1. 10

                                    Not on all systems. e.g. on FreeBSD and OpenBSD it’s /usr/local/bin/bash.

                                    1. 7

                                      Or Nix and Guix, which have them in some entirely different place (e.g. on Guix is something like /gnu/store/.../).

                                    2. 4

                                      in the BSDs it should be under /usr/local/bin or /usr/pkgs/bin. MacOS ships an old version of bash and one might want to install a newer version from homebrew, which goes under /usr/local/bin

                                      1. 1

                                        Using env bash let me both use a newer homebrew bash on Macs, and keep the script working on Linux machines, and possibly even Windows via WSL. On Macs the newer homebrew bash was needed for a switch statement, if memory serves.

                                        For ruby, chruby lets one install multiple versions on one system, and flip between them.

                                    1. 16

                                      I find all the admonishments to use POSIX shell rather than bash befuddling. Why would you not want to use Bash language features such as arrays and associative arrays? If your goal was portability across a wide swath of UNIX variants, then I understand that you might want to target POSIX shell, but that is a very unusual goal. In most instances why not leverage a shell language with very useful features?

                                      1. 31

                                        Because arrays and associative arrays are two of the most broken features in bash. You can use them if you’re an expert, but your coworker who has to maintain the script will likely not become an expert. (I’ve been using shell for 15 years and implementing a shell for 4, and I still avoid them)

                                        I implemented them more cleanly in Oil and some (not all) of the differences / problems are documented here.

                                        https://www.oilshell.org/release/latest/doc/known-differences.html

                                        • ${array} being equivalent to ${array[0]} is very confusing to people. Strings and arrays are confused.
                                        • associative arrays and arrays are confused. Try doing declare -A array and declare -a assoc_array and seeing what happens.
                                        • dynamic parsing of array initializers is confusing and buggy
                                        • in bash 4.3 and below (which is deployed on Ubuntu/Debian from 2016, not that old), empty arrays are confused with unset arrays (set -e). Not being able to use empty arrays makes them fundamentally broken

                                        I could list more examples, but if you’ve used them even a little bit, you will run into such problems.

                                        In Oil arrays and assoc arrays are usable. And you even have the repr builtin to tell you what the state of the shell is, which is hard in bash.


                                        edit: I forgot that one of the first problems I wrote about is related to array subscripts:

                                        Parsing Bash is Undecidable

                                        Also the security problem I rediscovered in 2019 is also related to array subscripts:

                                        https://github.com/oilshell/blog-code/tree/master/crazy-old-bug

                                        A statement as simple as echo $(( a )) is in theory vulnerable to shell code injection.

                                        • Shells that do not have arrays do not have the security problem.
                                        • You can inject code into shells with arrays with a piece of data like a[$(echo 42; rm -rf /)].

                                        All ksh derived shells including bash have this problem. Note that you don’t even have to use arrays in your program to be vulnerable to this. Simply using arithmetic in a shell that has arrays is enough! Because arithmetic is dynamically parsed an evaluated, and accepts $(command subs) in the array index expression.

                                        https://unix.stackexchange.com/questions/172103/security-implications-of-using-unsanitized-data-in-shell-arithmetic-evaluation/172109#172109


                                        bash is poorly implemented along many dimensions, but I would say arrays are one of the worse areas. But I learned that it got a lot of that bad behavior from ksh, i.e. “bash-isms” are really “ksh-isms”. So the blame for such a bad language to some extent goes back to AT&T and not GNU.

                                        1. 1

                                          Thanks. Without arrays, how do recommend handling cases where you need to build up a series of arguments to be passed to another command?

                                          1. 3

                                            I oscillate between:

                                            • Using strings and implicit splitting for known/trusted arguments. If you’re building up flags to a compiler like -O3 or -fsanitize=address, this is a reasonable option, and the one I use.
                                            • Using arrays and taking care not to use empty arrays (which is annoying).

                                            The fact that it’s awkward is of course a motivation for Oil :)

                                          2. 1

                                            in bash 4.3 and below (which is deployed on Ubuntu/Debian from 2016, not that old), empty arrays are confused with unset arrays (set -e). Not being able to use empty arrays makes them fundamentally broken

                                            Did you mean set -u? And to be fair, I would consider this more of a case of set -u being broken; it seems that their fix for it was to not trigger (even when unset) on * and @ indexes.

                                            1. 1

                                              Yes set -u. Either way, you can’t use empty arrays and “strict mode” together, which makes arrays virtually useless in those recent version of bash IMO.

                                              I have a memory of running into that the first time, and I couldn’t understand what was going on. And I ran into many more times after that, until I just stopped even trying to use arrays.

                                          3. 15

                                            Why would you not want to use Bash language features such as arrays and associative arrays?

                                            If you need them that’s a good sign it’s time to rewrite the script in real programming language.

                                            1. 12

                                              It’s not as “unusual” as you might think though. There are many people running OpenBSD on their work machines, where bash is simply not included in the default install. I could see why you’d want to make your script work without issue when bash isn’t an option. At the very core, a shell script should not do much: cleanup your local mailbox, aggregate multiple RSS feeds or perform a quick backup using rsync, … I have run openbsd on a laptop for some time, and I was delighted to see that all my personnal scripts were still working like a charm (besides calls to seq(1), this one killed me…). I’ve also written some simple C software, and wrapper scripts for it using POSIX shells only, and I was glad that nobody from the BSD world bothered me with these scripts.

                                              Another argument is that POSIX shells is much more simple to use and understand than the myriad of corner-cases and specificities that bash can have. It sure is a strengh to be able to use proper arrays, but bash manpage has 5 times more (48746 words) than sh (10224). Mastering bash as a language is definitely harder than sticking to POSIX, especially when you only write scripts that are < 20 lines.

                                              1. 4

                                                Even on Linux bash isn’t always included by default, especially on simple server setups/distros such as Alpine Linux.

                                                The seq thing is annoying, BSD has jot with different syntax. I wish they could agree on one or the other. Same with stat.

                                              2. 10

                                                In my experience, the moment my shell script becomes complex enough for a bash array is the moment it gets rewritten in Python.

                                                The only features from bash that have convinced me to require it in recent memory are herestrings (<<<) and the regex match operator (=~).

                                                1. 1

                                                  In my experience, the moment my shell script becomes complex enough for a bash array is the moment it gets rewritten in Python.

                                                  Same here. Even for the simple scripts since a script would become more complicated over time.

                                                2. 4

                                                  I use systems without bash installed by default. If you’re going to write a complex script that is too awkward to write in POSIX sh, then why not use a better (less quirky) language in the first place? Python for example is probably available in almost as many places as bash now. If you’re writing a shell script, you’re probably aiming for portability anyway, so please write POSIX shell if you can.

                                                  1. 2

                                                    I write many bash scripts where portability is not a concern and I think the language can be quite functional and even elegant when you are pulling together different cli tools into a new program.

                                                    1. 2

                                                      Certainly if it’s not a concern and you enjoy the language then I don’t see a problem with using bash! My main issue is that I don’t think it’s at all an unusual goal to use POSIX sh for portability.

                                                      1. 2

                                                        Ubuntu shaved quite a bit off their (pre-systemd) boot times by just switching /bin/sh from bash to dash (although I can’t find the exact number right now). The increased performance may be a concern (or is at least nice) in some cases (bending over backwards for it would of course be silly).

                                                      2. 1

                                                        Because there are plenty of use cases, like installers, where relying on another language isn’t possible.

                                                        1. 4

                                                          Why not do the heavy lifting in awk, if your’e in such a restricted environment?

                                                          1. 1

                                                            When I talk about writing shell applications, I personally am talking about using bash plus all the standard UNIX tools that come with every UNIX base install.

                                                            Awk is one of those tools.

                                                            1. 5

                                                              And when I say do the heavy lifting in awk, I mean more or less ignore the shell, and use awk. You get proper arrays, reasonable syntax for writing algorithms, relatively little shelling out, relatively sane string manipulation, and sidestep a bunch of issues around shell variable reexpansion.

                                                              And your code is more portable.

                                                              1. 2

                                                                I believe that. I haven’t used awk that way and I’ll admit that’s because I don’t know it well enough.

                                                                I know I’m asking a lot but might you be able to link to an example of awk being used in this way?

                                                                I mostly end up using stupid simple awk invocations like awk ‘{print $3}’ :)

                                                                1. 1

                                                                  Here’s an example from the FreeBSD tree. Lines 107 through 788 are one big awk script. https://github.com/freebsd/freebsd/blob/master/sys/kern/makesyscalls.sh

                                                                  It parses the syscall definitions here, and generates C: https://github.com/freebsd/freebsd/blob/master/sys/kern/syscalls.master

                                                          2. 1

                                                            Why isn’t it possible and why can’t it be done in POSIX sh?

                                                            1. 1

                                                              The OP’s post has two points.

                                                              1. If you’re writing anything complex at all, use a different language.

                                                              That’s what I was addressing.

                                                              To your point, there are customer environments where shipping UNIX systems with languages like Python is prohibited, either because of security constraints, maybe disk usage, etc.

                                                              1. bash versus POSIX shell? If bash ships as /bin/sh on a given UNIX system, I don’t see the difference as important enough to be worth any gymnastics to get one installed, but you may have a higher dimensional understanding of the differences than I do.
                                                              1. 1

                                                                I don’t think it’s really a big issue. Certainly for myself it’s only a minor frustration if I need to install bash for a simple script which gains nothing from using bash. I’ve just seen the #!/bin/bash shebang far too many times when it’s not necessary, and I think that a lot of the time that’s just because people don’t know the difference. It’s certainly not the end of the world and if bash feels like the right tool for whatever your use case is then I’m not going to argue! It would just be nice if there was a little awareness of other systems and that people would default to #!/bin/sh and only consider bash if they find a specific need for it. I imagine that in most cases shell scripts are used there actually is no need.

                                                                I’m a little obsessed with building my workflow around shell scripts and I have never found a need for bash extensions (YMMV). The other big benefit other than portability as others have suggested is the digestibility of the manpages for, e.g. dash.

                                                      1. 7

                                                        To anyone else wanting to move away from Elm:

                                                        I recommend looking into PureScript as an alternative. It’s a much more capable functional programming language, akin to Haskell for the web, and the community is full of mature, respectful adults.

                                                        Learn more: https://www.purescript.org/

                                                        Discourse: https://discourse.purescript.org/

                                                        1. 4

                                                          I tried Purescript about a year ago, as an Elm replacement. It’s indeed very Haskell-y, but I found documentation and working(!) examples extremely lacking. I gave up after days of fighting to get a working prototype.

                                                          I recently use nim to do some simple web stuff, and that was maybe not as great, but it was easy for me to get something working. Hours compared to days in purescript.

                                                          That’s my experience. I have very, very little patience for over-abstracted code and obtuse libraries in general, though.

                                                          1. 2

                                                            Mint might be nice alternative as well (when it reaches 1.0 of course). Written by person who moved away from Elm. Less Haskell-y than Purescript/Elm.

                                                            https://www.mint-lang.com/

                                                          1. 10

                                                            My configurations are too much copy and paste, I need to switch to a programming language

                                                            ( 2 years pass )

                                                            These configuration files are ridiculous and impossible to analyse, we should switch to a declarative config

                                                            1. 4

                                                              (2 months pass) Oh, this declarative config is inflexible, we should template it with jinja

                                                              1. 3

                                                                Also the person who wrote their special snowflake of a configurator probably left the organization and didn’t document any of it. And it’s the most critical thing in the pipeline.

                                                              1. 7

                                                                Unfortunately, the article doesn’t mention the Red language with its native cross-platform GUI engine (Win32, Cocoa, GTK and almost-finished Android) and a declarative DSL for interface specification. Granted, it’s still in the alpha stage, but IMO is mature enough for small and mid-sized personal projects (+ prototyping and aforementioned RAD), and the design goals somewhat resonate with the author’s sentiment.

                                                                For an apples-to-apples comparison of GUI frameworks in general, I recommend 7GUIs benchmark; here is the Red version, clocking under ~300LOC for all 7 tasks.

                                                                1. 2

                                                                  Hasn’t Red been in alpha for ages?

                                                                  1. 2

                                                                    It has been 8 years in active development as of now, what of it? The amount of features packed into toolchain and standard library easily puts it in the ballpark of other 1.0 languages, and right now it’s on par with Rebol2 (the main reference point).

                                                                    Tallying version numbers without ever evaluating the project on its technical merits won’t make a fair judgment or constructive criticism.

                                                                    Consider also sustainability and user experience: when developers say “ready”, they want newcomers to have a truly 1.0, smooth sailing (better docs, larger ecosystem, more diverse community, opportunities to contribute at any level of experience, etc) and to stick with them for a long haul; if they cannot provide that, then they simply don’t set the wrong expectations, at the cost of downplaying themselves (saying “alpha”). In such case tech doesn’t matter, people do.

                                                                  2. 1

                                                                    Red is barely alpha, there is almost no documentation, GTK is not supported and toolchain is still 32 bit only (It seems that 64 bit toolchain will be commercial product, part of “Red/Pro”…)

                                                                    I have included the ones that I thought were “mature” and “popular” enough to be deemed usable.

                                                                    Seems like Red does not fit the bill.

                                                                    1. 0

                                                                      Red is barely alpha

                                                                      Please tell me how much time did you spend using it and what of the experience gained during that time made you think that it’s “barely alpha” (also, compared to what?).

                                                                      There is almost no documentation

                                                                      Presence of official reference documentation, formal specification, Github wiki and community-provided resources doesn’t qualify as “almost no” in my book.

                                                                      GTK is not supported.

                                                                      GTK branch is pretty much operable, one can either compile from sources or take an automated build to try it out.

                                                                      Toolchain is still 32 bit only

                                                                      True, partially that’s the limitation stemming from using Rebol2 (32-bit only itself) during the bootstrapping phase. Many options on how to tackle planned 64-bit transition are on the table, each with its pros and cons.

                                                                      It seems that 64 bit toolchain will be commercial product, part of “Red/Pro”…

                                                                      Red/Pro will be a commercial product and will support 64-bit, so as the community version; one simply takes priority over the other.

                                                                      Seems like Red does not fit the bill.

                                                                      That’s non sequitur, since most of your claims were refuted by the actual facts (including 7GUIs benchmarks that I provided). Now, do you have something constructive to add to the topic at hand?

                                                                  1. 2

                                                                    I remember playing Dark Signs Online (first version in 2008 and reboot in 2012). Good times.

                                                                    1. 0

                                                                      If you were to get rid of prism.js and use static highlighting, how would you go about it?

                                                                      1. 3

                                                                        My personal static website generator uses gomarkdown and I just modified the renderer to pass through to chroma, which ends up looking like this. Obviously you could also use the original python pygments project this too, which is what I used to do when doing “staged” shell based rendering.

                                                                        1. 2

                                                                          I was also looking at https://www.gnu.org/software/src-highlite/ and considering building one myself in C (pretty sure I will at some point), but for web sites, I prefer to keep it on the client side in order to keep a clean HTML file.

                                                                          1. 2

                                                                            That highlighting where package is colored as a keyword but function isn’t hurts to look at. ;) Since they list Ada in supported languages, it clearly warrants a pull request. Maybe I should make one.

                                                                            1. 1

                                                                              I actually attempt to auto-detect the language using Chroma in an effort to backport some colors into my older posts (like the one linked), it detected incorrectly. I gave it a hint and now it should look better, thanks for pointing it out.

                                                                          2. 2

                                                                            Can you recommend me a good static highlighter? I think prism.js fits well for progressive ehancement,it doesn’t mess up the mark up for presentation.

                                                                            1. 3

                                                                              highlight is nice. I’m mostly asking about the workflow, what it would look like in the page source.

                                                                              Ever since I’ve joined IASSGA[1] I’ve been thinking about generator workflows and their implications quite a lot. In soupault 1.7 we’ve added a function for piping element content through an external process, that was meant to enable using any syntax highlighter. Then I realized that you could also use it for adding a rendered version of that content alongside the source, instead of replacing the content.

                                                                              [1] International Association of Static Site Generator Authors

                                                                              1. 1

                                                                                I’m mostly asking about the workflow, what it would look like in the page source.

                                                                                I wouldn’t, haha, but probably an HEREDOC:

                                                                                <h1>Highlight example</h1>
                                                                                
                                                                                <pre>
                                                                                <code class=js>
                                                                                #!
                                                                                hl << EOF
                                                                                function foo() {
                                                                                        var a = 1
                                                                                        console.log('foo')
                                                                                }
                                                                                EOF
                                                                                #!
                                                                                </code>
                                                                                </pre>
                                                                                
                                                                              2. 1

                                                                                Chroma is nice

                                                                                  1. 0

                                                                                    I really like microlight.js and it’s simple enough to port it to other programming languages (and use it for static highlighting).

                                                                                1. 5

                                                                                  There is also nice drawing by twitter user cathodegaytube

                                                                                  1. 8

                                                                                    It’s sad this is even needed. Unfortunately some people think that publishing some code oblige you to support it.

                                                                                    I remember people being upset at Dominic Tarr who transferred ownership of one of his npm modules to new maintainer who turned out to have malicious intents. People were upset that Tarr allowed new maintainer to use his old repository (instead forcing regular fork) or something like that.

                                                                                    Unless you are paid to provide support you don’t have any obligation to user of your FOSS code whatsoever.

                                                                                    1. 6

                                                                                      Many people are aware of the “no warranties” part of most FLOSS licenses.

                                                                                      But Github etc. have made contributing to software development easy and dare I say it , friendly. For better or worse, people expect maintenance and support, and a minority demand it.

                                                                                      While a gruff “read the damn license and leave me alone” is the techically correct way to communicate an absence of support, having a clear, unambigious and neutral way to communicate that is for the better in general.

                                                                                      1. 5

                                                                                        People were upset that Tarr allowed new maintainer to use his old repository (instead forcing regular fork) or something like that.

                                                                                        Unless you are paid to provide support you don’t have any obligation to user of your FOSS code whatsoever.

                                                                                        I don’t know anything about that particular situation but there’s a difference between obligation and trust. Open source authors do not have any obligation towards users of their code. However, if you use someone else’s code in your project or on your computer, you have a choice to make. You can either read and personally vet every line of the third-party code (which takes just as much, if not more effort than simply writing it yourself in the first place), or you can choose to trust that the author has no ill intent towards you. Almost without exception, we chose the latter and because of that, the whole open source software community is built upon trust (and to a lesser degree) reputation.

                                                                                        If you have some code that the open source community trusts, you certainly have the right to hand it off to anyone you chose. There is no obligation to manage the code in any particular way, or at all. But if you don’t vouch for that person, and they do something underhanded with it, those who comprise the community is well within their rights to no longer trust you.

                                                                                        1. 3

                                                                                          It’s very useful to know the status of a project when e.g. comparing alternatives or to know whether submitting an issue is not a waste of time. The choice here is not ‘either you buy support or you assume it is abandoned’. There is plenty of communication bandwidth available.

                                                                                        1. 3

                                                                                          Kakoune looks extremely cool, but I’m always stopped by two things:

                                                                                          1. No windows support. I currently use Linux but have been seriously considering moving back to windows
                                                                                          2. I’ve got a really, really big vimrc. This was called out in the article, and it’s a real problem 😔
                                                                                          1. 4

                                                                                            Oh, super curious, why are you considering a move to Windows? I personally use both OSes from time to time, but never heard of a person publicly speaking about going in this particular direction, so you piqued my interest what are the reasons :)

                                                                                            1. 2

                                                                                              Windows has AutoHotKey. That’s the only reason.

                                                                                              1. 2

                                                                                                There is no integrated solution like AutoHotKey for Linux but you can automate almost anything with shell scripts

                                                                                                1. 3

                                                                                                  I had an AHK script that would toggle YouTube between 1x and 1.25x tempo and another that automatically unfaved the playing song on Spotify. AHK is really, really good.

                                                                                                  1. 3

                                                                                                    I currently am on Linux and OS-X … and AHK is without a doubt what I miss most about Windows (being able to casually play any game I want is a close second). Not only was everything doable, but it was also all relatively easy. On the Linux side, you can use xdotool and a handful of other tools, and on OS-X you can do hammerspoon and similar, but none of it feels nearly as good IMHO.

                                                                                                    “Virtual desktops” – did with AHK. Fixing every annoyance I came across as quickly as I could, AHK. Even automating crazy multi-app flows easily, AHK. The app you have using stupid shortcuts you think should be changed but it doesn’t let you, AHK.

                                                                                                2. 2

                                                                                                  I used to use Xdotool a long time back. Is AutoHotKey very different/better than this?

                                                                                                  1. 2

                                                                                                    Yep, it really is IMHO, I miss AHK most days.

                                                                                            1. 1

                                                                                              Wow, such simple yet useful idea. Great job!

                                                                                              Could you add some explicit version number to it? I’d like to have it packaged for Void Linux but we need version number for that :)

                                                                                              1. 2

                                                                                                Hey! Thanks! I’ll add a version number to it. You might have a naming conflicting with https://github.com/maandree/pp tho.

                                                                                                  1. 1

                                                                                                    Thank you <3

                                                                                              1. 4

                                                                                                It’s a bummer that most of the Lua ecosystem is stuck on 5.1 due to LuaJIT compatibility.

                                                                                                1. 1

                                                                                                  Would you happen to know if there is any particular reason for this?? Apart from lack of time.

                                                                                                  1. 1

                                                                                                    My high-level understanding is the implementation of how integers were added in 5.3 conflicts with some of the optimizations LuaJIT does. (Also “lack of time” is a bit of an oversimplification; Mike Pall, the superhero genius author of LuaJIT is retired and there’s only one or two other humans on the planet as smart as he is.)

                                                                                                    1. 1

                                                                                                      it’s a shame I really like the focus on minimalism. Seems like the javascript hipsters that dominates the current generation never have seen a modem. I find the wastefulness of much of modern tools to be distasteful. lua is one of the best arguments that you can achieve a lot with very little.

                                                                                                      Beutifully designed and fun language as well. It’s a shame to hear of the state of luajit as JIT really is necessery for the language to compete.

                                                                                                      1. 5

                                                                                                        The default interpreter is also fast (faster than Python or Ruby) and I’m using it successfully at work to parse SIP messages (well, Lua and LPEG) in real time.

                                                                                                    2. 1

                                                                                                      It’s largely due to Mike Pall (creator of LuaJIT) having a fundamental disagreement with how globals are handled in Lua 5.2 and above—the entire mechanism changed (and it affected how modules are written as well). In Lua 5.1, globals are stored in a table associated with a function (its so called “environment”), and there were two functions to manipulate this (getfenv() and setfenv() in Lua; lua_getfenv() and lua_setfenv() from C). This changed in Lua 5.2 to a local variable (technically, an “upvalue”) holding the global variables (by the name of _ENV). It may have been too much of a change to deal with it properly in LuaJIT, I don’t know as I haven’t looked into the guts of it.

                                                                                                    3. 1

                                                                                                      Why do you think this is a “bummer”? Lua 5.1 is perfectly capable, 5.2-3 have had very minor changes (unless it was something you really cared about like an integer type).

                                                                                                      Granted a generational gc could be significant for long running scripts, but my impression is most lua usage is not long running scripts. That’s my impression at least.

                                                                                                      1. 2

                                                                                                        How modules work is a bit more than “very minor change” so at the time, I didn’t feel any compelling reason to even use Lua 5.2. Lua 5.3 introduced 64-bit integers and byte packing functions that were compelling enough to switch to (plus a UTF-8 module and built in boolean operators). There are some minor annoyances to deal with (mainly around module definitions and some C API changes) but I was able to get the modules I’ve written to work with Lua 5.1 through Lua 5.3 (I’m still waiting for the official release of Lua 5.4 before updating my modules).

                                                                                                        1. 1

                                                                                                          It’s not that bad but it makes more work for people who write libraries for Lua. Currently most libs support both 5.1 and 5.3. There is even library that helps in writing compatible code. It will just get harder with every breaking change in Lua.

                                                                                                          1. 1

                                                                                                            my impression is most lua usage is not long running scripts.

                                                                                                            Isn’t this a bit of a circular argument? Lua isn’t used for long-running scripts because its GC isn’t that good; Lua doesn’t need a good GC because it’s not used for long-running scripts.

                                                                                                            1. 3

                                                                                                              We use long running Lua based (5.1) programs at work and we’ve had no issues with the GC. And by “long running” I mean “around six months or so between deployments [1].”

                                                                                                              [1] Due to several factors we don’t move fast and break things—the SLAs and updating procedures we have with the Monopolistic Phone Company precludes doing that.

                                                                                                        1. 1

                                                                                                          I hope Mint will gain traction, it looks like great alternative for Elm. It is much simpler and allows easy js interop.

                                                                                                          1. 2

                                                                                                            I love to play VimGolf using Kakoune. While golfing is mostly entertainment, optimal solutions are usually close to „real world” usage. It’s also wildly satisfying when you manage to beat Vim in it’s own game ;)

                                                                                                            1. 5

                                                                                                              It seems that people who prefer white/light backgrounds in terminal/editors are in minority. Personally I find light background less tiring for my eyes. I use Selenized color scheme.

                                                                                                              1. 4

                                                                                                                I do, Mastodon replaced Twitter for me. I mean I still follow people on Twitter but most of my activity is on Mastodon now. It’s smaller community but fortunately there is plenty of tech people and artists out there. My account if anyone is interested in nerdy rambling and generative art.