
Ask HN: Example of annotated source code - chauhankiran
I was looking over Underscore.js library and found a link on annotated source code[0]. Do you know such type of annotated source code which you recommended to read?<p>[0].http:&#x2F;&#x2F;underscorejs.org&#x2F;docs&#x2F;underscore.html<p>Some more links:<p>Backbone.js - http:&#x2F;&#x2F;backbonejs.org&#x2F;docs&#x2F;backbone.html
jQuery 1.6 - http:&#x2F;&#x2F;robflaherty.github.io&#x2F;jquery-annotated-source&#x2F;
======
jonjacky
Small git clone in javascript:

[http://gitlet.maryrosecook.com/docs/gitlet.html](http://gitlet.maryrosecook.com/docs/gitlet.html)

Small Lisp interpreter in Python:

[http://khamidou.com/compilers/lisp.py/](http://khamidou.com/compilers/lisp.py/)

If you are interested in annotation formats other than side-by-side, many
Jupyter or IPython notebooks would qualify, for example Peter Norvig's
programming exercises:

[https://github.com/norvig/pytudes](https://github.com/norvig/pytudes)

~~~
lispm
>
> [http://khamidou.com/compilers/lisp.py/](http://khamidou.com/compilers/lisp.py/)

Lacks an actual description of the grammar/semantics of the implemented
language.

Should this work:

    
    
        ((lambda (foo) (+ foo 3)) 39)
    

or this

    
    
        (begin (define foo (lambda (a) (lambda (b) (+ a b)))) (define bar (foo 20)) (print (bar 22)))
    

> As you can see, it turns out its pretty easy to make your own interpreter

but of what language? If you don't document the language you are trying to
implement, we don't know what code should be valid. It's especially easy to
implement something if you don't say what you are trying to implement...

