top | item 46454085

Logos Language Guide: Compile English to Rust

53 points| tristenharr | 1 month ago |logicaffeine.com

34 comments

order

gouggoug|1 month ago

I wonder who the target is for such language.

What's difficult with programming isn't the language itself, it's everything else: understanding concepts, algorithms, programming patterns, the science.

It feels a bit like trying to reinvent the language of mathematics. It'd be really inefficient writing math in plain English.

forgotpwd16|1 month ago

There's no target. Someone is just experimenting with Claude. 2026 gonna be year of slop. And note this project is not FOSS. (Not sure what author is thinking. Don't they know nowadays someone can code launder their code through Claude?)

P.S. The English-to-AST though could be useful to other projects that may want natural-ish language input without having to resort to a LLM. E.g. a modify CSV tool in natural language like one posted yesterday.

layer8|1 month ago

Math started out as being written in plain natural language, until the 17th century or so, and yes, it was inefficient, that’s why it eventually changed.

tristenharr|1 month ago

Happy new year HN! After a few late nights this past week, I've finally got this one over the finish line just in time to kick the year off.

I'm happy to answer any questions that might pop up...

Some things of note:

Built-in P2P Mesh Networking

Listen on "/ip4/0.0.0.0/tcp/8080". Connect to "/ip4/192.168.1.5/tcp/8080". Sync counter on "game-room".

That's all you need for libp2p, QUIC transport, mDNS discovery, GossipSub pub/sub

Full conflict-free replicated data types: - GCounter, PNCounter — distributed counters - ORSet with configurable AddWins/RemoveWins bias - RGA, YATA — sequence CRDTs for collaborative text editing - Vector clocks, dot contexts, delta CRDTs

Wrap any CRDT in Distributed<T> and get: - Automatic journaling to disk (CRC32 checksums, auto-compaction at 1000 entries) - Automatic GossipSub replication to all peers - Unified flow: Local mutation → Journal → Network. Remote update → RAM → Journal. - Survives restarts, offline nodes, network partitions.

Go-Style Concurrency - TaskHandle<T> — spawnable async tasks with abort - Pipe<T> — bounded channels (sender/receiver split) - check_preemption() — cooperative yielding every 10ms for fairness

There's more... but those are my personal favorite features.

I've put a good bit of work into this, so I hope you all can appreciate and maybe find some uses for it here on my favorite place on the interwebs!

tombert|1 month ago

These features seem considerably more interesting than the "English to Rust" feature. These data structures and the concurrency stuff seems pretty neat.

nextaccountic|1 month ago

> Wrap any CRDT in Distributed<T>

Is this in a crate in crates.io?

koakuma-chan|1 month ago

Do I really want to yield every 10 ms?

tristenharr|1 month ago

Oh, I'm glad this got picked up! I posted it on New Years day and wasn't sure if it was going to be!

As a bit of background on myself and my goals/targets with this.

I started my career as an embedded software developer writing uCos-III for an RTOS working on medical devices for Cardinal Health where I primarily worked on enteral feeding pumps. From there, I spent a couple years in fintech, before trying my hand at my first startup where I co-founded a company in the quick commerce space. (Think similar to Doordash Dashmarts). When that fell apart I took a job at Hasura where I wrote GraphQL to SQL transpilers and other neat things for about 18 months. I've worked across a few different domains and the motivation behind writing this language is that I am preparing to teach my 13 year old brother how to code and wanted something I could get low level with him on, without losing him altogether.

This is a dual-purpose language and has a dual-AST, and the things I'm currently working on... having switched gears towards spending a couple days on the Logical side of things are adding an actual prover to the Logical AST. I'm getting ready to add a derivation tree struct and incorporate the ability to use a solver to do things like Modus Ponens, Universal Instantiation, etc. I also want to upgrade the engine to be able to reason about numbers and recursion similar to Lean with inductive types.

This is an early access product, it is free for students, educators, non-profits, orgs with < 25 people, and individuals.

It would make my day if I could get some rigorous HN style discussions, and even the critiques!! The feedback and discussions are invaluable and will help shape the direction of this effort.

What a lovely surprise doing my daily HN check before bed and seeing this post. :)

EDIT: I will read and respond to comments when I get up in the morning, feel free to ask questions! Or make suggestions.

dented42|1 month ago

Ah. So we’re recreating COBOL in 2026 I see.

iberator|1 month ago

Cobol is still actively developed and maintained by IBM.

tombert|1 month ago

You said it before I did; wasn't this the basic point of COBOL? TO make something that more naturally read like English but could be executed.

It's a cute idea, though I think the consensus is that once you actually learn a programming language, it generally doesn't help to have it look like prose.

khimaros|1 month ago

i also built something in this space, but English to any language. it is also self hosting (the "compiler" itself is built from an English language spec and chilled to several language implementations). supports any LLM backend including llama.cpp: https://github.com/khimaros/enc -- designed for Makefile driven workflows, mimicking the 'cc' CLI. many examples in the repo.

elcapitan|1 month ago

I get Applescript PTSD from this. Could never remember the "easier natural" way to write even small pieces of code correctly in it.

stevedonovan|1 month ago

Yep, there's always syntax, whether it's 'friendly' or not.

And it still isn't natural language, where you can paraphrase, use synonyms etc. Good job for an LLM

colordrops|1 month ago

At first I thought this was going to be some LLM thing. I had an idea a while ago, "context-based module development", that I started on a prototype of but never followed up on. The idea is to have a standard format for defining modules, black boxes with interfaces and clear definitions, that can be composed hierarchically. Module definitions and their code should not be larger than the context window of an LLM. As long as each module is well defined and tested and treated like a black box, you could have a system composed of both human and AI built modules that should behave as expected and be somewhat comprehensible. Not all architectures would work with this and I don't know if it would have worked in the end, but I do expect that at some point a more formal system for defining software from the ground up for AI development will emerge.

lasgawe|1 month ago

A great idea. I think this is a pseudocode to language compiler, similar to Pascal but easier than that. This is more suitable for language learners rather than developers imho.

chupchap|1 month ago

OMG this is so fascinating. We were taught LOGO in school for a year when we were kids

gus_massa|1 month ago

A total different language, but I guess the name clash is a problem.

Surac|1 month ago

Reinventing COBOL?