frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Compiling C to a custom architecture: my experience

https://github.com/ChristosMaragkos/Sharpie
1•NeverBugFree•1h ago

Comments

NeverBugFree•1h ago
For the last few months I've been researching how C compilers work, as I'd like to be able to write programs/games for the 16-bit ISA I designed and implemented. It was a rabbit hole nobody could've prepared me for: optimizations, DAGs, instruction selection, CFGs and everything in between. After asking around, I was told to try making a backend for either PCC, GCC or LLVM. I knew PCC was the simplest of the three, so naturally I attempted it first. Boy, what a mistake. PCC is archaic and so is its documentation. After a few days of "monkey see, monkey do" and imitating concepts I saw other 16-bit PCC targets implement, I tried compiling with my own target... And got a segfault. Nothing I could change anywhere in the codebase would make it budge and compile, so I tried compiling one of the existing targets. You can imagine I wanted to eat my can of Monster when that threw a segfault as well. I tried to tackle GCC and LLVM, but being the behemoths they are, the task was unapproachable by someone with little to no experience in compilers like me.

I was about to give up when I was looking around github and found out that clang has C# bindings in the form of the ClangSharp nuget package. Given the rest of my project is written in C# as well, I thought it couldn't hurt to give it a go, and I was right: within a day I was compiling simple C programs to my ISA.

Now, after a lot of research and work, I have a working compiler complete with peephole optimizations, implementations of C standard library functions such as alloca and memcpy via my project's firmware layer, and a fast C -> ROM file workflow. I'd love if you checked it out.

OpenClaw Is a Security Nightmare Dressed Up as a Daydream

https://composio.dev/content/openclaw-security-and-vulnerabilities
1•fs_software•1m ago•0 comments

March, 19-21: God is a comedian

https://no01.substack.com/p/march-19-21-god-is-a-comedian
1•robin_reala•1m ago•0 comments

Microsoft rolls back some of its Copilot AI bloat on Windows

https://techcrunch.com/2026/03/20/microsoft-rolls-back-some-of-its-copilot-ai-bloat-on-windows/
2•cratermoon•1m ago•0 comments

The U.S. Ammo Shortage Is Worse Than You Think

https://www.wsj.com/opinion/the-u-s-ammo-shortage-is-worse-than-you-think-97096193
1•Teever•2m ago•0 comments

China is wrestling with a novel phenomenon: inherited wealth

https://www.google.com/url?q=https://www.economist.com/briefing/2026/03/12/china-is-wrestling-wit...
2•mooreds•5m ago•1 comments

How to Not Get Hacked Through File Uploads

https://www.eliranturgeman.com/2026/03/14/uploads-attack-surface/
1•fs_software•5m ago•0 comments

Prosecutor notes explicitly state Jean Luc Brunel offered to cooperate

https://www.wsj.com/us-news/epstein-accomplice-brunel-evidence-6693cb70
2•Jimmc414•5m ago•0 comments

Genome modelling and design across all domains of life with Evo 2

https://www.nature.com/articles/s41586-026-10176-5
1•tiborsaas•6m ago•0 comments

Even an AI Needs a Diary

https://adventuresinclaude.ai/posts/even-an-ai-needs-a-diary
1•mooreds•6m ago•0 comments

How cross-thread double free detection could work in glibc malloc

https://kallus.org/blog_tcache_key.html
1•bkallus•7m ago•0 comments

Style Is a Consistent Constraint

https://stephango.com/style
1•rdegges•7m ago•0 comments

New development in PRNG of wyhash: w1rand

https://github.com/wangyi-fudan/wyhash
1•jinyu2026•7m ago•1 comments

US Job Market Visualizer

https://github.com/karpathy/jobs
2•lopespm•8m ago•0 comments

Show HN: AI Prompts for DPC Practice Ops – one found $18.6K/mo in billing leaks

https://altmaniac4.gumroad.com/l/uzyimr
1•LabSageMD•10m ago•0 comments

Show HN: Threejs 3D wireframe stylizing tool – Generate infinite variations

https://github.com/Lywald/Wireframed.js
1•ycosynot•11m ago•0 comments

Microsoft considers legal action over $50B Amazon-OpenAI cloud deal

https://www.reuters.com/technology/microsoft-weighs-legal-action-over-50-billion-amazon-openai-cl...
3•indigodaddy•14m ago•0 comments

Iran will close strait of Hormuz if Trump acts on 48 hour infrastructure threat

https://www.theguardian.com/world/live/2026/mar/22/middle-east-crisis-live-iran-war-trump-ultimat...
7•Jimmc414•14m ago•0 comments

80% of School Is a Waste of Time – Will AI Change It?

https://www.zappable.com/p/the-case-against-education-podcast
2•paulpauper•15m ago•0 comments

The Program That's Turning Schools Around

https://www.theatlantic.com/education/2026/01/texas-education-community-schools/685703/
1•paulpauper•15m ago•0 comments

Inside Maven, Palantir's Military Brain Built on Claude

https://www.linkedin.com/pulse/inside-maven-palantirs-military-brain-built-claude-anthony-maio-bd6ee
1•geox•17m ago•0 comments

CEOs Don't Steer (2017)

https://www.ribbonfarm.com/2017/11/09/ceos-dont-steer/
1•krrishd•18m ago•0 comments

Why I love NixOS

https://www.birkey.co/2026-03-22-why-i-love-nixos.html
11•birkey•19m ago•3 comments

Is Argon2 better than Bcrypt?

https://pilcrowonpaper.com/blog/14
2•mooreds•21m ago•0 comments

Vibe Coding Is a Security Disaster That Is About to Happen

https://medium.com/@jostfaganel/vibe-coding-is-a-security-disaster-that-is-about-to-happen-9f72f3...
2•jfaganel99•22m ago•1 comments

Full $44M budget breakdown for The Interview by Seth Rogen (2013) [pdf]

https://wikileaks.org/sony/docs/bonus/1/Password/The%20Interview%20Budget%20Final%2010_10_13.pdf
3•cocacola1•22m ago•0 comments

Show HN: Wormhole.page – Magic Wormhole file transfer in the browser via WASM

https://wormhole.page
4•lucamartinetti•22m ago•0 comments

SoftBank planning $500B data center in Ohio

https://www.japantimes.co.jp/business/2026/03/21/companies/softbank-ohio-data-center/
2•mikhael•23m ago•0 comments

How to train AI on your writing style

https://usenoren.ai/blog/how-to-train-ai-on-your-writing-style
3•snoren•25m ago•0 comments

Show HN: OpenFOIA – local-first FOIA toolkit with entity graphs

https://github.com/JordanCoin/openfoia
1•jordancj•26m ago•0 comments

Coding as a Game of Probability

https://robertmaple.co.uk/coding-as-a-game-of-probabilities/
3•_under_scores_•27m ago•0 comments