6 ms·
Create your own programming language in JavaScript
- aoe 15y agoAre there any other good tutorials on creating a toy programming language? Something that teaches about lexers, parsers, etc.
- eterps 15y agoThese are my favorite resources: Compiler Construction: http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf The Elements of Computing Systems: http://amzn.to/GQycqj http://amzn.to/GQycqj MetaCompilers: http://www.bayfronttechnologies.com/mc_tutorial.html http://www.bayfronttechnologies.com/mc_tutorial.html How to Create Your Own Freaking Awesome Programming Language: http://createyourproglang.com/ http://createyourproglang.com/ Bootstrapping a simple compiler from nothing: http://www.rano.org/bcompiler.html http://www.rano.org/bcompiler.html
- fogus 15y agoCorrect me if I'm wrong, but wasn't "How to Create Your Own Freaking Awesome Programming Language" the motivation for CoffeeScript. That alone should be enough motivation for sending your money that way.
- rbxbx 15y agoYou're correct. That's why the first version was written in Ruby :)
- irahul 15y agoTo add to the list, Peter Norwig's lisp interpreter is a short, concise introduction to interpreters. http://norvig.com/lispy.html http://norvig.com/lispy.html http://norvig.com/lispy2.html http://norvig.com/lispy2.html
- zerd 15y agoAnother one I recommend, because it starts with codegen and works its way back: Writing a compiler in Ruby, bottom up: http://www.hokstad.com/compiler http://www.hokstad.com/compiler
- raganwald 15y agoMy (pricey) favourite is Lisp In Small Pieces: http://www.amazon.com/Lisp-Small-Pieces-Christian-Queinnec/dp/0521545668?tag=duckduckgo-d-20 http://www.amazon.com/Lisp-Small-Pieces-Christian-Queinnec/d... Note that Peter Norvig gives it a five-star review. (The affiliate link benefits DuckDuckGo.)
- RodgerTheGreat 15y agoYou must read JonesForth, a literate program which starts from x86 assembly and builds up a complete Forth environment: https://github.com/chengchangwu/jonesforth https://github.com/chengchangwu/jonesforth
- tomp 15y agoCheck out Andrej Bauer's Programming language Zoo for some simple languages implemented in OCaml. Although he focuses more on the implementation/runtime semantics than on syntax. http://andrej.com/plzoo/ http://andrej.com/plzoo/
- DanI-S 15y agoI love the idea of offering your own mini-course. Teaching is by far the fastest way of cementing your knowledge of a subject. It would be great if someone could create a platform /'app store' for providing stuff like this, free or otherwise.
- JocoProductions 15y agoI believe Udemy.com does very similar to this and has a wide variety of courses.
- DanI-S 15y agoThat's very cool, thanks. I'd heard the name before, but never checked it out.
- eberfreitas 15y agoThe guys from Envato just released a tutorial marketplace: http://marketplace.tutsplus.com/ http://marketplace.tutsplus.com/
- emeraldd 15y agoI ran through something like this a couple of years ago and found it to be one of the most entertaining side projects I had worked on in a long while. Scheme from Scratch - http://peter.michaux.ca/articles/scheme-from-scratch-introduction http://peter.michaux.ca/articles/scheme-from-scratch-introdu...
- leon_ 15y agoI bet he will be building some RPN language ... which is a rather boring task.
- MatthewPhillips 15y agoYou can also just fork one of the many that are out there. Makes it easier than starting from scratch (although I realize for some people that eliminates the fun part). I'm liking Sibilant a lot: http://sibilantjs.info http://sibilantjs.info
- wingspan 15y agoWhy redirect from nathansuniversity.com to nathansuniversity.appspot.com? Shouldn't it be the other way around?
- dbh937 15y agoHe might think he'll get a lot of traffic, so google's servers would help.
- spacemanaki 15y agoThis is also starting in 3 weeks: http://www.udacity.com/overview/Course/cs262 http://www.udacity.com/overview/Course/cs262
- dbh937 15y agoThats learning about different programming languages... Not creating your own.
- MaxGabriel 15y agoCheck the syllabus; you create a Javascript/HTML parser and learn about syntax trees, grammars, etc. So the content will be similar to creating your own programming language.
- spacemanaki 15y agoBoth of these are basically introductory Programming Languages classes (with a capital P and L, in other words the study of programming languages themselves). I'm not really sure how you could create your own language without learning about different languages.
- bliss 15y agoi created a programming language of sorts in javascript, it was awful to code in (stored code as strings and used eval to run everything), but it did work - it is used for creating macros on an in-house billing system and only worked under ie6 trusted (which was the mandated browser) - more modern browsers balked at the cross site scripting exploit it took advantage of, but it was pretty useful way to deploy batch scripts as a bookmark. will share if anyone dares!
- cconroy 15y agoI like his teaching style. To get a sense for yourself check out http://nathansjslessons.appspot.com http://nathansjslessons.appspot.com where he covers functions as values, closures, and CSP in javascript. I dunno about you guys but I seem to spend almost all my professional time programming in javascript these days. This is perfect!
- jhuni 15y agoWhy build a programming language in a language other then Lisp?