Hacker Newsnew | past | comments | ask | show | jobs | submit | fcatalan's commentslogin

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.


This is one of the more interesting uses of Claude I've seen. Instead of asking it to write code in an existing language, you asked it to design the language it wants to think in. There's something philosophically fun about that I feel = like asking a painter to design their ideal brush.

I'm curious whether the generated language actually makes Claude produce better/more reliable outputs when writing in it, or if it just reflects Claude's training bias toward what "good language design" looks like in its corpus. Would be a fascinating benchmark to run.


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.


> There's something philosophically fun about that I feel = like asking a painter to design their ideal brush.

With the large difference that painters actually paint and use the brush, they don't just algorithmically regurgitate paintings they've been shown.


If you want to go really meta ask Claude Code to re-implement itself in the new language. You could keep going doing this.

It kind of feels like it wants to go there or thereabouts, but to be honest, I just half understand half of the roadmap it has written for itself:

  - **v0.0.1** (complete): Interpreter, PRE/POST contracts, REPL, TIMES/WHILE, FILTER/MAP/REDUCE, strings, I/O
  - **v0.1.0** (complete): Static type checker, VERIFY (property-based contract testing), maps, Safe Bank milestone
  - **v0.2.0** (complete): PROVE — compile-time contract verification via Z3 SMT solver
  - **v0.3.0** (complete): Algebraic data types (TYPE/MATCH) — Option, Result, and user-defined sum types with exhaustiveness checking
  - **v0.4.0** (complete): JSON parser/encoder milestone — wildcard MATCH, string primitives, ROT4, PAIRS, NUM_STR, VERIFY for sum types
  - **v0.4.1** (current): PROVE for IF/ELSE branches (via SMT-LIB `ite`), ABS/MIN/MAX, function call inlining
  - **v0.5.0** (next): Practical language features — LET bindings, IMPORT/modules, error handling, standard library
  - **v0.6.0**: PROVE for MATCH/algebraic types, refinement-style reasoning
  - **v0.7.0**: Typed BEAM concurrency (typed message passing, stateful actors)
  - **v0.8.0**: BEAM bytecode compilation
  - **Future**: Declarative constraint solving, tensor/distribution primitives, multi-agent collaboration
I'd say the sky is the limit, but in fact the limit is the stingy token budget of the 20€ Claude sub...

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
  # Stack: [amount, balance] (amount on top)
  # PRE: amount > 0 AND balance >= 0
  # POST: result >= 0
  DEF deposit : int int -> int
    PRE { OVER 0 GTE SWAP 0 GT AND }
    ADD
    POST DUP 0 GTE
  END
  
  # WITHDRAW: subtract amount from balance
  # Stack: [amount, balance] (amount on top)
  # PRE: amount > 0 AND balance >= amount
  # POST: result >= 0
  DEF withdraw : int int -> int
    PRE { OVER OVER GTE SWAP 0 GT AND }
    SUB
    POST DUP 0 GTE
  END
  
  # Verify both functions — 500 random tests each
  VERIFY deposit 500
  VERIFY withdraw 500
  
  # Prove both functions — mathematically, for ALL inputs
  PROVE deposit
  PROVE withdraw
  
  # Demo: manual operations
  1000 200 deposit SAY
  1000 300 withdraw SAY

Running it outputs:

  VERIFY deposit: OK — 500 tests passed (1056 skipped by PRE)
  VERIFY withdraw: OK — 500 tests passed (1606 skipped by PRE)
  PROVE deposit: PROVEN — POST holds for all inputs satisfying PRE
  PROVE withdraw: PROVEN — POST holds for all inputs satisfying PRE
  1200
  700

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 :)

The charge of the Rohirrim in Return of the King also works for me

Doc Severinsen can get me almost every time too.

https://www.youtube.com/watch?v=42TgFgVTIIA


I didn't know Sogno di Volare. It does work very well, quite intense.

I got me thinking... I've never taken any mind altering drugs, so I wonder how the experience compares. I guess that even if not in the same league, being "free" and without apparent side effects this is quite the "feelgood" bang for the buck.


I get chills from music here and there. The piece that most reliably will produce the strongest effect on me is "Fantasia on a Theme by Thomas Tallis" by Ralph Vaughan Williams.

Looking at the article there seems to be a genetic component, but no one in my family has ever mentioned them, I should go ask.

We are not a "musical" family. No one plays competently any instruments or goes to concerts. I have an ukulele that I use mostly as a noisy version of a fidget spinner.

From the article I see that the openmindedness trait fits, at least musically: I sometimes go on YouTube musical late night binges and they can easily range from Renaissance guitar pieces to KPop via Mozart, Slipknot or some obscure Latvian folklore.


Here is a wonderful recording of "Fantasia on a Theme by Thomas Tallis" played in Gloucester Cathedral:

https://www.youtube.com/watch?v=ihx5LCF1yJY&list=RDihx5LCF1y...


I non-ironically got them chills just by hearing a few bars while checking your link.

I tend to go for this one https://www.youtube.com/watch?v=qIhZbvlCjY0 because although I can´t read music I can kind of vibe-read the score by looking at the waves of notes following the music. For me it adds to the experience.

Also the almost organ-like effects of the two separate orchestras seem stronger in this recording than in any other I've tried.


My wife just said she wasn't getting any chills, but definitely some yawns :)

Beautiful, within the first 3 seconds for me too, incredible

You should listen to Classic FM. You can switch it on at random and this tune is often playing. If it isn't, then it's usually Saint Saens' Organ Symphony finale (as featured in "Babe".) :)

It makes me dream of traveling between planets using wormholes for some reason

I'm going to chime in with some more examples of (for me) chills inducing classical music pieces:

- Mozarts Piano Concerto No. 20 in D Minor (very dark)

- Rossinis Barber of Seville Overture

- Mozarts "The Magic Flute" Overture (helps if you know the opera)

- Mozarts Symphony No. 39 in E, as soon as the allegro starts

- Schuberts Symphony No. 8 "Unfinished", the whole thing makes me want to burst with excitement


Thank you for sharing the track: I got chills within the first few seconds... could it be a matter of the high-harmonic frequencies of the strings, and the crescendo combined with the spacious reverb of the place where the music is performed?

Yes. I could get over the 1300 hump and at least make general sense of everything past there because I have read about half of Ōsweald Bera

Spanish ID cards have had an X. 509 cert inside them for more than 10 years, I use it all the time to sign documents and access government sites. There is already legislation and a push for an EU-wide digital identity wallet that should be up and running this year, look up eidas 2.0 and the EUDI wallet.

That looks like it should make things like privacy compatible age verification "trivial".


Thanks, that looks very cool, and apparently close to coming into effect.


Approving commands you don't understand doesn't seem ideal


People are handing over their entire system to openclaw, so that's about where we are.


Because we haven't heard about the disaster stories yet, give it some time and see how people will talk about it as if it were a virus.


The message is that process is there to extract value from people with average skills and motivation. When you find someone very skilled and self motivated doing the right thing, don't let process hamper their way.


I wish the article actually said that in plain words instead of trying to foist it into that peculiar "wolf" analogy (or whatever it's trying to do). I found the article kind of confusing. Thanks for spelling it out.


Apparently the weld that broke joined an old segment with a new one installed last year as the tracks are renovated piecemeal.

Still the media in question, "El Mundo", is a mouthpiece for the opposition parties, seeking to create indignation against the government and scoring the head of the Transport Minister in particular.

They also want to make a parallel with the situation of the former President of the Valencian Community, from their party, who had to finally resign one year after being unreachable for hours on a date while hundreds of valencians drowned as his administration waffled aimlessly.

Of course the government is ultimately responsible for the state of the infrastructure, so the Minister well might have to resign after all is said and done, but the innuendo in that piece is pure politicking, not serious journalism.


This has some crossover with ageism. In the last years in my org all the senior staff has been put to pasture doing either nothing or confined strictly to whatever they were already doing.

Some part of it is that we are perceived as lazy obstructionist naysayer dinosaurs when we point out any flaws in new projects as the article warns. But the rest is that because some of the elders were effectively semi-retired and doing little, anyone over 40 has been uncritically dumped with them.

So we keep the lights on while all the new shiny stuff is given to fresh juniors that don't ever push back and are happy to say yes, but also can't do it alone, and are lost at sea.

So they don't get anything shipped while we keep polishing our legacy turds and wince every time we accidentally get a glimpse of what they are doing.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: