ATS has record types which are like tuples but each item is referenced via a name. They closely approximate C structs and in the generated C code are represented in this way. The following uses a record to hold x and y values representing a point on a 2D plane: fun print_point (p: @{x= int, y= int}): void = printf("%d@%d\n",... more →
Earlier this year I posted about how I created my git mirror of the mozilla-central mercurial repository. I've been keeping a fork on github updated regularly since then that a number of people have started using. Users of my mirror have wanted to be able to keep up to date with the mercurial mozilla-central repository themselves, or add updates from... more →
Update 2011-11-08 - The steps to build Rust have changed since I wrote this post, there's now no need to build LLVM - it's included as a submodule in the Rust git repository and will automatically be cloned and built. A while ago I wrote a quick look at Rust post, describing how to build it and run some simple... more →
ATS allows overloading of functions where the function that is called is selected based on number of arguments and the type of the arguments. The following example shows overloading based on type to provide a generic print function: symintr myprint fun myprint_integer (a: int) = printf("%d\n", @(a)) fun myprint_double (a: double) = printf("%f\n", @(a)) fun myprint_string (a: string) = printf("%s\n",... more →
Last month I went down to Wellington to give a joint talk at the WDCNZ conference. The topic was "HTML Media: Where we are and where we need to go". The talk was shared between Nigel Parker, Mobile and Developer Evangelist for Microsoft, and myself. The conference was excellent with some great speakers and talks. Nigel and I covered using... more →