diff options
Diffstat (limited to 'soplt.html')
| -rw-r--r-- | soplt.html | 180 |
1 files changed, 103 insertions, 77 deletions
@@ -1,96 +1,122 @@ <!DOCTYPE html> <html> -<head> - <title>Summer of PLT</title> - <meta property="article:published_time" content="2026-05-10"> - <script src="article.js"></script> -</head> -<body> - <article> - <header></header> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link rel="icon" href="static/Logo.svg" type="image/svg+xml"> + <link rel="stylesheet" href="article.css"> - <p>Looking for a summer coding project? Try making a programming language!</p> - <p>I think that every programmer, new or experienced, could benefit from understanding a little bit about how the languages they use daily actually work.</p> - <p>As such, this is my collection of resources that I used to teach myself a little bit of Programming Language Theory last summer, which concluded in my creation of <a href="https://github.com/bluedragon1221/ci">CI lisp</a>.</p> - <p>I'm planning on doing something similar this summer, so I figured I'd invite other people to try a 'Summer of PLT' too.</p> - <p class="comment">Disclaimer: I'm just a guy with no formal education in PLT. Like <a href="https://danilafe.com/blog/i_love_programming_languages">Daniel Fedorin said</a>, I just <em>love the field of programming languages</em>.</p> + <title>Summer of PLT</title> + </head> + <body> + <article class="markdown-body"> + <header> + <div class="header-top"> + <a href="writing.html" class="header-logo-link"></a> + <div class="header-info"> + <h1>Summer of PLT</h1> + <time datetime="2026-05-10">Published May 05, 2026</time> + </div> + </div> + <hr> + </header> - <div id="toc"></div> + <p>Looking for a summer coding project? Try making a programming language!</p> + <p>I think that every programmer, new or experienced, could benefit from understanding a little bit about how the languages they use daily actually work.</p> + <p>As such, this is my collection of resources that I used to teach myself a little bit of Programming Language Theory last summer, which concluded in my creation of <a href="https://github.com/bluedragon1221/ci">CI lisp</a>.</p> + <p>I'm planning on doing something similar this summer, so I figured I'd invite other people to try a 'Summer of PLT' too.</p> + <p class="comment">Disclaimer: I'm just a guy with no formal education in PLT. Like <a href="https://danilafe.com/blog/i_love_programming_languages">Daniel Fedorin said</a>, I just <em>love the field of programming languages</em>.</p> - <h2 id="read">Read a Book</h2> - <p> - If you're new to the field of programming languages, my first piece of advice is to read Crafting Interpreters! - <span style="color: #666">(or at least the first section, "A Treewalking Interpreter")</span> - In my opinion, there is no better way to break into the field of PLT than by reading Bob Nystrom's book on the subject: <a href="https://craftinginterpreters.com">Crafting Interpreters</a>. - There's also a free HTML version on his site if you don't feel like paying money. - </p> + <h2>Table of Contents</h2> + <ul> + <li><a href="#read">Read a Book</a></li> + <li><a href="#lisp">Make a Lisp</a></li> + <li><a href="#next">What next?</a></li> + <li><a href="#lambda">Lambda Calculus</a></li> + <li><a href="#monads">Monadic IO</a></li> + <li><a href="#sugar">Syntactic Sugar</a></li> + <li><a href="#chompchomp">Bytecode VM</a></li> + <li><a href="#cas">Make a CAS (?)</a></li> + <li><a href="#no">Try something else</a></li> + <li><a href="#contact">Contact</a></li> + </ul> - <p>After that, I would suggest looking into Lisp.</p> + <h2 id="read">Read a Book</h2> + <p> + If you're new to the field of programming languages, my first piece of advice is to read Crafting Interpreters! + <span style="color: #666">(or at least the first section, "A Treewalking Interpreter")</span> + In my opinion, there is no better way to break into the field of PLT than by reading Bob Nystrom's book on the subject: <a href="https://craftinginterpreters.com">Crafting Interpreters</a>. + There's also a free HTML version on his site if you don't feel like paying money. + </p> - <h2 id="lisp">Make a Lisp</h2> - <p>Lisp is one of the foundational language of PLT. My advice to anyone trying to start in this field would be to make a Lisp. Its minimal syntax makes parsing and interpreting much easier.</p> - <p>For a nice overview (and a bit of history), check out the Wikipedia page on Lisp: <a href="https://en.wikipedia.org/wiki/Lisp_(programming_language)">Lisp (programming language)</a>.</p> - - <p>Before making your lisp, it would probably be good if you knew Lisp. Here's a good resource for that: <a href="https://lisp-lang.org/learn/getting-started">lisp-lang.org</a>.</p> - <p class="comment">Alternatively, you could consider going down the Emacs rabbit hole to teach yourself lisp. In the Emacs environment, you'll quickly gain proficiency with the parentheses, but you'll probably lose at least a few weeks in the process.</p> + <p>After that, I would suggest looking into Lisp.</p> - <p>Theory-wise, I would recommend reading the original John McCarthy Lisp paper (be prepared for dense academic writing though): <a href="https://www.cs.tufts.edu/~nr/cs257/archive/john-mccarthy/recursive.pdf">Recursive Functions of Symbolic Expressions and Their Computation by Machine</a>.</p> - <p>Additionally, many suggest the book <a href="https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/index.html">Structure and Interpretation of Computer Programs</a>, which also includes some </p> + <h2 id="lisp">Make a Lisp</h2> + <p>Lisp is one of the foundational language of PLT. My advice to anyone trying to start in this field would be to make a Lisp. Its minimal syntax makes parsing and interpreting much easier.</p> + <p>For a nice overview (and a bit of history), check out the Wikipedia page on Lisp: <a href="https://en.wikipedia.org/wiki/Lisp_(programming_language)">Lisp (programming language)</a>.</p> - <p>The C2 lisp rant is also a fun read (but by no means required): <a href="https://wiki.c2.com/?LostInaSeaofParentheses">Lost Ina Seaof Parentheses</a>.</p> + <p>Before making your lisp, it would probably be good if you knew Lisp. Here's a good resource for that: <a href="https://lisp-lang.org/learn/getting-started">lisp-lang.org</a>.</p> + <p class="comment">Alternatively, you could consider going down the Emacs rabbit hole to teach yourself lisp. In the Emacs environment, you'll quickly gain proficiency with the parentheses, but you'll probably lose at least a few weeks in the process.</p> - <p>If you want more of a guided, handhold-y tutorial for making a lisp clone, I can only recommend <a href="https://github.com/kanaka/mal">mal - Make a Lisp</a>. I personally have not gone through it, but I've heard good things.</p> - <p class="comment">Alternatively, ask an LLM to help you learn how programming languages work. Just make sure that you're actually learning, not just copying whatever it says to do. Try something like "Don't give me any code, just explain to me..."</p> + <p>Theory-wise, I would recommend reading the original John McCarthy Lisp paper (be prepared for dense academic writing though): <a href="https://www.cs.tufts.edu/~nr/cs257/archive/john-mccarthy/recursive.pdf">Recursive Functions of Symbolic Expressions and Their Computation by Machine</a>.</p> + <p>Additionally, many suggest the book <a href="https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/index.html">Structure and Interpretation of Computer Programs</a>, which also includes some</p> - <h2 id="next">What next?</h2> - <p>After you make your lisp, you can use it as a playground for more ideas in the field of PLT.</p> + <p>The C2 lisp rant is also a fun read (but by no means required): <a href="https://wiki.c2.com/?LostInaSeaofParentheses">Lost Ina Seaof Parentheses</a>.</p> - <h3 id="lambda">Lambda Calculus</h3> - <p> - If you find yourself seeking more of the theory-side of PLT, consider learning Lambda Calculus and Church Encoding and implementing them in your lisp! - </p><p> - There's tons of resources on Lambda Calculus, but you can't go wrong with a skim of Alonzo Church's original book on the subject, <a href="https://compcalc.github.io/public/church/church_calculi_1941.pdf">The Calculi of Lambda-Conversion</a> - </p><p>Or you don't feel up to reading 1940s academic rhetoric, the Wikipedia page on Lambda Calculus is nice: <a href="https://en.wikipedia.org/wiki/Lambda_calculus">Lambda calculus</a> - </p> + <p>If you want more of a guided, handhold-y tutorial for making a lisp clone, I can only recommend <a href="https://github.com/kanaka/mal">mal - Make a Lisp</a>. I personally have not gone through it, but I've heard good things.</p> + <p class="comment">Alternatively, ask an LLM to help you learn how programming languages work. Just make sure that you're actually learning, not just copying whatever it says to do. Try something like "Don't give me any code, just explain to me..."</p> - <h3 id="monads">Monadic IO</h3> - <p>Also on the theory-heavy side, you could learn about Haskell's system for safe IO operations which use monads.</p> - <p>This paper on the subject (discovered on the Haskell wiki) is a pretty dense, but has all of the foundational ideas for Monadic IO in Haskell: <a href="https://web.archive.org/web/20140303101716/http://www-fp.dcs.st-and.ac.uk/~kh/papers/io-tutorial/io-tutorial.html">Monadic I/O in Haskell 1.3</a>.</p> - <p>The foundational ideas of Monads are well explained in <a href="https://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf">Monads for functional programming</a> by Phillip Wadler. I found this paper easier to understand than the prior one, and it gives you a great intuition for <em>why</em> Monads are cool. Definitely read this one!</p> + <h2 id="next">What next?</h2> + <p>After you make your lisp, you can use it as a playground for more ideas in the field of PLT.</p> - <h3 id="sugar">Syntactic Sugar</h3> - <p> - If you're looking more into the practical side of PLT, you could look into adding syntactic sugar to your lisp. - One source to look into might be David Wheeler's <a href="https://dwheeler.com/readable/sweet-expressions.html">Sweet Expressions</a>. - </p> + <h3 id="lambda">Lambda Calculus</h3> + <p> + If you find yourself seeking more of the theory-side of PLT, consider learning Lambda Calculus and Church Encoding and implementing them in your lisp! + </p><p> + There's tons of resources on Lambda Calculus, but you can't go wrong with a skim of Alonzo Church's original book on the subject, <a href="https://compcalc.github.io/public/church/church_calculi_1941.pdf">The Calculi of Lambda-Conversion</a> + </p><p>Or you don't feel up to reading 1940s academic rhetoric, the Wikipedia page on Lambda Calculus is nice: <a href="https://en.wikipedia.org/wiki/Lambda_calculus">Lambda calculus</a></p> - <h3 id="chompchomp">Bytecode VM</h3> - <p> - If you're interested in becoming more like the "real programming languages", you could look into writing a bytecode VM for your language. - It's a big undertaking, but it's outlined very well in the second section of Crafting Interpreters, <a href="https://craftinginterpreters.com/a-bytecode-virtual-machine.html">A Bytecode Virtual Machine</a>. - </p> + <h3 id="monads">Monadic IO</h3> + <p>Also on the theory-heavy side, you could learn about Haskell's system for safe IO operations which use monads.</p> + <p>This paper on the subject (discovered on the Haskell wiki) is a pretty dense, but has all of the foundational ideas for Monadic IO in Haskell: <a href="https://web.archive.org/web/20140303101716/http://www-fp.dcs.st-and.ac.uk/~kh/papers/io-tutorial/io-tutorial.html">Monadic I/O in Haskell 1.3</a>.</p> + <p>The foundational ideas of Monads are well explained in <a href="https://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf">Monads for functional programming</a> + by Phillip Wadler. I found this paper easier to understand than the prior one, and it gives you a great intuition for <em>why</em> + Monads are cool. Definitely read this one!</p> - <h3 id="cas">Make a CAS (?)</h3> - <p> - If you're a math nerd (like me), you could look into writing a CAS hosted in your lisp. - For me, this meant writing a deep pattern matching system and substitution engine. - Definitely a fun project! - </p> + <h3 id="sugar">Syntactic Sugar</h3> + <p> + If you're looking more into the practical side of PLT, you could look into adding syntactic sugar to your lisp. + One source to look into might be David Wheeler's <a href="https://dwheeler.com/readable/sweet-expressions.html">Sweet Expressions</a>. + </p> - <h3 id="no">Try something else</h3> - <p>Maybe you're sick of lisp? That's fine! There's lots of other PLT stuff that might suit your fancy:</p> - <ul> - <li><p>Make a Forth -- Sorry, I don't have very much information on this one, but stack-based languages are pretty neat!</p></li> - <li><p>Make a Python -- You can extend the ideas of lexing and parsing to a more complicated syntax, leading to more of a Python-like experience</p></li> - </ul> + <h3 id="chompchomp">Bytecode VM</h3> + <p> + If you're interested in becoming more like the "real programming languages", you could look into writing a bytecode VM for your language. + It's a big undertaking, but it's outlined very well in the second section of Crafting Interpreters, <a href="https://craftinginterpreters.com/a-bytecode-virtual-machine.html">A Bytecode Virtual Machine</a>. + </p> - <h2 id="contact">Contact</h2> - <p>Did I interest you in a 'Summer of PLT'? Let me know! I'd love to see some toy lisps this summer!</p> + <h3 id="cas">Make a CAS (?)</h3> + <p> + If you're a math nerd (like me), you could look into writing a CAS hosted in your lisp. + For me, this meant writing a deep pattern matching system and substitution engine. + Definitely a fun project! + </p> - <footer> - <hr> - <p class="comment">Discuss on <a href="https://news.ycombinator.com/item?id=48087351">Hacker news</a> or <a href="https://bsky.app/profile/cwilliams1221.bsky.social/post/3mljk2zarjc2h">Bluesky</a></p> - </footer> - </article> -</body> -</html>
\ No newline at end of file + <h3 id="no">Try something else</h3> + <p>Maybe you're sick of lisp? That's fine! There's lots of other PLT stuff that might suit your fancy:</p> + <ul> + <li><p>Make a Forth -- Sorry, I don't have very much information on this one, but stack-based languages are pretty neat!</p></li> + <li><p>Make a Python -- You can extend the ideas of lexing and parsing to a more complicated syntax, leading to more of a Python-like experience</p></li> + </ul> + + <h2 id="contact">Contact</h2> + <p>Did I interest you in a 'Summer of PLT'? Let me know! I'd love to see some toy lisps this summer!</p> + + <footer> + <hr> + <p class="comment">Discuss on <a href="https://news.ycombinator.com/item?id=48087351">Hacker news</a> + or <a href="https://bsky.app/profile/cwilliams1221.bsky.social/post/3mljk2zarjc2h">Bluesky</a></p> + </footer> + </article> + </body> +</html> |
