Better HN
topnewbestaskshowjobs
Log inSign up

taolson

122 karma · joined Feb 8, 2025 (1y ago) · 47 submissions

Submissions

comment 2w ago · link · parent

I've been actively working on my language / compiler for a couple of years now (https://github.com/taolson/Admiran). My goal in its development was to learn in a deep sense how to efficiently compile a pure functional language down to low-level assembly-language, so I haven't used LLMs at all -- using them would negate the learning experience. Plus it's fun to puzzle through these things by yourself!

I actively use it for most programming, these days (command-line only), and use it every year during Advent of Code.

comment 1mo ago · link · parent

Agreed. But there's a big difference between parametric polymorphism (List<A>) and ad-hoc polymorphism like typeclasses. It would be very painful to have to write a new list type for any kind of value type it might hold, but with monads you have many fewer distinct implementations (mainly just Maybe / Either / List / State / IO) and their actions are so different that you almost have to know exactly which monad you are using in the code, so "generic" code that can operate with any monad is less useful.

comment 1mo ago · link · parent

That may be true for functions which operate on a generic Monad typeclass, but typeclasses (Higher kinded types) aren't required to implement concrete Functor / Applicative / Monad instances for a particular type, e.g. Maybe:

    fmap f Nothing = Nothing
    fmap f (Just x) = Just (f x)

    pure x = Just x

    Nothing >>= f = Nothing
    Just x >>= f = f x

comment 1mo ago · link · parent

In a lazy language like Haskell, the order in which things are actually evaluated is f -> g -> h -> x, because arguments to a function are only evaluated when the are needed, rather than before they are called. But even so, I still prefer writing it as x |> h |> g |> f.

comment 1mo ago · link · parent

Or just use lazy list operations with a single if test at the end:

https://github.com/taolson/Admiran/blob/main/examples/fizzBu...

/s

comment 2mo ago · link · parent

Yes, that's an even better picture! Austrian air-force version, right?

comment 2mo ago · link · parent

I still consider the Saab Draken one of the most beautiful aircraft ever designed:

https://en.wikipedia.org/wiki/Saab_35_Draken

Especially the top view:

https://www.flyajetfighter.com/wp-content/uploads/2025/09/Sa...

comment 3mo ago · link · parent

Another interesting lisp-like language by Ian Piumarta is Maru, currently hosted here: https://github.com/attila-lendvai/maru

comment 3mo ago · link · parent

You're probably thinking of Ian Piumarta's COLA project (Combined Object Lambda Architecture), which had parts named after cola soft-drinks (Coke was a lisp-like language, Pepsi was a Smalltalk-like language, and Jolt was an early implementation of Coke):

https://www.piumarta.com/software/cola/

comment 3mo ago · link · parent

Congrats to the Squeak 6.1 team! I was an early contributor to Squeak from when Alan Kay's group was at Apple (I see that SameGame, the first game implemented in Morphic is still in the image), and still enjoy following the progress of Squeak and all of its spinoffs.

comment 3mo ago · link · parent

Since your language is very "rust-like", what made you choose Ocaml as the implementation language?

comment 3mo ago · link · parent

The FPU in the 29050 was based on the Am29325 bit-slice family FPU; an extra write port was added to the register file to allow for asynchronous FPU result writeback, which allowed the parallel operation.

gr2 and gr3 were used in the 29050 for FP condition code registers, but otherwise I'm pretty sure accessing the rest caused a trap.

comment 3mo ago · link · parent

The registers could also be partitioned into fixed sizes and protected, to allow for a banked register file that allowed for amazingly fast context switches in RTOS systems.

comment 3mo ago · link · parent

> Well that was basically an am29000 but with an x86 instruction decoder front end.

The K5 was based upon a 29K-family design, but it was actually an un-released superscalar project code-named "Jaguar", rather than just a 29K with an x86 decoder.

comment 3mo ago · link · parent

Yep, it wound up as the main CPU in a bunch of laser-printers, as well as Apple's 8*24GC QuickDraw accelerator card for the Macintosh, and as part of the flight-control computer on Boeing 777s, among many other embedded system designs.

comment 3mo ago · link · parent

Wow, blast from the past! I was on the architecture / micro-architecture team for the 29K and 29050, and your story of writing and debugging the emulator brought up similar memories of working on the performance simulator for these chips.

Very impressive work -- congratulations!

comment 3mo ago · link · parent

Fun fact I learned from a Func Prog podcast: the name Steel Bank is a play on it's origin as Carnegie-Mellon Common Lisp (Carnegie made his fortune in Steel, while Mellon did so with Banks):

https://www.sbcl.org/history.html

comment 5mo ago · link · parent

We actually did this in my freshman dorm room, as the paint color almost exactly matched the original Crest "green".

comment 6mo ago · link · parent

I remember a visit by Gasseé and a team of BeBox engineers to the PowerPC design center in Austin, where they demo'ed the yet-to-be released early version of the BeBox and OS. We were all duly impressed by the speed and responsiveness of the system. At one point they were demoing that it really was running multiple processors by opening a control panel that showed the processor activity, and clicking a button to disable one of the processors, which instantly doubled the load on the other processor. Someone in the crowd asked "What if you disable the other processor, too?", and they said "I don't know -- let's see." The system promptly crashed ;-)

comment 7mo ago · link · parent

Sorry, I meant "Haskell / Miranda style syntax" -- e.g. curried functions, concise syntax with little boilerplate, etc. The word type is too overloaded ;-)

comment 7mo ago · link · parent

Nice to see another language with Haskell / Miranda type syntax, but the vibe-coded implementation sure shows: e.g. src/Compiler/Infer.sky isUpperStart:

    isUpperStart : String -> Bool
    isUpperStart name =
        case String.slice 0 1 name of
            
            "A" ->
                True
            
            "B" ->
                True
            
            "C" ->
                True
        ... for 23 more cases.
And the corresponding go code in the bootstrap compiler is even worse.

comment 8mo ago · link · parent

An example where this is useful is to help inline otherwise recursive functions, by writing the function to take some useful parameters first, then return a recursive function which takes the remaining parameters. This allows the function to be partially in-lined, resulting in better performance due to the specialization on the first parameters. For example, foldr:

foldr f z = go

  where

    go [] = z

    go (x : xs) = f x (go xs)
when called with (+) and 0 can be inlined to

go xs = case xs of

    [] -> 0

    (x : xs) = x + go xs
which doesn't have to create a closure to pass around the function and zero value, and can subsequently inline (+), etc.

23.

Show HN: Admiran: a pure, lazy functional language and self-hosting compiler(github.com ↗)

2 points · by taolson · 8mo ago · discuss

comment 9mo ago · link · parent

Yes, the open-source release he did is what introduced me to Miranda. I rewrote a lot of my previous Haskell solutions to Advent of Code puzzles with it, and liked it so much I decided to try to improve on it ;-)

That's what led to Admiran. I originally wrote Admiran in Miranda, then bootstrapped from that to self-hosting when it was stable enough to do so. The original Miranda combinator compiler / interpreter took 20 minutes to compile all of Admiran, while the self-hosted version now takes 20 seconds.

One of the grad students of David Turner has taken up maintenance on the original Miranda source; the repository is now at https://codeberg.org/DATurner/miranda

comment 9mo ago · link · parent

Don't know if my language is considered Lil' enough for this, but it's a pure, lazy functional language based upon Miranda (progenitor language to Haskell) that compiles to x86-64 asm. ~6700 SLOC for the (self-hosted!) compiler, and ~3300 SLOC additional for the extensive library of functional data structures and functions.

https://github.com/taolson/Admiran

comment 9mo ago · link · parent

Either newt was already in the list, or it got added. We talked a bit about using our languages for AoC 2024 -- looks like you've been keeping busy working on it!

comment 9mo ago · link · parent

The logo for Smalltalk-80, and later Squeak, came from the Robert Tinney cover of the Byte issue which introduced Smalltalk. The story behind it is documented here:

https://wiki.squeak.org/squeak/3459

comment 9mo ago · link · parent

Also this one, which originally came from Usenet days:

https://old.reddit.com/r/talesfromtechsupport/comments/cp48t...

comment 10mo ago · link · parent

The author includes some easter-eggs (printing random facts about Zen and various C constructs) which trigger randomly -- check out the file src/zen/zen_facts.c in the repository...

comment 11mo ago · link · parent

>I made my own, with a Haskell+Bash flavor and a REPL that reloads with each keystroke

That was impressive! Do you have a public repo with your language, anywhere?

12