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?

'Broadview Six' defendants have all remaining charges dismissed

https://www.nbcchicago.com/news/local/chicago-politics/broadview-six-defendants-have-all-remainin...
1•petethomas•59s ago•0 comments

Consumer groups file complaint against Meta, TikTok and Google running scam ads

https://www.beuc.eu/press-releases/consumer-groups-file-complaints-against-meta-tiktok-and-google...
1•benoau•1m ago•0 comments

Merkel Urges EU to Keep Regulating Social Media Speech

https://reclaimthenet.org/merkel-eu-speech-regulation-censorship
1•Cider9986•2m ago•0 comments

Homemade robot fluff ball with a realistic eye

https://www.instagram.com/reel/DYnsNwlzxG5/
1•authorisedfrog•2m ago•0 comments

The AI Bubble – No One's Happy

https://nooneshappy.com/article/the-ai-bubble/
1•diebillionaires•6m ago•0 comments

FCC Extends Update Deadline for Foreign-Made Routers, Drones Until 2029

https://www.pcmag.com/news/fcc-extends-update-deadline-for-foreign-made-routers-drones-until-2029
1•gnabgib•8m ago•0 comments

Convert between 30 color formats in one tool (HEX, RGB, Tailwind, Flutter, etc)

https://colorcx.com/
1•hkdb•10m ago•0 comments

How you probably will find Satoshi

https://foxchapelresearch.substack.com/p/how-you-probably-will-find-satoshi
1•lalaland1125•11m ago•0 comments

Condé Nast expects search to become a single-digit of its traffic

https://searchengineland.com/conde-nast-search-single-digit-traffic-477358
1•gnabgib•16m ago•0 comments

Fork Your Dependencies

https://twitter.com/mitchellh/status/2057171518027887035
2•nreece•22m ago•0 comments

Stocks Are Not an Effective Inflation Hedge

https://financialpost.com/pmn/business-pmn/repeat-after-me-stocks-are-not-an-effective-inflation-...
2•littlexsparkee•23m ago•0 comments

The Rise of Build-to-Rent Housing

https://www.construction-physics.com/p/the-rise-of-build-to-rent-housing
1•JumpCrisscross•26m ago•0 comments

Trump's IRS "settlement" is not limited to $1.776B [video]

https://www.youtube.com/watch?v=tIBCjzz-bmk
1•mdnahas•26m ago•1 comments

Woman files lawsuit after arrest for Facebook post concerning Trinidad water

https://www.fox4news.com/news/woman-arrested-facebook-post-concerning-trinidad-water-poisoning
2•ki4jgt•27m ago•0 comments

San Francisco woman gets photographer's old number. It changes both their lives

https://www.nbcbayarea.com/news/local/bay-area-proud/san-francisco-woman-gets-photographers-old-p...
1•gnabgib•28m ago•0 comments

Making sure what your code does you think it does, with Vet

https://robocall.github.io//bouncing-balls
1•d0able•38m ago•0 comments

EHRC guidance puts women first, which may upset people

https://millihill.substack.com/p/ehrc-guidance-puts-women-first-which
1•appreciatorBus•40m ago•1 comments

Nginx-poolsip: new RCE 0-day and ASLR bypass in mainline Nginx

https://twitter.com/nebusecurity/status/2057071579876753643
2•negura•41m ago•1 comments

Yet Another AI Teammate

https://yaat.sh/
1•c4pt0r•44m ago•0 comments

JPMorgan Fights over Comic Books Locked in a Mississippi Warehouse

https://www.bloomberg.com/news/features/2026-05-21/jpmorgan-publishers-fight-over-bankrupt-comic-...
1•petethomas•49m ago•0 comments

Human Urine Becomes Option for Farmers in Fertilizer Supply Crunch

https://www.bloomberg.com/news/articles/2026-05-22/farmers-turn-to-human-urine-after-fertilizer-c...
1•petethomas•53m ago•0 comments

U.S. bears brunt of Israel's missile defense, Pentagon assessments show

https://www.washingtonpost.com/national-security/2026/05/21/us-bears-brunt-israels-missile-defens...
4•Teever•53m ago•0 comments

Reptyr: attach a running process to a new terminal (2011)

https://blog.nelhage.com/2011/01/reptyr-attach-a-running-process-to-a-new-terminal/
1•Curiositry•56m ago•0 comments

The San Francisco $10k treasure chest has been found

https://old.reddit.com/r/sanfrancisco/comments/1tjv11f/we_found_a_10000_treasure_chest
3•notknifescience•58m ago•0 comments

Tell HN: Gemini 3.5 Flash breaks in stupid ways

5•XCSme•1h ago•1 comments

Design Notes: Local Lifetimes for Kotlin

https://github.com/Kotlin/KEEP/blob/main/notes/0007-local-lifetimes.md
1•LelouBil•1h ago•1 comments

Eyes on the Solar System

https://eyes.nasa.gov/apps/solar-system/
1•md224•1h ago•0 comments

Demystifying phone unlocking tools: A technical overview

https://osservatorionessuno.org/blog/2026/05/demystifying-phone-unlocking-tools-a-technical-overv...
1•Cider9986•1h ago•0 comments

Staybl, the browser that adjusts for tremors in real time (2022)

https://www.marketingbrew.com/stories/2022/04/26/the-story-behind-havas-new-app-for-people-with-t...
1•bobbiechen•1h ago•0 comments

Show HN: Free Fonts – a collection of 400+ original, open-source typefaces

https://www.mixfont.com/fonts
3•justswim•1h ago•0 comments