<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: soegaard</title><link>https://news.ycombinator.com/user?id=soegaard</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 04 Jun 2026 08:53:30 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=soegaard" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by soegaard in "Micropatching Brings the Abandoned Equation Editor Back to Life (2018)"]]></title><description><![CDATA[
<p>The version Microsoft used is discontinued.
However, you can just buy a license of the new product.<p><a href="https://www.wiris.com/en/mathtype/" rel="nofollow">https://www.wiris.com/en/mathtype/</a></p>
]]></description><pubDate>Tue, 26 May 2026 13:42:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=48279778</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=48279778</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48279778</guid></item><item><title><![CDATA[New comment by soegaard in "Why I still reach for Lisp and Scheme instead of Haskell"]]></title><description><![CDATA[
<p>Agree. It got the ball rolling.</p>
]]></description><pubDate>Thu, 30 Apr 2026 12:53:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=47961672</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47961672</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47961672</guid></item><item><title><![CDATA[New comment by soegaard in "WASM is not quite a stack machine"]]></title><description><![CDATA[
<p>Don't you need parens here?<p><pre><code>    (local.get 0)
    (local.get 1)</code></pre></p>
]]></description><pubDate>Tue, 28 Apr 2026 16:11:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=47936419</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47936419</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47936419</guid></item><item><title><![CDATA[New comment by soegaard in "WASM is not quite a stack machine"]]></title><description><![CDATA[
<p>FWIW if you are looking for examples of WebAssembly written in the textual format, take a look at:<p><a href="https://raw.githubusercontent.com/soegaard/webracket/refs/heads/main/runtime-wasm.rkt" rel="nofollow">https://raw.githubusercontent.com/soegaard/webracket/refs/he...</a><p>As a small example, here is a definition of `$car` which extracts the first value from a pair.<p><pre><code>    (func $car (type $Prim1) 
               (param $v (ref eq)) 
               (result (ref eq))
      (if (result (ref eq)) 
          (ref.test (ref $Pair) (local.get $v))
          (then (struct.get $Pair $a (ref.cast (ref $Pair) (local.get $v))))
          (else (call $raise-pair-expected (local.get $v))
                (unreachable))))</code></pre></p>
]]></description><pubDate>Tue, 28 Apr 2026 10:33:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=47932590</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47932590</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47932590</guid></item><item><title><![CDATA[Show HN: Command line tool for viewing files in color]]></title><description><![CDATA[
<p>The tool `peek` show files in color in the terminal. A wide range of popular programming language and file types are supported.<p>Today I added support for binary files inspired by the HN post on colors in hex editors.<p>Each supported programming language is backed by its own (reusable) lexer. The lexer provides a stream of tokens to the colorer.
Using streams means that you will see the top of large files at once.<p>The idea to make `peek` came from a need to look at CSS files in the terminal. I wanted color swatches and other niceties from the browser. Also, I wanted an option to fix alignment in machine generated CSS files.<p>Enjoy.</p>
<hr>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=47875861">https://news.ycombinator.com/item?id=47875861</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Thu, 23 Apr 2026 14:00:08 +0000</pubDate><link>https://soegaard.github.io/peek/</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47875861</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47875861</guid></item><item><title><![CDATA[New comment by soegaard in "Your hex editor should color-code bytes"]]></title><description><![CDATA[
<p>This was a great article and inspired me to add support for binary files in `peek`.<p><a href="https://soegaard.github.io/peek/#%28part._binary-files%29" rel="nofollow">https://soegaard.github.io/peek/#%28part._binary-files%29</a><p>For me the key insight is that similar values should get similar colors.
And since Fx and 0x are "similar" the color palette should be cyclic.</p>
]]></description><pubDate>Thu, 23 Apr 2026 13:52:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=47875773</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47875773</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47875773</guid></item><item><title><![CDATA[New comment by soegaard in "Nanopass Framework: Clean Compiler Creation Language"]]></title><description><![CDATA[
<p>Yes.</p>
]]></description><pubDate>Sun, 19 Apr 2026 22:35:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=47828261</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47828261</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47828261</guid></item><item><title><![CDATA[New comment by soegaard in "Nanopass Framework: Clean Compiler Creation Language"]]></title><description><![CDATA[
<p>Skim<p><a href="https://andykeep.com/pubs/dissertation.pdf" rel="nofollow">https://andykeep.com/pubs/dissertation.pdf</a><p>Also see the this text:<p><a href="https://www.cs.umd.edu/class/fall2025/cmsc430/Notes.html" rel="nofollow">https://www.cs.umd.edu/class/fall2025/cmsc430/Notes.html</a></p>
]]></description><pubDate>Sun, 19 Apr 2026 17:48:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=47826130</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47826130</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47826130</guid></item><item><title><![CDATA[New comment by soegaard in "Nanopass Framework: Clean Compiler Creation Language"]]></title><description><![CDATA[
<p>Nanopass uses structures internally to represent the programs.<p>The Nanopass dsl just gives the user a nicer syntax to specify the transformations.</p>
]]></description><pubDate>Sun, 19 Apr 2026 17:31:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=47825972</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47825972</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47825972</guid></item><item><title><![CDATA[New comment by soegaard in "Want to write a compiler? Just read these two papers (2008)"]]></title><description><![CDATA[
<p>An Incremental Approach to Compiler Construction<p>Abdulaziz Ghuloum<p><a href="http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf" rel="nofollow">http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf</a><p>Abstract<p>Compilers are perceived to be magical artifacts, carefully crafted by the wizards, and unfathomable by the mere mortals. Books on compilers are better described as wizard-talk: written by and for a clique of all-knowing practitioners. Real-life compilers are too complex to serve as an educational tool. And the gap between real-life compilers and the educational toy compilers is too wide. The novice compiler writer stands puzzled facing an impenetrable barrier, “better write an interpreter instead.”<p>The goal of this paper is to break that barrier. We show that building a compiler can be as easy as building an interpreter. The compiler we construct accepts a large subset of the Scheme programming language and produces assembly code for the Intel-x86 architecture, the dominant architecture of personal computing. The development of the compiler is broken into many small incremental steps. Every step yields a fully working compiler for a progressively expanding subset of Scheme. Every compiler step produces real assembly code that can be assembled then executed directly by the hardware. We assume that the reader is familiar with the basic computer architecture: its components and execution model. Detailed knowledge of the Intel-x86 architecture is not required.<p>The development of the compiler is described in detail in an extended tutorial. Supporting material for the tutorial such as an automated testing facility coupled with a comprehensive test suite are provided with the tutorial. It is our hope that current and future implementors of Scheme ﬁnd in this paper the motivation for developing high-performance compilers and the means for achieving that goal.</p>
]]></description><pubDate>Wed, 15 Apr 2026 11:07:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=47777439</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47777439</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47777439</guid></item><item><title><![CDATA[New comment by soegaard in "The Future of SCIP"]]></title><description><![CDATA[
<p>I misread it too.</p>
]]></description><pubDate>Fri, 27 Mar 2026 22:35:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=47549281</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47549281</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47549281</guid></item><item><title><![CDATA[New comment by soegaard in "A 6502 disassembler with a TUI: A modern take on Regenerator"]]></title><description><![CDATA[
<p>Loved the examples!</p>
]]></description><pubDate>Tue, 24 Mar 2026 10:32:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=47500696</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47500696</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47500696</guid></item><item><title><![CDATA[New comment by soegaard in "femtolisp: A lightweight, robust, scheme-like Lisp implementation"]]></title><description><![CDATA[
<p>This is pretty small.<p><a href="http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html" rel="nofollow">http://scheme.dk/blog/2006/12/self-evaluating-evaluator.html</a></p>
]]></description><pubDate>Mon, 23 Feb 2026 19:57:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=47127855</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47127855</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47127855</guid></item><item><title><![CDATA[New comment by soegaard in "Emulating Goto in Scheme with Continuations"]]></title><description><![CDATA[
<p>If you are into continuations, check Friedman's papers on ReadScheme.<p><a href="https://github.com/schemedoc/bibliography/blob/master/page6.md" rel="nofollow">https://github.com/schemedoc/bibliography/blob/master/page6....</a><p>In particular look at "Programming with Continuations", "Engines Build Process Abstractions" and "Continuations and Coroutines".</p>
]]></description><pubDate>Mon, 23 Feb 2026 19:23:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=47127387</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=47127387</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47127387</guid></item><item><title><![CDATA[New comment by soegaard in "Hoot: Scheme on WebAssembly"]]></title><description><![CDATA[
<p><a href="https://docs.racket-lang.org/rkt-tree-widget/index.html" rel="nofollow">https://docs.racket-lang.org/rkt-tree-widget/index.html</a></p>
]]></description><pubDate>Sun, 08 Feb 2026 23:34:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=46939727</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=46939727</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46939727</guid></item><item><title><![CDATA[New comment by soegaard in "The WebRacket language is a subset of Racket that compiles to WebAssembly"]]></title><description><![CDATA[
<p>I need to study the stack-switching proposal in more detail.<p>However, I don't see an obvious way of attach and probe continuation marks to the continuations (including the current one).<p>I am not an expert in continuation marks, so I'll just link to this presentation by Matthew Flatt (which you probably already know).<p><a href="https://github.com/WebAssembly/meetings/blob/main/stack/2021/presentations/2021-5-17-flatt-racket-intermediate-language-control.pdf" rel="nofollow">https://github.com/WebAssembly/meetings/blob/main/stack/2021...</a></p>
]]></description><pubDate>Thu, 22 Jan 2026 13:13:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=46718797</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=46718797</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46718797</guid></item><item><title><![CDATA[New comment by soegaard in "The WebRacket language is a subset of Racket that compiles to WebAssembly"]]></title><description><![CDATA[
<p>Yes. I am following the Scheme tradition of representing immediate values as tagged pointers. And (ref i31) is the obvious choice when using WebAssembly.
I am happy you and the team added GC to WebAssembly.<p>Details on the representation.<p><a href="https://github.com/soegaard/webracket/blob/main/compiler.rkt#L3763" rel="nofollow">https://github.com/soegaard/webracket/blob/main/compiler.rkt...</a><p>I am more or less only using the linear memory for the JavaScript FFI.
FASL-encoded values are passed back and forth to JavaScript.</p>
]]></description><pubDate>Thu, 22 Jan 2026 12:59:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=46718663</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=46718663</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46718663</guid></item><item><title><![CDATA[New comment by soegaard in "The WebRacket language is a subset of Racket that compiles to WebAssembly"]]></title><description><![CDATA[
<p>> Is Racket bytecode different?<p>Changes to the bytecode representation were indeed rare also in Racket.<p>The Whalesong project was written as part of a dissertation - and when people graduate and get jobs, projects are often abandoned.</p>
]]></description><pubDate>Thu, 22 Jan 2026 12:46:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=46718535</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=46718535</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46718535</guid></item><item><title><![CDATA[New comment by soegaard in "The WebRacket language is a subset of Racket that compiles to WebAssembly"]]></title><description><![CDATA[
<p>I am using a similar representation of immediates as Hoot and wasm_of_ocaml.<p>The representation is explained here:<p><a href="https://github.com/soegaard/webracket/blob/main/compiler.rkt#L3763" rel="nofollow">https://github.com/soegaard/webracket/blob/main/compiler.rkt...</a><p>Internally the compiler uses a series of passes implemented using Nanopass.<p><pre><code>    (generate-code
     (flatten-begin
      (closure-conversion
       (anormalize
        (categorize-applications
         (assignment-conversion
          (α-rename
           (explicit-case-lambda
            (explicit-begin
             (convert-quotations
              (infer-names
               (flatten-topbegin
                (parse
                 (unexpand
                  (topexpand stx)))))))))))))))

</code></pre>
The code generator is inspired by "Destination-driven Code Generation"
by Dybvig, Hieb and Butler. There are some differences however. The code
generator in the paper generates "flat" code (assembler) whereas I
generate nested Web Assembly instructions.<p>This approach generates reasonable code without having to implement
a register allocator. Also, I believe I saw a Wasm to Wasm compiler
that improved register allocation (maybe it was a switch for wasm-tools?).<p>If (when?) WebRacket becomes a success, we can always switch out individual passes.</p>
]]></description><pubDate>Thu, 22 Jan 2026 12:40:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=46718471</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=46718471</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46718471</guid></item><item><title><![CDATA[New comment by soegaard in "The WebRacket language is a subset of Racket that compiles to WebAssembly"]]></title><description><![CDATA[
<p>Maybe. My main problem is to get light-weight support for continuation marks.<p>If I need a CPS-pass for continuation marks, I might as well use it for continuations as well.<p>It would be great if it were possible to avoid a CPS-pass though.</p>
]]></description><pubDate>Thu, 22 Jan 2026 12:24:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=46718340</link><dc:creator>soegaard</dc:creator><comments>https://news.ycombinator.com/item?id=46718340</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46718340</guid></item></channel></rss>