ATS is an incredibly apt systems programming language; as it compiles to C it enjoys all the versatility that C does. In particular, this means that we get some flexibility from the ability to import from high-level languages as well as export to them.
I wanted to give a small demonstration of ATS, partly to document a little bit of how to use atspkg, partly to show how to (safely) beat C's performance in ATS, and partly an example of how to parse command-line arguments in ATS.
I came across some interesting benchmark results recently, and I figured I'd give a short writeup.
If you have followed the Haskell community much, you may have heard the phrase "programmable semicolon" in relation to monads. Of course, it is not obvious what is meant by such a thing, so I figured I'd write a short explanation for those already familiar with monads.
Here I present two ways to write Euler's totient function in ATS. First we write our primality check:
prev | next