<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>rust on Azrea Amis</title><link>/tags/rust/</link><description>Recent content in rust on Azrea Amis</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</copyright><lastBuildDate>Mon, 21 Apr 2025 10:45:30 +0200</lastBuildDate><atom:link href="/tags/rust/index.xml" rel="self" type="application/rss+xml"/><item><title>Compiling Forsp Stacklessly</title><link>/posts/2025/04/21/compiling-forsp-stacklessly/</link><pubDate>Mon, 21 Apr 2025 10:45:30 +0200</pubDate><guid>/posts/2025/04/21/compiling-forsp-stacklessly/</guid><description>Forsp is fascinating language billed as a combination of Lisp and Forth. It&amp;rsquo;s stack based, but features easy idiomatic access to a local environment. This gives you the simplicity of Forth, but offers an &amp;ldquo;escape hatch&amp;rdquo; out of stack hell. Code that would require complicated stack/value shuffling in Forth can instead name the values and manipulate them in a way more natural to Lisp programmers. Forsp is also neither call by value nor call by name, but instead call by push value, though I&amp;rsquo;m not entirely clear on why this is interesting as I haven&amp;rsquo;t read the paper yet.</description></item><item><title>Ironic Space Lisp Part 9</title><link>/posts/2019/08/29/ironic-space-lisp-part-9/</link><pubDate>Thu, 29 Aug 2019 14:05:09 -0700</pubDate><guid>/posts/2019/08/29/ironic-space-lisp-part-9/</guid><description>It&amp;rsquo;s been a long time since I last worked on ISL, mostly because I got distracted by other projects and languages: things like the flows project, or Clojure. Also, writing futures code in Rust is painful. Recently, async-await syntax got released on Rust nightly, which makes async code much easier to write.
When I was last working on the project, I was working on a local variables feature. VM operations to allow storing and loading local variables linked to the frame stack, and later, support in the compiler.</description></item><item><title>Pipeline Operators</title><link>/posts/2018/11/03/pipeline-operators/</link><pubDate>Sat, 03 Nov 2018 19:28:01 -0700</pubDate><guid>/posts/2018/11/03/pipeline-operators/</guid><description>Pipeline &amp;ldquo;operators&amp;rdquo; or &amp;ldquo;threading&amp;rdquo;1 constructs are interesting language constructs. They are an acknowledgement that functional code can be a little obtuse. They reorient (or rewrite) functional code so it looks more like a &amp;ldquo;dataflow&amp;rdquo;. Particularly of Lisps, but also of some other functional languages, execution moves from the inside of expressions to the outside in a way that&amp;rsquo;s not particularly natural feeling. It&amp;rsquo;s a real source of the difficulty people express when reading functional code.</description></item><item><title>Ironic Space Lisp Part 8</title><link>/posts/2018/09/20/ironic-space-lisp-part-8/</link><pubDate>Thu, 20 Sep 2018 13:21:53 -0700</pubDate><guid>/posts/2018/09/20/ironic-space-lisp-part-8/</guid><description>&lt;p>It&amp;rsquo;s been a while since I posted progress on ISL, and that is mostly my fault.
Most of this time was spent making maintenance, like documentation, but also
trying to get the self hosted interpreter working and self hosting. That was a
challenge, and also my fault.&lt;/p></description></item><item><title>Ironic Space Lisp Part 7</title><link>/posts/2018/08/27/ironic-space-lisp-part-7/</link><pubDate>Mon, 27 Aug 2018 15:56:11 -0700</pubDate><guid>/posts/2018/08/27/ironic-space-lisp-part-7/</guid><description>Let&amp;rsquo;s talk about the VM internals. I&amp;rsquo;ve written a compiler for ISL, and implemented functions at the same time. This is not a mistake or an over-reach, rather a natural progression. To the VM, what is a function? The VM doesn&amp;rsquo;t have a strong concept of &amp;ldquo;functions&amp;rdquo;, or even of procedures. It has the Call and Return operations. These operations are the only way to manipulate the frame stack in a meaningful way: Call pushes an address to the frame stack, jumping to it, while Return pops an address, returning to the caller.</description></item><item><title>Ironic Space Lisp Part 6</title><link>/posts/2018/08/22/ironic-space-lisp-part-6/</link><pubDate>Wed, 22 Aug 2018 01:56:10 -0700</pubDate><guid>/posts/2018/08/22/ironic-space-lisp-part-6/</guid><description>&lt;p>Since last time, I did two things: switched from &lt;code>error_chain&lt;/code> to &lt;code>failure&lt;/code>, and
refactored with the visitor pattern. They took about the same amount of time,
and the refactor is much more interesting. I briefly touch on an issue I
encountered with &lt;code>failure&lt;/code>, but I&amp;rsquo;d rather discuss the refactor.&lt;/p></description></item><item><title>Ironic Space Lisp Part 5</title><link>/posts/2018/08/19/ironic-space-lisp-part-5/</link><pubDate>Sun, 19 Aug 2018 20:44:24 -0700</pubDate><guid>/posts/2018/08/19/ironic-space-lisp-part-5/</guid><description>Let&amp;rsquo;s talk about environmental bindings. I&amp;rsquo;m taking the unusual (I think) approach of sharing environment bindings code between the VM and the interpreter. Unfortunately, I wrote the environment code at the same time as the VM, and fit the code a little too closely to the requirements of the VM, and didn&amp;rsquo;t think enough about what the interpreter would require. In the process of writing the interpreter, I encountered a strong disconnect between the semantics that I wanted and the semantics I had.</description></item><item><title>Operators</title><link>/posts/2018/08/15/operators/</link><pubDate>Wed, 15 Aug 2018 16:21:39 -0700</pubDate><guid>/posts/2018/08/15/operators/</guid><description>I recently started thinking about operators and math in programming languages. This is at least partly inspired by the programming language I&amp;rsquo;m making right now, but I&amp;rsquo;ll get to that later. It&amp;rsquo;s also inspired, in some sense, by the tutorials I was reading while trying to successfully parse my programming language. I didn&amp;rsquo;t find a tutorial specifically for what I was trying to do, which was fair, but I did find tutorials on parsing other more &amp;ldquo;normal&amp;rdquo; languages or more C-like languages, and it got me thinking.</description></item><item><title>Ironic Space Lisp Part 4</title><link>/posts/2018/08/12/ironic-space-lisp-part-4/</link><pubDate>Sun, 12 Aug 2018 00:41:11 -0700</pubDate><guid>/posts/2018/08/12/ironic-space-lisp-part-4/</guid><description>&lt;p>This update is all about parsing, and this ended up being really difficult. Not
in a good way though. In my &lt;a href="../../posts/2018-08-10-ironic-space-lisp-part-3/">last post&lt;/a>, I talked about using
languages so difficult and alien that the difficulty clearly signified that
there was something important you could learn from mastering them. I didn&amp;rsquo;t find
this was the case during this phase of the project.&lt;/p></description></item><item><title>Ironic Space Lisp Part 3</title><link>/posts/2018/08/10/ironic-space-lisp-part-3/</link><pubDate>Fri, 10 Aug 2018 17:09:28 -0700</pubDate><guid>/posts/2018/08/10/ironic-space-lisp-part-3/</guid><description>Have you ever been working on a project and felt stupid and scared? Not in an anxious way, and not in an imposter syndrome way, but in a visceral way, like &amp;ldquo;I don&amp;rsquo;t really know what I&amp;rsquo;m doing, and I&amp;rsquo;m not sure I can do this.&amp;rdquo; Some languages are so complex and different that, although I know they&amp;rsquo;re full feature and Turing complete languages, I don&amp;rsquo;t know that I can even write whatever program I&amp;rsquo;m trying to make.</description></item><item><title>Ironic Space Lisp Part 2</title><link>/posts/2018/07/29/ironic-space-lisp-part-2/</link><pubDate>Sun, 29 Jul 2018 10:59:40 -0700</pubDate><guid>/posts/2018/07/29/ironic-space-lisp-part-2/</guid><description>&lt;p>&lt;a href="../../posts/2018-07-29-ironic-space-lisp/">Part 1&lt;/a>&lt;/p>
&lt;p>&lt;a href="../../posts/2018-07-09-ironic-space-lisp-part-2/">Part 2&lt;/a>&lt;/p>
&lt;p>Last time, the conceptual challenges of a the stack VM convinced me it was the
wrong approach. In a normal recursive lisp interpreter, code is data, and you
have a single evaluator function over every value. &lt;a href="https://github.com/atamis/ironic-space-lisp/tree/4ee0904fdc54c876cdd9231ff4f1e49593286280">Follow along here&lt;/a>.&lt;/p></description></item><item><title>Ironic Space Lisp Part 1</title><link>/posts/2018/07/29/ironic-space-lisp-part-1/</link><pubDate>Sun, 29 Jul 2018 02:03:01 -0700</pubDate><guid>/posts/2018/07/29/ironic-space-lisp-part-1/</guid><description>&lt;p>&lt;a href="../../posts/2018-07-29-ironic-space-lisp/">Part 1&lt;/a>&lt;/p>
&lt;p>&lt;a href="../../posts/2018-07-09-ironic-space-lisp-part-2/">Part 2&lt;/a>&lt;/p>
&lt;p>I recently had a new idea for a space programming game. The idea isn&amp;rsquo;t done,
although the planning document is getting lengthy. Programming games need
programming languages, and based on the game design, I had some pretty
particular specifications for the language.&lt;/p></description></item></channel></rss>