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•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•12mo 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?

Renewables growth cut Spain's electricity bills by 24.2% over the past two years

https://www.pv-magazine.com/2026/04/30/renewables-growth-cut-spains-electricity-bills-by-24-2-ove...
1•akyuu•2m ago•0 comments

White House workshops plan to bring back Anthropic

https://www.axios.com/2026/04/29/trump-anthropic-pentagon-ai-executive-order-gov
1•JumpCrisscross•3m ago•0 comments

We Asked GPT-5.5 and Claude Opus 4.7 to Design 5 UIs

https://blog.kilo.ai/p/we-asked-gpt-55-and-claude-opus-47
1•heymax054•4m ago•0 comments

Day-ahead electricity prices hit –€500/MWh in France and Germany

https://data.nordpoolgroup.com/auction/day-ahead/prices?deliveryDate=latest&currency=EUR&aggregat...
1•floitsch•5m ago•0 comments

Minilos: A device for intentional listening in the digital age

https://coconauts.net/blog/2026/04/30/minilos/
1•marbartolome•11m ago•0 comments

Iran war drives up circuit board prices, according to report

https://www.heise.de/en/news/Iran-war-drives-up-circuit-board-prices-according-to-report-11276894...
1•pantalaimon•12m ago•0 comments

Use Gmail's 'Manage Subscriptions' Tool to Cut Down on Inbox Clutter

https://www.wired.com/story/gmail-manage-subscriptions-cut-down-on-inbox-clutter/
2•joozio•13m ago•0 comments

I Deleted My Second Brain

https://bulletjournal.com/blogs/bulletjournalist/i-deleted-my-second-brain
1•zdkaster•16m ago•2 comments

Create a digital wardrobe from your Google Photos

https://blog.google/products-and-platforms/products/photos/google-photos-wardrobe-feature/
2•TechTechTech•16m ago•0 comments

1.4 GW: battery storage at former Grohnde nuclear power plant

https://www.heise.de/en/news/1-4-GW-Huge-battery-storage-at-former-Grohnde-nuclear-power-plant-11...
3•pantalaimon•16m ago•0 comments

Show HN: A simple stereogram viewer with zoom and pan

https://github.com/cbbldtgthr/stereogram-viewer
1•cbbldtgthr•17m ago•0 comments

Building reliability into uncertain event delivery (2022)

https://zendesk.engineering/building-reliability-into-uncertain-event-delivery-a09db0750ef9
1•tibbar•20m ago•0 comments

What a chatbot support loop and a meditation hall have in common

https://pilgrima.ge/p/the-swan-in-the-next-room
1•momentmaker•22m ago•0 comments

Mm – Unix tools (find/cat/grep) rebuilt for the multimodal era

https://www.vlm.run/open-source/mm
1•cpnwaugha•25m ago•0 comments

Realtime Faux-Raytraced Interactive 125,000 hair particles on Web

https://imosspro.vercel.app/
3•ldhieu•26m ago•1 comments

Show HN: PortScout – TUI to find and kill processes occupying your ports

https://github.com/abhaikollara/portscout
3•TheThirdTuring•30m ago•0 comments

Considering a Sphere

https://www.solipsys.co.uk/new/ConsideringASphere.html?zd30hn
4•ColinWright•31m ago•0 comments

How to Disable Firefox's New Emoji Picker

https://emsh.cat/en/how-to-disable-firefoxs-emoji-picker/
3•embedding-shape•36m ago•0 comments

The Difference Between "Replicable" and "Not Replicable" Is Not Replicable

https://arxiv.org/abs/2604.26268
4•sebg•38m ago•0 comments

The A.I. Fear Keeping Silicon Valley Up at Night

https://www.nytimes.com/2026/04/30/opinion/ai-labor-work-force-silicon-valley.html
3•pretext•38m ago•0 comments

Collio Is the AI Coworker That Delivers Finished Work, Not Just Instructions

https://collio.chat/
2•serin-ai•39m ago•2 comments

Make HN great again: Neovim vs. IDEs

3•vtemian•45m ago•3 comments

Near-100% test coverage did not catch a CVE in my Go library

https://blog.reqproof.com/p/i-had-near-100-test-coverage-it-didnt
2•LeonidBugaev•50m ago•0 comments

Show HN: Throwaway – open-source disposable email checker and API

https://github.com/sslboard/throwaway
3•weddpros•51m ago•1 comments

Semantic VCS for AI driven development

https://github.com/theswiftway/nool-cli
2•theswiftway•52m ago•1 comments

Granite 4.1: IBM's 8B Model Matching 32B MoE

https://firethering.com/granite-4-1-ibm-open-source-model-family/
62•steveharing1•54m ago•9 comments

What Code Review Can't See (and Bad Data Always Finds)

https://blog.dochia.dev/blog/code_review_rarely_find_bugs/
3•ludovicianul•57m ago•0 comments

Australia ran the experiment on AI economics

https://drdavidwbell.substack.com/p/where-the-jobs-go
3•drdavidwbell•1h ago•0 comments

Cart before horse: On India and vehicle-to-vehicle communication technology

https://www.thehindu.com/opinion/editorial/cart-before-horse-on-india-and-vehicle-to-vehicle-comm...
2•thisislife2•1h ago•0 comments

Detection toolkit for CopyFail(CVE-2026-31431)

https://github.com/kadir/copy-fail-CVE-2026-31431-IOC
2•nofool•1h ago•1 comments