frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•1y ago

Comments

nine_k•1y ago
> Introducing the ‘packed’ data format, a binary format that allows using data as it is, without the need for a deserialisation step. A notable perk of this format is that traversals on packed trees is proven to be faster than on ‘unpacked’ trees: as the fields of data structures are inlines, there are no pointer jumps, thus making the most of the L1 cache.

That is, a "memory dump -> zero-copy memory read" of a subgraph of Haskell objects, allowing to pass such trees / subgraphs directly over a network. Slightly reminiscent of Cap'n Proto.

90s_dev•1y ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•1y ago
They mention this in the article.
spockz•1y ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•1y ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•1y ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•1y ago
> the serialised version of the data is usually bigger than its in-memory representation

I don’t think this is common. Perhaps for arrays of floats serialized as JSON or something. But I can’t think of a case where binary serialization is bigger. Data types like maps are necessarily larger in memory to support fast lookup and mutability.

nine_k•1y ago
I suppose all self-describing formats, like protobuf, or thrift or, well, JSON are bigger than the efficient machine representation, because they carry the schema in every message, one way or another.
IsTom•1y ago
If you use a lot of sharing in immutable data it can grow a lot when serializing. A simple pathological example would be a tree that has all left subtrees same as the right ones. It takes O(height) space in memory, but O(2^height) when serialized.
gitroom•1y ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•1y ago
This was very well written. Excellent article!
NetOpWibby•1y ago
Is this like MessagePack for Haskell?

Nvidia Challenges Apple Silicon with New RTX Spark PC Chip

https://www.macrumors.com/2026/06/01/nvidia-challenges-apple-rtx-spark-pc-chip/
1•mgh2•1m ago•0 comments

Show HN: Cloud CI and agentic workflows for embedded hardware development

https://github.com/jumpstarter-dev/jumpstarter
1•mickuehl•3m ago•0 comments

Why _Am_ I Interested in Your Company?

https://jjmojojjmojo.github.io/why-am-i-interested-in-your-company.html
2•jjmojojjmojo•4m ago•0 comments

AI Agent Discovery via DNS

https://dns-aid.org/
1•oogali•4m ago•0 comments

Human-Centered Reinforcement Learning [pdf]

https://ml.cmu.edu/research/phd-dissertation-pdfs/smilani_phd_mld_2025.pdf
1•ankitg12•5m ago•0 comments

Self-Hosting on the Dark Web

https://david.alvarezrosa.com/posts/self-hosting-on-the-dark-web/
1•dalvrosa•7m ago•0 comments

Nvidia Nemotron 3 Super

https://research.nvidia.com/labs/nemotron/Nemotron-3-Super/
2•tosh•9m ago•0 comments

BYD will pay for crashes on its FSD competitor, something Tesla never has

https://electrek.co/2026/06/01/byd-gods-eye-accepts-liability-tesla-never-has/
2•breve•10m ago•0 comments

React adoption drops from 36% to 20% once you remove Vercel-hosted launches

https://stackscope.dev/blog/state-of-indie-launches-may-2026
1•stackscope•11m ago•0 comments

Why is Lidl opening a pub?

https://www.bbc.co.uk/news/articles/cze222z1300o
1•sarreph•12m ago•0 comments

Nvidia CEO Jensen Huang Delivers Keynote at Computex 2026 in Taiwan (Good Audio) [video]

https://www.youtube.com/watch?v=gxgi6D-Cf9I
1•Nevaeh•14m ago•0 comments

Efficiently Cooling Satellite Components in Space

https://www.fraunhofer.de/en/press/research-news/2026/june-2026/efficiently-cooling-satellite-com...
2•giuliomagnifico•20m ago•0 comments

Nvidia CEO Jensen Huang speaks at Computex 2026 (2:06:24 Video)

https://www.youtube.com/watch?v=9CJ_MZOOj_E
2•Nevaeh•21m ago•0 comments

A JavaScript PoC FROST side channel a browser tab that senses your SSD activity

https://github.com/brammittendorff/opfs-ssd-timing
1•botw44•22m ago•0 comments

The Spam Economy Comes to Work

https://fffej.substack.com/p/the-spam-economy-comes-to-work
1•PretzelFisch•23m ago•0 comments

The Axis That Made the Chips

https://hoeijmakers.net/the-axis-that-made-the-chips/
1•janvdberg•23m ago•0 comments

Termux: X11 is a fledged X server built with Android NDK

https://github.com/termux/termux-x11
1•ivo8n52•23m ago•0 comments

Undigested fructose linked to anxiety and brain inflammation

https://www.psypost.org/undigested-fructose-linked-to-anxiety-and-brain-inflammation/
3•amichail•23m ago•0 comments

When Background AI Agents Become a Security Boundary Problem

https://www.originhq.com/research/background-c2-agent
1•lucasluitjes•25m ago•0 comments

Nvidia announces new AI chip for personal computers

https://www.bbc.com/news/articles/crmp9mppvzro
1•rishikeshs•27m ago•1 comments

Google's top result is 16yo when searching for "Ubuntu 24.04 install fonts"

https://www.google.com/search?q=ubuntu24.04installfonts
1•felooboolooomba•30m ago•2 comments

Thermal conductivity modulation as a mechanism of thermotolerance in tardigrades

https://royalsocietypublishing.org/rsif/article/23/238/20251033/481636/Thermal-conductivity-modul...
1•bookofjoe•33m ago•0 comments

Why Melanoma Spreads More in Middle Age

https://brieflycurious.com/why-melanoma-spreads-more-in-middle-age-a-mouse-study-points-to-the-im...
1•matkoone•33m ago•0 comments

Sixteen Kids and a Hit Man (2024)

https://nymag.com/intelligencer/article/christopher-pence-corderos-fbi-dark-web-hit-man.html
2•Michelangelo11•36m ago•1 comments

Lynching Postcard

https://en.wikipedia.org/wiki/Lynching_postcard
2•doener•41m ago•0 comments

Show HN: Postbase – 100% open source Alternative to Firebase and Supabase [video]

https://www.youtube.com/watch?v=St_kJZXZ_nE
5•harshalone•43m ago•1 comments

Rebuilding the Access Edge: Why We Replaced PPPoE with a Custom DHCP Server

https://medium.com/@mustafa.n.gaid/rebuilding-the-access-edge-why-we-replaced-pppoe-with-a-custom...
1•musnas•44m ago•0 comments

Show HN: Curtab – Each command in its own interactive terminal tab

https://github.com/rashidmya/curtab
1•rashidmya•47m ago•0 comments

China Aims A.I. At Predicting Who Could Pose a Political Risk

https://www.nytimes.com/2026/06/01/us/politics/china-ai-predicting-dissent.html
7•uxhacker•51m ago•0 comments

Show HN: Open-source sync-engine for managing websites at scale

https://github.com/gospecter/specter
1•aabergkvist•52m ago•0 comments