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

Comments

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

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

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

Fitness and exercise effects on brain age: A randomized clinical trial

https://www.sciencedirect.com/science/article/pii/S2095254625000602
1•PaulHoule•1m ago•0 comments

InfiniaxAI Just Automated Repositories

https://infiniax.ai
1•ZacharyGolinger•2m ago•1 comments

Show HN: Guess My RGB – Daily game to test your color visualization skills

https://rgb.day
1•balgan•2m ago•0 comments

Angry gamers are forcing studios to scrap or rethink new releases

https://www.washingtonpost.com/technology/2026/01/26/gamer-protests-ai-slop-backlash/
1•gnabgib•2m ago•0 comments

Pentagon clashes with Anthropic over military AI use, sources say

https://www.reuters.com/business/pentagon-clashes-with-anthropic-over-military-ai-use-2026-01-29/
1•pseudolus•5m ago•0 comments

Show HN: Best AI Image Generator

https://aiimagegenerators.net/
1•wangmao•7m ago•0 comments

Ex-Google engineer convicted of stealing AI secrets for Chinese companies

https://www.reuters.com/legal/government/ex-google-engineer-convicted-stealing-ai-secrets-chinese...
2•tokyobreakfast•11m ago•0 comments

Adult Humor Costumes

https://www.halloweencostumes.com/adult-humor-costumes.html
1•rolph•13m ago•1 comments

Ask HN: How do you reset an AppleID?

1•OhMeadhbh•16m ago•3 comments

Moving on from XML? A teaser for a possible alternative (2024)

https://genodians.org/nfeske/2024-12-20-moving-on-from-xml
1•doener•20m ago•0 comments

Having that high-deductible health plan might kill you, literally

https://arstechnica.com/health/2026/01/having-that-high-deductible-health-plan-might-kill-you-lit...
2•pseudolus•21m ago•1 comments

Sculpt OS Version 25.10

https://genode.org/download/sculpt
1•doener•24m ago•0 comments

Show HN: GLinksWWW – A student-built retro browser with a 9-slot multi-clipboard

https://github.com/rio719/gLinksWWW-browser
1•RioBurhan•24m ago•0 comments

Blessed.rs – An unofficial guide to the Rust ecosystem

https://blessed.rs/crates
1•Brysonbw•25m ago•0 comments

Show HN: A website that summarises all adopted texts of EU parliament

https://euforya.eu
1•krzysiek•26m ago•0 comments

Show HN: LLMGeoKit – Free scanner for AI/LLM visibility (the new SEO)

https://llmgeokit.com/
1•borxtrk•29m ago•1 comments

TikTok users flock to UpScrolled in response to new U.S. owners

https://mashable.com/article/tiktok-alternative-upscrolled-palestine-censorship
3•bhouston•30m ago•0 comments

The powerful tools in ICE's arsenal to track suspects – and protesters

https://www.washingtonpost.com/technology/interactive/2026/ice-surveillance-immigrants-protesters/
5•diogenes_atx•31m ago•1 comments

Trump says US decertifying Bombardier until Canada certifies Gulfstream

https://ca.finance.yahoo.com/news/trump-says-us-decertifying-bombardier-011312008.html
4•cosmicgadget•34m ago•1 comments

Show HN: Real-time generative MIDI "instrument"

https://soundipity.com/guide
1•nukenuke•35m ago•0 comments

Show HN: Record your screen and microphone 24/7 and sync to clawdbot instance

https://github.com/mediar-ai/screenpipe
1•louis030195•36m ago•0 comments

Terry Pratchett's novels may have held clues to dementia decade before diagnosis

https://theconversation.com/terry-pratchetts-novels-may-have-held-clues-to-his-dementia-a-decade-...
3•pseudolus•36m ago•1 comments

In the Beginning Is the End

https://gilpignol.substack.com/p/in-the-beginning-is-the-end
1•light_triad•38m ago•0 comments

Pogacar and Ku Coin

https://inrng.com/2026/01/ku-coin-pogacar-deal/
1•pietroppeter•38m ago•1 comments

Church of Molt · Crustafarianism

https://molt.church/
2•ianrahman•41m ago•0 comments

Foods That Could Kill You (If You Eat Enough of Them)(2013)

https://www.bonappetit.com/test-kitchen/ingredients/slideshow/foods-that-can-kill-you
1•rolph•44m ago•0 comments

How are you handling tiny website change requests?

https://getpushpilot.com/
2•ryan_rudd•44m ago•1 comments

How much do your EC2 nodes cost?

https://github.com/Nextdoor/lumina
1•diranged•46m ago•1 comments

Why I Always End Up Going Back to C

https://deplet.ing/why-i-always-end-up-using-c/
3•indy•46m ago•0 comments

Request Radar – Classify LinkedIn invitations as recruiters or spam

https://chromewebstore.google.com/detail/request-radar/pmpkcbnkoojpenphcempidfgkjkemife
1•kvntrnz•47m ago•1 comments