frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Closures as Win32 Window Procedures

https://nullprogram.com/blog/2025/12/12/
47•ibobev•3h ago

Comments

cyberax•2h ago
This approach was used in the ATL/WTL (Active Template Library, Windows Template Library) in the early 2000-s. It was a bad idea, because you need to generate executable code, interfering with NX-bit memory protection.

Windows actually had a workaround in its NX-bit implementation that recognized the byte patterns of these trampolines from the fault handler: https://web.archive.org/web/20090123222148/http://support.mi...

Philpax•1h ago
Hah! I usually allocate trampolines at runtime, as the article suggests, but reserving R/W space for them within the application's memory space is a cute trick.

Probably not useful for most of my use cases (I'm usually injecting a payload, so I'd still have the pointer-distance issue between the executable and my payload), but it's still potentially handy. Will have to keep that around!

RossBencina•1h ago
> This is more work than going through GWLP_USERDATA

Indeed, aside from a party trick, why build an executable trampoline at runtime when you can store and retrieve the context, or a pointer to the context, with SetWindowLong() / GetWindowLong() [1]?

Slightly related: in my view Win32 windows are a faithful implementation of the Actor Model. The window proc of a window is mutable, it represents the current behavior, and can be changed in response to any received message. While I haven't personally seen this used in Win32 programs it is a powerful feature as it allows for implementing interaction state machines in a very natural way (the same way that Miro Samek promotes in his book.)

[1] https://learn.microsoft.com/en-us/windows/win32/api/winuser/...

Linux Sandboxes and Fil-C

https://fil-c.org/seccomp
123•pizlonator•4h ago•30 comments

An Implementation of J

https://www.jsoftware.com/ioj/ioj.htm
24•ofalkaed•2h ago•3 comments

Closures as Win32 Window Procedures

https://nullprogram.com/blog/2025/12/12/
47•ibobev•3h ago•3 comments

Recovering Anthony Bourdain's (really) lost Li.st's

https://sandyuraz.com/blogs/bourdain/
130•thecsw•6h ago•45 comments

I tried Gleam for Advent of Code

https://blog.tymscar.com/posts/gleamaoc2025/
245•tymscar•10h ago•135 comments

I fed 24 years of my blog posts to a Markov model

https://susam.net/fed-24-years-of-posts-to-markov-model.html
112•zdw•7h ago•45 comments

Using E-Ink tablet as monitor for Linux

https://alavi.me/blog/e-ink-tablet-as-monitor-linux/
29•yolkedgeek•4d ago•9 comments

VPN location claims don't match real traffic exits

https://ipinfo.io/blog/vpn-location-mismatch-report
273•mmaia•7h ago•161 comments

Cat Gap

https://en.wikipedia.org/wiki/Cat_gap
57•Petiver•3d ago•6 comments

The Rise of Computer Games, Part I: Adventure

https://technicshistory.com/2025/12/13/the-rise-of-computer-games-part-i-adventure/
60•cfmcdonald•7h ago•16 comments

Why Twilio Segment moved from microservices back to a monolith

https://www.twilio.com/en-us/blog/developers/best-practices/goodbye-microservices
187•birdculture•7h ago•141 comments

llamafile: Distribute and Run LLMs with a Single File

https://github.com/mozilla-ai/llamafile
36•stefankuehnel•8h ago•4 comments

Useful patterns for building HTML tools

https://simonwillison.net/2025/Dec/10/html-tools/
253•simonw•3d ago•73 comments

Cryptids

https://wiki.bbchallenge.org/wiki/Cryptids
98•frozenseven•1w ago•15 comments

Ask HN: How can I get better at using AI for programming?

246•lemonlime227•11h ago•276 comments

Awesome-Jj: Jujutsu Things

https://github.com/Necior/awesome-jj
14•n3t•2h ago•1 comments

Go Proposal: Secret Mode

https://antonz.org/accepted/runtime-secret/
169•enz•4d ago•77 comments

From Azure Functions to FreeBSD

https://jmmv.dev/2025/12/from-azure-functions-to-freebsd.html
75•todsacerdoti•5d ago•8 comments

A Giant Ball Will Help This Man Survive a Year on an Iceberg

https://www.outsideonline.com/outdoor-adventure/exploration-survival/how-giant-ball-will-help-man...
44•areoform•12h ago•37 comments

Free Software Awards Winners Announced: Andy Wingo, Alx Sa, Govdirectory

https://www.fsf.org/news/2024-free-software-awards-winners
17•pseudolus•2h ago•0 comments

Some surprising things about DuckDuckGo

https://gabrielweinberg.com/p/some-surprising-things-about-duckduckgo
73•ArmageddonIt•5h ago•54 comments

Flat-pack washing machine spins a fairer future

https://www.positive.news/society/flat-pack-washing-machine-spins-a-fairer-future/
67•ohjeez•4h ago•32 comments

EasyPost (YC S13) Is Hiring

https://www.easypost.com/careers
1•jstreebin•10h ago

What is the nicest thing a stranger has ever done for you?

https://louplummer.lol/nice-stranger/
319•speckx•2d ago•242 comments

Dhtml Lemmings (2004)

https://www.elizium.nu/scripts/lemmings/index.php
4•tetris11•5d ago•2 comments

Want to sway an election? Here’s how much fake online accounts cost

https://www.science.org/content/article/want-sway-election-here-s-how-much-fake-online-accounts-cost
154•rbanffy•6h ago•101 comments

Using Python for Scripting

https://hypirion.com/musings/use-python-for-scripting
99•birdculture•5d ago•78 comments

Photographer built a medium-format rangefinder

https://petapixel.com/2025/12/06/this-photographer-built-an-awesome-medium-format-rangefinder-and...
167•shinryuu•1w ago•41 comments

Researchers seeking better measures of cognitive fatigue

https://www.nature.com/articles/d41586-025-03974-w
110•bikenaga•3d ago•31 comments

First all-optical XPU processing system

https://www.akhetonics.com/
7•bohnohboh•4h ago•2 comments