frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Tiny C Compiler

https://bellard.org/tcc/
102•guerrilla•3h ago•44 comments

SectorC: A C Compiler in 512 bytes

https://xorvoid.com/sectorc.html
186•valyala•7h ago•34 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
110•surprisetalk•7h ago•116 comments

Brookhaven Lab's RHIC concludes 25-year run with final collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
43•gnufx•6h ago•45 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
130•mellosouls•10h ago•279 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
880•klaussilveira•1d ago•269 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
129•vinhnx•10h ago•15 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
166•AlexeyBrin•12h ago•29 comments

The F Word

http://muratbuffalo.blogspot.com/2026/02/friction.html
97•zdw•3d ago•46 comments

FDA intends to take action against non-FDA-approved GLP-1 drugs

https://www.fda.gov/news-events/press-announcements/fda-intends-take-action-against-non-fda-appro...
60•randycupertino•2h ago•90 comments

First Proof

https://arxiv.org/abs/2602.05192
96•samasblack•9h ago•63 comments

The silent death of Good Code

https://amit.prasad.me/blog/rip-good-code
48•amitprasad•1h ago•44 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
265•jesperordrup•17h ago•86 comments

I write games in C (yes, C) (2016)

https://jonathanwhiting.com/writing/blog/games_in_c/
167•valyala•7h ago•148 comments

Eigen: Building a Workspace

https://reindernijhoff.net/2025/10/eigen-building-a-workspace/
4•todsacerdoti•4d ago•1 comments

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
85•thelok•9h ago•18 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
549•theblazehen•3d ago•203 comments

Show HN: I saw this cool navigation reveal, so I made a simple HTML+CSS version

https://github.com/Momciloo/fun-with-clip-path
49•momciloo•7h ago•9 comments

Show HN: A luma dependent chroma compression algorithm (image compression)

https://www.bitsnbites.eu/a-spatial-domain-variable-block-size-luma-dependent-chroma-compression-...
26•mbitsnbites•3d ago•2 comments

Selection rather than prediction

https://voratiq.com/blog/selection-rather-than-prediction/
24•languid-photic•4d ago•6 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
246•1vuio0pswjnm7•13h ago•388 comments

Microsoft account bugs locked me out of Notepad – Are thin clients ruining PCs?

https://www.windowscentral.com/microsoft/windows-11/windows-locked-me-out-of-notepad-is-the-thin-...
79•josephcsible•5h ago•105 comments

Reinforcement Learning from Human Feedback

https://rlhfbook.com/
108•onurkanbkrc•12h ago•5 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
137•videotopia•4d ago•44 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
57•rbanffy•4d ago•17 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
215•limoce•4d ago•123 comments

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
303•alainrk•12h ago•480 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
48•marklit•5d ago•9 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
121•speckx•4d ago•183 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
294•isitcontent•1d ago•39 comments
Open in hackernews

Copy-and-Patch: A Copy-and-Patch Tutorial

https://transactional.blog/copy-and-patch/tutorial
116•todsacerdoti•3mo ago

Comments

shoo•3mo ago
the accompanying post "How It Works" is worth reading alongside this tutorial

https://transactional.blog/copy-and-patch/

(key terms: abus[e|ing]: 4, force: 3, trick: 1, chance: 1)

weinzierl•3mo ago
I think this technique also lies at the heart of the Cranelift project.

https://cranelift.dev/

aw1621107•3mo ago
IIRC Cranelift doesn't use copy-and-patch. It uses e-graphs [0] as part of its optimization pipeline, though.

Closest thing in (relatively) recent news that uses copy-and-patch I can think of is CPython's new JIT.

[0]: https://github.com/bytecodealliance/rfcs/pull/27

weinzierl•3mo ago
My understanding is that e-graphs take care of selecting the best patch (by examining many options in parallel) but fundamentally it is still copy-and-patch.
aw1621107•3mo ago
Could you elaborate more on "fundamentally it is still copy-and-patch"? From what I can recall when I had first read about copy-and-patch a not-uncommon comparison was against Cranelift, which to me would imply that different approaches were taken. I don't recall any discussion about Cranelift's use of the technique, either, so your claim that it's at the heart of Cranelift is new information to me. Has Cranelift adopted copy-and-patch (maybe for a specific compilation stage?) in the meantime?
weinzierl•3mo ago
You are right. Somehow I had in my mind that e-graphs worked with pre-compiled snippets of code but it seems Cranelift does not do that.
sestep•3mo ago
Indeed, the original copy-and-patch paper explicitly compares against Cranelift: https://fredrikbk.com/publications/copy-and-patch.pdf
fikovnik•3mo ago
But not that is conceptually related, only that the copy-and-patch is faster than cranelift in that particular scenario.
IainIreland•3mo ago
Cranelift does not use copy-and-patch. Consider, for example, this file, which implements part of the instruction generation logic for x64: https://github.com/bytecodealliance/wasmtime/blob/main/crane...

Copy-and-patch is a technique for reducing the amount of effort it takes to write a JIT by leaning on an existing AOT compiler's code generator. Instead of generating machine code yourself, you can get LLVM (or another compiler) to generate a small snippet of code for each operation in your internal IR. Then codegen is simply a matter of copying the precompiled snippet and patching up the references.

The more resources are poured into a JIT, the less it is likely to use copy-and-patch. You get more control/flexibility doing codegen yourself.

But see also Deegen for a pretty cool example of trying to push this approach as far as possible: https://aha.stanford.edu/deegen-meta-compiler-approach-high-...

re•3mo ago
Related:

Copy-and-Patch: Fast compilation for high-level languages and bytecode (2020) https://news.ycombinator.com/item?id=40553448 - June 2024 (51 comments)

A copy-and-patch JIT compiler for CPython - https://news.ycombinator.com/item?id=38769874 - Dec 2023 (68 comments)

Copy-and-Patch: Fast JIT Compilation for SQL, WebAssembly, and Others - https://news.ycombinator.com/item?id=28547057 - Sept 2021 (7 comments)

programLyrique•3mo ago
There are some experiments in using copy-and-patch for the R language (after Python): https://dl.acm.org/doi/10.1145/3759548.3763370

From a master thesis: https://www.itspy.cz/wp-content/uploads/2025/09/it_spy_2025_...

fikovnik•3mo ago
Featuring self-modifying code - it can repatch emitted instruction at runtime based on the current value type.
anon-3988•3mo ago
This blog goes from 0 to 100 really, really quickly. I have no idea what I am looking. I suppose it is not meant for beginners but it claims to be a tutorial.
gopalv•3mo ago
> but it claims to be a tutorial.

This is, but only for someone who wants to do JIT work without writing assembly code, but can read assembly code back into C (or can automate that part).

Instead of doing all manual register allocations in the JIT, you get to fill in the blanks with the actual inputs after a more (maybe) diligent compiler has allocated the registers, pushed them and all that.

There's a similar set of implementation techniques in Apache Impala, where the JIT only invokes the library functions when generating JIT code, instead of writing inline JIT operations, so that they can rely on shorter compile times for the JIT and deeper optimization passes for the called functions.

penguin_booze•3mo ago
https://www.reddit.com/r/restofthefuckingowl/
mamcx•3mo ago
Question: For what else (apart from assembler) this could be a good idea?

I think WASM, but could be for a custom byte code? and more importantly, for a set of host-native functions (like I make some rust functions that somehow exploit this idea?)

zackmorris•3mo ago
This is really interesting, and I'm surprised that I had never looked at JIT compiling as self-modifying code (SMC). Also that I had never heard of copy-and-patch.

There are whole classes of problems that can be more easily solved with SMC. That's part of what got me into FPGAs back in the 90s, before I abandoned them due to their lack of exponential growth and proprietary placement and routing tools.

This could have implications for faster in-app scripting like in games. Also for building more powerful shaders. I wonder if there are analogs of the article's mprotect(ret, 256, PROT_READ | PROT_EXEC) calls for GPUs.