
<?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>Blog on The Coalton Programming Language</title>
    <link>https://coalton-lang.github.io/post/</link>
    <description>Recent content in Blog on The Coalton Programming Language</description>
    <generator>Hugo -- 0.148.0</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 24 Apr 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://coalton-lang.github.io/post/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Introducing mine, a Coalton and Common Lisp IDE</title>
      <link>https://coalton-lang.github.io/20260424-mine/</link>
      <pubDate>Fri, 24 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20260424-mine/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mine&lt;/code&gt; is a brand new IDE for Coalton and Common Lisp, built from the ground up with one purpose: &lt;strong&gt;To make Coalton and Common Lisp easier and more accessible to the programming world.&lt;/strong&gt;&lt;/p&gt;
&lt;center&gt;&lt;em&gt;TL;DR? &lt;a href=&#34;https://coalton-lang.github.io/mine&#34;&gt;Go to mine&#39;s homepage with downloads for Windows/macOS/Linux.&lt;/a&gt;&lt;/em&gt;
&lt;img src=&#34;mine-screenshot.png&#34; alt=&#34;&#34;&gt;
&lt;/center&gt;
&lt;p&gt;&lt;code&gt;mine&lt;/code&gt; is a complete, single-download application that comes with everything needed to experience the interactive and incremental development programming workflow, including hot-reloading and on-the-fly debugging, that Lisp programmers often refer to as &lt;em&gt;the&lt;/em&gt; differentiating feature of the ecosystem. After installing, one can immediately open a file, program some Coalton or Lisp, and beam code to the REPL. On the same token, it has many of the advanced features you&amp;rsquo;d expect in a professional IDE:&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Preview of Coalton 0.2</title>
      <link>https://coalton-lang.github.io/20260312-coalton0p2/</link>
      <pubDate>Thu, 12 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20260312-coalton0p2/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Coalton is a statically typed functional programming language that lives inside Common Lisp. It has had an exciting few years. It is being used for industrial purposes, being put to its limits as a production language to build good, reliable, efficient, and robust products. Happily, with Coalton, many products shipped with tremendous success. But as we built these products, we noticed gaps in the language. As such, we&amp;rsquo;re setting the stage for the next tranche of Coalton work, and we&amp;rsquo;re going to preview some of these improvements here, including how Coalton can prove $\sqrt{2+\sqrt{3}} = \sqrt{2}(\sqrt{3}+1)/2$ exactly.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Common Lisp Libraries from Coalton</title>
      <link>https://coalton-lang.github.io/20250812-lisp-libraries/</link>
      <pubDate>Tue, 12 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20250812-lisp-libraries/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;We discuss how we can make an efficient, type-safe interface to existing libraries written in Common Lisp so that they can be used in Coalton code.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
    &lt;hr&gt;
    &lt;h2&gt;Table Of Contents&lt;/h2&gt;
    &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#do-we-even-need-a-library&#34;&gt;Do we even need a library?&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#find-a-library-and-create-a-package&#34;&gt;Find a library and create a package&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#identify-the-rough-api&#34;&gt;Identify the rough API&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#decide-on-a-binding-strategy&#34;&gt;Decide on a binding strategy&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#define-the-types&#34;&gt;Define the types&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#wrap-some-other-constructors&#34;&gt;Wrap some other constructors&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#use-type-classes-when-possible&#34;&gt;Use type classes when possible&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#equality&#34;&gt;Equality&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#ordering&#34;&gt;Ordering&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#efficiency&#34;&gt;Efficiency?&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&#34;#other-type-classes&#34;&gt;Other type classes&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#a-more-difficult-example&#34;&gt;A more difficult example&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#argument-order&#34;&gt;Argument order?&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#wrapping-it-up&#34;&gt;Wrapping it up&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#concluding-remarks&#34;&gt;Concluding remarks&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#source-listing&#34;&gt;Source listing&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
    &lt;hr&gt;
&lt;/div&gt;

&lt;p&gt;One of Coalton&amp;rsquo;s headline features is that it&amp;rsquo;s embedded in Common Lisp, and allows the use of Common Lisp code via the &lt;code&gt;lisp&lt;/code&gt; operator. However, it&amp;rsquo;s not immediately obvious how one can use Common Lisp when Coalton is strongly typed. How do we do it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Coalton to Implement a Quantum Compiler</title>
      <link>https://coalton-lang.github.io/20220906-quantum-compiler/</link>
      <pubDate>Tue, 06 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20220906-quantum-compiler/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://github.com/eliaslfox&#34;&gt;Elias Lawson-Fox&lt;/a&gt;, &lt;a href=&#34;https://github.com/aijony&#34;&gt;Aidan Nyquist&lt;/a&gt;, and &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Updated July 1, 2025 by Robert Smith.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
    &lt;hr&gt;
    &lt;h2&gt;Table Of Contents&lt;/h2&gt;
    &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#introduction-coalton-and-the-quilc-compiler&#34;&gt;Introduction: Coalton and the quilc compiler&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#towards-a-discrete-set-of-operations-for-quantum-computation&#34;&gt;Towards a discrete set of operations for quantum computation&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#an-approach-to-discrete-compilation-by-ross-and-selinger&#34;&gt;An approach to discrete compilation by Ross and Selinger&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#coaltons-strength-in-implementing-math&#34;&gt;Coalton&amp;rsquo;s strength in implementing math&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#discrete-compilation-in-quilc&#34;&gt;Discrete compilation in quilc&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#inaccuracy-gotchas-and-validating-the-compiler&#34;&gt;Inaccuracy gotchas and validating the compiler&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#conclusion-and-how-to-get-involved&#34;&gt;Conclusion and how to get involved&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#acknowledgements&#34;&gt;Acknowledgements&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
    &lt;hr&gt;
&lt;/div&gt;

&lt;h2 id=&#34;introduction-coalton-and-the-quilc-compiler&#34;&gt;Introduction: Coalton and the quilc compiler&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/quil-lang/quilc&#34;&gt;Quilc&lt;/a&gt; is a state-of-the-art optimizing compiler for quantum computers written in Common Lisp. It is capable of taking arbitrary quantum programs written in &lt;a href=&#34;https://quil-lang.github.io/&#34;&gt;Quil&lt;/a&gt;, and compiling and optimizing them into code that conforms to the majority of quantum computing architectures that exist today.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Numbers in a Nutshell, an Update</title>
      <link>https://coalton-lang.github.io/20220827-numbers/</link>
      <pubDate>Sat, 27 Aug 2022 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20220827-numbers/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;We discuss numbers and math in Coalton, as they are so far. Coalton
is under active development, so this blog post may go out of date in
due time.&lt;/em&gt;&lt;/p&gt;
&lt;div&gt;
    &lt;hr&gt;
    &lt;h2&gt;Table Of Contents&lt;/h2&gt;
    &lt;nav id=&#34;TableOfContents&#34;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&#34;#introduction&#34;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#the-concrete-types&#34;&gt;The concrete types&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#rudimentary-classes&#34;&gt;Rudimentary classes&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#arithmetic&#34;&gt;Arithmetic&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#reals-rounding-and-related-classes&#34;&gt;Reals, rounding, and related classes&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#complex-numbers&#34;&gt;Complex numbers&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#powers-roots-and-logs&#34;&gt;Powers, roots, and logs&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#trigonometry&#34;&gt;Trigonometry&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#pi-and-elementary-functions&#34;&gt;$\pi$ and elementary functions&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&#34;#big-floats&#34;&gt;Big floats&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href=&#34;#precision-of-big-floats&#34;&gt;Precision of big floats&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
    &lt;hr&gt;
&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Coalton is statically typed, which presents some challenges in how we
work with numbers, both syntactically and semantically. For instance,
consider the following Common Lisp code:&lt;/p&gt;</description>
    </item>
    <item>
      <title>One Reason Typeclasses Are Useful</title>
      <link>https://coalton-lang.github.io/20211212-typeclasses/</link>
      <pubDate>Sun, 12 Dec 2021 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20211212-typeclasses/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;In this post, we explore one way that typeclasses are useful. We do so by first painting ourselves into a corner while building a toy Common Lisp program, and then seeing how Coalton&amp;rsquo;s typeclasses can ameliorate the issues.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;a-graphics-library&#34;&gt;A Graphics Library&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s write a graphics library. Or, a tad less ambitiously, let&amp;rsquo;s write some routines for performing transformations on 2D points, which might serve as the foundation of a graphics library. We&amp;rsquo;ll be interested in:&lt;/p&gt;</description>
    </item>
    <item>
      <title>AoC 2021 Coalton Contest</title>
      <link>https://coalton-lang.github.io/20211129-aoc-contest/</link>
      <pubDate>Mon, 29 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20211129-aoc-contest/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Update: The prizes have been matched 1:1 by a donor who wishes to remain anonymous!&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Last &lt;a href=&#34;https://coalton-lang.github.io/20211010-introducing-coalton/&#34;&gt;September&lt;/a&gt; we announced Coalton, a statically typed language that is &amp;ldquo;just&amp;rdquo; another Common Lisp DSL. To our great surprise, there was a lot of excitement and fanfare, which made the development team feel quite honored and proud. It even made &lt;a href=&#34;https://news.ycombinator.com/item?id=28484850&#34;&gt;the top of Hacker News&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Unsurprisingly, as is the case with many open-source projects, that fanfare lead to little &amp;ldquo;conversion&amp;rdquo;; only a few people actually gave Coalton a shot and provided feedback. We are &lt;em&gt;immensely&lt;/em&gt; thankful to those who did! The good news is that it lead to some good discussion, great PRs, and fantastic internship applications from a wonderful and diverse group of people. We won&amp;rsquo;t be able to accept everyone but I&amp;rsquo;m pleased that there&amp;rsquo;s interest in helping build out the next generation of quantum computational tools using &amp;ldquo;alien technology&amp;rdquo;. :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Coalton: How to Have Our (Typed) Cake and (Safely) Eat It Too, in Common Lisp</title>
      <link>https://coalton-lang.github.io/20211010-introducing-coalton/</link>
      <pubDate>Fri, 10 Sep 2021 00:00:00 +0000</pubDate>
      <guid>https://coalton-lang.github.io/20211010-introducing-coalton/</guid>
      <description>&lt;p&gt;By &lt;a href=&#34;https://twitter.com/stylewarning&#34;&gt;Robert Smith&lt;/a&gt;, &lt;a href=&#34;https://github.com/eliaslfox&#34;&gt;Elias Lawson-Fox&lt;/a&gt;, &lt;a href=&#34;https://github.com/colescott&#34;&gt;Cole Scott&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Updated July 1, 2025 by Robert Smith.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Coalton is a statically typed functional programming language built with Common Lisp. We can load it like a normal Lisp library.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CL-USER&amp;gt; (asdf:load-system &amp;#34;coalton&amp;#34;)
CL-USER&amp;gt; (in-package #:coalton-user)
COALTON-USER&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is Coalton computing Fibonacci numbers by exponentiating &lt;em&gt;functions&lt;/em&gt; (not numbers!):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(coalton-toplevel
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (&lt;span style=&#34;font-weight:bold&#34;&gt;declare&lt;/span&gt; function-power (Integer -&amp;gt; (&lt;span style=&#34;font-style:italic&#34;&gt;:t&lt;/span&gt; -&amp;gt; &lt;span style=&#34;font-style:italic&#34;&gt;:t&lt;/span&gt;) -&amp;gt; (&lt;span style=&#34;font-style:italic&#34;&gt;:t&lt;/span&gt; -&amp;gt; &lt;span style=&#34;font-style:italic&#34;&gt;:t&lt;/span&gt;)))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (define (function-power n f)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (&lt;span style=&#34;font-weight:bold&#34;&gt;if&lt;/span&gt; (&amp;lt;= n 0)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        id
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (compose f (function-power (1- n) f))))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (&lt;span style=&#34;font-weight:bold&#34;&gt;declare&lt;/span&gt; fib-step ((Tuple Integer Integer) -&amp;gt; (Tuple Integer Integer)))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (define (fib-step (Tuple a b))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (Tuple b (+ a b)))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (&lt;span style=&#34;font-weight:bold&#34;&gt;declare&lt;/span&gt; fib (Integer -&amp;gt; Integer))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (define (fib n)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (fst ((function-power n fib-step) (Tuple 0 1)))))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is Coalton greeting you by making native use of Common Lisp functions:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
