Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    113comments
  2. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    158comments
  3. “The Secret Life of Circuits” is here(coredump.cx ↗)
    24comments
  4. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    79comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    449comments
  6. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    106comments
  7. San Francisco Onion Futures Company(onionfutures.com ↗)
    76comments
  8. Laya the open source version of Jev(convaiinnovations.com ↗)
    2comments
  9. Cloudflare Quick Tunnels(cloudflare.com ↗)
    285comments
  10. SDCC – Small Device C Compiler(sourceforge.net ↗)
    20comments
  11. How to Write with an LLM(sockpuppet.org ↗)
    342comments
  12. Communication by means of modulated Johnson noise(pnas.org ↗)
    1comments
  13. Science Is Open Software(jepedersen.dk ↗)
    40comments
  14. Saving another 100TB of RAM(cloudflare.com ↗)
    83comments
  15. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    18comments
  16. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    32comments
  17. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    1comments
  18. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    94comments
  19. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  20. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    4comments
  21. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    107comments
  22. Apple M6 Pro Achieves the Highest Single-Core CPU Score in Geekbench 7(geekbench.com ↗)
    79comments
  23. OpenJev(openjev.com ↗)
    270comments
  24. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    89comments
  25. Goroutine Leak Profiles(go.dev ↗)
    4comments
  26. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    73comments
  27. Veronese's Dogs(publicdomainreview.org ↗)
    1comments
  28. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    14comments
  29. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    81comments
  30. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    101comments

Customasm – An assembler for custom, user-defined instruction sets

73 pointsby 1y agogithub.com
17 comments
1y agoHN ↗

This is very cool! I'm always on the lookout for extensible assemblers. I especially want one that can handle a normalized subset of GNU assembly so that it can be used on the output of LLVM or GCC (using existing assembly languages, but assembling them in non-standard ways or with extensions).

1y agoHN ↗

flat assembler g (fasmg) does this. It has a powerful macro language, in which, among other architectures and formats, it implements x86 and ELF/PE/macho and is able to assemble itself.

I like to use it for scripting for turning binary formats to text and vice-versa.

1y agoHN ↗

This is very cool. On the topic of assembly, does anyone know of a language that is higher level than assembly, but retains the property that the output doesn't depend on the compiler or its flags?

I want it for low level CPU benchmarks and tests. Using C or assembly for those both suck.

I don't really know exactly how this would look (is the register allocator part of the spec?) but has anyone tried something like this?

1y agoHN ↗

but retains the property that the output doesn't depend on the compiler or its flags?

That's not an inherent property of assemblers, and not the case in practice either.

1y agoHN ↗

Yes I know there are some minor caveats with pseudo-instructions and relocations but in general it is basically true. You can't wildly change the output without changing the source like you can with C.

1y agoHN ↗

Have you tried looking into something like NASM's macro functionality?

1y agoHN ↗

That sounds like a tall order. If you want it for CPU benchmarks, you presumably want to be able to use all real CPU machine instructions. Or a simpler language instruction set but with an optimizer, but it's hard to write an optimizer and then you could never change the optimizer.

1y agoHN ↗

There was a post on HN where someone implemented a new language compiler purely from Assembly, and shows you from nothing to the very end where it looked mostly like a LISP assembly language. It was really neat. Sadly I dont have the buzzwords for Google to find it anymore, used to be able to find the powerpoint slides for it.

I forgot about HLA (High Level Assembly) though I have not used it personally, there were also a few others like C-- as well:

https://en.wikipedia.org/wiki/High_Level_Assembly

1y agoHN ↗

My complements on this. Assembler is the ultimate understanding and control.

1y agoHN ↗

Interesting. If only it supported little-endian architectures!