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.
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
GitHub - google/zx: A tool for writing better scripts
A tool for writing better scripts. Contribute to google/zx development by creating an account on GitHub.GitHub
This entry was edited (2 years ago)
Dan Sugalski
in reply to Mark Gardner • • •Mark Gardner
in reply to Dan Sugalski • • •Worse Is Better
dreamsongs.comDan Sugalski
in reply to Mark Gardner • • •Mark Gardner
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.
Add `sed` support · Issue #581 · google/zx
GitHubNorm Tovey-Walsh
in reply to Mark Gardner • • •Mark Gardner
in reply to Norm Tovey-Walsh • • •Norm Tovey-Walsh
in reply to Mark Gardner • • •Mark Gardner
in reply to Mark Gardner • • •Vivi :flagAgender::flagPansexual: [Viridi Vix]
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.
Mark Gardner
in reply to Vivi :flagAgender::flagPansexual: [Viridi Vix] • • •Vivi :flagAgender::flagPansexual: [Viridi Vix]
in reply to Mark Gardner • • •MOVED to @h@besties.house
in reply to Vivi :flagAgender::flagPansexual: [Viridi Vix] • • •Mark Gardner
in reply to MOVED to @h@besties.house • • •Mark Gardner
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.
Vivi :flagAgender::flagPansexual: [Viridi Vix]
2023-04-20 19:26:09
nf
in reply to Mark Gardner • • •Mark Gardner
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
Mark Gardner
2023-04-20 20:00:58
nf
in reply to Mark Gardner • • •Norm Tovey-Walsh
in reply to Mark Gardner • • •Norm Tovey-Walsh
in reply to Norm Tovey-Walsh • • •Mark Gardner
in reply to Norm Tovey-Walsh • • •How’s that working for you? xkcd.com/1987/
#xkcd
Python Environment
xkcdNorm Tovey-Walsh
in reply to Mark Gardner • • •Mark Gardner
in reply to Norm Tovey-Walsh • • •Norm Tovey-Walsh
in reply to Mark Gardner • • •Mark Gardner
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.
Mark Gardner
2023-04-20 16:08:16
Norm Tovey-Walsh
in reply to Mark Gardner • • •Mark Gardner
in reply to Norm Tovey-Walsh • • •Norm Tovey-Walsh
in reply to Mark Gardner • • •Mark Gardner
in reply to Norm Tovey-Walsh • • •wheel of reincarnation
catb.orgswagg boi
in reply to Mark Gardner • • •I’m sure by now you’ve seen…
xkcd.com/224/
Lisp
xkcdMark Gardner
in reply to swagg boi • • •Mark Gardner
in reply to Mark Gardner • • •swagg boi
in reply to Mark Gardner • • •Mark Gardner
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.
aziz
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
swagg boi
in reply to aziz • • •Mark Gardner
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)
Mark Gardner
2023-04-20 17:05:57
dr 🛠️🛰️📡🎧:blobfoxcomputer:
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.
akater
in reply to Mark Gardner • • •Mark Gardner
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.
BoredomFestival
in reply to Mark Gardner • • •BoredomFestival
in reply to Mark Gardner • • •Mark Gardner reshared this.
Jim
in reply to Mark Gardner • • •Jim
in reply to Mark Gardner • • •Mark Gardner reshared this.
Mark Gardner
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
GitHub - shelljs/shelljs: Portable Unix shell commands for Node.js
GitHubgrin
in reply to Jim • • •testssl, probably the easiest to use SSL/TLS tester is also written in bash (24041 lines).
Just sayin'. 😁
Mark Gardner
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.
Jim
in reply to Mark Gardner • • •Jim
in reply to Mark Gardner • • •Mark Gardner
Unknown parent • • •Add `sed` support · Issue #581 · google/zx
GitHubMOVED to @h@besties.house
in reply to Mark Gardner • • •Mark Gardner
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…
The continuous amnesia issue
www.ufried.comMark Gardner
Unknown parent • • •@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.
Mark Gardner
Unknown parent • • •Zorro Notorious MEB 😡
Unknown parent • • •@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.
Mozzarella Mommy
in reply to Mark Gardner • • •Mark Gardner
in reply to Mozzarella Mommy • • •Mark Gardner reshared this.
Richard
in reply to Mark Gardner • • •Cosmin
in reply to Mark Gardner • • •Mark Gardner
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.
Learn Perl - learn.perl.org
learn.perl.orgPerl reshared this.
Mark Gardner
Unknown parent • • •