frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•1y ago

Comments

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

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

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

Warren Buffett on the stock market (1999) [pdf]

https://www.berkshirehathaway.com/1999ar/FortuneMagazine.pdf
1•rzk•51s ago•0 comments

India Country Brief: The Anthropic Economic Index

https://www.anthropic.com/research/india-brief-economic-index
1•ms7892•2m ago•0 comments

Climate change is cooking Europe's oceans, scientists find

https://www.politico.eu/article/climate-change-is-cooking-europes-oceans-world-weather-attributio...
1•robtherobber•3m ago•0 comments

XLibre- community-managed display server for the X11

https://xlibre.net/
1•nalinidash•3m ago•0 comments

Show HN: A Dynamic video creator for free

https://video.samriddhi.shop/
1•suniljaindvg•4m ago•0 comments

A library to make GNN work on binary code

https://blog.quarkslab.com/from-p-code-to-gnn-extract-binary-code-semantics.html
1•shangoue•7m ago•0 comments

The Pinecone DAISY-1 is a fantasy 8-bit computer that exists in reality

https://blog.arduino.cc/2026/06/02/the-pinecone-daisy-1-is-a-fantasy-8-bit-computer-that-exists-i...
3•PPBear•11m ago•0 comments

Junghans Force Mega Solar

https://junghans-shop.com
1•tellwilhelm•11m ago•0 comments

AI is entertainment's scarlet letter

https://www.axios.com/2026/08/08/generative-ai-accusations-hank-green-jerry-falade
2•feraloink•13m ago•1 comments

GeoLibre: An open-source GIS that runs in the browser

https://github.com/opengeos/GeoLibre
1•Nina_antalpha•15m ago•0 comments

From "default dead" to living the future of cancer care

https://cancerletter.com/guest-editorial/20260814_2/
1•tchalla•16m ago•0 comments

Made the best alarm clock for myself

https://endothermalsystems.com/work/cinderclock.html
2•Aknazar•17m ago•0 comments

Reduce Claudish: Paul-Graham-writing-style-in-Claude.md

https://gist.github.com/frodo-max-12/090ec580048f0920c20ce9a4da67ddee
2•infinite_frodo•17m ago•0 comments

Show HN: Data enrichment with AI for Pandas DataFrame

https://github.com/mljar/enrichment
1•pplonski86•18m ago•0 comments

Rebuilding Linear's delta sync read path

https://linear.app/now/rebuilding-delta-sync-read-path
1•ingve•19m ago•0 comments

React ScrollIntoView and UseRef: Scroll to Any Element

https://reactdevelopment.substack.com/p/react-scrollintoview-useref-scroll
1•javatuts•19m ago•0 comments

Accounts are now required to access old.reddit

https://old.reddit.com/login/
3•dtakuma•27m ago•1 comments

Debian weighs eight options in vote on LLM usage

https://lwn.net/Articles/1087134/
4•roryirvine•27m ago•0 comments

Input Required: Agentic Architecture Framework

https://www.agenticaf.io/
1•Cowboy_Dave•27m ago•0 comments

Show HN: An interactive OOM handler for Linux (List hogs and ask what to do)

https://github.com/phiresky/linux-oom-psi-ask
1•phiresky•27m ago•0 comments

Radio Europe Online

https://radio-europe.com/
1•armandsa•29m ago•0 comments

Ripple – semantic commit analysis for Python that blocks broken commits

https://github.com/TheArcDev/ripple-git
1•TheArcDev•34m ago•0 comments

Jet engines can't tell coconut-blend fuel from jet fuel–but the environment can

https://bioengineer.org/jet-engines-cant-tell-coconut-blend-fuel-from-jet-fuel-but-the-environmen...
2•geox•37m ago•0 comments

The Sleep-Promoting Resilience of Boring Infrastructure

https://weblog.rogueamoeba.com/2026/08/19/the-sleep-promoting-resilience-of-boring-infrastructure/
1•ingve•37m ago•0 comments

Malicious Version of ArrayRef (0.3.10) Published

https://github.com/droundy/arrayref
1•John23832•40m ago•0 comments

My Thoughts on Agentic Coding

https://vucenovic.dev/blog/agentic-coding-thoughts/
2•avucenovic•44m ago•0 comments

Run frontier LLMs on sovereign EU infrastructure

https://corti.ai/models
1•guillego•47m ago•0 comments

Arrayref v0.3.10 and v0.3.11 compromised on crates.io

1•stevefan1999•48m ago•0 comments

Show HN: Ollama served my 40k-context model at 4k, silently

https://github.com/Bigbonus/ollama-context-window-check
1•satoshiakiyama•50m ago•0 comments

Nutrition standards for AI-designed foods across borders

https://www.worldsolve.org/?view=problem&id=5047
2•pep-6067•53m ago•0 comments