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?

Show HN: End-to-End Static Type Checking: PostgreSQL to TypeScript

https://npgsqlrest.github.io/blog/end-to-end-static-type-checking-postgresql-typescript.html
1•vbilopav•41s ago•0 comments

How we stopped worrying and bought an Electron Microscope [video]

https://www.youtube.com/watch?v=zfPYij2-ry0
1•hmelder•1m ago•1 comments

Worktrunk: Git worktree management for parallel AI agent workflows

https://worktrunk.dev/
1•pryz•2m ago•0 comments

UN: Pact for the Future

https://www.un.org/pact-for-the-future/en/about-pact
1•janandonly•2m ago•0 comments

Sunset $600 MRR app from App Store

https://apps.apple.com/us/app/drylendar-sobriety-tracker/id6756030804
1•francoisboulais•3m ago•0 comments

Show HN: I built an AI tool that generates YouTube thumbnails in seconds

https://www.youtubethumbnailgenerator.app/
1•samuelaidoo45•4m ago•0 comments

The Pheix project published postmortem review following the latest release

https://pheix.org/embedded/post-rtm-engineering-review
2•pheix•8m ago•1 comments

BMW Recalls 36,922 X3s over Steering Software Glitch

https://www.bmwblog.com/2025/12/19/2025-2026-bmw-x3-recall-steering-software/
2•krona•8m ago•0 comments

Claude wrote a functional NES emulator using my engine's API

https://carimbo.games/games/nintendo/
1•delduca•10m ago•1 comments

Tiny fee on Minneapolis carbon pollution won't do much for the climate

https://phys.org/news/2025-11-tiny-fee-minneapolis-carbon-pollution.html
1•PaulHoule•11m ago•0 comments

Generative Intuition

https://nikitph.medium.com/generative-intuition-a1048fb2b820
1•loaderchips•14m ago•0 comments

Tell HN: Happy New Year

2•schappim•15m ago•2 comments

Migadu Email: The Missing Email Service for Domains

https://migadu.com/
1•janandonly•16m ago•0 comments

A Beginner's Two-Component Crystal-Style Wi-Fi Detector

https://siliconjunction.wordpress.com/2025/12/12/a-beginners-two-component-crystal-style-wi-fi-de...
2•jensgk•17m ago•0 comments

Exploiting Silent Delivery Receipts to Monitor Users on Instant Messengers

https://github.com/gommzystudio/device-activity-tracker
2•tcsenpai•17m ago•0 comments

Claude Code Anywhere

https://happy.engineering/
1•mellosouls•18m ago•1 comments

Show HN: TimeProofs – Prove when data existed without uploading it

1•timeproofs•19m ago•1 comments

Two Decades of Piracy Reporting: TorrentFreak's Retrospective

https://torrentfreak.com/2025-two-decades-of-piracy-reporting-torrentfreaks-retrospective/
2•throw0101c•20m ago•0 comments

Immutable Infrastructure, Immutable Code

https://aicoding.leaflet.pub/3mbaguyrjek2g
1•gpi•21m ago•0 comments

'Ghost resorts': 100s of ski slopes lie abandoned–will nature reclaim Alps?

https://www.theguardian.com/environment/2025/dec/27/alps-france-skiing-snow-warming-resorts-closi...
3•bookofjoe•21m ago•0 comments

Stages of AI Grief

https://sellsbrothers.com/the-5-stages-of-ai-grief
9•goosebump•23m ago•3 comments

The science of how (and when) we decide to speak out–or self-censor

https://arstechnica.com/science/2025/12/the-science-of-how-and-when-we-decide-to-speak-out-or-sel...
1•asplake•24m ago•0 comments

The Best Cable in the World (For Developers)

https://eliot.blog/p/the-best-cable-in-the-world-for-developers
2•ea016•25m ago•0 comments

Best Free Online Escape Room Games in 2026

https://onlineescaperoom.org
1•weihz5138•30m ago•1 comments

Immigrant Derangement Syndrome

https://paulkrugman.substack.com/p/immigrant-derangement-syndrome
7•rbanffy•31m ago•2 comments

Nvidia GB10's Memory Subsystem, from the CPU Side

https://chipsandcheese.com/p/inside-nvidia-gb10s-memory-subsystem
2•ingve•34m ago•0 comments

Nvidia Groq Update: Everyone Gets Rich, Patent Warfare Begins

https://ossa-ma.github.io/blog/groq-update
4•simonebrunozzi•37m ago•0 comments

Show HN: LoureiroGate – Differentiable Physics Guardrails for PyTorch

https://github.com/Ashioya-ui/loureiro-gate
1•pb_lightmind•44m ago•2 comments

The Cost of Translation

https://www.ramijames.com/thoughts/the-cost-of-translation
9•ramijames•44m ago•0 comments

Vect AI – The Autonomous Marketing OS for 10x Growth

https://www.google.com/search?q=site%3Avect.pro&oq=s&gs_lcrp=EgZjaHJvbWUqCAgDEEUYJxg7MgYIABBFGDwy...
1•WoWSaaS•45m ago•3 comments