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?

The Birth of the American 12-string Guitar

https://www.harpguitars.net/history/grunewald/12-string.htm
1•bilegeek•6m ago•0 comments

Show HN: Horus-runtime – High Performance Computing workflow manager

https://github.com/temple-compute/horus-runtime
1•chdominguez•7m ago•0 comments

America Stopped Reading

https://ilummi.app/how-america-stopped-reading
1•anttonio•8m ago•1 comments

OpenAI is shutting down Atlas

https://techcrunch.com/2026/07/09/openai-is-shutting-down-atlas-but-its-ai-browser-ambitions-are-...
1•quadrige•9m ago•1 comments

Build a Basic AI Agent from Scratch: Security III

https://www.ruxu.dev/articles/ai/build-an-ai-agent-security-3/
1•ruxudev•10m ago•0 comments

Show HN: Dozenal – A Game of Spatial Arithmetic

https://dozenal.game
5•sarreph•14m ago•0 comments

Ask HN: Why is every company encorporating AI everywhere?

4•vanessa1211•18m ago•2 comments

If digital computers are conscious, they are conscious at the hardware level

https://smoothbrains.net/posts/2026-05-09-digital-consciousness.html
1•eatitraw•25m ago•0 comments

How to Run an Autonomous Agent Against Your Own Server

https://medium.com/@vektormemory/how-to-run-an-autonomous-agent-against-your-own-server-3ff9335ba69f
1•vektormemory•25m ago•1 comments

A preferred way to design tools for AI agents

https://www.bolshchikov.com/p/your-agent-isnt-dumb-your-tools-are
1•bolshchikov•25m ago•0 comments

Show HN: Spsc-ring-threadsafe Python C ext. 100x faster as multiprocessing.Queue

https://github.com/eliasdejong/spsc-ring-threadsafe
1•eliasdejong•30m ago•0 comments

Show HN: JavaScript/JSON and CSS minifier lib in minimal C89

https://fossil.wanderinghorse.net/r/cssminc/doc/ckout/README.md
1•sgbeal•36m ago•0 comments

How to Build an Automated SEO Workflow That Improves over Time

https://medium.com/@stefant/how-to-build-an-automated-seo-workflow-that-actually-improves-over-ti...
1•stevematzal•37m ago•0 comments

Big Companies Are Starting to Hire Again, Defying Predictions of AI Wipeout

https://www.wsj.com/business/big-companies-are-starting-to-hire-again-defying-predictions-of-ai-w...
3•thm•41m ago•1 comments

How to Set Up an On-Premises Project Management Platform

https://ones.com/blog/how-to-set-up-an-on-premises-project-management-platform-without-real-time-...
1•coding1134•45m ago•0 comments

Finance engineering roles are 2.6% of open finance-department jobs

https://app.layerz.cc/resources/finance-engineer-statistics
1•abarbey•48m ago•0 comments

How to Build a 50k Ton Forging Press

https://www.construction-physics.com/p/how-to-build-a-50000-ton-forging
1•Michelangelo11•51m ago•0 comments

Beyond Lambda-Calculus: Intensional Computation (2017) [video]

https://www.youtube.com/watch?v=Mmjwdtcu99I
1•sargstuff•51m ago•0 comments

Libsm64: Mario 64 as a library for use in external game engines

https://github.com/libsm64/libsm64
2•klaussilveira•53m ago•0 comments

Is Software Solved?

https://ahmet.ee/is-software-solved/
1•aozisik•55m ago•1 comments

The Odyssey Leaked on X: Bootleg Seen by Millions in Hours Before Takedown

https://variety.com/2026/film/news/the-odyssey-leaked-high-quality-bootleg-x-1236821418/
4•smurda•55m ago•1 comments

Removing React.js from the codebase and adapting Htmx for UI interactivity

https://misago-project.org/t/removing-reactjs-from-the-codebase-and-adapting-htmx-for-ui-interact...
1•Ralfp•59m ago•0 comments

Why I Left Google DeepMind

https://www.lesswrong.com/posts/iKm2FhpWkuuBojm82/why-i-left-google-deepmind
6•eatitraw•1h ago•1 comments

"Please just use plain English, I don't understand what you're saying."

https://twitter.com/mykola/status/2081450468178579594
4•alediaferia•1h ago•0 comments

Show HN: Agent Console – A Local Dashboard for Codex and Claude Code

https://github.com/buhuipao/agent-console
1•buhuipao•1h ago•0 comments

Brief notes on the OpenAI/Hugging Face incident

https://abstatisticalconsulting.substack.com/p/brief-notes-on-the-openaihugging
1•eatitraw•1h ago•0 comments

Resumepilot

https://resumpilot-xtlr.bolt.host
1•ibrahemalghazy•1h ago•0 comments

Absolute Truths I Unlearned as Junior Developer (2019)

https://monicalent.com/blog/2019/06/03/absolute-truths-unlearned-as-junior-developer/
1•downbad_•1h ago•0 comments

Heartbeats and Heart Attacks (2016)

https://tabletopwhale.com/2016/10/19/heartbeats-and-heart-attacks.html
2•downbad_•1h ago•0 comments

Teaching LLMs to Update Beliefs for Efficient Long-Horizon Interaction

https://bair.berkeley.edu/blog/2026/07/26/abbel/
1•SVI•1h ago•0 comments