Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Desktop Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    « Visual Studio 2010 Service Pack 1 released on MSDNThe best way to keep your settings? »
    comments

    In an attempt to overcome my perfectionism I've decided to open source my long term side project Machete for the world to see. Machete is my own dialect of the ECMAScript 5 standard or as it is more commonly called JavaScript.

    Features

    Cleaner lambda expressions:

    var succinct = \(x, y) x + y;
    var verbose = function (x, y) { return x + y; };
    

    First class iteration support with the foreach loop and generators.

    var numbers = generator {
        yield 1;
        yield 2;
        yield 3;
    };
    
    foreach (var n in numbers) {
        Output.write(n);
    }   
    
    foreach (var e in ["Array", " objects", " are", " iterable", "!"]) {
        Output.write(e);
    } 
    
    foreach (var c in "Strings are iterable!") {
        Output.write(c);
    }
    

    Implementation

    • The compiler is written in F# and uses the library FParsec.
    • The runtime is written in C# and is hosted by .NET.
    • It currently has over 400 tests with many more on the way.

    Machete is the product of almost a years worth of research, design, and coding. I have it hosted on GitHub so please stop by and fork the project. I would really love to up my test count dramatically and test cases from the community would be invaluable. Without further ado, the link to my repository.

    GitHub Repository For Machete

    5485 views
    InstapaperVote on HN

    8 comments

    Comment from: Thom [Visitor] Email · http://hotwoofy.com
    Thom Looks excellent, and very thorough.

    Is the emphasis on a full scripting environment for .NET, or is the engine also embeddable (and potentially sandboxable)?
    03/07/11 @ 17:23
    Comment from: chaospandion [Member] Email
    chaospandion @Thom - Hey, thanks for the kind words. As to your question, my goal is to make it a cinch to embed Machete into anything. I'm thinking it will be optionally sandboxable but nothing is set in stone.
    03/07/11 @ 18:40
    Comment from: Christiaan Baes (chrissie1) [Member]
    Christiaan Baes (chrissie1) Is it on nuget yet? Do you want us to setup a dedicated forum for it?
    Looks cool.
    03/08/11 @ 00:53
    Comment from: Christiaan Baes (chrissie1) [Member]
    Christiaan Baes (chrissie1) Do you have a twitter account?
    03/08/11 @ 01:20
    Comment from: Tahir Khalid [Member] Email
    Awesome, I wouldn't even know where to begin if I was to do something similar.

    Get some more articles up for this
    03/08/11 @ 04:04
    Comment from: chaospandion [Member] Email
    chaospandion chrissie1 - Is it on nuget yet? Do you want us to setup a dedicated forum for it?
    Looks cool.


    I wouldn't be against a dedicated forum but I'm not sure how popular it would be.

    chrissie1 - Do you have a twitter account?

    I don't currently have an account.

    kermit - Awesome, I wouldn't even know where to begin if I was to do something similar. Get some more articles up for this

    That is exactly what I thought until I actually started the project. :)
    03/08/11 @ 08:27
    Comment from: Senthil Kumar B [Visitor] · http://www.ginktage.com
    Senthil Kumar B Nice Work !!! . It would be nice if you share the link of GitHun where it is hosted...
    03/11/11 @ 22:50
    Comment from: chaospandion [Member] Email
    chaospandion @Senthil - I've made the link more prominent.
    03/13/11 @ 17:09

    Leave a comment


    Your email address will not be revealed on this site.

    To mislead the spambots.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)