frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•11mo ago

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•11mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

Prototyping turned into an excuse for not thinking

https://unsung.aresluna.org/prototyping-turned-into-an-excuse-for-not-thinking/
1•latexr•4m ago•0 comments

Ask HN: What should I re-skill in?

2•TbobbyZ•5m ago•1 comments

The internet is deciding what to forget

https://www.ft.com/content/e1c3fd8e-b7c7-4582-a63b-f7b1a2f2bc93
2•hhs•8m ago•0 comments

Cyphernetes – Cypher for Kubernetes

https://cyphernet.es/docs/language
1•fatliverfreddy•11m ago•0 comments

Show HN: 65K synthetic personas project 136 English council elections

https://github.com/Kronaxis/kpm1-election-projections
2•JasonDuke•12m ago•0 comments

Emergency jabs after 100 children die of suspected measles in Bangladesh

https://www.bbc.com/news/articles/cevkz2z7dm8o
1•gmays•15m ago•0 comments

YC interview simulator. Retro game aesthetic

https://trainyc.com
1•ilyaforfun•16m ago•2 comments

Follow Tracker making NHL players rethink social media

https://www.nytimes.com/athletic/7178360/2026/04/08/nhl-follow-tracker-x-social-media/
1•_doctor_love•19m ago•1 comments

A soft robot has no problem moving with no motor and no gears

https://engineering.princeton.edu/news/2026/04/08/soft-robot-has-no-problem-moving-no-motor-and-n...
3•hhs•20m ago•0 comments

Anthropic says new AI model too dangerous for public release

https://thehill.com/policy/technology/5824219-anthropic-new-ai-dangerous-public/
3•geox•20m ago•0 comments

The AWS Lambda 'Kiss of Death'

https://shatteredsilicon.net/the-aws-lambda-kiss-of-death/
1•birdculture•23m ago•0 comments

How Many Lives Do Amber Alerts Really Save?

https://www.mcgill.ca/oss/article/critical-thinking-technology-history/how-many-lives-do-amber-al...
1•bookofjoe•23m ago•0 comments

Show HN: Lingle – Voice agent to simulate zoom-based personal language lessons

https://lingle.ai/
3•andrewfhou•25m ago•2 comments

Amazon Ending Support for Older Kindles: Full List of Affected Devices

https://www.techrepublic.com/article/news-amazon-ends-support-older-kindles-2026/
2•rmason•30m ago•3 comments

Show HN: Memoriki – LLM Wiki+MemPalace for persistent personal knowledge bases

4•Aianback•31m ago•0 comments

Show HN: Agent Tuning, using recursion to achieve predictable agent output

https://github.com/adam-s/agent-tuning
4•dataviz1000•32m ago•0 comments

Kids Are Discovering the Joys – and Pains – Of the Landline

https://www.wsj.com/lifestyle/kids-are-discovering-the-joysand-painsof-the-landline-f703d505
2•fortran77•33m ago•1 comments

Open source died in March. It just doesn't know it yet

https://www.chainguard.dev/unchained/open-source-died-in-march-it-just-doesnt-know-it-yet
3•gpi•37m ago•1 comments

How the Trivy supply chain attack harvested credentials from secrets managers

https://vaultproof.dev/blog/trivy-supply-chain-attack
3•Rial_Labs•43m ago•0 comments

Hosted AI API Gateway – smart routing across Google, OpenAI, Anthropic, and more

https://api.lxg2it.com
1•sea-gold•43m ago•2 comments

Funerals Keep Africa Poor

https://davidoks.blog/p/how-funerals-keep-africa-poor
4•powera•44m ago•1 comments

Kanye of the Tech Industry

https://getlearnix.com/
1•noahjohnson1•46m ago•0 comments

Samsung's 2026 Q1 profit increased eightfold to a record $38B

https://www.reuters.com/sustainability/sustainable-finance-reporting/samsung-flags-eight-fold-jum...
3•itopaloglu83•46m ago•1 comments

A dashboard for the state of the American Chestnut

https://chestnut.fyi/
2•adam_gyroscope•46m ago•0 comments

Use a gaming PC as a Google Gemma 4 LLM server

https://sgbarker.com/use-a-gaming-pc-as-a-google-gemma-4-llm-server/
2•amaitu•49m ago•1 comments

BunnyCDN has been silently losing our production files for 15 months

https://old.reddit.com/r/webdev/comments/1sglytg/bunnycdn_has_been_silently_losing_our_production/
10•speckx•50m ago•0 comments

Show HN: Rust based eBook library for Python, with MIT license

https://github.com/arc53/fast-ebook
2•larry-the-agent•50m ago•0 comments

Show HN: Curated list of ~40 AI browser extensions across 9 categories

https://github.com/kklt92/awesome-ai-extensions
2•imvyarqoyzcuem•51m ago•0 comments

The Training Example Lie Bracket

https://pbement.com/posts/lie_brackets/
2•pb1729•54m ago•0 comments

Benchmarking LLMs with Marimo Pair

https://ericmjl.github.io/blog/2026/4/8/benchmarking-llms-with-marimo-pair/
1•akshayka•56m ago•0 comments