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?

Anthropic's Seven Founders

https://www.nytimes.com/2026/10/26/technology/anthropic-founders.html
1•donohoe•6m ago•0 comments

Show HN: TablePro – open-source native database client for macOS

https://github.com/TableProApp/TablePro
1•ngoquocdat•6m ago•0 comments

OLED iPad Mini

https://www.apple.com/shop/buy-ipad/ipad-mini
3•etothet•7m ago•0 comments

Connect your AI agents to your database without them having to write SQL

https://github.com/claix-dev/claix-for-devs
1•gael_dev•7m ago•0 comments

Show HN: Tapo-uploader – Tapo camera to private YouTube, recorded on motion

https://github.com/LuigiElleBalotta/tapo-uploader
1•lbalotta•7m ago•0 comments

Show HN: KanuniLabs-DataGrid and PivotGrid for React and JavaScript

https://kanunilabs.com/demos/sales-analytics
1•hizlikovboy27•7m ago•1 comments

How to install an app on your Commodore 64

https://www.anildash.com/2026/10/08/install-an-app-commodore-64/
1•colinprince•8m ago•0 comments

Pusaka Intelligence – AI equity research on US large caps

https://pusakaintelligence.com/en/
1•David_Gunawan•9m ago•0 comments

How far $100 of fuel takes you in America's best-selling cars

https://www.kadoa.com/energy-prices/insights/car-fuel-costs
1•hubraumhugo•11m ago•0 comments

What Are Chinese AI Companies Saying About the Impacts of Export Controls?

https://www.konstantinpilz.com/posts-publications/chinese-statements-on-compute
1•abdullahalharir•11m ago•0 comments

Ask HN: Is it true the Claude Code is better than Codex for coding?

1•abalgir•11m ago•0 comments

Custom Development Services

https://www.bitechnology.co.uk/
1•itshimbilal•13m ago•0 comments

It's time to come back to Firefox [video]

https://www.youtube.com/watch?v=E2AoYIKwJqM
3•wofo•13m ago•0 comments

Product

https://www.anthropic.com/news/product
1•surprisetalk•14m ago•0 comments

Anthropic IPO: S-1 Filing Offers First Look at Claude Maker's Finances

https://www.bloomberg.com/news/articles/2026-10-26/anthropic-ipo-s-1-filing-offers-first-look-at-...
1•gk1•15m ago•0 comments

Rockchip RK3588s Secure BootROM arbitrary code execution with highest privileges

https://www.cve.org/CVERecord?id=CVE-2024-13942
3•yeko•15m ago•0 comments

Show HN: Generate 3D printable mesh from laser scanned terrain data

https://github.com/code-fabrik/las2stl
1•Lukas_Skywalker•17m ago•0 comments

Chattanooga's Ambitious Plan to Become America's Quantum Capital

https://www.forbes.com/sites/jonathanreichental/2026/10/24/chattanoogas-ambitious-plan-to-become-...
1•willswire•18m ago•0 comments

Panfrost is now using Kraid

https://www.collabora.com/news-and-blog/news-and-events/panfrost-is-now-using-kraid.html
4•losgehts•22m ago•0 comments

Best Database Design Tools for 2027: Windows, macOS and Linux

https://visualeaf.com/blog/best-database-design-tools/
2•business_analys•22m ago•0 comments

Anthropic rushing IPO before AI bubble bursts

https://nypost.com/2026/10/23/business/wall-street-is-urging-anthropic-openai-to-do-their-ipos-in...
9•nothrowaways•24m ago•0 comments

Senior devs are in their Kasparov era

https://www.reddit.com/r/ClaudeAI/comments/1xfs6h7/senior_devs_are_in_their_kasparov_era/
1•redbell•25m ago•0 comments

Show HN: Gostman – Open-source API client with Git-friendly YAML collections

https://gostman.com/
1•kentuckyrc•25m ago•0 comments

Show HN: 25launches – I built a Linktree for my product launches

https://25launches.com
1•bilyas509•25m ago•1 comments

LearnHarness – An Agent Harness for Learning

https://github.com/amosblomqvist/learnharness
2•abhaynayar•27m ago•0 comments

Anthropic Reveals 14-Fold Increase in Growth as It Prepares for Blockbuster IPO

https://www.nytimes.com/2026/10/26/technology/anthropic-ipo-finances.html
2•jbegley•28m ago•0 comments

AI is coming for accounting after coding

2•shoman3003•30m ago•0 comments

Anthropic files for listing on US stock market: valuation of more than $1.5T

https://www.theguardian.com/technology/2026/oct/26/anthropic-files-listing-stock-market
5•bookofjoe•30m ago•0 comments

The MS-DOS Moment of AI

https://rruxandra.github.io/the-msdos-moment.html
2•rruxandra•32m ago•0 comments

Show HN: Sbr, a sing-box compatible client for government resistant VPN infra

https://sbr.blit.cc/benchmarks/
1•antihero•34m ago•0 comments