Hacker News new | ask | show | jobs
by DonHopkins 431 days ago
I'll update my examples when your examples of how it's been fixed don't use the same arcane syntax and semantics as the 48 year old Bourne shell. That's the whole point, which you're still missing.

> $ bash -c '[ $((1 + 1)) = 2 ]; echo $?'

Not even Perl uses that much arcane punctuation to test if 1 + 1 = 2. As if [] isn't enough, you've got to throw in two more levels of (()), plus enough grawlix profanity for a Popeye comic strip. And people complain Lisp has too many parens. Sheez.

https://en.wikipedia.org/wiki/Grawlix

There's even an emoji for Unix shell syntax:

https://www.compart.com/en/unicode/U+1F92C

1 comments

What are good shells in your opinion?
I prefer ITS DDT (aka HACTRN), with its built-in PDP-10 assembler and disassembler, that lets you do things like your login file customizing your prompt in assembly code to print the time by making system calls, without actually spawning any sub-jobs to merely print the time:

https://gunkies.org/wiki/ITS_DDT_Guide

  ..PROMPT
      holds the instruction which DDT uses to type out a "*".
      You can replace it with any other instruction.
      To use "%" instead of "*", deposit $1#%$> in that location
      ($> to avoid clobbering the opcode without having 
      to know what it is)
If you have to use arcane syntax and grawlix profanity, you should at least have direct efficient access to the full power of the CPU and operating system.

https://en.wikipedia.org/wiki/Incompatible_Timesharing_Syste...

https://en.wikipedia.org/wiki/Dynamic_debugging_technique

https://web.archive.org/web/20061011004003/http://www.sigfs....

https://its.victor.se/wiki/luser

https://www.hactrn.net/sra/alice/alices.pdp10

https://gunkies.org/wiki/Incompatible_Timesharing_System

(I recognize that photo I took of MIT-MC at the MIT-AI Lab!)

https://gunkies.org/wiki/File:Mit-mc.jpg

Even the Apple ][ Integer Basic monitor ROMs had a build-in mini assembler and disassembler.

https://www.ldx.ca/notes/apple2-notes.html

I keep submitting PR’s to get my assembler extensions in Fish and ZSH but so far no avail. Ideally all scripting should be done in single-clock-cycle assembly statements.

I mean it makes write-only languages like Perl look like beautiful prose but it’s hard to argue about efficiently setting the 20 environment variables used by my terraform jobs with a mere 20 clock cycles. It may seem silly but every clock cycle truly matters.

it's not silly! <3
rc and 9front's philosophy. Unix, but better and removing all the cruft.