frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

SocketAddrV6 is not roundtrip serializable

https://sunshowers.io/posts/socketaddrv6-not-roundtrip/
30•cyndunlop•7h ago

Comments

majke•1h ago
Falsehoods programmers think about addresses:

- parsing addresses is well defined (try parsing ::1%3)

- since 127.0.0.2 is on loopback, ::2 surely also would be

- interface number on Linux is unique

- unix domain socket names are zero-terminated (abstract are not)

- sin6_flowinfo matters (it doens;t unless you opt-in with setsockopt)

- sin6_scope_id matters (it doesn't unless on site-local range)

(I wonder if scope_id would work on ipv4-mapped-IPv6, but if I remember right I checked and it didn't)

- In ipv4, scope_id doesnt exist (true but it can be achieved by binding to interface)

and so on...

Years ago I tried to document all the quirks I knew about https://idea.popcount.org/2019-12-06-addressing/

sunshowers•1h ago
Thanks. At Oxide we do use the scope ID quite a bit, as my colleague Cliff Biffle says here: https://hachyderm.io/@cliffle/115492946627058792
o11c•37m ago
You can use ::ffff:127.0.0.2 for most purposes, but you can't ping it.
WatchDog•1h ago
Another day, another reason ipv6 should have been ipv4 with more bits.
koito17•1h ago
Unrelated to the article, but the scope ID in IPv6 addresses is super useful for the networking software I write.

The socket API for IPv4 requires a strange ceremony of calling if_nametoindex to map an interface name to an index then setting IP_BOUND_IF in order to bind a socket to a particular network interface. (Sorry, this only works on BSD and Mac OS; Linux instead uses SO_BINDTODEVICE for whatever reason).

When you don't supply a network interface, the OS "helpfully" guesses an interface, and that interface is usually the wrong one for multicast and broadcast packets.

I made a PXE boot server in Rust recently, and I lost at least 30 minutes of my time figuring out why DHCP responses wouldn't be receieved by an EFI client. The problem was that 255.255.255.255:68 is inherently ambiguous when multiple network interfaces exist.

In the case of the IPv6 API, you have to specify the interface up front (e.g. ff05::1:3%en0) or else you won't even be able to send a packet. I used to find this design tedious, but I prefer writing scope IDs explicitly in an address rather than having libc (or my own code) iterate over a linked list provided by the kernel to get an integer then supply that integer to a setsockopt (and remember that Linux has a quirk here).

Mr Tiff

https://inventingthefuture.ghost.io/mr-tiff/
162•speckx•2h ago•13 comments

Patching 68K Software – SimpleText

https://tinkerdifferent.com/threads/patching-68k-software-simpletext.4793/
46•mmoogle•2h ago•2 comments

Apple uses 3D Gaussian splatting for Personas and 3D conversions of photos

https://www.cnet.com/tech/computing/apple-talks-to-me-about-vision-pro-personas-where-is-our-virt...
34•dmarcos•5d ago•7 comments

This Day in 1988, the Morris worm infected 10% of the Internet within 24 hours

https://www.tomshardware.com/tech-industry/cyber-security/on-this-day-in-1988-the-morris-worm-sli...
296•canucker2016•10h ago•143 comments

Pg_lake: Postgres with Iceberg and data lake access

https://github.com/Snowflake-Labs/pg_lake
271•plaur782•9h ago•78 comments

Whole Earth Index

https://wholeearth.info/
141•bookofjoe•1w ago•32 comments

Uncle Sam wants to scan your iris and collect your DNA, citizen or not

https://www.theregister.com/2025/11/04/dhs_wants_to_collect_biometric_data/
95•SanjayMehta•2h ago•58 comments

Codemaps: Understand Code, Before You Vibe It

https://cognition.ai/blog/codemaps
190•janpio•7h ago•65 comments

BlackRock's Larry Fink: "Tokenization", Digital IDs, & Social Credit

https://thewinepress.substack.com/p/tokenization-blackrocks-larry-fink
30•sbuttgereit•3h ago•14 comments

Show HN: A CSS-Only Terrain Generator

https://terra.layoutit.com
273•rofko•11h ago•75 comments

By the Power of Grayscale

https://zserge.com/posts/grayskull/
104•surprisetalk•4d ago•31 comments

I took all my projects off the cloud, saving thousands of dollars

https://rameerez.com/send-this-article-to-your-friend-who-still-thinks-the-cloud-is-a-good-idea/
116•sebnun•4h ago•132 comments

Singing bus horns in West Sumatra

https://www.auralarchipelago.com/auralarchipelago/kalason
48•Kaibeezy•1w ago•3 comments

RISC-V takes first step toward international ISO/IEC standardization

https://riscv.org/blog/risc-v-jtc1-pas-submitter/
6•jrepinc•5d ago•0 comments

Bluetui – A TUI for managing Bluetooth on Linux

https://github.com/pythops/bluetui
16•birdculture•2h ago•0 comments

Launch HN: Plexe (YC X25) – Build production-grade ML models from prompts

https://www.plexe.ai/
65•vaibhavdubey97•8h ago•27 comments

Frozen String Literals: Past, Present, Future?

https://byroot.github.io/ruby/performance/2025/10/28/string-literals.html
23•Bogdanp•1w ago•1 comments

Singapore to cane scammers as billions lost in financial crimes

https://www.freemalaysiatoday.com/category/highlight/2025/11/04/singapore-to-cane-scammers-as-bil...
37•raybb•5h ago•35 comments

What is a manifold?

https://www.quantamagazine.org/what-is-a-manifold-20251103/
330•isaacfrond•15h ago•117 comments

NoLongerEvil-Thermostat – Nest Generation 1 and 2 Firmware

https://github.com/codykociemba/NoLongerEvil-Thermostat
307•mukti•8h ago•106 comments

Analyzing the Performance of WebAssembly vs. Native Code

https://ar5iv.labs.arxiv.org/html/1901.09056
48•liminal•2h ago•31 comments

Google Removed 749M Anna's Archive URLs from Its Search Results

https://torrentfreak.com/google-removed-749-million-annas-archive-urls-from-its-search-results/
64•gslin•2h ago•27 comments

Tell HN: X is opening any tweet link in a webview whether you press it or not

557•stillatit•19h ago•475 comments

Zip Files All the Way Down (2010)

https://research.swtch.com/zip
24•aebtebeten•1w ago•3 comments

Optimizing Datalog for the GPU

https://danglingpointers.substack.com/p/optimizing-datalog-for-the-gpu
99•blakepelton•11h ago•19 comments

Bloom filters are good for search that does not scale

https://notpeerreviewed.com/blog/bloom-filters/
175•birdculture•16h ago•34 comments

FDA described as a "clown show" amid latest scandal; top drug regulator is out

https://arstechnica.com/health/2025/11/fda-described-as-a-clown-show-amid-latest-scandal-top-drug...
42•duxup•1h ago•3 comments

Grayskull: A tiny computer vision library in C for embedded systems, etc.

https://github.com/zserge/grayskull
9•gurjeet•3h ago•1 comments

How devtools map minified JS code back to your TypeScript source code

https://www.polarsignals.com/blog/posts/2025/11/04/javascript-source-maps-internals
70•manojvivek•10h ago•13 comments

Customize Nano Text Editor

https://shafi.ddns.net/blog/customize-nano-text-editor
136•shafiemoji•1w ago•48 comments