An example of porting ATS code

The following gzipped tarball contains a solution to Assignment 8 in a
course
I am teaching
(http://www.cs.bu.edu/~hwxi/academic/courses/Spring14/CS320.html):

http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring14/assignments/08/Wormlike-BF-solution.tgz

The C files in the tarball are generated from some ATS source. You need
GTK±2.0 and libgc to compile it:

make all_ported

I encourage you to give it a try.

My ATS source uses some ATS library code that are yet not publicly
available. However, the generated C
code can be compiled as long as ATS-includes and ATS-contrib-includes are
available. While this is anticipated,
seeing it as a reality is still quite exciting :slight_smile:

Cheers!

I was using tcc-0.9.25.

With tcc-0.9.26, the code can be compiled successfully!On Saturday, March 29, 2014 6:01:34 PM UTC-4, gmhwxi wrote:

Unfortunately, the code generated by tcc crashes :frowning:

On Saturday, March 29, 2014 5:52:45 PM UTC-4, gmhwxi wrote:

By the way, I just used TinyCC (tcc) to compile the C code in the tarball:

make PATSCC=tcc CC=tcc MYCCRULE=PORTABLE -f Makefile

It is really lightening fast!

Maybe this opens an avenue to using ATS as a scripting language :slight_smile:

On Saturday, March 29, 2014 3:53:51 PM UTC-4, gmhwxi wrote:

The following gzipped tarball contains a solution to Assignment 8 in a
course
I am teaching (
http://www.cs.bu.edu/~hwxi/academic/courses/Spring14/CS320.html):

http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring14/assignments/08/Wormlike-BF-solution.tgz

The C files in the tarball are generated from some ATS source. You need
GTK±2.0 and libgc to compile it:

make all_ported

I encourage you to give it a try.

My ATS source uses some ATS library code that are yet not publicly
available. However, the generated C
code can be compiled as long as ATS-includes and ATS-contrib-includes
are available. While this is anticipated,
seeing it as a reality is still quite exciting :slight_smile:

Cheers!

Unfortunately, the code generated by tcc crashes :(On Saturday, March 29, 2014 5:52:45 PM UTC-4, gmhwxi wrote:

By the way, I just used TinyCC (tcc) to compile the C code in the tarball:

make PATSCC=tcc CC=tcc MYCCRULE=PORTABLE -f Makefile

It is really lightening fast!

Maybe this opens an avenue to using ATS as a scripting language :slight_smile:

On Saturday, March 29, 2014 3:53:51 PM UTC-4, gmhwxi wrote:

The following gzipped tarball contains a solution to Assignment 8 in a
course
I am teaching (
http://www.cs.bu.edu/~hwxi/academic/courses/Spring14/CS320.html):

http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring14/assignments/08/Wormlike-BF-solution.tgz

The C files in the tarball are generated from some ATS source. You need
GTK±2.0 and libgc to compile it:

make all_ported

I encourage you to give it a try.

My ATS source uses some ATS library code that are yet not publicly
available. However, the generated C
code can be compiled as long as ATS-includes and ATS-contrib-includes are
available. While this is anticipated,
seeing it as a reality is still quite exciting :slight_smile:

Cheers!

By the way, I just used TinyCC (tcc) to compile the C code in the tarball:

make PATSCC=tcc CC=tcc MYCCRULE=PORTABLE -f Makefile

It is really lightening fast!

Maybe this opens an avenue to using ATS as a scripting language :)On Saturday, March 29, 2014 3:53:51 PM UTC-4, gmhwxi wrote:

The following gzipped tarball contains a solution to Assignment 8 in a
course
I am teaching (
http://www.cs.bu.edu/~hwxi/academic/courses/Spring14/CS320.html):

http://www.cs.bu.edu/~hwxi/academic/courses/CS320/Spring14/assignments/08/Wormlike-BF-solution.tgz

The C files in the tarball are generated from some ATS source. You need
GTK±2.0 and libgc to compile it:

make all_ported

I encourage you to give it a try.

My ATS source uses some ATS library code that are yet not publicly
available. However, the generated C
code can be compiled as long as ATS-includes and ATS-contrib-includes are
available. While this is anticipated,
seeing it as a reality is still quite exciting :slight_smile:

Cheers!