Sunday, August 25, 2013

Frost! v.0.1.5

Frost project is not dead! I am now working in an IT company here in Brazil, so I don't have as much free time as I had before to work on this project... But still, here's a new version!

This language is now capable of reflection! You can inspect your global variables (using a special variable called globalList) and your functions (using functionList), and you can also insert code at runtime (using the :: operator).

I hope you like it!

Sunday, August 4, 2013

Frost! v.0.1.3

A new version of the Frost programming language interpreter is now available, again! :-)

This new version supports named array positions. With this you can define structs and objects as arrays!

var stack = {

    .sp 0,
    .data {nil},

    .push ^:[d, stack] {[stack.sp] = d;
        stack.sp = stack.sp + 1;

    .pop ^:stack {

        if(stack.sp == 0) {

        stack.sp = stack.sp - 1;

    .isEmpty ^:stack {
        return (stack.sp == 0);

Stack object!

// Using this stack object

// Push an integer
[~stack.push stack:stack d:10];

// Push a string
[~stack.push stack:stack d:"Hello!\n"];

// Push a function
[~stack.push stack:stack d:@main];

// Pop everything and then print...
var d;

while(![~stack.isEmpty stack:stack]) {

    d = [~stack.pop stack:stack].string;
    [print string:"%s\n" format:{d}];