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?

Simplex Algorithm

https://en.wikipedia.org/wiki/Simplex_algorithm
1•tosh•40s ago•0 comments

Like a Bouncer at a Bookstore: Texas' App Store Accountability Act

https://cdt.org/insights/like-a-bouncer-at-a-bookstore-texas-app-store-accountability-act-is-unco...
2•bilsbie•1m ago•0 comments

After 80 Years, Mathematicians Give Famed 'Erdős Method' an Upgrade

https://www.quantamagazine.org/after-80-years-mathematicians-give-famed-erdos-method-an-upgrade-2...
1•Brajeshwar•2m ago•0 comments

Sad Things about PHP

http://phpsadness.com/
1•linmer•3m ago•0 comments

Belonging to the Land

https://www.5jt.com/belonging-to-the-land
2•tosh•10m ago•0 comments

Live: Daniel J. Bernstein (djb) on the push to weaken post-quantum TLS [10am ET]

https://www.youtube.com/watch?v=qPhoJQtvgUo
2•almostbasic•12m ago•0 comments

Software Values

https://useyourexperience.com/software-values
1•jrdieter•12m ago•0 comments

You Can Now Program Steam Deck GPU with Mojo and Max

https://forum.modular.com/t/programming-the-steam-decks-gpu-with-mojo-and-max/3282
1•melodyogonna•13m ago•0 comments

Two humpback whales set records swimming between Australia and Brazil

https://phys.org/news/2026-05-humpback-whales-australia-brazil.html
1•pseudolus•14m ago•0 comments

AI Ticket and Article Summarization Package for Otobo ITSM

https://github.com/imAbdelhadi/AISummaryPackage
1•djafer•14m ago•1 comments

Talking with your PDFs locally with Blablador and GPT4all

https://sdlaml.pages.jsc.fz-juelich.de/ai/guides/blablador_gpt4all/
1•the-mitr•15m ago•0 comments

The $1T problem diamonds can solve [video]

https://www.youtube.com/watch?v=HKJC84RLhyU
1•teleforce•17m ago•0 comments

Commodore Callback flip phone will use recycled memory chips

https://www.tomshardware.com/phones/commodore-drops-callback-flip-ohine-to-399-by-defaulting-to-r...
2•LorenDB•19m ago•0 comments

Adobe Generative AI User Guidelines (2026)

https://www.adobe.com/legal/licenses-terms/adobe-gen-ai-user-guidelines.html
1•joebig•19m ago•1 comments

Slowjson – attack on HTTP servers accepting JSON with chunked transfer encoding

https://github.com/cr0hn/slowjson
1•jen20•20m ago•0 comments

Apple and Audi alumni have made a luxe EV based on the moon buggy

https://www.wired.com/story/amble-one-luxe-ev-buggy/
2•LorenDB•23m ago•0 comments

I went to uni to learn. What I discovered has made me angry and terrified

https://www.smh.com.au/national/i-went-to-uni-to-learn-what-i-discovered-about-my-generation-has-...
2•obscurette•23m ago•1 comments

I'm 16 and Running a Software Jam in a World of Slop

https://foxmoss.com/blog/radish/
1•foxmoss•27m ago•1 comments

50 out of 413 Companies that use my libraries

https://mccue.dev/pages/6-27-26-who-uses
1•theanonymousone•29m ago•0 comments

Suspicious Discontinuities

https://danluu.com/discontinuities/
2•tosh•32m ago•0 comments

Nextcloud Talk and the FOSS caveat of mobile push notifications

https://codeberg.org/danb/isitreallyfoss/issues/305
1•schafele•33m ago•0 comments

Position: Coding Benchmarks Are Misaligned with Agentic Software Engineering

https://arxiv.org/abs/2606.17799
1•wek•34m ago•0 comments

Qwen-AgentWorld-35B-A3B: a local 'world model' you can run at home Open Models

https://vettedconsumer.com/qwen-agentworld-35b-a3b-a-local-world-model-you-can-run-at-home/
1•ermantrout•34m ago•0 comments

Map2Model has been shut down [due to legal notices]

https://map2model.com/
1•randunel•35m ago•0 comments

Show HN: Hyoomn – We'll constructively roast your AI coded B2B SaaS

https://hyoomn.com/
1•krm01•36m ago•0 comments

Apple seeks approval to buy chips from blacklisted Chinese company, FT reports

https://finance.yahoo.com/technology/articles/apple-seeks-approval-buy-chips-032619203.html
4•roboror•36m ago•0 comments

GPT-5.6 Sol: ~20 US govt-approved orgs only. What about non-US businesses?

https://nexusfoundation.substack.com/p/digital-segregation-how-bigtech-and
2•kris_osiadacz•36m ago•0 comments

When you're stuck, just do something

https://www.autogram.id/alex/thoughts/when-you-re-stuck-just-do-something
1•alexakten•38m ago•0 comments

Music Tuned to 440 Hz versus 432 Hz and the Health Effects

https://www.sciencedirect.com/science/article/pii/S1550830718302763
1•looofooo0•39m ago•0 comments

Show HN: InfyniDock – a macOS Dock that switches actual windows

https://infyniclick.com
1•yeelone•41m ago•0 comments