Skip to main content


This is hilarious. A #Google engineer invented #zx to make command line scripting easier with #NodeJS, because at a certain point #shell scripts get too complicated and you need a Real #Programming Language.

github.com/google/zx/

This is exactly #Perl’s use case from thirty-six years ago. But the kids want #JavaScript everywhere and would rather it take more work to convert their ascended #Bash scripts to a vastly different syntax.

github.com/google/zx/issues/58…

#Unix #Linux #ProgrammingLanguages

This entry was edited (2 years ago)
in reply to Mark Gardner

...in every way I can think of that people used to slag on perl, JavaScript is worse.
in reply to Mark Gardner

I guess, but given how we're so "perl is awful!" in house it's annoyingly funny how we managed to reinvent it only worse.
in reply to Mark Gardner

Within ten minutes, the *official* #Google organizational account on #GitHub deleted my issue comment pointing out that #zx recapitulates #Perl

github.com/google/zx/issues/58…

The irony of GitHub not preserving a previous version of the issue with my comment intact is not lost on me.

This entry was edited (2 years ago)
in reply to Norm Tovey-Walsh

I’m not even mad though. It’s a perfect stack of hilarity on top of more hilarities. Clearly I’m very jaded.
This entry was edited (2 years ago)
in reply to Mark Gardner

I'm sure that's better for your mental health anyway, but it's still appalling.
in reply to Mark Gardner

By the way, never let it be said that I lack generosity. I just sent the developer a one-time $50 #sponsorship payment because I want to see a #Perl hacker mentioned in the #zx release notes
in reply to Mark Gardner

honestly I would've deleted it too, assuming all you wrote was a gripe that "perl already does this" (which, without the original text, is a fair assumption to make as your choice of paraphrase of the comment is that it "recapitulates perl"), then it's a comment that is not constructive in the scope of the project, and overall only detracts from the focus and development of the project. It's indistinguishable from spam.

You can of course dislike re-inventing the wheel, but you can also do that in your own spaces away from the project without mingling yourself in to stomp someone down for trying to make their personal work environment less of a bitch to deal with. Knowing it's a Google project, they're probably already suffering enough.

in reply to Vivi :flagAgender:​:flagPansexual:​ [Viridi Vix]

@vivi I did not write “#Perl already does this.” Snarky shitposting is for social media, not GitHub. You wrote a long response to something that you didn’t see.
in reply to Mark Gardner

I guess you blocked me because I can’t see your posts or reply from my home instance.

In response to woof.archandle.net/@vivi/11023…, I’m not a terrible person which is why I didn’t save my non-terrible comment in anticipation of its deletion. And I don’t care if you think I’m a terrible person—I’m Extremely Online enough for you to decide that for yourself if you want.


I'm going off the information you provided. If you wanted to convince me you weren't a terrible person, you could've pasted the actual comment :firShrug:

This entry was edited (2 years ago)
in reply to Mark Gardner

can you explain what the point of your comment is? I think that project is really silly but based solely from what you’ve said in this thread it sounds like you’ve just been trolling them. Sponsoring them to have a “perl hacker mentioned”? Really dude? If you don’t like it, ignore it.
in reply to nf

@nf I explained here: social.sdf.org/@mjgardner/1102…

You’re the second person to assume my deleted GitHub comment was snarky trolling: social.sdf.org/@mjgardner/1102…

I’m sorry I didn’t keep a copy, but I didn’t anticipate swift deletion of what I believed to be an informative comment there


@h Oh, I don’t deny it’s useful. And you’ll never catch me saying it’s bad to stick with what you know if it gets the job done—that’s one reason I continue to use #Perl.

My main point was that it’s less work converting #Bash to Perl than to #JavaScript.

The “kids want JavaScript everywhere” was admittedly a little snark directed at the “continuous amnesia” of prior art (not unique to #JS developers but their sheer number means it’s *really* prevalent) as described here: ufried.com/blog/continuous_amn…


@nf
in reply to Mark Gardner

so your comment was basically that the project needn’t exist because they can just use Perl? Do you really think that is constructive in that context, regardless of how politely it was phrased?
in reply to Norm Tovey-Walsh

And for the record, I say that as a #Perl fan. It was my goto scripting language for a lot of years. I've mostly moved to Python, mostly because the Perl build became brittle with respect to tools I used.
#perl
in reply to Mark Gardner

I haven't had any problems like that in a long time. I work with python in a virtual environment and use python 3.x exclusively and it just works. The fact that #Saxonica can now publish easily installable Python wheels for #SaxonC is icing on the cake.
in reply to Mark Gardner

Yeah. The phrase "in a long time" as distinct from "never" was an explicit choice 😀
in reply to Norm Tovey-Walsh

Reading your bio. I’m almost reluctant to point out that the same “worse is better” cycle applies to #markup languages.

social.sdf.org/@mjgardner/1102…

#JSON was a reaction to #XML, #Markdown was a reaction to #HTML, and both have since acquired layers to add back what they threw away.

This entry was edited (2 years ago)
in reply to Mark Gardner

I know man. I was there. Am there. You just gotta roll with the punches. And #XML was a reaction to #SGML for the web, so it all goes around and around.
#xml #SGML
in reply to Norm Tovey-Walsh

@ndw Everybody eventually ends up building the same thing, and when they finally get there, they find the #Lisp hackers waiting and asking, “What took you so long?”
in reply to Mark Gardner

@swaggboi Everyone loves #Lisp because you can build the entire universe from a small set of parts, but nobody uses it because very few problems require a bespoke universe
in reply to Mark Gardner

I always liked the idea of Lisp the same way I like the idea of Raku.. It’s just every time I’ve tried to sit down with it I never felt like I ‘got it.’
in reply to swagg boi

@swaggboi IMHO #RakuLang sits at the opposite end of the spectrum. It’s too damn big.

I know it’s supposedly okay to write “baby talk” Raku until you discover more of its syntax, just like with #Perl (as enshrined in the camel book). But the few times I’ve posted my work it’s quickly been met with sometimes ungentle “this is how it should be done” responses.

in reply to swagg boi

The way I understood how lisp, and in particular scheme, and eventually kernel are powerful is by writing my own small interpreter, and compiler.

@mjgardner

in reply to aziz

I think that’s how it was taught in University right? Write your own compiler
in reply to swagg boi

@swaggboi @aziz And you never do it again once you’re gainfully employed because the vast majority of #programming problems don’t require it and you don’t have the time social.sdf.org/@mjgardner/1102…

The only exception is when trying to get a job at places that fetishize #CompSci puzzles as an interview filter (cough cough, #Google and its admirers)


@swaggboi Everyone loves #Lisp because you can build the entire universe from a small set of parts, but nobody uses it because very few problems require a bespoke universe

in reply to Mark Gardner

@swaggboi @aziz You never do the whole thing again, but you might use ideas from that larger process later.

I recently realized that a utility class I had was isomorphic to a runtime environment and that the feature I was adding was essentially scope masking. That made it easy to think about and create.

in reply to Mark Gardner

Are your comments grounded in real experience with members of Lisp-related communities? Me and some people I know do use Lisp but not because they can build something from a small set of parts. On the contrary, Lisp systems have often been (and some still are) criticised for being too large. And I certainly disagree with “nobody uses it”. There are plenty of Emacs users, and plenty of those write notable amounts of Emacs Lisp. I do.
in reply to akater

@akater @swaggboi The “nobody” is a rough approximation compared to the “everybody” of #JavaScript, #Python, and the rest of the #TIOBE index top 20. I said it about #Lisp (number 29) from the perspective of its low-rated neighbor #Perl (number 25). Please don’t take it personally—we’re both on the same end of the long tail.

I didn’t intend to imply that you can’t or shouldn’t build large #Lisp things any more than #Perl things.

in reply to Mark Gardner

My rule of thumb: if a bash script is too long to fit in my editor without scrolling... it should probably be converted to Python.
in reply to Mark Gardner

In my Unix sysadmin handbook from about 15yrs ago, they make a big point about shell scripts beyond 50 lines really need to become Perl or Python. I am by no means a programmer but I tend to use that as a yardstick. I've seen a *tonne* of horrendous shell scripts that could use the lesson though.

Mark Gardner reshared this.

in reply to Jim

Yep. And I just found out that this isn’t even the first time the #JavaScript kiddies have done this.

github.com/shelljs/shelljs

“#ShellJS is a portable implementation of #Unix #shell commands on top of the #NodeJS API. […] say goodbye to those gnarly #Bash scripts!”

Of course, #PerlPowerTools also exists if you want Unix commands that work the same everywhere. It has exactly four dependencies to download from #CPAN outside of the #Perl core.

perlpowertools.com

This entry was edited (2 years ago)
in reply to Jim

@sullybiker dehydrated, possibly the most easy to use ACME/LetsEncrypt client is written in bash (2260 lines).
testssl, probably the easiest to use SSL/TLS tester is also written in bash (24041 lines).
Just sayin'. 😁
@Jim
in reply to grin

@grin @sullybiker The main problem with #shell scripts is that they’re glue for other commands that may or may not be installed and may or may not be the same as those used by the author.

It’s why #dehydrated has so much logic detecting the installed flavor of awk, sed, grep, diff, et al. “Portable” shell is like portable #C—riddled with brittle environmental tests (thus begetting things like #GNU #Autotools).

Even #testssl admitted defeat and can run from a #Docker #container now.

in reply to Mark Gardner

@grin A lot of that stuff is what makes them so difficult to decipher. I know they work well, I'm just glad I'm not the one that has to figure out what is going on 😀
@grin
in reply to Mark Gardner

@grin Even steam has a pretty beefy shell script launching it, I've had to poke around in it back in the early days and it always gave me a headache.
@grin
Unknown parent

mastodon - Link to source
Mark Gardner
@swaggboi Yep: github.com/google/zx/issues/58…
in reply to Mark Gardner

that's cool honestly! makes existing javascript developers able to write complicated scripts with shell commands quickly without first needing to learn another thing
in reply to MOVED to @h@besties.house

@h Oh, I don’t deny it’s useful. And you’ll never catch me saying it’s bad to stick with what you know if it gets the job done—that’s one reason I continue to use #Perl.

My main point was that it’s less work converting #Bash to Perl than to #JavaScript.

The “kids want JavaScript everywhere” was admittedly a little snark directed at the “continuous amnesia” of prior art (not unique to #JS developers but their sheer number means it’s *really* prevalent) as described here: ufried.com/blog/continuous_amn…

Unknown parent

mastodon - Link to source
Mark Gardner

@AlgoCompSynth @h “Readable” implies what the reader already knows how to read.

Your reply is to a post where I specifically said the point was about converting from #Bash.

If you don’t know how to read a #shell script you definitely don’t know how to convert it to another #programming language. You’ll be doubly handicapped if the new language is nothing like the old.

Unknown parent

mastodon - Link to source
Mark Gardner
I never said anything in this thread about the programming language marketplace and am completely uninterested in holy wars about tools. Everything is a trade-off.
This entry was edited (2 years ago)
Unknown parent

mastodon - Link to source
Zorro Notorious MEB 😡

@h

2. Programming language "success" is almost 100 percent driven by market factors other than quality of the programming language. "zig" may be objectively better than Rust in some ways but I am not expecting "zig" to become any more widely used than, say, Forth.

in reply to Cosmin

@cosmin Yay, another #Perl learner! Start here: learn.perl.org

Feel free to follow @Perl to send and receive posts among the Perl community here on the #fediverse.

Perl reshared this.

Unknown parent

mastodon - Link to source
Mark Gardner
@david_megginson Hail from this universe! Yours must be far away, it took almost three weeks before I saw your reply 😉