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

Comments

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

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

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

Data is not available upon request

https://osf.io/preprints/psyarxiv/jbu9r_v3
1•sien•1m ago•0 comments

I Graduated from Survival Mode

https://www.fieldnotes.nautilus.quest/p/i-graduated-from-survival-mode
1•zeldapoem•1m ago•0 comments

The Pentagon used a secret aircraft painted to look like a civilian plane

https://www.nytimes.com/2026/01/12/us/politics/us-boat-attacks-law.html
1•perihelions•2m ago•0 comments

Verizon to stop automatic unlocking of phones as FCC ends 60-day unlock rule

https://arstechnica.com/tech-policy/2026/01/fcc-lets-verizon-lock-phones-for-longer-making-it-har...
2•DefineOutside•8m ago•0 comments

A 'Holy Grail' Sleep Apnea Pill Could Be on the Market Next Year

https://www.forbes.com/sites/amyfeldman/2026/01/12/a-holy-grail-sleep-apnea-pill-could-be-on-the-...
1•cebert•8m ago•0 comments

Great code doesn't matter if you can't sell it

https://platformtoolsmith.com/blog/senior-engineer-part-3/
1•sharp-dev•8m ago•1 comments

FCC revises Verizon phone unlocking rules after significant fraud issues

https://www.reuters.com/business/media-telecom/fcc-revises-verizon-phone-unlocking-rules-after-si...
2•petethomas•9m ago•0 comments

Canada's Scaling Problem Isn't Compute, It's Coastlines

https://zeitgeistml.substack.com/p/canadas-scaling-problem-isnt-compute
1•sjosh003•9m ago•0 comments

Show HN: Minimal type-safe language for software architecture

https://github.com/tesserato/Tect
2•tesserato•10m ago•0 comments

Bug 55867 – Doesn't know how to tag XI_TRACKBALL

https://bugs.freedesktop.org/show_bug.cgi?__goaway_challenge=meta-refresh&__goaway_id=bdd4239d39d...
1•rballpug•15m ago•3 comments

From Starbase: Pete Hegseth on Defense Innovation Reform [video]

https://www.youtube.com/watch?v=MlRm9tCT0Ug
1•0xWTF•18m ago•1 comments

Meta shakes up its review system with 'stronger rewards for top performers'

https://www.businessinsider.com/meta-performance-review-system-stronger-rewards-top-performers-20...
2•ryandrake•24m ago•0 comments

Paramount Wants Warner to Show Its Work

https://www.bloomberg.com/opinion/newsletters/2026-01-12/paramount-wants-to-warner-to-show-its-work
1•feross•24m ago•0 comments

Turning Agents into Learning Machines

https://twitter.com/ashpreetbedi/status/2010781132418064750
1•bedify•27m ago•0 comments

DJT Says Microsoft to Make Changes to Curb Data Center Power Costs for Americans

https://money.usnews.com/investing/news/articles/2026-01-12/trump-says-microsoft-to-make-changes-...
1•schmuckonwheels•34m ago•1 comments

Living with LLMs Everywhere – How Ambient LLMs Negate Security Policy

1•djwide•36m ago•0 comments

Who Companies Call When They Want to Become a Bank

https://www.bloomberg.com/news/articles/2026-01-12/fintechs-call-klaros-group-when-they-want-bank...
1•petethomas•40m ago•0 comments

Apple: You (Still) Don't Understand the Vision Pro

https://stratechery.com/2026/apple-you-still-dont-understand-the-vision-pro/
1•feross•40m ago•1 comments

Show HN: Idlen.io ($IDL), the first privacy-first AI ad network is launched

https://www.idlen.io/fr/
4•paulefizelier•41m ago•1 comments

Ask HN: How are you using AI to self-augment?

1•almostlikemagic•45m ago•0 comments

Show HN: I built a tool to calculate the True Cost of Ownership (TCO) for yachts

https://yachtvaluereport.com/
2•todaycompanies•46m ago•3 comments

Sherlock MCP server so you can use AI to do OSI research

https://github.com/Burnsedia/sherlock-mcp
2•Burnsedia•48m ago•0 comments

Picao AI Landing Page

https://picaoai.com
2•Kathrine_Oduah•49m ago•0 comments

Meta Taps Trump Alum as New President

https://thehill.com/newsletters/technology/5685457-meta-taps-trump-alum-as-new-president
5•650REDHAIR•50m ago•1 comments

Ackman Pitches Prepayment Penalties as Way to Cut Mortgage Rates

https://www.bloomberg.com/news/articles/2026-01-12/ackman-pitches-prepayment-penalties-as-way-to-...
1•petethomas•52m ago•0 comments

Mystery: Why do some LLMs produce more coil noise on Mac Studio M3 Ultra?

https://twitter.com/OrganicGPT/status/2010879700785373437
5•behnamoh•54m ago•2 comments

I'm a Happy Engineer Now

https://blog.denv.it/posts/im-happy-engineer-now/
5•denysvitali•54m ago•0 comments

Spy Shots Catch the Strangest New Car We've Seen Since Cybertruck

https://carbuzz.com/ceer-suv-spy-shots-january-2026/
1•gnabgib•57m ago•0 comments

Phind Is Shutting Down

1•wilsonjholmes•1h ago•0 comments

Is life a game?Philosopher C. Thi Nguyen argues that play is the meaning of life

https://www.newyorker.com/culture/open-questions/is-life-a-game
2•bookofjoe•1h ago•2 comments