<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Lisp on Momori Nakano</title><link>https://momori.dev/tags/lisp/</link><description>Recent content in Lisp on Momori Nakano</description><generator>Hugo -- 0.147.0</generator><language>en-us</language><lastBuildDate>Mon, 04 Mar 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://momori.dev/tags/lisp/index.xml" rel="self" type="application/rss+xml"/><item><title>Building a Lisp-like Language from Scratch in Rust</title><link>https://momori.dev/posts/building-a-lisp-like-language-from-scratch-in-rust/</link><pubDate>Mon, 04 Mar 2024 00:00:00 +0000</pubDate><guid>https://momori.dev/posts/building-a-lisp-like-language-from-scratch-in-rust/</guid><description>&lt;p>This post delves into building an interpreter for a Lisp-like language using Rust. No knowledge beyond Rust basics is required to follow this post.&lt;/p>
&lt;h2 id="inspiration-and-project-overview">Inspiration and Project Overview&lt;/h2>
&lt;p>Inspired by Stepan Parunashvili&amp;rsquo;s article &lt;a href="https://stopa.io/post/222">Risp (in (Rust) (Lisp))&lt;/a>, I created &lt;strong>lip&lt;/strong>, an interpreted language designed for logical operations with a Lisp-like syntax. This supports logical operations (not, and, or), branching (if expression), lambda functions, and variable definition.&lt;/p>
&lt;p>This post guides you through the process of building an interpreter, focusing on the core functionalities of tokenizing, parsing, and evaluating expressions. While it may sound complex, the process only requires basic Rust knowledge. The language we&amp;rsquo;ll build is &lt;strong>lp&lt;/strong>, a distilled version of lip designed for illustration. The &lt;a href="https://momori256.github.io/lip/lp/www/">live demo&lt;/a> of an lp interpreter is accessible via a browser, and the complete code is available on &lt;a href="https://github.com/momori256/lip">GitHub&lt;/a>.&lt;/p></description></item></channel></rss>