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?

Flaros

https://flaros.pro
1•HamzaGbada•24s ago•0 comments

Of all the creatures in the sea, LLMs seem to love cuttlefish the most

https://www.artfish.ai/p/ai-aquarium
1•yenniejun111•3m ago•0 comments

Show HN: Belay – deterministic semantic diffs of what a coding agent changed

https://github.com/Allexsen/belay
1•allexsendev•3m ago•0 comments

Show HN: Telesma – an autonomous development loop for Claude Code

https://github.com/mario12358/telesma
1•mariusziskra•3m ago•0 comments

Show HN: Avva – Compress your expertise available to AI agent via MCP

https://avva.chat/
1•kdobrinov•4m ago•0 comments

Lazy, useless people are hiding behind AI

https://www.nicharalambous.com/blog/lazy-useless-people-hiding-behind-ai
1•speckx•5m ago•0 comments

The Randomized K-Server Conjecture Is False

https://cacm.acm.org/research-highlights/the-randomized-k-server-conjecture-is-false/
1•frostbyte7•5m ago•0 comments

Hkust 3D Prints a Titanium Alloy That Keeps Hardening

https://3dprinting.com/news/hkust-researchers-3d-print-a-titanium-alloy-that-keeps-hardening-unde...
1•rbanffy•5m ago•0 comments

DEVONtechnologies – EasyFind

https://www.devontechnologies.com/apps/freeware/easyfind
1•7839284023•6m ago•1 comments

Mathematics in the Age of AI

https://royalsociety.org/news-resources/publications/2026/mathematics-in-the-age-of-ai/
1•Anon84•7m ago•0 comments

Type errors cost our coding agents under 1% of their time

https://evilmartians.com/chronicles/type-errors-cost-our-coding-agents-under-one-percent-of-their...
1•tilt•10m ago•0 comments

Propanol: Deadly Hover Racing

https://store.steampowered.com/app/5158560/Propanol/
1•dams-labs•11m ago•0 comments

Class Action: Optimum Adds Junk Fee to Advertised Prices for Internet Service

https://www.classaction.org/news/optimum-adds-a-junk-fee-to-advertised-prices-for-internet-servic...
1•DeepLogin•12m ago•0 comments

Effective Altruism bought off the media for the Nvidia Hoax

https://twitter.com/AmOptimistShow/status/2125344162815836440
1•MrBuddyCasino•13m ago•0 comments

Trusted Timestamping

https://en.wikipedia.org/wiki/Trusted_timestamping
1•vismit2000•14m ago•0 comments

Patton's Speech to the Third Army

https://www.5ad.org/Patton_speech.htm
1•matltc•15m ago•0 comments

OmniBuf: Keep .proto schemas but replace Protobuf's binary wire format

https://kmcd.dev/posts/omnibuf/
1•ingve•17m ago•0 comments

Notes from the Belly of the Whale: AI's Need for Humanism

https://browsercompany.substack.com/p/notes-from-the-belly-of-the-whale
1•FinnLobsien•17m ago•0 comments

Playbit: A better foundation for personal software

https://playbit.app/
1•surprisetalk•17m ago•0 comments

Show HN: Aethel WAF – A Bare-Socket Web Application Firewall in SWI-Prolog

https://prologwaf.site/
1•lokinpendawa•18m ago•0 comments

Sounds Like a Little Chaos

https://elevenmusic.io/blog/sounds-like-a-little-chaos
1•sigvef•18m ago•0 comments

It Is a BrandedQR Generator

https://app.grbsystem.com
1•gilsonbellon•18m ago•1 comments

What Is WSP MCP? A Free WordPress Plugin to Manage Websites with AI

https://github.com/bilalnaseer/wsp-wordpress-mcp
1•wspmcp77•20m ago•0 comments

Oil and shipping tankers hacked in recent weeks, per report

https://techcrunch.com/2026/11/24/dozens-of-oil-and-shipping-tankers-hacked-in-recent-weeks-per-r...
1•speckx•24m ago•0 comments

Show HN: Hub, an open-source coordinator for Claude Code and Codex sessions

https://github.com/icons8/hub
1•kalimullin•25m ago•1 comments

Show HN: DuckDB client side AI spreadsheet

https://plexisai.vercel.app/
1•samarjoseph12•27m ago•0 comments

Google Built a Giant 'Mirror Dimension' Internet to Test Its Chrome AI Agents

https://www.wired.com/story/google-built-a-giant-mirror-dimension-internet-to-test-its-chrome-ai-...
1•noorsimar•28m ago•0 comments

Show HN: Clary reads iOS notifications in the sender's voice and keeps a history

https://hiclary.com/
2•vignesh_warar•28m ago•0 comments

Fund browser-grade certificate checking for every TLS client

https://upki.rustls.dev/funding.html
1•wofo•30m ago•0 comments

Dangerously Skip Permissions (Song)

https://suno.com/song/890b8848-6001-4d47-b1f6-76767070cf50
1•ekadet•31m ago•0 comments