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?

Weird Al declined 'a nice pile of money' to star in AI ad

https://www.avclub.com/weird-al-yankovic-ai-commercial-exit
1•jimt1234•2m ago•0 comments

I put Claude Code on my Garmin running watch

https://github.com/fashton28/garmin-code
1•fashton28•3m ago•1 comments

The Underhanded C Contest

https://underhanded-c.org/
1•ccabraldev•4m ago•0 comments

Motte-and-Bailey Fallacy

https://en.wikipedia.org/wiki/Motte-and-bailey_fallacy
1•chistev•7m ago•0 comments

Break any AI scam phone call in just a few easy steps [video]

https://www.youtube.com/watch?v=lk3jCuITwcE
1•akavel•10m ago•0 comments

Show HN: GONK – Lightweight Edge-Native API Gateway in Go

https://github.com/JustVugg/gonk
1•vforno•10m ago•0 comments

Lawsuit alleges Samsung, SK Hynix, and Micron colluded to inflate DRAM prices

https://www.polygon.com/ram-manufacturers-sued-supply-price-fixing/
2•DSemba•13m ago•0 comments

Opening up 'Zero-Knowledge Proof' technology to promote privacy in age assurance

https://blog.google/innovation-and-ai/technology/safety-security/opening-up-zero-knowledge-proof-...
1•consumer451•15m ago•0 comments

Teaching AI to Reason About Software

https://soteria-tools.com/blog/teaching-ai
2•giltho•18m ago•0 comments

KDE Linux Introduces "Developer Mode" Option, Easier Log Collection

https://www.phoronix.com/news/KDE-Linux-June-2026
2•Bender•20m ago•0 comments

'It's like having a dumb friend': Young San Franciscans hate AI

https://www.sfgate.com/tech/article/san-francisco-ai-backlash-22325141.php
9•turtlegrids•21m ago•0 comments

US opts not to renew Trump's trade deal with Mexico and Canada

https://www.ft.com/content/2c7b4dc8-1b1c-49f4-b51a-0dee0c1d216a
4•petethomas•22m ago•0 comments

Roost

https://roostsocial.app/
1•JetSpiegel•22m ago•0 comments

Reap: Automatic Curation of Coding Agent Benchmarks

https://arxiv.org/abs/2604.01527
1•dipankarsarkar•24m ago•0 comments

Ask HN: Could someone invite me to lobste.rs?

1•ra0x3•25m ago•0 comments

The Rape Gang Inquiry Report

https://rapeganginquiry.co.uk/report
4•Bender•25m ago•1 comments

Are Claude models broken with the Fable 5 update?

1•jackjd•25m ago•0 comments

Cboe Seeks to List Prediction Market Type Options on Earnings Metrics

https://www.bloomberg.com/news/articles/2026-07-01/cboe-seeks-to-list-prediction-market-type-opti...
1•petethomas•25m ago•0 comments

Crimson Room (2004)

https://kbhgames.com/game/crimson-room
1•dieselgate•28m ago•0 comments

Best Investments over the Last 100 Years? Almost All Are Tech Companies.

https://www.nytimes.com/2026/06/26/business/apple-nvidia-tesla-spacex-stock-market-winners.html
1•bookofjoe•28m ago•1 comments

The empty corner in brain-to-text

https://brgsk.xyz/the-empty-corner-in-brain-to-text/
1•brgsk•28m ago•0 comments

Your Site, your rules: new AI traffic options for all customers

https://blog.cloudflare.com/content-independence-day-ai-options/
2•tcp_handshaker•29m ago•0 comments

Large Hadron Collider is shut down by CERN to make it more powerful

https://www.dailymail.com/sciencetech/article-15943949/Large-Hadron-Collider-shut-CERN.html
1•Bender•29m ago•0 comments

Show HN: Simulate what AI agents do to an engineering org (no signup)

https://www.orgonaut.co/tools/agentic-reorg-simulator/
1•orgonaut•30m ago•0 comments

FSF Librephone update: Ensuring freedom, one blob at a time

https://www.fsf.org/bulletin/2026/summer/ensuring-freedom-one-blob-at-a-time
9•g-b-r•31m ago•0 comments

Stop Quoting Steve Ballmer

https://www.boxofcables.dev/stop-quoting-steve-ballmer/
1•haydenbarnes•31m ago•2 comments

Meta is reportedly building its own cloud business

https://www.engadget.com/2206249/meta-is-reportedly-building-its-own-cloud-business/
1•tcp_handshaker•32m ago•0 comments

What Can't Fable Do?

1•alimhaq•33m ago•0 comments

Flickr – Senior SRE – Remote (US) – Full-Time

https://www.flickr.com/jobs?gh_jid=7822735&gh_src=7b63e17d1
1•Photoworkisfun•34m ago•0 comments

Tidesman: Native MCP server for Apple Container's Linux container workflows

https://tidesman.dev/
1•JeronimoColon•35m ago•0 comments