Posix

Philosophy

[Unix is my IDE – mkaz.blog]

Unix shell programming: the next 50 years

[src] and [discussion]

The good

  • Universal language for interoperability
  • Works with anything and is a medium between anything
  • Incredibly expressive (and often efficient) EDSL for stream processing
  • Interactive environment for interacting with the computer

bad

  • insane specification that isn't implemented correctly in *any* shell, not even worth diving into
  • too arbitrary - it has infinite flexibility and that prevents it from doing anything
  • too dynamic - everything in a shell script is dependent on global state, which prevents any form of optimization or program change
  • performance cannot scale because it cannot be optimized

Future

  • Smoosh :: fully formalize and implement the posix shell, showing differences between specifications across semantics
  • PaSH/POSH :: annotation languages as a high level specification interface for interactive programs, can be used as abstract models for command behaviors! This allows for better system specification that can actually be enforced (thinking of tools like Alloy here!)
  • static reasoning :: previous bullets name annotation languages that give us information about the shell - why not dynamically rewrite and inspect every shell command?

Utilities

[fuck] corrects your last console command.

[Cool, but obscure unix tools · Kristof Kovacs ✈️]aas a whole list of them. Worth poking around to see what might be useful - in the future!

[werc - A sane web anti-framework]

[Why I Use Suckless Tools - Xe]

[GitHub - casey/just: 🤖 Just a command runner]

[GitHub - sharkdp/hexyl: A command-line hex viewer]

Alternatives

[Oil shell] is a new Unix shell alternative that can be compiled and deployed as a native executable.

[Nushell] approaches the shell environment with structured data.

Configs

[Be careful editing bash scripts]:

 tracks the byte position in the file during execution and scans 
        lines accordingly. This example shows a user editing a line that has dangerous 
        consequences in the file - and even though some dangerous line is still 
        commented out, the byte offset of everything in the file changes, so the 
        dangerous piece of code is executed. Insane. It's okay to load your program 
        into memory before running it - really.
     
2022-11-02 6c4b6ca
2022-11-02 8292a44
2022-10-27 e352709
2021-09-22 52a677b
2021-09-21 7732812
2021-08-19 87d9551
2021-05-19 2d1f943
2021-01-20 35e386e
2021-01-18 af0b1e0
2021-01-15 d1b02d2
2021-01-15 4cf5fb9
2021-01-15 f2197ab
2021-01-15 5599273