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 ↗)
    43comments
  2. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    18comments
  3. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    20comments
  4. San Francisco Onion Futures Company(onionfutures.com ↗)
    58comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    383comments
  6. Typesafe-computer-use drives a Mac toward a goal for 1/50th of a cent per step(github.com/awlevin ↗)
    32comments
  7. Science Is Open Software(jepedersen.dk ↗)
    31comments
  8. SDCC – Small Device C Compiler(sourceforge.net ↗)
    15comments
  9. Cloudflare Quick Tunnels(cloudflare.com ↗)
    275comments
  10. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    28comments
  11. Saving another 100TB of RAM(cloudflare.com ↗)
    66comments
  12. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    8comments
  13. How to Write with an LLM(sockpuppet.org ↗)
    320comments
  14. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    2comments
  15. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    4comments
  16. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    81comments
  17. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    98comments
  18. Goroutine Leak Profiles(go.dev ↗)
    2comments
  19. Veronese's Dogs(publicdomainreview.org ↗)
    discuss
  20. OpenJev(openjev.com ↗)
    258comments
  21. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    88comments
  22. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    67comments
  23. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    12comments
  24. How come AI-related posts get so many points on HN?
    6comments
  25. Minimal Phone 2(minimalcompany.com ↗)
    218comments
  26. The Farnese letter(simonklee.dk ↗)
    6comments
  27. Cyclomatic Complexity in C#(ndepend.com ↗)
    18comments
  28. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    54comments
  29. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    97comments
  30. Xcode 27.1 Beta Release Notes(developer.apple.com ↗)
    99comments

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!