-
Predicates, Upgraded
This post describes the thought process and implementation of moving from predicates to patterns while keeping this feature consistent with the rest of the language and compatible with existing code. Minimalistic example: Background While implementing the language, I’ve added higher order functions that seemed “obvious” to have in a language: Observation What I’ve noticed after…
-
“if grep”, the bomb
Take 2 This is version two of the post, based on the feedback in this Reddit discussion. Some things need clarification. That includes the title which should be something like Why NGS has more ergonomic error handling than bash Background I was using bash and Python for “DevOps” scripting. Frustrated by both, I’ve started working…
-
The Journey to retry_assert()
I was annoyed quite a bit with bash (no, not because I was new, I used it professionally daily for 12 years before starting NGS). One of the red herrings was the constant need to reimplement small stupid things like retry() function for example (or copy it all the time across projects and adjust as…
-
UI in NGS
Before describing UI design in Next Generation Shell, let’s clarify which problems we are trying to solve. Problems Warming exercise: CLI is an interface that focuses on a single line, the Command Line. Stop for a moment to ponder that. Unusable Output and Missing Semantics Treating the output of a program as if it was…
-
main() in NGS
Background oilshell, added in-main builtin recently, allowing the following: OSH: YSH: Source: https://www.oilshell.org/blog/2023/09/release-0.18.0.html I commented about why not have main() that is invoked manually. That’s exactly what NGS does after all. There was a request for clarification and I decided to post it here. Python I’ll start with Python because frustration with Python and bash…
-
AWS CLI with NGS instead of jq
I’ve been using jq to process the output of AWS CLI for years. I suspect many others are doing the same. Let’s take a closer look at jq and its alternatives. jq The Good Why jq is so good? Because it’s domain specific; think sed, grep, and awk mixed together and not for text but…
-
The Unix Shell’s Humble If – Fixed
I’ve seen this post – https://thoughtbot.com/blog/the-unix-shells-humble-if and there was no place for comments. Here is my humorous response then. ( Below: removed added ) The Unix shell is often overlooked by software developers (many times for good reasons) more familiar with higher level (read normal / saner / better / actually designed and not accidental)…
-
The Shell vs the Web
Context I’m working on the UI of Next Generation Shell. While on it, I am comparing AWS Web Console to the shell with AWS CLI. Particularly I’m looking at UX. The aim of this comparison and the steps that will follow is to design the most effective UI that I can think of. The Obvious…
-
The Case for Semantics in the Shell
Should the shell have semantic understanding of external programs that it runs? By “semantic” I mean here specifically “understanding” of inputs and outputs to the level which allows something smarter than bytes and text manipulation. My claim is that semantic understanding by the shell is necessary in order to be productive. Let’s delve into the…
-
Filling The Matrix (Language Design)
Filling the matrix is a language design principle. I’ve coined the term because I am not aware of a proper term describing the principle below. Let me know if you are aware of a proper existing term; I assume I’m not the first thinking about this. Background Next Generation Shell, a shell I’m working on,…