<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: abainbridge</title><link>https://news.ycombinator.com/user?id=abainbridge</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 19 Nov 2026 05:27:27 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=abainbridge" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by abainbridge in "Scientists rediscover how to make ancient Roman colour-changing glass"]]></title><description><![CDATA[
<p>The ancient artefact described also featured in a Jonathon Blow lecture, as an example of an engineering skill we lost for 1600 years: <a href="https://youtu.be/ZSRHeXYDLko?t=402" rel="nofollow">https://youtu.be/ZSRHeXYDLko?t=402</a></p>
]]></description><pubDate>Sun, 25 Oct 2026 18:57:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=50234872</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50234872</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50234872</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>> I think the op is far too pessimistic about code size and performance<p>My code gen is definitely worse than TCC! But I think modern CPUs see all my redundant register-register moves and just treat them as a no-ops. Probably performance isn't much worse than TCC. But currently I can hardly compile a program complex enough for a meaningful comparison to be made.</p>
]]></description><pubDate>Sun, 25 Oct 2026 17:36:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=50233979</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50233979</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50233979</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>> I think the viewpoint that your're missing is: how do I make sure the machine code means the same thing as the source code?<p>Ooo, no. I already have an AST. When writing the code gen for a node type in the AST, I normally start by typing a few lines of C into godbolt that exercises the same kind of thing represented by the node type. I try a few different compilers and optimization settings and look at what gets generated. I pick an approach that looks simple and good enough. Then I ask an AI to assemble the instructions I see the compilers using. I like to ask an AI to do this because it will explain what all the bits do in the instruction encoding and it is less error prone at reading the ISA docs than I am. The description from the AI might prompt me to ask things like, "what if the jump target doesn't fit in the 32-bit immediate" etc.<p>All I was claiming was that this is easier than generating code for a byte code of my invention, partly because I don't have to invent a byte code and partly because I can use existing tools to help, eg disassemblers/debuggers to check my output or compilers to give me ideas on how to convert C-like statements into machine code.<p>I don't have any IR at the moment. I'll have a think about what benefits that might bring.<p>The reason I posted my project under this top level thread is because I'm interested in Small Programs and Languages. My experiment is in what I can remove from a language implementation to make it simpler. Adding a dependency on LLVM is the opposite of what I had in mind :-)<p>There are many reasons I'm writing it in C but mainly because I like C.</p>
]]></description><pubDate>Sun, 25 Oct 2026 17:30:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=50233920</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50233920</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50233920</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>I didn't know about the Appel book. I'll take a look. Thanks.<p>I feel like the way we write about compiler design could be reduced in complexity too. I read the blog posts by Nora Sandler and they did a great job compared to "the Dragon book" (confusing now because her book has a dragon on the front too). But we still ought to replace phrases like "lexical analysis" with "character grouping" (credit to Sam H Smith for forcing that one into my brain).</p>
]]></description><pubDate>Sun, 25 Oct 2026 12:41:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=50230942</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50230942</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50230942</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>> What I understand from that is, byte code is portable while machine code isn't.<p>This is an area I want to explore. It seems to me that it is less true than it used to be. x86_32 was the last significant architecture that made things hard. Now we can ignore that. All desktop or server class CPUs support 8, 16, 32 and 64-bit integers. And they all have at least 10 general purpose registers. They all have a sensible set of memory access modes. As a result, the same code generator works for them all. As it stands, my code generator calls functions like emit_indexed_load, emit_conditional_jump etc. There are currently 26 of those functions and they're all trivial.<p>So far I have only implemented them for x86_64 machine code output. But writing versions that output ARM64 or risvc doesn't seem hard. I expect I'll find small problems which will cause me to have to tweak the set of CPU features my code gen depends on.<p>As for generating bytecode being easier than x86_64 machine code, I disagree. There are lots of tools for validating x86_64 machine code (ie disassemblers). There aren't any for a bytecode I might invent. And I can ask an AI how to generate x86_64 machine code to do an indexed load. I immediately get the answer. I don't have to think about how to make an efficient bytecode encoding.<p>The hardest thing I've encountered so far is getting the ABI right so that my compiled code can call existing functions (eg libc). But I'd have to do that even if I was using an interpreter.</p>
]]></description><pubDate>Sun, 25 Oct 2026 12:11:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=50230749</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50230749</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50230749</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>TCC is partly what motivated me to try. But I want to get closer to lower the Kolmogorov Complexity. I'm happy to sacrifice C compatibility. In fact I'm happy to sacrifice much of the power of C. And I'd be happier with code that was somewhat slower.<p>And the original TCC code is not easy to understand. It is a lot cleverer than I can cope with!</p>
]]></description><pubDate>Sun, 25 Oct 2026 11:10:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=50230393</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50230393</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50230393</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>Hah. I won't pretend I'm not motivated by the same forces as many lost souls before me. But if my language turns out anything like Lisp, I'd be upset.</p>
]]></description><pubDate>Sun, 25 Oct 2026 10:39:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=50230163</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50230163</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50230163</guid></item><item><title><![CDATA[New comment by abainbridge in "Small Programs and Languages"]]></title><description><![CDATA[
<p>I'm interested in making a really simple compiled scripting language. I don't understand why most scripting languages compile to bytecode and then interpret that. This requires the following steps:<p>1: Design a bytecode. 2: Write a compiler. 3: Write an interpreter.<p>It seems like it would be simpler to not bother with 1 and 3 and instead use machine code as the bytecode. A side benefit is that programs will run faster.<p>I think it is easy to generate machine code for x86_64, ARM64 and risvc64, as long as you don't mind it being 3x larger and slower than an optimizing compiler would generate. It ought to be easy because it is possible to only target the common subset of features these architectures support.<p>I made a start, <a href="https://github.com/abainbridge/mortar" rel="nofollow">https://github.com/abainbridge/mortar</a>, but haven't got much past being able to compile and run a Fibonacci sequence generator. I have no experience with language design or compiler implementation. I was somewhat gobsmacked when the fib generator ran 380x faster than an almost identical looking Python program.<p>Any comments or suggestions, including, "that's a bad idea, you will fail because of XYZ", or, "save yourself the effort, here's one I wrote earlier..."?</p>
]]></description><pubDate>Sun, 25 Oct 2026 09:57:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=50229866</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50229866</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50229866</guid></item><item><title><![CDATA[New comment by abainbridge in "Nordwand Mono – A monospace font for coders and adventurers"]]></title><description><![CDATA[
<p>Hadn't seen Cozette before. Its lovely. Ta.</p>
]]></description><pubDate>Tue, 20 Oct 2026 12:57:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=50165667</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50165667</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50165667</guid></item><item><title><![CDATA[New comment by abainbridge in "Nordwand Mono – A monospace font for coders and adventurers"]]></title><description><![CDATA[
<p>One I made. Available here: <a href="https://github.com/abainbridge/deadfrog-lib/blob/master/src/fonts/df_mono.fon" rel="nofollow">https://github.com/abainbridge/deadfrog-lib/blob/master/src/...</a><p>Has 7 sizes ranging from 6x10 pixels to 16x30. The larger ones are a bit rubbish. Only covers Latin-1.</p>
]]></description><pubDate>Tue, 20 Oct 2026 12:40:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=50165461</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50165461</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50165461</guid></item><item><title><![CDATA[New comment by abainbridge in "Linux 7.3"]]></title><description><![CDATA[
<p>That's awesome. Now what I want is an animated version that shows how the bugs lines change over time.</p>
]]></description><pubDate>Tue, 20 Oct 2026 10:57:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=50164338</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50164338</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50164338</guid></item><item><title><![CDATA[New comment by abainbridge in "Nordwand Mono – A monospace font for coders and adventurers"]]></title><description><![CDATA[
<p>I prefer bitmap fonts for coding / terminal. My monitor is 100 DPI and I like to cram as much on screen as possible. Here's a comparison of a bitmap font vs Nordwand <a href="https://gist.github.com/abainbridge/a4b2647ea91e661a7576417bd98f1695" rel="nofollow">https://gist.github.com/abainbridge/a4b2647ea91e661a7576417b...</a><p>I know I'm a bit weird, but the internet is full of weird people. It seems strange to me that nobody is interested in bitmap fonts these days.<p>What I really want is a hand anti-aliased bitmap font which prioritizes sharpness.</p>
]]></description><pubDate>Tue, 20 Oct 2026 10:53:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=50164278</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50164278</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50164278</guid></item><item><title><![CDATA[New comment by abainbridge in "Linux 7.3"]]></title><description><![CDATA[
<p>I want to see the same graph but for number of CVEs introduced. ie, when we find a CVE, find out which kernel version introduced it. This would only be useful for kernel versions that were a few years old, so we'd have had time to find most of the CVEs. But it'd still be interesting.</p>
]]></description><pubDate>Mon, 19 Oct 2026 15:28:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=50153633</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=50153633</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=50153633</guid></item><item><title><![CDATA[New comment by abainbridge in "What Zig felt like, coming from Rust"]]></title><description><![CDATA[
<p>Yes. I don't really understand why Zig gets more attention than dlang. It seems that it is more to do with the personality of the authors, rather than the technicalities. I get the impression that Walter is more laissez-faire, while Andrew is more single-minded. I'm grateful to the contributions both have made.</p>
]]></description><pubDate>Sun, 20 Sep 2026 07:52:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=49773518</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=49773518</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49773518</guid></item><item><title><![CDATA[New comment by abainbridge in "Casey Muratori – The Root of the Root of All Evil – BSC 2026 [video]"]]></title><description><![CDATA[
<p>Another point I liked was that there was, apparently, an influential book called Structured Programming, whose content was so universally agreed upon, that all programming became Structured Programming. Nobody needs the book anymore.</p>
]]></description><pubDate>Sun, 30 Aug 2026 14:05:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=49498770</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=49498770</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49498770</guid></item><item><title><![CDATA[New comment by abainbridge in "How the words we teach English language learners changed"]]></title><description><![CDATA[
<p>There are many well documented cases of rapid evolution: a population of African elephants became 50% tuskless at birth in a single generation, urban fox anatomy diverged from rural, frogs in the Chernobyl Exclusion Zone turned black, the Peppered Moth turned black in the industrial revolution.</p>
]]></description><pubDate>Mon, 03 Aug 2026 09:48:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=49153495</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=49153495</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49153495</guid></item><item><title><![CDATA[New comment by abainbridge in "Did I photograph the Aurora or was it something else? (2016)"]]></title><description><![CDATA[
<p>I'd have no idea how to find him. But I think it'd be a fruitless task anyway. I'm sure they'd have no memory of what, to them, was a moment as mundane as any other that day. I've definitely had people recount a shared experience to me, reminiscing about how profound it was, and me having no idea what they're talking about.</p>
]]></description><pubDate>Tue, 05 May 2026 19:38:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=48027450</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=48027450</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48027450</guid></item><item><title><![CDATA[New comment by abainbridge in "Did I photograph the Aurora or was it something else? (2016)"]]></title><description><![CDATA[
<p>I think I have an observation that defies the info on that page. That page was written around the time that STEVE (an aurora related phenomenon) was first named. <a href="https://en.wikipedia.org/wiki/STEVE" rel="nofollow">https://en.wikipedia.org/wiki/STEVE</a><p>I mention this because in the 1990s, while at uni in St Andrews, Scotland, I remember a trip to the astronomy observatory one evening. There was a peculiar cloud overhead - whitish purple, tube shaped and shimmering. I asked the astro professor what it was. He said, "Its a cloud" and showed no further interest. I took a photo. When I got the film developed and photos printed, you could see bright colours either side of the tube. I've always wondered a) what it was and b) why that astronomy professor was an astronomy professor when he had no interest in what the universe had to reveal to him.<p>I now believe it to have been a STEVE. I've still got no insight into the mind of the astro professor.</p>
]]></description><pubDate>Tue, 05 May 2026 17:40:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=48025858</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=48025858</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48025858</guid></item><item><title><![CDATA[New comment by abainbridge in "XOR'ing a register with itself is the idiom for zeroing it out. Why not sub?"]]></title><description><![CDATA[
<p>For a few years I worked in the team that wrote software for an embedded audio DSP. The power draw to do something was normally more important than the speed. Eg when decoding MP3 or SBC you probably had enough MIPS to keep up with the stream rate, so the main thing the customers cared about was battery life. Mostly the techniques to optimize for speed were the same as those for power. But I remember being told that add/sub used less power than multiply even though both were single cycle. And that for loops with fewer than 16 instructions used less power because there was a simple 16 instruction program memory cache that saved the energy required to fetch instructions from RAM or ROM. (The RAM and ROM access was generally single cycle too).<p>Nowadays, I expect optimizations that minimize energy consumption are an important target for LLM hosts.</p>
]]></description><pubDate>Wed, 22 Apr 2026 14:55:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=47864532</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=47864532</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47864532</guid></item><item><title><![CDATA[New comment by abainbridge in "XOR'ing a register with itself is the idiom for zeroing it out. Why not sub?"]]></title><description><![CDATA[
<p>> seems like x86 and the major 8bit cpu's had the same speed, pondering in this might be a remnant from the 4-bit ALU times.<p>I think that era of CPUs used a single circuit capable of doing add, sub, xor etc. They'd have 8 of them and the signals propagate through them in a row. I think this page explains the situation on the 6502: <a href="https://c74project.com/card-b-alu-cu/" rel="nofollow">https://c74project.com/card-b-alu-cu/</a><p>And this one for the ARM 1: <a href="https://daveshacks.blogspot.com/2015/12/inside-alu-of-armv1-first-arm.html" rel="nofollow">https://daveshacks.blogspot.com/2015/12/inside-alu-of-armv1-...</a><p>But I'm a software engineer speculating about how hardware works. You might want to ask a hardware engineer instead.</p>
]]></description><pubDate>Wed, 22 Apr 2026 09:50:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=47861255</link><dc:creator>abainbridge</dc:creator><comments>https://news.ycombinator.com/item?id=47861255</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47861255</guid></item></channel></rss>