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•11mo ago

Comments

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

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

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

The Man Who Stayed [video]

https://www.ordinarylifeextraordinarygod.org/post/the-man-who-stayed-a-short-documentary
1•NaOH•1m ago•0 comments

See how your investments would look if they never lost value

https://arells.com
1•jeyakatsa•3m ago•0 comments

A Curriculum for Tools for Thought [pdf]

https://ai-tools-for-thought.github.io/workshop/documents/chi26/Crichton_Curriculum_for_Tools_for...
1•tosh•5m ago•0 comments

It is incorrect to "normalize" // in HTTP URL paths

https://runxiyu.org/comp/doubleslash/
1•pabs3•10m ago•0 comments

I Made a Free Stick Figure Generator

https://stickfiguremaker.com/
1•Lex200•12m ago•0 comments

DateBoy (2024)

https://tupperwarefan.itch.io/dateboy
1•robin_reala•13m ago•0 comments

"Liberation Day" at OpenAI as multiple senior executives announce leaving

https://mas.to/@carnage4life/116422881496195720
2•riffraff•16m ago•0 comments

Ask HN: How are short-form video algorithms impacting your deep work?

1•mtjfilipovic•20m ago•0 comments

Show HN: A site for stopping work slop

https://stopnoslop.com/
1•vlidholt•23m ago•0 comments

The Core-Math Project

https://core-math.gitlabpages.inria.fr/
2•crispinh•24m ago•0 comments

A Message to All Humanity: Three Onboard UFO Encounters [video]

https://www.youtube.com/watch?v=cQ5ztmIA2Bo
1•keepamovin•25m ago•0 comments

Discovering Dennis Ritchie's Lost Dissertation

https://computerhistory.org/blog/discovering-dennis-ritchies-lost-dissertation/
1•signa11•25m ago•0 comments

Show HN: InGaming, front end MVP for casino brands

https://www.ingaming.dev/
1•jonypopovv•27m ago•0 comments

Handling Instruction Branching in Modern Processors

https://blog-site-ivory.vercel.app/blog/third_blog/
1•signa11•30m ago•0 comments

Hanlon's Razor

https://en.wikipedia.org/wiki/Hanlon%27s_razor
1•bryanrasmussen•34m ago•0 comments

Meta targets May 20 for first wave of layoffs; additional cuts later in 2026

https://www.reuters.com/world/meta-targets-may-20-first-wave-layoffs-additional-cuts-later-2026-2...
2•1vuio0pswjnm7•35m ago•0 comments

Show HN: Podads – An Ad Blocker for Your Podcasts

https://podads.yet-to-be.com/
1•wyxuan•38m ago•0 comments

Mastering Page-Level Chinese Calligraphy via Layout-Guided Spatial Planning

https://arxiv.org/abs/2603.12482
1•PaulHoule•41m ago•0 comments

Lambda Calculus in K

https://ngn.codeberg.page/txt/lambda.html
1•lioeters•46m ago•0 comments

The Social Battery Across Scales: Household, Labor, and Global Systems

https://www.academia.edu/165751647/The_Social_Battery_Across_Scales_Household_Labor_and_Global_Sy...
1•W_G_III•47m ago•0 comments

Why does sharing a private Gitea repo still need adding a collaborator in 2026?

https://sharemygit.com/
1•onesandofgrain•50m ago•1 comments

Total Solar Eclipse Led to Seismic Quiet for Cities Within Its Path

https://www.seismosoc.org/news/total-solar-eclipse-led-to-seismic-quiet-for-cities-within-its-path/
1•geox•51m ago•0 comments

Show HN: Twitter Media Downloader – X Media Downloader

https://chromewebstore.google.com/detail/twitter-media-downloader/dbkcfmmamhmdaiikkpgiigicgobnjnnj
1•qwikhost•55m ago•0 comments

Tinder and Zoom offer 'proof of humanity' eye-scans to combat AI

https://www.bbc.com/news/articles/cp9vppem4evo
3•1659447091•56m ago•0 comments

Show HN: My workflow for using Plan 9 on Windows

1•dharmatech•1h ago•0 comments

The most beautiful formula not enough people understand [video]

https://www.youtube.com/watch?v=fsLh-NYhOoU
4•eigenBasis•1h ago•0 comments

What the EU Battery Passport Means for Your Devices

https://holdmybill.com/blog/eu-battery-passport-explained-2027
2•niksmac•1h ago•0 comments

Study: The Logic Behind AI's Judgments of People

https://en.huji.ac.il/news/hidden-logic-behind-ai%E2%80%99s-judgments-people/
1•giuliomagnifico•1h ago•0 comments

Were early humans limited by materials–or by ideas?

https://www.zavesti.com/the-stone-age-world-was-nothing-like-you-imagine/
1•stonespider•1h ago•1 comments

Is It O.K. To Be a Luddite? – By Thomas Pynchon (1984)

https://archive.nytimes.com/www.nytimes.com/books/97/05/18/reviews/pynchon-luddite.html
2•keiferski•1h ago•0 comments