dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Javascript Compiler

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    150

    Javascript Compiler

    Since Google released their closure tool yesterday (as I'm sure most of you are aware). I thought I may as well release my tool which does the same thing, though on a smaller scale.

    Basically this was written last year to address the same issues as Google's tool, namely the lack of good optimising minifiers - all the existing ones just stripped white space very carefully, leaving space in when in doubt. Obviously this is by far the easiest way without full syntax parsing, but I didn't think it was good enough. Anyway, for my third yeah university project I wrote a tool called "yavascript", which did syntax tree based minification and optimisation, in the same way as Google's tools.

    The code was MOSTLY finished for the project hand-in, there are still many bugs and not many actual optimisations are implemented yet. I was planning to continue it and announce it when it was closer to being stable (or at least more bug free), but as Google have released their far superior product, I'm just saying that this exists because I want to (I don't expect anyone to use it).

    I did take a completely different approach to Google, introducing custom syntax based around the C pre-processor, so there was no way that you could use code meant for this without it, however like Google I wrote it so that you didn't need to compile before every test, you could run straight in the browser.

    Anyway, this was technically released months ago, but only on my personal site that not many people read, I'm just putting it out here now as a sort of swan song. The website contains more information, including the full write up from my project report.

    Website:

    http://yavascript.org/

    Comments would be appreciated, though as I said I'm just posting this for myself so I at least told people about the work I spent months on.

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    looks cool.
    the one question i had: why isn't it written in javascript?

    i think it would be a lot cooler if i could run this by visiting a page instead of running a download...

  3. #3
    Join Date
    May 2009
    Posts
    150
    I debated that at the time, I maybe should have written it in javascript but I wanted the speed, though I'm not even sure how much faster it really is. The core logic is actually based on JSLint so had a gone the JS route it would have probably taken me vastly less time to write.

    TBH I think the honest answer is I like C/C++ for applications and JS for websites, no real justifications involved.

    Edit:

    I should also mention this post I made: http://y-less.com/wordpress/?p=82

    It's a description of what the "Debug" functions found in the main compiler are for if you ever look in the code, again it's an incomplete feature but the idea is that it can produce code with massive amounts of debug information for you to work with.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles