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: Deslop Your TS Codebases

https://github.com/maharshi365/deslop
1•maharship2022•1m ago•0 comments

Show HN: Trackd – a Gmail subscription tracker with no bank login

https://trackd.deanware.com
1•deanandreakis•1m ago•0 comments

How much of "write simply" is just survivorship bias?

https://greyenlightenment.com/2026/09/13/how-much-of-write-simply-is-just-survivorship-bias/
1•paulpauper•2m ago•0 comments

Is the AI Apocalypse for Real? What the intelligence community thinks

https://www.kenklippenstein.com/p/is-the-ai-apocalypse-for-real
1•Refreeze5224•3m ago•0 comments

AI 'kill switch' may need to be mandatory, Anthropic co-founder says

https://www.bbc.co.uk/news/articles/cqgk5e2j0gg8o
1•chrisjj•3m ago•0 comments

The Jenna Set (2005)

https://strangehorizons.com/wordpress/fiction/the-jenna-set/
1•bucket2015•3m ago•0 comments

Show HN: Direct SQL Access to Your QuickBooks Data

https://instabooks.io/docs/db
4•swannodette•4m ago•1 comments

"Do You Still Read the Code?"

https://zanlib.dev/blog/do-you-still-read-the-code/
1•speckx•8m ago•0 comments

How I Won $750k With this Drone [video]

https://www.youtube.com/watch?v=kXqXWcw-hSI
1•seanbrodie•8m ago•1 comments

AirBaltic files for Chapter 11 bankruptcy as Iran war costs bite

https://www.reuters.com/world/airbaltic-files-chapter-11-bankruptcy-new-york-2026-09-14/
2•avalexandrov•9m ago•0 comments

Micro Mock – instant OpenAPI mock server in VS Code, with chaos testing

https://github.com/SamirHodzic/micro-mock
2•samirh•14m ago•0 comments

Prompts Aren't Real

https://evaluation.club
2•mcfunley•19m ago•0 comments

You need another HTML abstraction

https://github.com/spcbeck/ouroboros-html
2•karlbarks•22m ago•0 comments

The Depression Thing (2017)

https://zachholman.com/posts/the-depression-thing
3•joebig•23m ago•0 comments

A Beginning for Mathematics

https://proofsandprompts.com/2026/09/14/a-beginning-for-mathematics/
12•pact_inference•23m ago•1 comments

97% of US database administrators are running obsolete programs

https://www.zdnet.com/business/why-companies-use-outdated-dbms-percona-report/
1•CrankyBear•26m ago•1 comments

One monkey mind's 10 days of silence

https://notetoself.studio/post/one-monkey-mind-s-10-day-silent-meditation-course/
2•Eridanus2•28m ago•0 comments

Ask HN: Is your AI LLM based web service secure from prompt injection?

2•roschdal•30m ago•1 comments

Submit your ideas for Interop 2027

https://webkit.org/blog/18283/submit-your-ideas-for-interop-2027/
1•stwrt•31m ago•0 comments

The Cool Numbers' Club at PostHog

https://coolnumbersclub.posthog.com/
1•rbaudibert•31m ago•0 comments

Valve's Steam Frame costs $1,059

https://www.theverge.com/games/994376/valve-steam-frame-vr-headset-price-release-date
3•sbulaev•31m ago•1 comments

Trip Report on VLDB 2026

https://thinklinks.wordpress.com/2026/09/13/trip-report-vldb-2026/
1•pgroth•31m ago•0 comments

SmartPantry – Free grocery expiry tracker with no sign-ups

1•syedarutaba•33m ago•0 comments

Show HN: Closebytes – 60k open-source projects in a similarity point cloud

https://closebytes.com
1•boredCoconut•34m ago•0 comments

Meta bet that AI would shrink its management ranks and is now rebuilding them

https://fortune.com/2026/09/12/meta-year-of-efficiency-managers-ai-investment/
1•ryandrake•36m ago•0 comments

Apache Cloudberry's ecosystem docs cover LibreDB Studio as a native SQL client

https://cloudberry.apache.org/docs/ecosystem/sql-clients/libredb-studio/
2•abdullahk0634•38m ago•2 comments

How to Unclench

https://howtounclench.com/
2•jonnymiller•40m ago•0 comments

Why estimates of hallucinated citations are probably low

https://veruscite.com/blog/hallucinated-citation-estimates-are-low
1•apwheele•41m ago•0 comments

The agents are coming for the web and the web isn't ready

https://info.varnish-software.com/blog/the-agents-are-coming-for-the-web-and-the-web-isnt-ready
2•ingve•42m ago•1 comments

GPT-5.6 Luna vs. GPT-6 Astra: Is a $1.20 Model Good Enough for Code Review?

https://entelligence.ai/blogs/gpt-5.6-luna-vs-gpt-6-astra-is-a-1.20-model-good-enough-for-code-re...
34•theanonymousone•42m ago•19 comments