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?

Show HN: Sqemo – An ERD tool where column names are generated, not typed

https://app.sqemo.com
1•sqemo•3m ago•0 comments

Frags framework for precision in AI agents

https://github.com/theirish81/frags
1•mansilladev•5m ago•0 comments

Don't despair about what's happening to our planet

https://www.theguardian.com/membership/2026/aug/11/dont-despair-about-whats-happening-to-our-plan...
1•jahnu•6m ago•0 comments

Agentic test processes, LLM benchmarks, and other notes

https://danluu.com/ai-coding/
2•kqr•6m ago•0 comments

ReVoice: Local video dubbing with voice cloning, no cloud/API

1•masterchief_tr•7m ago•0 comments

Staring into the abyss as a core life skill (2022)

https://www.benkuhn.net/abyss/
1•EndXA•7m ago•0 comments

Cloudflare Pricing Calculator

https://xoresearch.org/blog/cloudflare-pricing-calculator
1•k_vi•7m ago•0 comments

Show HN: Two LLMs sword-fight in a physics SIM, humans blind-vote who reasoned

1•pioneer37•8m ago•0 comments

GPU AI workloads with a Ruby on Rails monolith

https://www.docuseal.com/blog/gpu-ai-workloads-with-a-ruby-on-rails-monolith
1•babanooey21•8m ago•1 comments

No standard says what to record about an LLM call, so I built the record

https://stillig.net/posts/tamper-evident-llm-calls/
1•johtidebreak•9m ago•0 comments

Show HN: The Rotten Tomatoes for AI films, ranked by the tools that made them

https://popcorn.movie/
1•deIeted•10m ago•0 comments

The End of Google Search–and the Internet–As We Know It

https://www.theringer.com/2026/08/04/tech/google-search-ai-internet
2•cdrnsf•10m ago•0 comments

Show HN: ReadAware – an extensible eBook reader that evolves with you

https://github.com/ahpxex/read-aware
1•ahpx•13m ago•0 comments

Show HN: PrimeTask – A local-first Mac productivity system with an MCP server

https://www.primetask.app/
1•vxvaptor•13m ago•0 comments

Show HN: Ebman – a k9s-style terminal UI for AWS Elastic Beanstalk

https://github.com/tombaldwin/ebman
1•tombaldwin•13m ago•0 comments

How the hard reality of climate change hit Europe's economy this summer

https://www.reuters.com/business/environment/how-hard-reality-climate-change-hit-europes-economy-...
1•alephnerd•15m ago•0 comments

Vladimir Arnold's Rainbow Is a Masterclass in Simplification [video]

https://www.youtube.com/watch?v=ZJH-5LLwWuo
1•surprisetalk•16m ago•0 comments

Website showing form intersections in 3D

https://eyes.training/intersections/
1•mdrzn•18m ago•0 comments

Show HN: HoneyMCP – Deception Layer for MCP Servers, Ghost Tools Act as Honeypot

https://github.com/barvhaim/HoneyMCP
1•bignet•19m ago•0 comments

Reasoning Traces: A New Trick Reveals AI Models' Inner Thoughts

https://www.wired.com/story/a-new-trick-reveals-ai-models-inner-thoughts/
3•smurda•20m ago•0 comments

Show HN: Synapse – a monitoring SaaS shipped with my Claude Code workflow

https://synapse.mdlc.ai
1•grepzero•22m ago•0 comments

The guide to healing your insecure attachment

https://www.pasthepast.com/p/the-ultima-guide-to-healing-your
2•ElysiumAbove•22m ago•0 comments

Vaultwarden Sequence Diagrams

https://app.ilograph.com/demo.ilograph.Vaultwarden/Log%2520In
2•billyp-rva•23m ago•0 comments

How 10,000 American Cities Got Their Names

https://www.wsj.com/us-news/how-10-000-american-cities-got-their-names-a67c625e
2•impish9208•24m ago•1 comments

How the government is using AI to speed up the planning system

https://takes.jamesomalley.co.uk/p/build-gemini-build
1•dgroshev•27m ago•0 comments

Show HN: Replacing HTML/CSS/JS with Rust

https://fui-rs-demo.effindom.dev/
3•zionsati•27m ago•2 comments

Show HN: Reprogram your mind while you vibe code

https://justglow.dev/
1•mikiyas•29m ago•0 comments

The Closure of the Internet: Most Important Social Phenomenon of the Late 2010s

https://arctotherium.substack.com/p/the-closure-of-the-internet
1•nkurz•30m ago•0 comments

Amazon cuts some jobs in its artificial general intelligence unit

https://www.cnbc.com/2026/07/22/amazon-lays-off-some-employees-in-its-agi-unit.html
4•mgh2•35m ago•0 comments

CPU jitter entropy random number generator

https://www.chronox.de/jent/
2•fanf2•35m ago•0 comments