Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. San Francisco Onion Futures Company(onionfutures.com ↗)
    32comments
  2. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    353comments
  3. Typesafe-computer-use drives a Mac toward a goal for 1/50th of a cent per step(github.com/awlevin ↗)
    9comments
  4. SDCC – Small Device C Compiler(sourceforge.net ↗)
    9comments
  5. Science Is Open Software(jepedersen.dk ↗)
    20comments
  6. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    73comments
  7. Cloudflare Quick Tunnels(cloudflare.com ↗)
    271comments
  8. Saving another 100TB of RAM(cloudflare.com ↗)
    58comments
  9. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    18comments
  10. How to Write with an LLM(sockpuppet.org ↗)
    307comments
  11. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    discuss
  12. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    88comments
  13. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    80comments
  14. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    1comments
  15. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    82comments
  16. Goroutine Leak Profiles(go.dev ↗)
    2comments
  17. OpenJev(openjev.com ↗)
    254comments
  18. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    63comments
  19. The Farnese letter(simonklee.dk ↗)
    6comments
  20. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  21. Minimal Phone 2(minimalcompany.com ↗)
    202comments
  22. Cyclomatic Complexity in C#(ndepend.com ↗)
    17comments
  23. LispBM is a concurrent Lisp for microcontrollers with message passing(lispbm.com ↗)
    3comments
  24. Claude Code now reads AGENTS.md if there is no Claude.md(claude.com ↗)
    213comments
  25. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    96comments
  26. Alibaba open-sources AI model that can detect cancer and nearly 150 conditions(scmp.com ↗)
    11comments
  27. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    43comments
  28. How SpaceX streamlined the Raptor engine(construction-physics.com ↗)
    67comments
  29. Two parallel neural ectoderm progenitors contribute to the developing brain(newscientist.com ↗)
    60comments
  30. The Implications of Linguistic Illegibility for LLM Security(arxiv.org ↗)
    26comments

Metaprogramming for madmen

134 pointsby 12y agofgiesen.wordpress.com
12 comments
12y agoHN ↗

This is an amazing insight into how demos are written. Farbrausch stuff has always been inspirational to me.

It's very interesting is the sort of extreme version of the idea that data model and code are inherently tied: Especially in functional programming circles it's a maxim that you design your data models first, specifically for your task, and then the rest of the code is pretty much pattern-matching around that. This takes that coupling and makes it even tighter, to serve a higher purpose. I almost feel like given enough time, this could be a JIT: an executable that adaptively strips code and self-minifies over time as you run it. :)

Also check out: - kkrieger (windows only 96kb 3D FPS, video here: https://www.youtube.com/watch?v=2NBG-sKFaB0) - the previous post (http://fgiesen.wordpress.com/2012/02/13/debris-opening-the-b...)

12y agoHN ↗

an executable that adaptively strips code and self-minifies over time as you run it

i wonder if a lot of the dead code paths are already eliminated at runtime by the branch predictors in modern CPUs/GPUs. of course it would make no difference for size on disk (which can be argued is mainly useful for code golf and edu these days), but it would be cool to get that feedback in some format without needing to exert any additional effort.

12y agoHN ↗

Do you know much about branch prediction? It seems pretty darn interesting. I'm just curious as to how something like that would work with a path that potentially has side-effects. I don't really know how things work very well at that level, so perhaps I'm misunderstanding something.

12y agoHN ↗

Branch predictors do not modify the code in memory. Dead code is still there; if you have a branch that is always taken, the predictor may remember that, but the wasted bytes following it are still using up your cache.

You can usually get the linker to either remove dead code or assist in its removal, though. "Nearly" dead code is the big pain (e.g. options that are never set but could be).

12y agoHN ↗

I almost feel like given enough time, this could be a JIT: an executable that adaptively strips code and self-minifies over time as you run it. :)

Yes, their tool is getting pretty similar to superoptimization and profile-guided optimization.

(Of course, you don't really want to self-minify over time: what if a new request comes in from a user exercising stripped functionality? You'd have to have some sort of fallback way to retrieve the original unoptimized code.)

12y agoHN ↗

This is how Go's test coverage tool works, except in the Go case it was easy to do because there are libraries for reading and writing Go source code in the standard library.

Details: http://blog.golang.org/cover

12y agoHN ↗

GCC can do it as well, compile your code with --coverage and `gcov -c` will tell you how often each branch was taken.

12y agoHN ↗

This brings back fond memories of trying to get a 4k under the magic 4096 bytes. You get really good at reusing data.