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

Comments

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

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

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

Why Speed Matters

https://lemire.me/blog/2025/12/05/why-speed-matters/
1•gsky•2m ago•0 comments

AI chatbots can sway voters better than political advertisements

https://www.technologyreview.com/2025/12/04/1128824/ai-chatbots-can-sway-voters-better-than-polit...
1•_tk_•3m ago•0 comments

DNS over TLS with LetsEncrypt

https://blog.hardill.me.uk/2025/12/06/dns-over-tls-with-letsencrypt/
1•gsky•10m ago•0 comments

Ask HN: What's Been Your Experience Implementing Web Accessibility?

1•lalithaar•10m ago•0 comments

Physicists prove the Universe isn't a simulation after all

https://www.sciencedaily.com/releases/2025/11/251110021052.htm
1•webnrrd2k•11m ago•1 comments

Show HN: Stateless TikToken and Unix-Dictionary GitHub URL Shortener

https://selfdotsend.com/shorty/
1•pankajdoharey•13m ago•0 comments

Show HN: Trello Clone with Source Code

https://kanban.demo.codegres.com/
1•Codegres•18m ago•0 comments

Touching the Elephant – TPUs

https://considerthebulldog.com/tte-tpu/
2•giuliomagnifico•19m ago•0 comments

Self-hosted RSS reader with Docker and HTTPS

https://github.com/ggeorgovassilis/selfhosted-reader
2•ggeorgovassilis•29m ago•1 comments

John Oliver Auction Raises $1.5M for Public Broadcasting

https://www.techdirt.com/2025/12/05/john-oliver-auction-raises-1-5-million-for-public-broadcasting/
2•thunderbong•30m ago•0 comments

US Flips History by Casting Europe–Not Russia–As Villain in New Security Policy

https://www.wsj.com/world/europe/u-s-flips-history-by-casting-europenot-russiaas-villain-in-new-s...
3•layer8•30m ago•0 comments

Desantis Proposal for Citizens Bill of Rights for AI

https://www.flgov.com/eog/news/press/2025/governor-ron-desantis-announces-proposal-citizen-bill-r...
1•yankeehue•38m ago•0 comments

Why Apple Is Moving Intelligence Back to Your Laptop

https://www.apple.com/
4•alternativeto•39m ago•1 comments

Mapping cell dynamics in hair follicles suggests pull mechanism of hair growth

https://www.nature.com/articles/s41467-025-65143-x
1•rbanffy•39m ago•0 comments

'Life being stressful is not an illness' – GPS on mental health over-diagnosis

https://www.bbc.com/news/articles/cx2pvxdn9v4o
4•jnord•41m ago•1 comments

Show HN: GitHub Organisation Years in review stats

https://github.com/Tazer/years-in-review
3•tazer•42m ago•1 comments

Why Tehran Is Running Out of Water

https://www.wired.com/story/why-tehran-is-running-out-of-water-iran-climate-change-drought-extrem...
2•quapster•43m ago•0 comments

Iosevka – Versatile typeface for code, from code

https://github.com/be5invis/Iosevka
1•gjvc•45m ago•0 comments

Replit Design Mode

https://blog.replit.com/design-mode
2•555imon•51m ago•1 comments

Claude Opus 4.5 Gave Me a Perfect Tmux Setup

https://www.hadijaveed.me/2025/12/05/how-claude-opus-gave-me-perfect-tmux-setup/
2•hjaveed•53m ago•0 comments

Apple Interface Design Executive Left for Meta

https://daringfireball.net/2025/12/bad_dye_job
2•SoKamil•54m ago•0 comments

llama2.zig: Inference Llama 2 in one file of pure Zig

https://github.com/cgbur/llama2.zig
3•tosh•54m ago•0 comments

Cryptids

https://wiki.bbchallenge.org/wiki/Cryptids
1•frozenseven•1h ago•0 comments

Show HN: WDP – A protocol where data migrates to survive seizure

https://github.com/dododbobovo-commits/wdp
1•__VECTOR•1h ago•0 comments

We Gave Students Laptops and Took Away Their Brains

https://www.thefp.com/p/we-gave-students-laptops-and-took
3•tzury•1h ago•0 comments

Lessons from a Swift Interview

https://oskargroth.com/blog/swift-interview-lessons
1•cindori•1h ago•0 comments

Swiss government urges people to ditch Microsoft 365 – lack proper encryption

https://www.techradar.com/pro/security/swiss-government-urges-people-to-ditch-microsoft-365-and-o...
13•pseudolus•1h ago•2 comments

OpenRouter Broadcast

https://openrouter.ai/docs/guides/features/broadcast/overview
2•Topfi•1h ago•0 comments

Show HN: Holesail – open-source peer-to-peer tunnels

https://holesail.io/
1•supersuryaansh•1h ago•2 comments

I Pushed an LLM (Claude Opus 4.1) to Its Narrative Limit

https://medium.com/@gianlucabailo/i-pushed-an-llm-claude-opus-4-1-to-its-narrative-limit-here-is-...
1•olvy0•1h ago•0 comments