Showing posts from June, 2010

Let's make a shit JavaScript interpreter! Part one.

Let's make a shit javascript interpreter! Part one. As a learning exercise, I've begun writing a javascriptECMAScript interpreter in python. It doesn't even really exist yet, and when it does it will run really slowly, and not support all js features.

So... let's make a "from scratch", all parsing, all dancing, shit interpreter of our very own!

Teaching something is a great way to learn. Also writing things on my blog always gets good 'comments', hints, tips, plenty of heart, and outright HATE from people. All useful and entertaining :)

Tokenising So to start with, we need something to turn the .js files into a list of tokens. This type of program is called a tokeniser.

From some javascript like this:
function i_can_has_cheezbrgr () {return 'yum';};Into a Token list something like this:

My javascript reading list over the last few months

Over the last few months I've been fairly deep into javascript land. Both in my full time job, and in most of my coding side projects - I've been mostly doing javascript. Of course, like most web programmers I've been dabbling in javascript over the years... but never so intensely. On the way I've been collecting a 'reading list' of videos, articles, books, and projects.

Here are some of the good links from the last few months.

Crockford on javascript videos:!+User+Interface+Blog%29

akihabara arcade:

canvas javascript games:

javascript 3d engine:

Aves Engine: HTML/JavaScript Game Engine (…