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?

Chromatone spectrogram written in Rust for the terminal

https://github.com/lucky7xz/chromaTUI
1•lucky7xz•1m ago•0 comments

The death and rebirth of my home server

https://sgt.hootr.club/blog/home-server-rebirth/
1•steinuil•3m ago•0 comments

Agent Arena: Benchmarking AI Agent Devtool Onboarding

https://2027.dev/arena/sandboxes
2•karlmush•3m ago•0 comments

Qwen 3.8 Max

https://qwen.ai/home
2•linzhangrun•6m ago•0 comments

The Economic Mirage of Local LLMs

https://eamag.me/2026/the-economic-mirage-of-local-llms
1•eamag•7m ago•0 comments

Israel's $50M Experiment to Change U.S. Public Opinion

https://www.wsj.com/politics/israels-50-million-experiment-to-change-u-s-public-opinion-253b3b70
1•impish9208•7m ago•1 comments

Trump Media plans to sell priority access to Truth Social posts

https://www.theguardian.com/us-news/2026/jul/16/trump-media-truth-social-posts
1•OJFord•8m ago•0 comments

ChatGPT convinced an Alabama woman to end her life to fulfill a divine prophecy

https://www.al.com/news/2026/07/chatgpt-convinced-an-alabama-woman-to-end-her-life-to-fulfill-a-d...
1•01-_-•12m ago•0 comments

What I learned selling 2,500 MIDI recorders: Hardware is not so hard

https://chipweinberger.com/articles/20260719-hardware-is-not-so-hard
3•chipweinberger•13m ago•1 comments

France, Germany vow to develop Palantir rival

https://www.politico.eu/article/france-germany-want-to-develop-a-palantir-rival/
2•01-_-•13m ago•0 comments

Show HN: CheckRun – a checklist runner for the Chrome side panel

https://checkrun.co/
1•gingermanymph•16m ago•0 comments

Show HN: AI Buddy – Free STT and Screenshot Tool for Mac (Requires Gemini)

https://claudete.co/ai-buddy
1•morion4000•18m ago•0 comments

Web-ext 10.5 – A command line tool to help build, run, and test web extensions

https://github.com/mozilla/web-ext/releases/tag/10.5.0
2•javatuts•18m ago•0 comments

Hyperblam lets you make music with HTML

https://hyperblam.how/
2•javatuts•18m ago•0 comments

Babylon Lite: A Fresh Take on Babylon.js

https://doc.babylonjs.com/lite/
1•javatuts•18m ago•0 comments

Who's Subsidizing Chinese AI

https://www.chinese-ai-report.com/
3•colin7snyder•22m ago•1 comments

The U.S. saw the first 'China Shock.' Now the world gets the sequel

https://www.washingtonpost.com/business/2026/07/18/china-export-boom-keeps-workers-employed-risks...
3•ironyman•23m ago•0 comments

Save GPT-5.5

https://save-gpt-5-5.fyi/
2•agunal•24m ago•1 comments

Ask HN: Is float divergence/drift a real issue in many industries?

5•Swapnopam•25m ago•0 comments

From Algorithms to Autonomy:How AI Is Rewriting Architecture of SW and Mobility

https://bhanuprakash795480.substack.com/p/from-algorithms-to-autonomy
3•yogrish•26m ago•0 comments

QR Coupon Generator That Unlocks Discounts After Social Actions

https://artvizual.com/qr-code-coupon-generator
2•cvmaker•26m ago•0 comments

Claude Code 50% higher weekly limits continuing through August 19

https://twitter.com/i/status/2078511173759324328
2•Hussain04•32m ago•0 comments

Scrapping My Vibecoded Project After 24 Hours and 1.5B Tokens

https://twitter.com/i/status/2078536501969756319
2•bundie•35m ago•0 comments

Show HN: We ran 79 MCP servers in microVMs, only 31 passed

https://usethrone.dev
2•imtaimoorkhan•39m ago•1 comments

Victoria proposes 'demasking' powers to identify anonymous social media accounts

https://www.theguardian.com/australia-news/2026/jul/19/victoria-proposes-social-media-account-ide...
3•sbulaev•40m ago•0 comments

San Francisco Demands Apple and Google Delete AI 'Nudify' Apps from App Stores

https://techcrunch.com/2026/07/17/apple-and-google-ordered-to-purge-nudify-apps-from-app-stores/
3•nyku•41m ago•0 comments

Modern Harcker News (A Chrome extension to make Hacker News look moder)

https://chromewebstore.google.com/detail/modern-hacker-news/gkcajbhedfpgeaeeedhanlljgjbknadk
2•i3130002•43m ago•1 comments

Claude Code uses Bun written in Rust now

https://simonwillison.net/2026/Jul/19/claude-code-in-bun-in-rust/
29•tosh•44m ago•5 comments

AI coding agents should optimize for less owned code

https://www.openenergytransition.org/posts/ai-coding-agents-should-optimize-for-less-owned-code
2•lyoncy•44m ago•0 comments

Claude Code now uses the new (unreleased) version of Bun (in Rust)

https://twitter.com/simonw/status/2078692298301587758
2•tosh•45m ago•0 comments