Live data from Hacker News

The Om Programming Language

om-language.com

91–100 of 119 posts

Re: The Om Programming Language

#91

Aren't LLMs supposed to write machine code directly, no more programming languages at all, any day now? Joking aside, programming languages are a good mental exercise. Forth was my first language after assembly. Didn't like the stack juggling and ended up using its macro assembler more and more, it became something else, conventions over code I suppose, like what to keep in registers. Forth (and Unix) got the composa…

Conrad Barski, Feb 25, 2026:

> Working atari 2600 flappy bird, by just asking chatgpt to directly output the raw bytes for a cartridge image

TBH this is a bit unexpected: it should know how to encode instructions, of course, but calculating all jumps on the fly is rather hard (I think).

Re: The Om Programming Language

#93
post #86

Earlier quoted context omitted.

A few days ago I asked Claude what kind of language it would like to program in, and it said something like Forth but with static typing, contracts, and constraint solving, implemented on the Erlang BEAM. So I have been prodding Claude Code for a few sessions to actually do it. It's a silly experiment, but fun to watch. Right now it's implementing a JSON parser in the generated language as a kind of milestone example…

[dead]

I plan to keep dumping tokens into it here and there to see where it goes, it's a fun rabbit hole.

I find that it's able to produce working code in the generated language just from the README and the previous examples without much trouble. And I've seen the strict typing help it catch and correct bugs quickly. I steer it very little. The only thing I keep an eye on is not allowing it to cheat about things like writing lots of concrete functionality in the host language and then just calling that from the interpreter.

Re: The Om Programming Language

#94
post #74

Earlier quoted context omitted.

Alt opinion: syntax is the least important part of a programming language. I can't wait for the day someone invents one where it's defined entirely as an AST (with the S standing for Semantic). Just bring your own weird syntax. I guess Unison is the closest to this platonic ideal right now? https://github.com/unisonweb/unison/issues/499

Love this take! Unison is exactly this, and it's awesome! Here's a quote from one of the creators: > But here's the super cool thing about our language! Since we don't store your code in a text/source code representation, and instead as a typechecked AST, we have the freedom to change the surface syntax of the language very easily, which is something we've done several times in the past. We have this unique possibili…

Can Raku do something like this? I was lightly exploring it recently, and I thought I saw that something like this may be possible with it.

Re: The Om Programming Language

#95

Earlier quoted context omitted.

If you don't mind, could you drop some code? I'd be interested to see the result :)

sure, for example it generated this small demo of the type and contract safeguards. As you can see, it's mostly "Forth but with things": # bank.ax — The Safe Bank (Milestone 2) # # Demonstrates property-based verification of financial operations. # Each function has PRE/POST contracts. VERIFY auto-generates random # inputs, filters by PRE, runs the function, and checks POST holds. # DEPOSIT: add amount to balance # S…

How does it do the proving?

Re: The Om Programming Language

#96

Earlier quoted context omitted.

Love this take! Unison is exactly this, and it's awesome! Here's a quote from one of the creators: > But here's the super cool thing about our language! Since we don't store your code in a text/source code representation, and instead as a typechecked AST, we have the freedom to change the surface syntax of the language very easily, which is something we've done several times in the past. We have this unique possibili…

Can Raku do something like this? I was lightly exploring it recently, and I thought I saw that something like this may be possible with it.

I'm not super familiar with Raku, but if RakuAST is what you had in mind it looks a bit different:

    use experimental :rakuast;
    
    my $ast = RakuAST::Call::Name.new(
      name => RakuAST::Name.from-identifier("say"),
      args => RakuAST::ArgList.new(
        RakuAST::StrLiteral.new("Hello world")
      )
    );
Looks more like "low-level programming an AST" (which I believe other languages offer as well), rather than using a bidirectional transform. I don't know how you'd get Raku code back out, for example.

Edit: I should have looked deeper, `DEPARSE` does exactly this:

https://docs.raku.org/type/RakuAST

Neat!

Re: The Om Programming Language

#97
post #74
post #25

Would recommend placing example language syntax above the fold. Was tough to have to scroll halfway down the entire site to see any syntax. Nobody cares about the EBNF syntax until they have a feel for the language.

Alt opinion: syntax is the least important part of a programming language. I can't wait for the day someone invents one where it's defined entirely as an AST (with the S standing for Semantic). Just bring your own weird syntax. I guess Unison is the closest to this platonic ideal right now? https://github.com/unisonweb/unison/issues/499

This is a Very Bad Idea. Two people working with the same language will be unable to reason about each other's code, because it requires understanding their bespoke syntax and its nuances.

Re: The Om Programming Language

#98

Earlier quoted context omitted.

sure, for example it generated this small demo of the type and contract safeguards. As you can see, it's mostly "Forth but with things": # bank.ax — The Safe Bank (Milestone 2) # # Demonstrates property-based verification of financial operations. # Each function has PRE/POST contracts. VERIFY auto-generates random # inputs, filters by PRE, runs the function, and checks POST holds. # DEPOSIT: add amount to balance # S…

How does it do the proving?

Spawns and calls z3 under the hood, I did let it cheat there because otherwise it's rabbit holes below rabbit holes all the way down :)

Re: The Om Programming Language

#99
post #79

Earlier quoted context omitted.

I have an idea, maybe we could represent that AST as parenthesis.

That's cool, but I might prefer semantic whitespace. Sure would be neat if we could both work with the same code in our preferred forms.

Like this? https://en.wikipedia.org/wiki/Whitespace_(programming_langua...

Re: The Om Programming Language

#100
post #74

Earlier quoted context omitted.

Alt opinion: syntax is the least important part of a programming language. I can't wait for the day someone invents one where it's defined entirely as an AST (with the S standing for Semantic). Just bring your own weird syntax. I guess Unison is the closest to this platonic ideal right now? https://github.com/unisonweb/unison/issues/499

This is a Very Bad Idea. Two people working with the same language will be unable to reason about each other's code, because it requires understanding their bespoke syntax and its nuances.

No it won't? That's exactly the point -- each of those people will be viewing the code in their own preferred syntax. If there is semantic nuance in the writer's syntax, the reader will see it presented in the best way their preferred syntax's representation can provide.

Imagine all the hours saved that are currently spent on tired tabs vs spaces debates, or manicuring .prettierrc, etc etc. The color of the bike shed might matter (sometimes a lot) to some people, I know, but it's storing bikes away from the elements and thieves that is the goal, not obsessing over optimizing something that is demonstrably a subjective matter of taste.

Post reply on HN