New tutorial series on ATS
Nice to see ATS getting some attention. I look forward to the day lobsters needs an ATS tag :-)
A couple years ago I experimented with ATS and found it to be a huge slog getting my environment set up on Windows, so I saved my efforts and commited it to GitHub: ChadSki/ATS-Environment
The only external dependency is Cygwin, which is necessary to run the ATS transpiler. To compile the generated C code I opted to use the Tiny C Compiler instead of MinGW, so the final output of compilation is a native win32 program and doesn’t depend on Cygwin.
Note that I haven’t updated this repo in years, so the bundled ATS compiler is stale. But it still runs! I’m not sure how much ATS has changed since then.
Using TCC was a great idea. One of the nice things about a compiler that generates C code with a minimal runtime is it is (hopefully) quite portable. Building on Android, static binaries, etc becomes a bit easier.
Does ATS need a garbage collector to work properly? He mentions installing BDWGC
Wiki says “Garbage collection is not used unless explicitly stated with -D_ATS_GCATS”.
ATS supports linear types (the same type theory that Rust leverages) to ensure that objects are only used once, and deallocated after use.