frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

"Compiled" Specs

https://deepclause.substack.com/p/compiled-specs
1•schmuhblaster•2m ago•0 comments

The Next Big Language (2007) by Steve Yegge

https://steve-yegge.blogspot.com/2007/02/next-big-language.html?2026
1•cryptoz•3m ago•0 comments

Open-Weight Models Are Getting Serious: GLM 4.7 vs. MiniMax M2.1

https://blog.kilo.ai/p/open-weight-models-are-getting-serious
3•ms7892•13m ago•0 comments

Using AI for Code Reviews: What Works, What Doesn't, and Why

https://entelligence.ai/blogs/entelligence-ai-in-cli
3•Arindam1729•13m ago•0 comments

Show HN: Solnix – an early-stage experimental programming language

https://www.solnix-lang.org/
2•maheshbhatiya•13m ago•0 comments

DoNotNotify is now Open Source

https://donotnotify.com/opensource.html
4•awaaz•15m ago•1 comments

The British Empire's Brothels

https://www.historytoday.com/archive/feature/british-empires-brothels
2•pepys•15m ago•0 comments

What rare disease AI teaches us about longitudinal health

https://myaether.live/blog/what-rare-disease-ai-teaches-us-about-longitudinal-health
2•takmak007•20m ago•0 comments

The Brand Savior Complex and the New Age of Self Censorship

https://thesocialjuice.substack.com/p/the-brand-savior-complex-and-the
2•jaskaransainiz•22m ago•0 comments

Show HN: A Prompting Framework for Non-Vibe-Coders

https://github.com/No3371/projex
2•3371•23m ago•0 comments

Kilroy is a local-first "software factory" CLI

https://github.com/danshapiro/kilroy
2•ukuina•33m ago•0 comments

Mathscapes – Jan 2026 [pdf]

https://momath.org/wp-content/uploads/2026/02/1.-Mathscapes-January-2026-with-Solution.pdf
1•vismit2000•35m ago•0 comments

80386 Barrel Shifter

https://nand2mario.github.io/posts/2026/80386_barrel_shifter/
2•jamesbowman•36m ago•0 comments

Training Foundation Models Directly on Human Brain Data

https://arxiv.org/abs/2601.12053
1•helloplanets•36m ago•0 comments

Web Speech API on HN Threads

https://toulas.ch/projects/hn-readaloud/
1•etoulas•38m ago•0 comments

ArtisanForge: Learn Laravel through a gamified RPG adventure – 100% free

https://artisanforge.online/
2•grazulex•39m ago•1 comments

Your phone edits all your photos with AI – is it changing your view of reality?

https://www.bbc.com/future/article/20260203-the-ai-that-quietly-edits-all-of-your-photos
1•breve•40m ago•0 comments

DStack, a small Bash tool for managing Docker Compose projects

https://github.com/KyanJeuring/dstack
2•kppjeuring•41m ago•1 comments

Hop – Fast SSH connection manager with TUI dashboard

https://github.com/danmartuszewski/hop
1•danmartuszewski•41m ago•1 comments

Turning books to courses using AI

https://www.book2course.org/
5•syukursyakir•43m ago•3 comments

Top #1 AI Video Agent: Free All in One AI Video and Image Agent by Vidzoo AI

https://vidzoo.ai
2•Evan233•43m ago•1 comments

Ask HN: How would you design an LLM-unfriendly language?

1•sph•45m ago•0 comments

Show HN: MuxPod – A mobile tmux client for monitoring AI agents on the go

https://github.com/moezakura/mux-pod
1•moezakura•46m ago•0 comments

March for Billionaires

https://marchforbillionaires.org/
1•gscott•46m ago•0 comments

Turn Claude Code/OpenClaw into Your Local Lovart – AI Design MCP Server

https://github.com/jau123/MeiGen-Art
1•jaujaujau•46m ago•0 comments

An Nginx Engineer Took over AI's Benchmark Tool

https://github.com/hongzhidao/jsbench/tree/main/docs
1•zhidao9•48m ago•0 comments

Use fn-keys as fn-keys for chosen apps in OS X

https://www.balanci.ng/tools/karabiner-function-key-generator.html
1•thelollies•49m ago•1 comments

Sir/SIEN: A communication protocol for production outages

https://getsimul.com/blog/communicate-outage-to-ceo
1•pingananth•50m ago•1 comments

Show HN: OpenCode for Meetings

https://getscripta.app
2•whitemyrat•51m ago•1 comments

The chaos in the US is affecting open source software and its developers

https://www.osnews.com/story/144348/the-chaos-in-the-us-is-affecting-open-source-software-and-its...
1•pjmlp•52m ago•0 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.