Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Compare ATS2/Ajhc/Idris
### Versions
casper$ patsopt --version
Hello from ATS2(ATS/Postiats)!
ATS/Postiats version 0.0.6 with Copyright (c) 2011-2014 Hongwei Xi
casper$ ajhc --version
ajhc (e601dfc26abce79686e41c2609ed5beb7fd7f4d5)
compiled by ghc-7.6 on a x86_64 running linux
casper$ idris --version
Idris version
### Source codes
casper$ ls
HelloAjhc.hs hello_ats2.dats hello_idris.idr
casper$ cat hello_ats2.dats
main0 () = {
val () = println! ("Hello world!")
casper$ cat HelloAjhc.hs
main :: IO ()
main = putStrLn "Hello world"
casper$ cat hello_idris.idr
module Main
main : IO ()
main = putStrLn "Hello world"
### Compile
casper$ patscc -o hello_ats2 hello_ats2.dats
casper$ ajhc -o HelloAjhc HelloAjhc.hs
casper$ idris -o hello_idris hello_idris.idr
### Compare size (smaller is good)
casper$ size hello_ats2 HelloAjhc hello_idris
text data bss dec hex filename
3473 724 32 4229 1085 hello_ats2
14040 1373 528 15941 3e45 HelloAjhc
80690 968 32 81690 13f1a hello_idris
### Compare number of libraries depended on (smaller is good)
casper$ ldd hello_ats2 | wc -l
casper$ ldd HelloAjhc | wc -l
casper$ ldd hello_idris | wc -l
### Compare number of undefined symbols (smaller is good)
casper$ nm hello_ats2 | grep -c " U"
casper$ nm HelloAjhc | grep -c " U"
casper$ nm hello_idris | grep -c " U"

This comment has been minimized.

Show comment Hide comment

master-q Feb 19, 2014

Idris is not portable...


master-q commented Feb 19, 2014

Idris is not portable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment