Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    142comments
  2. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    47comments
  3. Tin: full-text search for Postgres(planetscale.com ↗)
    41comments
  4. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    454comments
  5. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    180comments
  6. “The Secret Life of Circuits” is here(coredump.cx ↗)
    51comments
  7. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    35comments
  8. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    13comments
  9. I built the fastest PHP webserver in the world(qbixserver.com ↗)
    28comments
  10. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    551comments
  11. San Francisco Onion Futures Company(onionfutures.com ↗)
    116comments
  12. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    132comments
  13. New evidence for hidden chambers beyond Tutankhamun's tomb(nature.com ↗)
    5comments
  14. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    190comments
  15. What Zig felt like, coming from Rust(besok.github.io ↗)
    106comments
  16. Learning Another Language May Be One of the Best Ways to Keep Your Brain Healthy(theconversation.com ↗)
    39comments
  17. Cloudflare Quick Tunnels(cloudflare.com ↗)
    301comments
  18. How to Write with an LLM(sockpuppet.org ↗)
    360comments
  19. Agreement between the USA and Denmark (1951,2004) [pdf](state.gov ↗)
    13comments
  20. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    24comments
  21. Communication by means of modulated Johnson noise(pnas.org ↗)
    18comments
  22. Saving another 100TB of RAM(cloudflare.com ↗)
    89comments
  23. SDCC – Small Device C Compiler(sourceforge.net ↗)
    23comments
  24. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    11comments
  25. Science Is Open Software(jepedersen.dk ↗)
    51comments
  26. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    44comments
  27. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    122comments
  28. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    7comments
  29. OpenJev(openjev.com ↗)
    279comments
  30. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments

Ask HN: Best blog tutorial explaining Assembly code?

1 pointsby 2y ago
4 comments
2y agoHN ↗

This is almost Hello World:

https://stackoverflow.com/questions/2246748/assembly-linking... ~:

  cat hello.asm
  # section .text
  #      jmp [rax]
  nasm -f elf64 hello.asm
  objdump -Sr hello.o

/? nasm helloworld: https://www.google.com/search?q=nasm+helloworld :

- https://www.devdungeon.com/content/hello-world-nasm-assemble... : succinct Hello World program; 32bit ; - [ ] port this to 64bit

- "NASM Tutorial" https://cs.lmu.edu/~ray/notes/nasmtutorial/ ; a good "blog tutorial explaining Assembly code" per OT

"What is better "int 0x80" or "syscall" [or "sysenter" or VDSO] in 32-bit code on Linux?" https://stackoverflow.com/questions/12806584/what-is-better-... links to https://stackoverflow.com/questions/12776340/system-calls-im... which links to the vDSO Wikipedia article, which explains that vDSO supports ASLR and is more portable than `int 80` (which is the old 32bit way to syscall)

vDSO: https://en.wikipedia.org/wiki/VDSO

"Linux Assembly HOWTO" http://tldp.org/HOWTO/Assembly-HOWTO/

2y agoHN ↗

WASM: WebAssembly > Specification > Wasm program > Code representation > C source code and corresponding WebAssembly https://en.wikipedia.org/wiki/WebAssembly#Code_representatio...

WASI: https://en.wikipedia.org/wiki/WebAssembly :

WebAssembly System Interface (WASI) is a simple interface (ABI and API) designed by Mozilla intended to be portable to any platform.[84] It provides POSIX-like features like file I/O constrained by capability-based security.[85][86] There are also a few other proposed ABI/APIs.[87][88]

[88]: webassembly/wasm-c-api: https://github.com/WebAssembly/wasm-c-api

/? WASM tutorial: https://www.google.com/search?q=wasm+tutorial

/? WASM helloworld: https://www.google.com/search?q=wasm+helloworld

Learn X in Y minutes > WebAssembly: https://learnxinyminutes.com/docs/wasm/

WebAssembly/WABT: The WebAssembly Binary Toolkit: https://github.com/WebAssembly/wabt

https://docs.docker.com/desktop/wasm/ :

  docker run \
    --runtime=io.containerd.wasmedge.v1 \
    --platform=wasi/wasm \
    secondstate/rust-example-hello

Docker Desktop downloads and installs the following runtimes that you can use to run Wasm workloads:

  io.containerd.slight.v1
  io.containerd.spin.v2
  io.containerd.wasmedge.v1
  io.containerd.wasmtime.v1
  io.containerd.lunatic.v1
  io.containerd.wws.v1
  io.containerd.wasmer.v1

Do all of these have WASI?