ABS 1.3.2: making ABS faster with a simple fix

Hi there! Just a quick post to announce a bugfix release of the ABS programming language: 1.3.2 fixes a simple yet important performance bug dealing with short-circuit evaluation.

Short-circuiting is the amazing property some languages assign to boolean operators (eg. && or ||): if the first parameter in the expression is sufficient to determine the end value of the expression, the second value is not evaluated at all.

Take a look at this example:

false && sleep(a_really_long_time)

You wouldn’t expect the script to sleep since the first parameter in the expression is already falsy, thus the expression can never be truthy.

What about:

true || sleep(a_really_long_time)

Same thing, easy peasy.

Even more important, short-circuiting can be really useful in order to access a property when not sure whether it exists:

# we don't know whether X is null or what
x && x.property

Compare that to what you’d usually have to write:

# we don't know whether X is null or what
if x {
    return null

return x.property

You might be wondering what does all of this have to do with ABS: well, we were supposed to have fully working short-circuiting but, as it turns out, there was a bug preventing this from working. Your code would work and run successfully, but it would always evaluate all the arguments of an expression, even if it short-circuited. In some cases (like when using short-circuiting for accessing properties) your code would crash — defeating the whole purpose of short-circuiting.

Luckily, Ming fixed this in #227 and the fix got backported to the 1.3.x branch: 1.3.2 is served!

Now what?

Install ABS with a simple one-liner:

bash <(curl https://www.abs-lang.org/installer.sh)

…and start scripting like it’s 2019!

Hi there! I recently wrote an ebook on web application security, currently sold on leanpub, the Amazon Kindle store and gumroad.

It contains 160+ pages of content dedicated to securing web applications and improving your security awareness when building web apps, with chapters ranging from explaining how to secure HTTP cookies with the right flags to understanding why it is important to consider joining a bug bounty program.

Feel free to skim through some of the free chapters published on this blog and, if the content seems interesting enough to you, grab a copy on leanpub, the Amazon Kindle store, gumroad or simply checkout right down below!

Buy the Web Application Security ebook for $9.99

In the mood for some more reading?

...or check the archives.