# Small demos for ATS2

**URL:** <https://discourse.ats-lang.org/t/small-demos-for-ats2/179>\
**Category:** Google Group\
**Created:** [April 2, 2014, 7:08pm UTC](https://discourse.ats-lang.org/t/small-demos-for-ats2/179 "2014-04-02T19:08:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [April 2, 2014, 7:08pm UTC](https://discourse.ats-lang.org/t/small-demos-for-ats2/179/1 "2014-04-02T19:08:38Z")

</div>

FYI.

I created the following on-line directory to hold some small demos for ATS.

[http://www.ats-lang.org/COMPILED/](http://www.ats-lang.org/COMPILED/).

There are two subdirectory:

doc/  
utils/

There is some JS code generated from ATS source in doc/. For instance, here  
is  
an analog clock:

[http://www.ats-lang.org/COMPILED/doc/PROJECT/SMALL/JSclock/myclock1.html](http://www.ats-lang.org/COMPILED/doc/PROJECT/SMALL/JSclock/myclock1.html)

The source code for the clock can be found at:

[https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/JSclock](https://github.com/githwxi/ATS-Postiats/tree/master/doc/PROJECT/SMALL/JSclock)

There is also C code generated from ATS source in doc/. To run the C code,  
you can use  
the sccripts in the following directory:

[http://www.ats-lang.org/COMPILED/utils/](http://www.ats-lang.org/COMPILED/utils/)

For instance, you can execute the command-line below to view a timer:

./wgetccrun\_gtk3.sh  
[http://www.ats-lang.org/COMPILED/doc/PROJECT/SMALL/gtkcairotimer/mytimer1-all\_dats.c](http://www.ats-lang.org/COMPILED/doc/PROJECT/SMALL/gtkcairotimer/mytimer1-all_dats.c)

You need tcc and GTK±3.0 on the machine you use (in addition to having  
ATS2 properly installed).

Cheers!
