Skip to content

v1.7.0

Compare
Choose a tag to compare
@odino odino released this 20 Aug 15:15
· 226 commits to master since this release

A new minor release of ABS: always be shipping! 馃殺

ABS 1.7.0 introduces some syntactical sugar as well as improvements to the REPL, so let's check these changes out!

Reverse search in the REPL

You can now use ctrl+r to look for previously ran commands in the REPL (#265), have a look at this video:

asciicast

Number abbreviations

You can now abbreviate numbers through these letters (#269):

  • k (thousand)
  • m (million)
  • b (billion)
  • t (trillion)
1m / 2k # 500

The abbreviations are case-insensitive.

Output an exit message when terminating a script

You can now output a "goodbye" message when exiting a script (#266):

exit(1, "something nasty happened")

Earlier you had to explicitly echo right before exiting:

echo("something nasty happened")
exit(1)

This message argument to exit(...) is optional.

Improvements to str.replace(...)

We have made a couple of changes to improve the str.replace() function:

  • you do not have to specify the number of replacements anymore, as the default value is "all replacements": "abcabc".replace("a", "x") # "xbcxbc" (#268)
  • you can replace a list of characters now: "121".replace(["1", "2"], "x") # "xxx" (#267)

The ABS playground

This is not really specific to this version, but we launched a playground for you to test ABS code directly on the website:

image