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?

Repository Is Your Swarm

https://nicktrevino.com/your-repository-is-your-swarm.html
1•Hyperlisk•1m ago•0 comments

Open Sourcing the YC Application

https://metorial.com/blog/open-sourcing-the-yc-application
1•LYFMail•3m ago•0 comments

Hilbert Curve

https://en.wikipedia.org/wiki/Hilbert_curve
1•pykello•4m ago•0 comments

Why Do We Feed Wildlife?

https://thetyee.ca/News/2026/08/20/Why-Do-We-Feed-Wildlife/
1•wertyk•7m ago•0 comments

Schooling Has a Meaning Crisis. Paradoxically, AI Can Help

https://blog.comini.in/p/schooling-has-a-meaning-crisis-paradoxically
1•vismit2000•7m ago•0 comments

GitHub Actions vs. GitLab Pipeline

https://medium.com/playground-tech/github-actions-vs-gitlab-pipeline-2368e9a27f68
1•caulagi•14m ago•0 comments

AWS Bedrock AgentCore enforces user context to prevent hijacked AI agents

https://techupdate24.com/aws-bedrock-agentcore-hijacked-ai-security/
2•sysadmin_diarie•14m ago•0 comments

Elven Rope, Ultra-High Molecular Weight Polyethylene, and LLMs (2025)

https://vgel.me/posts/elven-rope-and-llms/
1•networked•15m ago•0 comments

Testing CUDA kernel execution with GPU correctness harness

https://github.com/IshwaryaRavichandran/gpu-correctness-harness
1•laxmena•16m ago•0 comments

Show HN: Open source math games and puzzles

https://theorem.games/
1•Zebfross•20m ago•1 comments

Thousands of years of indoor air pollution

https://www.slowboring.com/p/thousands-of-years-of-indoor-air
2•neehao•20m ago•0 comments

A Man Who Proved the Blue Zones Are Fake – Saul Newman [video]

https://www.youtube.com/watch?v=1ZE5ml7a6rE
2•neehao•21m ago•1 comments

OpenAI Is Backing Away from Reddit as Reddit Tries to Become OpenAI?

https://gizmodo.com/openai-is-backing-away-from-reddit-as-reddit-tries-to-become-openai-2000800060
3•helsinkiandrew•21m ago•1 comments

Pitfalls of Benchmarking on Modern Systems

https://stefan-marr.de/2026/08/pitfalls-of-benchmarking-on-modern-systems/
2•matt_d•22m ago•0 comments

Escaping the Quicksand: A Call to Arms

https://arxiv.org/abs/2608.19674
1•ahsillyme•24m ago•0 comments

The Religious Experience of Philip K. Dick by R. Crumb (1986)

https://philipdick.com/resources/miscellaneous/the-religious-experience-of-philip-k-dick-by-r-cru...
1•wise_blood•31m ago•0 comments

Cognition and consciousness arise from analog computations, says new theory

https://picower.mit.edu/news/cognition-and-consciousness-arise-analog-computations-says-new-theory
3•XzetaU8•33m ago•0 comments

Stop Making TUIs

https://sockpuppet.org/blog/2026/08/20/stop-making-tuis/
3•underdeserver•33m ago•2 comments

The superfast and compatible < 100kb pure HTML/oldJS Jellyfin front-end

https://www.reddit.com/r/jellyfin/comments/1vtcltb/meet_jellydinosaur_the_superfast_very_compatible/
1•wise_blood•39m ago•0 comments

Japan tried to build an operating system for the world, the US intervened

https://www.xda-developers.com/japan-tried-build-operating-system-entire-world-us-government-inte...
14•rdmuser•39m ago•2 comments

Meta's Global Playbook for Fighting Child Safety Laws

https://www.techtransparencyproject.org/articles/inside-metas-global-playbook-for-fighting-child-...
2•femto•40m ago•0 comments

Submit privacy-focused companies and projects on PrivBid.com

https://privbid.com/
1•CR1337•46m ago•0 comments

Code Doesn't Speak – It Compiles: Why Small Models Win

https://www.innerkore.com/blog/code-doesnt-speak-it-compiles-small-models-win/
1•gagan2020•47m ago•0 comments

Seed: Minimal, self-modifying agent harness

https://github.com/vivekhaldar/seed
2•gandalfgeek•50m ago•0 comments

Ask HN: Claude Code in Video Editor

2•eliseinicolae•51m ago•1 comments

Show HN: I built an open source video editor that you can control with an LLM

https://github.com/DonkeyCut/Donkey
2•dthedavid•51m ago•0 comments

Building with Papert at My Elbow

https://somewildideas.com/articles/building-with-papert-at-my-elbow
1•the-mitr•57m ago•0 comments

35hp and $12,000 of Pure Joy [video]

https://www.youtube.com/watch?v=ZPVpcTDi1kw
2•primogen•1h ago•0 comments

Show HN: Just describe your idea and let AI build a playable game for you

https://run.ceo/coder/
2•Marvin_RunAI•1h ago•0 comments

California Draws More Startup Investment Than All Other 49 States Combined

https://www.wsj.com/tech/ai/californias-ai-dominance-fuels-366-billion-venture-capital-bonanza-82...
3•mmooss•1h ago•0 comments