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?

Nomenclator (Nomenclature)

https://en.wikipedia.org/wiki/Nomenclator_(nomenclature)
1•thunderbong•1m ago•0 comments

Age Checks That Don't Reveal Identity: Privacy Preserving Attribute Verification [pdf]

https://magarshak.com/papers/Personal.pdf
1•EGreg•4m ago•0 comments

City on the Edge: Can San Francisco's soul survive techno-capitalism?

https://www.ft.com/content/e9a5639c-eaad-4c24-997b-1cdf9348851d
1•1vuio0pswjnm7•12m ago•0 comments

Show HN: Searchable directory of HN Job postings

https://gethnjobs.com/
1•hboon•13m ago•0 comments

On AI Text Detection

https://ethansmith2000.substack.com/p/ai-text-detection-arms-dealers-in
1•dvrp•13m ago•0 comments

Ditching Vagrant

https://benjamintoll.com/2026/06/29/on-ditching-vagrant/
1•jandeboevrie•19m ago•0 comments

Show HN: PDFWix – Browser-Based PDF Tools for Everyday Workflows

https://www.pdfwix.com/
1•PDFWix•20m ago•0 comments

He sent a harsh email to ICE's top official. Federal agents tracked him down

https://www.npr.org/2026/07/01/nx-s1-5874124/dhs-tracks-ice-critic
2•OutOfHere•20m ago•0 comments

CursorBench 3.1

https://cursor.com/evals
2•handfuloflight•21m ago•0 comments

Paste any job, find who in your network can refer you

https://happenstance.ai/sidedoor
1•welshpony•22m ago•1 comments

Transcending Temptation Through Abstraction

https://journals.sagepub.com/doi/10.1177/0963721412449169
1•highfrequency•25m ago•0 comments

The Control Plane Was the Point: Revisiting Autofz in the LLM Era

https://yfu.tw/blog/en/autofz-revisited/
1•twleo•25m ago•0 comments

Alleged member of international cyber hacking group Scattered Spider arrested

https://news.sky.com/story/alleged-member-of-international-cyber-hacking-group-scattered-spider-a...
1•austinallegro•25m ago•0 comments

Generative Dynamic Gaussian Reconstruction from Monocular Video

https://research.nvidia.com/labs/amri/projects/world-from-motion/
1•ilreb•26m ago•0 comments

What Did Hubble See on Your Birthday?

https://science.nasa.gov/mission/hubble/multimedia/what-did-hubble-see-on-your-birthday/
1•sohkamyung•39m ago•0 comments

Shader Benchmark for LLMs

https://nbardy.github.io/shader_benchmark/
1•nbardy•49m ago•0 comments

OpenAI proposes handing Trump administration 5% stake

https://www.ft.com/content/7c803eab-8e80-4431-9a87-e943bf00e00b
4•enraged_camel•49m ago•1 comments

SpaceX reportedly working on an AI phone

https://www.theverge.com/science/960442/spacex-phone-prototype-elon-musk
2•mandeepj•52m ago•1 comments

Delivery Optimization for Browser and Software Updates to Minimize Bandwidth

https://inavoyage.blogspot.com/2026/07/delivery-optimization-for-browser.html
1•initramfs•52m ago•0 comments

Kenneth Bulmer

https://en.wikipedia.org/wiki/Kenneth_Bulmer
2•petethomas•54m ago•0 comments

GameBoy Emulator on ESP32 and eInk [video]

https://www.youtube.com/watch?v=oPbOK90aJEo
2•yboris•55m ago•0 comments

Book Prizes Don't Work How You Think

https://rebeccamakkai.substack.com/p/book-prizes-dont-work-how-you-think
1•samclemens•55m ago•0 comments

JavaScript library for rapid AI and XR prototyping

https://github.com/google/xrblocks
2•arbayi•1h ago•0 comments

OpenAI proposes handing Trump administration 5% stake

https://www.reuters.com/business/openai-proposes-handing-trump-administration-5-stake-ft-reports-...
4•tristanj•1h ago•0 comments

Smoothie – compile a folder of data into a cited artifact agents can query

https://github.com/4tyone/smoothie
1•MelsHakobyan•1h ago•1 comments

Web Apps for Meta Ray-Ban Display Glasses

https://wearables.developer.meta.com/docs/develop/webapps/build/
2•arbayi•1h ago•0 comments

I hacked this temu camera. what I found should be illegal. [video][8 mins]

https://www.youtube.com/watch?v=RuqQR_R-dEQ
2•Bender•1h ago•0 comments

Show HN: Claude Desktop Switcher for separating the whole Claude Desktop suite

https://matsumotory.github.io/claude-desktop-switcher/
2•matsumotory•1h ago•0 comments

Kimi K2.7 Code is generally available in GitHub Copilot

https://github.blog/changelog/2026-07-01-kimi-k2-7-is-now-available-in-github-copilot/
5•unliftedq•1h ago•0 comments

Show HN: Margarita - Programming language for Agents using Markdown-ish syntax

https://www.margarita.run
2•margarita_dev•1h ago•0 comments