A few days ago I released a new minor version of the ABS programming language, 1.7.0, which adds some syntactic sugar as well as improvments to the REPL — let’s get to them!
Reverse search in the REPL through ctrl+r
You can type something in the REPL and, by pressing
ctrl+r, ABS will try to find the last command that
was executed that matches what you typed.
See it in action:
If you press
ctrl+r multiple times, the REPL will
walk its way back into the history to find the previous
command matching your input, until it reaches the end
of the history.
Easily my favorite, this feature allows you to append a suffix to a number in order to specify the “order of magnitude” of the number itself. Confused? It’s actually quite simple:
1 2 3 4
Suffixes are case-insensitive, so you can express
Improvements to some builtin functions
We’ve decided to ease using some of the standard functions:
you can now, for example, print a message before exiting
a script directly through the
Your code would have previously looked like:
1 2 3 4
while now you can simply do:
1 2 3
Similarly, we made it easier to use the
replace function on
strings: you can now omit the last argument (number of replacements),
with its default value being
-1 (no limit):
1 2 3 4 5
and you can now also specify a list of characters to replace:
Install ABS with a simple one-liner:
…and start scripting like it’s 2019!