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?

OpenAI Unveils Lockdown Mode to Protect Sensitive Data from Prompt Injection

https://techcrunch.com/2026/06/06/openai-unveils-lockdown-mode-to-protect-sensitive-data-from-pro...
1•odig•46s ago•0 comments

Shadow Blister Effect

https://en.wikipedia.org/wiki/Shadow_blister_effect
1•thunderbong•54s ago•0 comments

Show HN: Typedframes – Pandas/polars column name checking at lint time

https://github.com/w-martin/typedframes
1•w-martin•1m ago•1 comments

I am giving up on VM Gaming

https://deployonfri.day/posts/i-am-giving-up-on-vm-gaming
1•BoKKeR11•1m ago•0 comments

The Case for Space Datacenters

https://newsletter.semianalysis.com/p/to-boldly-go-the-case-for-space-datacenters
2•davedx•1m ago•0 comments

Eating Out

https://www.futilitycloset.com/2026/06/06/eating-out/
1•speckx•2m ago•0 comments

Madagascar Hissing Cockroach

https://en.wikipedia.org/wiki/Madagascar_hissing_cockroach
1•davedx•3m ago•1 comments

Thermometry at the MK Scale, Revisited

http://nanoscale.blogspot.com/2026/06/thermometry-at-mk-scale-revisited.html
1•EvgeniyZh•7m ago•0 comments

Milky Way black hole's missing wind found after a half-century-long search

https://phys.org/news/2026-06-milky-black-hole-century.html
2•davedx•7m ago•0 comments

For Whom the Boys Troll

https://www.cnn.com/2026/06/06/us/groypers-young-men-trolls-nick-fuentes-cec
1•1659447091•8m ago•0 comments

Elfeed 4.0 (Emacs)

https://github.com/emacs-elfeed/elfeed/blob/main/NEWS.org
2•DASD•8m ago•1 comments

Computex 2026: Are We Heading for the Agentic PC Era Yet? – EE Times

https://www.eetimes.com/computex-2026-are-we-heading-for-the-agentic-pc-era-yet/
1•rbanffy•9m ago•0 comments

Some ancient microbes frozen with Ötzi the Iceman are still growing

https://arstechnica.com/science/2026/06/otzis-mummified-body-is-home-to-ancient-strains-of-yeast-...
1•speckx•12m ago•0 comments

Creative Sound Blaster Katana V2X hijackable over Bluetooth; vendor denies flaw

https://www.tomshardware.com/tech-industry/cyber-security/creatives-sound-blaster-katana-v2x-can-...
1•sbulaev•13m ago•0 comments

Australian cockroach kingpin caught with 100k illegal bugs in record bust

https://apnews.com/article/illegal-cockroaches-seized-australia-madagascar-hissing-dubia-e35889bf...
2•randycupertino•15m ago•0 comments

Learn from Your Mistakes: Tree-Like Self-Play for Secure Code LLMs

https://arxiv.org/abs/2606.03489
1•Extropy_•20m ago•0 comments

Made my first plugin – How I orchestrated 3 LLMs to ship a plugin in 2 hours

https://byacommonthread.com/blog/what-should-i-eat
1•kaydub•21m ago•1 comments

Huawei post-trained DeepSeek's 1.6T model on 1k Ascend 910C chips

https://www.tomshardware.com/tech-industry/artificial-intelligence/huawei-led-team-claims-it-post...
2•sbulaev•23m ago•0 comments

Zooming Fractal – WebGL Mandelbrot with music sync, PNG export and video render

https://zoomingfractal.com
1•Dr_Jonah•24m ago•0 comments

Sem: New primitive for code understanding – not LSPs, but entities on top of Git

https://ataraxy-labs.github.io/sem/
1•rohanucla•29m ago•0 comments

Phonicorn: A self-hosted phonics flashcard app for kids practice word sounds

https://github.com/onatm/phonicorn
1•onatm•30m ago•1 comments

China proposes nuclear-powered floating island to reshape global shipping

https://www.scmp.com/news/china/science/article/3355989/china-proposes-nuclear-powered-floating-i...
3•ksec•31m ago•0 comments

Scientific Laws and LLMs Are the Same Shape

https://audriusberzanskis.substack.com/p/the-brute-force-formula
1•audriusber•33m ago•1 comments

Michael Reiter – The Palm Beach cop who Jeffrey Epstein couldn't stop

https://www.miamiherald.com/news/local/article315967185.html
1•embedding-shape•33m ago•0 comments

Can tech legends find the liar?

https://www.youtube.com/watch?v=EDCwQe7P8T0
1•skogstokig•36m ago•0 comments

Koppert Bumblebee Farming [video]

https://www.youtube.com/watch?v=oLucqyqg6L8
1•Onavo•42m ago•0 comments

Home alone: Remote work, isolation, and mental health

https://www.science.org/doi/10.1126/science.aec7671
4•speckx•42m ago•0 comments

AI Enthusiasts Race Against Time, Skeptics Race Against Entropy

https://charitydotwtf.substack.com/p/ai-enthusiasts-are-in-a-race-against
2•birdculture•45m ago•0 comments

If you put the Apple icon in reverse

https://daringfireball.net/2026/01/thoughts_and_observations_regarding_apple_creator_studio
1•baal80spam•47m ago•0 comments

A new robot's UI is body language

https://www.theattachmenteconomy.com/p/a-new-robots-ui-is-body-language
2•mikelgan•47m ago•1 comments