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?

The Economy Avoided a Recession in 2025

https://www.nytimes.com/2025/12/22/business/economy-unemployment-wages-affordability.html
1•Mehuleo•5m ago•1 comments

Just Fucking Use Markdown

https://justfuckingusemarkdown.com/
2•Charmunk•6m ago•0 comments

Ask HN: What was the hardest bug you tracked down in 2025?

2•varshith17•16m ago•0 comments

Encore: TypeScript Infrastructure Framework

https://encore.dev/
1•handfuloflight•16m ago•0 comments

HUML – YAML Without Ambiguity

https://huml.io/specifications/v0-1-0/
1•itsfarseen-1•21m ago•0 comments

Move Over, Genghis Khan. Many Other Men Left Genetic Legacies

https://www.smithsonianmag.com/smart-news/move-over-genghis-khan-many-other-men-left-huge-genetic...
1•thunderbong•25m ago•0 comments

Before This Physicist Studied the Stars, He Was One

https://www.nytimes.com/2025/12/27/world/europe/brian-cox-astronomy-profile.html
1•quapster•28m ago•0 comments

Building Team. One 26MB Primitive. Air-Gapped. Deterministic. Runs Anywhere

https://www.getarbiter.dev/
2•getarbiter•29m ago•1 comments

Next Generation File System?

https://github.com/hydra-nexus/hn4
1•phboot•29m ago•0 comments

Finding Where to Compromise with LLM's

https://trueml.org/thoughts/14
1•ramenlover•38m ago•1 comments

Claude Use Cases

https://claude.com/resources/use-cases
1•Anon84•38m ago•0 comments

Ask HN: What Disappointed You in 2025?

1•adrianwaj•39m ago•0 comments

Velox – A <3kb reactive framework with O(1) updates (No VDOM)

https://github.com/TheRemyyy/velox-framework
1•TheRemyyy•46m ago•2 comments

Show HN: JSON Editors – Online JSON Editor and Developer Toolbox

https://jsoneditors.com
2•DerekDragon•46m ago•0 comments

Quadratrix of Hippias

https://en.wikipedia.org/wiki/Quadratrix_of_Hippias
2•MaysonL•49m ago•0 comments

Spreadsheet Simulators Are Unstoppable

https://www.youtube.com/watch?v=iwU9mcBQgyo
1•exBarrelSpoiler•54m ago•0 comments

Half-Life: Alyx's level designer prefers Black Mesa to original Half-Life (2020)

https://www.pcgamer.com/half-life-alyxs-level-designer-would-rather-play-black-mesa-than-the-orig...
2•TMWNN•59m ago•1 comments

At The Limits of Design

https://mwells.substack.com/p/at-the-limits-of-design
1•braecroft•1h ago•0 comments

My Three Strikes Rule for Blogging

https://www.swyx.io/three-strikes
4•gmays•1h ago•0 comments

Show HN: Jobswithgpt.com Semantic Job Search

2•jobswithgptcom•1h ago•2 comments

Shut-In Society

https://en.wikipedia.org/wiki/Shut-in_Society
2•sieep•1h ago•0 comments

Alloy: React for Codegen, like Stripe's internal framework

https://github.com/alloy-framework/alloy
2•johnathon023•1h ago•1 comments

Macro Photography Highlights: The Best of 2025

https://www.nickybay.com/macro-highlights-the-best-of-2025/
1•kianN•1h ago•0 comments

We Saved Reboot

https://www.youtube.com/watch?v=L00jx-GH2w8
2•bane•1h ago•0 comments

Tell HN: I am afraid AI will take my job at some point

4•funnyfoobar•1h ago•8 comments

Not Everything Should Be Easy

https://blog.rastrian.dev/post/not-everything-should-be-easy
2•rastrian•1h ago•0 comments

I documented a local 20B LLM perceiving its hardware state without data access

https://github.com/Lux1984-oss/Nebula-emergence-AGI
1•loukalacasse•1h ago•0 comments

LLM Conversations Viewer

https://github.com/TomzxCode/llm-conversations-viewer
1•tomzx•1h ago•0 comments

USB 3.0* Radio Frequency Interference Impact on 2.4 GHz Wireless Devices (2012) [pdf]

https://www.usb.org/sites/default/files/327216.pdf
1•davikr•1h ago•0 comments

Installing Podman on OS X with Homebrew

https://www.atamanroman.dev/installing-podman-on-osx-with-homebrew/
2•toomuchtodo•1h ago•0 comments