frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Xcc700: Self-hosting mini C compiler for ESP32 (Xtensa) in 700 lines

https://github.com/valdanylchuk/xcc700
35•isitcontent•3h ago
Repo: https://github.com/valdanylchuk/xcc700

Hi Everyone! I just wrote my first compiler!

- single pass, recursive descent, direct emission

- generates REL ELF binaries, runnable using ESP-IDF elf_loader

- very basic features only, just enough for self-hosting

- treats the Xtensa CPU as a stack machine for simplicity, no register allocation / window usage

- compilable on Mac, probably also Linux, can cross-compile for esp32 there

- wrote for fun / cyberdeck project

Sample output from esp32:

    xcc700.elf xcc700.c -o /d/cc.elf
    
    [ xcc700 ] BUILD COMPLETED > OK
    > IN  : 700 Lines / 7977 Tokens
    > SYM : 69 Funcs / 91 Globals
    > REL : 152 Literals / 1027 Patches
    > MEM : 1041 B .rodata / 17120 B .bss
    > OUT : 27735 B .text / 33300 B ELF
    [ 40 ms ] >> 17500 Lines/sec <<
My best hope is that some fork might grow into a unique nice language tailored to the esp32 platform. I think it is underrated in userland hobby projects.

Comments

boznz•1h ago
Cool, always refreshing to see different approaches to the same problem, and you learn so much by doing, this is more the kind of tinkering I will be doing in retirement.
MobiusHorizons•1h ago
Very cool! What was the shell you are running in the demo video?
isitcontent•58m ago
Thanks! That is just my small custom experimental mini shell. This project started as a retro DOS-like cyberdeck, and first thing I tried to run there was DOS programs, which is why it looks like that. Only got to COM files, when I learned about elf_loader, so I now focus on that. I might extract and release whatever is valuable/reusable in that shell later on.
guestbest•24m ago
Thanks for posting this here. I star’d the project. Getting a portable computer with a minimal flexible and previously well supported operating system was one of my goals for the esp32 as well. I’ll be watching for more.
ladyanita22•14m ago
That's super cool! I have been wondering what could be done with ESP32 if it weren't for the lack of RAM.

As a fun of Rust, one thing that saddens me is knowing these things would be difficult to achieve with a Rust compiler, given the language seems to be vastly more complex.

Unless someone created a subset of Rust without (some?) safety checks, I guess.

Package managers keep using Git as a database, it never works out

https://nesbitt.io/2025/12/24/package-managers-keep-using-git-as-a-database.html
414•birdculture•6h ago•234 comments

C/C++ Embedded Files (2013)

https://www.4rknova.com//blog/2013/01/27/cpp-embedded-files
27•ibobev•1h ago•22 comments

LearnixOS

https://www.learnix-os.com
128•gtirloni•6h ago•44 comments

Experts Explore New Mushroom Which Causes Fairytale-Like Hallucinations

https://nhmu.utah.edu/articles/experts-explore-new-mushroom-which-causes-fairytale-hallucinations
40•astronads•1h ago•12 comments

Show HN: AutoLISP interpreter in Rust/WASM – a CAD workflow invented 33 yrs ago

https://acadlisp.de/noscript.html
40•holg•3h ago•19 comments

Unix "find" expressions compiled to bytecode

https://nullprogram.com/blog/2025/12/23/
69•rcarmo•6h ago•4 comments

Show HN: Xcc700: Self-hosting mini C compiler for ESP32 (Xtensa) in 700 lines

https://github.com/valdanylchuk/xcc700
35•isitcontent•3h ago•5 comments

Joan Didion and Kurt Vonnegut had something to say. We have it on tape

https://www.nytimes.com/2025/12/19/books/james-baldwin-joan-didion-92ny-recordings.html
71•tintinnabula•4d ago•11 comments

FFmpeg has issued a DMCA takedown on GitHub

https://twitter.com/FFmpeg/status/2004599109559496984
36•merlindru•1h ago•4 comments

High School Student Discovers 1.5M Potential New Astronomical Objects

https://www.smithsonianmag.com/smart-news/high-school-student-discovers-1-5-million-potential-new...
78•mhb•3h ago•71 comments

The Algebra of Loans in Rust

https://nadrieril.github.io/blog/2025/12/21/the-algebra-of-loans-in-rust.html
141•g0xA52A2A•3d ago•74 comments

A Proclamation Regarding the Restoration of the Em-Dash

https://blog.nawaz.org/posts/2025/Dec/a-proclamation-regarding-the-restoration-of-the-dash/
57•BeetleB•1h ago•58 comments

ZJIT is now available in Ruby 4.0

https://railsatscale.com/2025-12-24-launch-zjit/
22•ibobev•1h ago•10 comments

Rob Pike got spammed with an AI slop "act of kindness"

https://simonwillison.net/2025/Dec/26/slop-acts-of-kindness/
9•nabla9•21m ago•0 comments

Rob Pike Goes Nuclear over GenAI

https://skyview.social/?url=https%3A%2F%2Fbsky.app%2Fprofile%2Frobpike.io%2Fpost%2F3matwg6w3ic2s&...
765•christoph-heiss•4h ago•714 comments

Sandbox: Run untrusted AI code safely, fast

https://github.com/PwnFunction/sandbox
11•vortex_ape•1w ago•1 comments

TurboDiffusion: 100–200× Acceleration for Video Diffusion Models

https://github.com/thu-ml/TurboDiffusion
193•meander_water•15h ago•35 comments

Overlooked No More: Inge Lehmann, Who Discovered the Earth's Inner Core

https://www.nytimes.com/2025/12/20/obituaries/inge-lehmann-overlooked.html
49•Hooke•3d ago•12 comments

An 11-qubit atom processor in silicon with all fidelities from 99.10% to 99.99%

https://www.nature.com/articles/s41586-025-09827-w
60•giuliomagnifico•5d ago•40 comments

Bedlam Cube Solved (ALL 19,186 solutions)

http://scottkurowski.com/BedlamCube/
19•kristianp•4d ago•2 comments

Show HN: Gaming Couch – a local multiplayer party game platform for 8 players

https://gamingcouch.com
359•ChaosOp•5d ago•106 comments

Building an AI agent inside a 7-year-old Rails monolith

https://catalinionescu.dev/ai-agent/building-ai-agent-part-1/
93•cionescu1•11h ago•40 comments

The First Web Server

https://dfarq.homeip.net/the-first-web-server/
33•giuliomagnifico•7h ago•6 comments

ChatGPT conversations still lack timestamps after years of requests

https://community.openai.com/t/timestamps-for-chats-in-chatgpt/440107?page=3
186•Valid3840•6h ago•103 comments

Geometric Algorithms for Translucency Sorting in Minecraft [pdf]

https://douira.dev/assets/document/douira-master-thesis.pdf
55•HeliumHydride•9h ago•19 comments

How to Reproduce This Book with LaTeX

https://github.com/BenjaminGor/Latex_Notes_Tutorial
76•nill0•1w ago•11 comments

MiniMax M2.1: Built for Real-World Complex Tasks, Multi-Language Programming

https://www.minimaxi.com/news/minimax-m21
197•110•18h ago•70 comments

Maybe the default settings are too high

https://www.raptitude.com/2025/12/maybe-the-default-settings-are-too-high/
836•htk•19h ago•272 comments

I'm a laptop weirdo and that's why I like my new Framework 13

https://blog.matthewbrunelle.com/im-a-laptop-weirdo-and-thats-why-i-like-my-new-framework-13/
218•todsacerdoti•6h ago•205 comments

Targeting by Reference in the Shadow DOM

https://meyerweb.com/eric/thoughts/2025/12/19/targeting-by-reference-in-the-shadow-dom/
12•surprisetalk•6d ago•0 comments