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?

Talk: The P2P chat from 1983 that a VPN brought back to life

https://en.andros.dev/blog/03a4ffb9/talk-the-p2p-chat-from-1983-that-a-vpn-brought-back-to-life/
1•andros•35s ago•0 comments

Grafana > Datadog

https://pocketarc.com/articles/i-replaced-datadog-with-grafana-loki-tempo-and-prometheus
1•pocketarc•2m ago•0 comments

The Prague of Deus Ex: Mankind Divided

https://www.killscreen.com/disjointed-prague-deus-ex-mankind-divided/
1•keiferski•3m ago•0 comments

Hotseat – Bid for the #1 public ranking spot

https://www.hotseat.gold
1•slightqn•5m ago•0 comments

Take-notes – turn a video, article or paper into one self-contained HTML note

https://github.com/davertor/take-notes
1•davertor•6m ago•0 comments

AI;DR or Don't be a meat proxy

https://theaspiringnerd.com/aidr-or-dont-be-a-meat-proxy/
1•speckx•6m ago•0 comments

A cyberpunk game where the hacks are real (except one district)

https://nightfabric.codesyo.com
1•sashyo•6m ago•1 comments

Locus: Deterministic AST safety firewall for AI agents in pure Rust (<0.05ms)

https://github.com/ahmadshady747-create/LOCUS
1•ahmadshadi2004•8m ago•0 comments

Show HN: A simple budget app focused on how much you can spend each day

https://www.coinsbucket.com/
1•vitormargis•8m ago•0 comments

Minecraft Could Run on the Wii

https://twitter.com/OptiJogos/status/2090686687798067363
1•Jotalea•8m ago•0 comments

Disclosure Has a Billionaire Problem

https://medium.com/@moketchups/the-billionaire-problem-underneath-disclosure-926030c64dc7
2•MoKetchups•8m ago•0 comments

Opus 5 feels, in a word, hostile

https://www.reddit.com/r/ClaudeAI/s/Yv7DiM0rBa
2•Michelangelo11•9m ago•0 comments

Show HN: Mcploitable – The "Metasploitable" of the Model Context Protocol

https://github.com/agileAlligator/mcploitable
1•agileAlligator•10m ago•1 comments

My theme switch was running 3164 animations

https://sley-ui.dev/notes/theme-fade
1•imfemambocus•10m ago•1 comments

The unbearable slowness of being: Why do we live at 10 bits/s?

https://www.sciencedirect.com/science/article/pii/S0896627324008080
1•hamburgererror•11m ago•0 comments

Real world(ish) DeepSeek V4 Flash performance on a single MI300X

https://matthusby.github.io/agent_coding_bench/
1•mhusby•11m ago•0 comments

Building Without Predicting

https://sive.rs/fit
1•surprisetalk•12m ago•0 comments

I made a web puzzle game based on logic questions that 99% of people fail

https://www.telegraph.co.uk/puzzles/puzzle/?source=home&number=194#onepercentclub/the-1-club/the-...
1•joey_cee•14m ago•0 comments

Show HN: Free, non-profit crypto AML screening – no key, no trial

https://publicaml.org/free-crypto-aml/
3•publicaml•15m ago•0 comments

ChatGPT-Taught Experts Are Crippling Agentic AI

https://msukhareva.substack.com/p/how-chatgpt-taught-experts-are-crippling
1•Airealist•15m ago•1 comments

The Brain Is Just Specialized Agents Talking to Each Other – Dr. Jeff Beck [video]

https://www.youtube.com/watch?v=Ucqfb33GJJ4
1•binyu•16m ago•0 comments

New AirPods designed to capture paired color images

https://www.macrumors.com/2026/08/21/camera-airpods-code-reveals-hardware-details/
1•noja•16m ago•0 comments

Amid intense backlash, people are vandalizing Flock surveillance cameras

https://www.npr.org/2026/08/21/nx-s1-5939851/flock-cameras-police-block-surveillance-vandalize
2•geox•17m ago•0 comments

Do we still need GitHub?

https://debarshibasak.github.io/readables/blogs/do-we-need-github.html
2•debarshri•17m ago•0 comments

Tell HN: US LLM models are smarter outside US working hours

1•gepeto666•18m ago•0 comments

Edgerton, KS sues citizens trying to put data center ban before voters

https://www.kmbc.com/article/edgerton-kansas-data-center-ban-lawsuit-citizen-petition/73489670
1•jodacola•18m ago•0 comments

System reminders – how Claude Code steers itself

https://michaellivs.com/blog/system-reminders-steering-agents/
1•Bluestein•19m ago•0 comments

My own embedding models benchmark focused on code duplication detection

https://rkochanowski.com/article/embedding-benchmark/
1•rkochanowski•19m ago•1 comments

The Controversial Academic (Nathan Cofnas) Who Ignited the Jason Arday Furor

https://www.wsj.com/world/uk/the-controversial-academic-who-ignited-the-jason-arday-furor-1071e7fc
2•Bostonian•21m ago•1 comments

Felony charges for citizen deleting phone data at US Border

https://www.nytimes.com/2026/08/21/us/politics/samuel-tunick-deleted-phone-felony.html
9•floathub•22m ago•2 comments