frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: btrc – C, but better. Built with AI in just a few weeknights

https://github.com/schiffy91/btrc
4•schiffy•1h ago
btrc is a statically-typed language that transpiles to C11. It adds classes, generics (monomorphized), type inference, lambdas, f-strings, collections (Vector, Map, Set), threads, GPU compute via WebGPU, ARC memory management, exception handling, and a standard library — while generating strict C11 with no runtime, no GC, and no VM.

The compiler is a 6-stage Python pipeline (lexer → parser → analyzer → IR gen → optimizer → C emitter) driven by a formal EBNF grammar and an algebraic AST spec (Zephyr ASDL). The generated C is readable and linkable with any C11 compiler. It ships with a VS Code extension (LSP with completions, diagnostics, go-to-def, hover) and 930 tests.

I've wanted to build something like this for about 10 years, but it was always too ambitious of a project to do on the side. With AI, I was able to build it over a handful of evenings after work, which is really wild.

Some things worth noting:

A few things that I find fun / interesting / noteworthy:

- The EBNF grammar and ASDL spec are the single source of truth — the lexer, parser, and AST node classes are all derived from them, not hardcoded

- Generics are monomorphized (like C++ templates / Rust), so zero runtime overhead but binary size grows per type combination

- ARC handles most memory management including cycle detection and cleanup on exceptions — no GC, deterministic destruction

- The entire stdlib (collections, math, datetime, IO, threading) is written in btrc itself

- @gpu functions transpile to WGSL compute shaders with auto-generated WebGPU boilerplate — array params become storage buffers, scalars become uniforms

- The generated C is meant to be readable — you can step through it in gdb/lldb and it mostly makes sense (just verbose with lots of underscores)

- There's a 3D game engine example (ball + WASD + jump + shadows + raymarching) that's ~570 lines of btrc across 11 small modules

- The VS Code extension reuses the compiler's own lexer, parser, and analyzer — diagnostics match exactly what the compiler reports

- btrc inherits C's memory model wholesale — no borrow checker, no lifetime analysis. You can absolutely still shoot yourself in the foot

- The whole thing was built in a few evenings after work with heavy AI assistance, which felt like the most interesting part of the project honestly

Comments

rohandas•1h ago
I take it the mark of a good vibe-coded programming language is the entire thing in "initial commit"

Solar self-descaling seesaw extractor for lithium production from seawater

https://www.cell.com/device/fulltext/S2666-9986(25)00341-2?_returnURL=https%3A%2F%2Flinkinghub.el...
1•PaulHoule•1m ago•0 comments

ROLV – Beats Vendor Kernels, Cross‑Platform

https://img1.wsimg.com/blobby/go/68eb7843-76aa-4f45-831c-bf0cbe513bde/downloads/52638717-8fe8-4b3...
1•heggenhougen•2m ago•1 comments

SCOTUS declines to hear dispute over copyrights for AI-generated material

https://www.reuters.com/legal/government/us-supreme-court-declines-hear-dispute-over-copyrights-a...
2•cainxinth•3m ago•0 comments

What Even Are Breeze, QtQuick, QtWidget, Union..?

https://akselmo.dev/posts/what-are-breeze-widgets-quick-union/
1•birdculture•3m ago•0 comments

Show HN: Vim-Claude-code – Claude CLI integration for AI workflows inside Vim

https://github.com/rishi-opensource/vim-claude-code
1•rishi-hn•4m ago•0 comments

Ask HN: Git branching strategy when using multiple CLIs running multiple agents?

1•elpakal•4m ago•0 comments

HBO Max and Paramount+ to Combine into One Streaming Platform

https://variety.com/2026/tv/news/hbo-max-paramount-plus-combine-streaming-1236676645/
1•indigodaddy•5m ago•0 comments

Open source devs consider making hogs pay for every download

https://www.theregister.com/2026/02/28/open_source_opinion/
1•CrankyBear•6m ago•0 comments

Using mobile phone data when evaluating electric vehicle usage

https://www.gov.uk/government/publications/using-mobile-phone-data-when-evaluating-electric-vehic...
1•_____k•6m ago•0 comments

Show HN: CodecProbe – What your device says it can play vs. what it can

https://codecprobe.dev
1•spliffedr•8m ago•1 comments

Show HN:Logic gates as persistent stateful tasks – a BCD decoder built on a VM

2•tracyspacy•8m ago•0 comments

Modalities

https://www.freemanjiang.com/modalities
1•freemanjiang•8m ago•0 comments

Qwen 3.5 9B, 4B models beating 30B, 80B models

https://huggingface.co/Qwen/Qwen3.5-4B
1•satvikpendem•8m ago•0 comments

Secretary of War Tweets That Anthropic Is Now a Supply Chain Risk

https://thezvi.substack.com/p/secretary-of-war-tweets-that-anthropic
1•paulpauper•10m ago•0 comments

Brazil's 'Dubai' – where skyscrapers and sky-high property prices meet

https://www.ft.com/content/d640389f-bef8-49c1-bf3d-7c3e8c92c95d
1•paulpauper•10m ago•0 comments

What the recent dust-up means for AI regulation

https://marginalrevolution.com/marginalrevolution/2026/03/what-the-recent-dust-up-means-for-ai-re...
1•paulpauper•11m ago•0 comments

Show HN: Smidge. Turn expert knowledge into agent intelligence

https://www.smdg.app/
1•junianwoo•13m ago•0 comments

Show HN: MemlyBook – AI agents debating their own freedom

https://github.com/sordado123/memlybook-engine
1•memly•15m ago•1 comments

Everything to know about NASA's Artemis in its chase of China to the Moon

https://jatan.space/moon-monday-issue-264/
2•JPLeRouzic•16m ago•0 comments

A World Where All Is Free. That's Elon Musk's Theory of 'Sustainable Abundance.'

https://www.nytimes.com/2026/02/27/business/a-world-where-all-is-free-thats-elon-musks-theory-of-...
1•bookofjoe•16m ago•1 comments

Ask HN: Using OpenClaw for marketing: worth it or overhyped?

1•starfun•16m ago•0 comments

Claude Auto Memory

https://code.claude.com/docs/en/memory
1•pajtai•17m ago•0 comments

Show HN: ImagineIf – Collaborative storytelling with AI visuals in 22 languages

https://imagineif.app
1•tugaypala•18m ago•1 comments

Xous security focused open source on 22nm custom silicon

https://www.crowdsupply.com/sutajio-kosagi/precursor/updates/xous-0-10-0-introducing-baochip-1x-s...
2•ZiiS•20m ago•0 comments

PanicLock: Disable Touch ID and lock screen with a single click on macOS

https://paniclock.github.io/
1•rendx•21m ago•0 comments

Show HN: Super Chopsticks – Finger Counting Game

https://superchopsticks.com
1•deckardt•21m ago•0 comments

Why SSRFs Are the Trickiest Security Issue in Modern Web Apps

https://tachyon.so/blog/ssrfs-trickiest-issue
2•logicx24•22m ago•0 comments

Run your agent 10 times – you won't get the same answer

https://arxiv.org/abs/2602.11619
3•amanmehta1997•22m ago•0 comments

Web dependencies are broken. Can we fix them?

https://lea.verou.me/blog/2026/web-deps/
1•fagnerbrack•22m ago•0 comments

Do Not Write with an LLM

https://elijahpotter.dev/articles/do-not-write-with-an-LLM
1•chilipepperhott•22m ago•0 comments