Category: Uncategorized

Loci v1.4 Released

The latest version of the Loci compiler is now available. See the release notes for detailed information about what’s included. The main feature in this release is a brand new compiler diagnostics system with a rewritten lexer and parser. Here’s an example of errors from the old compiler:

And here’s how it looks with…

atoi() vs std::stringstream

I was recently asked to compare the functionality of atoi() and std::stringstream. Here’s the code:

And here’s the output: So it looks like the functionality of both is actually very similar (though note std::stringstream has many ways to modify its behaviour); unfortunately it seems the stream doesn’t set the result to zero when…