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?

AI 'productivity pollution': the hidden tax on everyone

https://www.machinesociety.ai/p/productivitypollution
1•mikelgan•1m ago•1 comments

Maintaining an organizational knowledge graph with an LLM and event sourcing

https://blog.arkency.com/maintaining-an-organizational-knowledge-graph-with-an-llm-and-event-sour...
2•pdabrowski6•2m ago•0 comments

Turn Hacker News into a personalized brief

https://briefin.com/hackernews/
2•DSemba•3m ago•0 comments

Show HN: Claude Code kept ignoring our MCP tools, so we used hooks instead

https://github.com/NanoNets/Graft
2•Shhdwi•4m ago•0 comments

A few strong opinions about AI

https://noisydeadlines.net/a-few-strong-opinions-about-ai
2•speckx•4m ago•0 comments

Researcher Launches 'CPU Deoptimization' Project to Identify Slowest x86

https://www.tomshardware.com/pc-components/cpus/hardware-researcher-spins-up-cpu-deoptimization-p...
1•birdculture•4m ago•0 comments

SpaceXAI's Grok 4.6 Scores 61 on the Artificial Analysis Intelligence Index

https://artificialanalysis.ai/articles/grok-4-6-benchmarks-and-analysis
2•wertyk•4m ago•0 comments

Can AI do novel security research? Meet the HTTP Terminator

https://portswigger.net/research/can-ai-do-novel-security-research
1•mahemm•6m ago•0 comments

We tested six $24 Linode VMs in Los Angeles: CPU stayed flat, storage varied 76%

https://webbynode.com/articles/linode-24-dollar-vm-cpu-stable-storage-varied
1•gsgreen•7m ago•0 comments

HTML over WebSockets: real-time SPAs with barely any JavaScript

https://en.andros.dev/blog/ef4968f5/html-over-websockets-real-time-spas-with-barely-any-javascript/
2•redbell•7m ago•0 comments

FinCEN Ends Beneficial Ownership Reporting for Small Business Owners

https://home.treasury.gov/news/press-releases/sb0603
1•Cider9986•8m ago•0 comments

I "wrote" my own 8086 nostalgia emulator

https://pavkam.dev/2026-08-11-agents-rebuilt-my-childhood-computer/
1•speckx•10m ago•0 comments

Four Lads Who Shook the (Old) World: Alessio, Andy, Jervis, & Tuomas Drop By

https://bedroombattlefields.com/alessio-cavatore-andy-chambers-jervis-johnson-tuomas-pirinen/
2•Michelangelo11•11m ago•0 comments

Show HN: Snipsy – turn photos into a dated stamp keepsake, sent the same day

https://hosting-pages.netlify.app/snipsy
2•ashwinn11•12m ago•1 comments

Live: Total Solar Eclipse – August 12, 2026 [Live Stream] [video]

https://www.youtube.com/watch?v=DtjbfQtqlsY
2•andai•12m ago•1 comments

Wisconsin Primary Election Results

https://www.nytimes.com/interactive/2026/08/11/us/elections/results-wisconsin-primary.html
2•whack•12m ago•0 comments

In case you think there is consciousness, intelligence or personality in an LLM [video]

https://www.youtube.com/watch?v=vXV2ltVdLMQ
2•spottedmarley•13m ago•1 comments

New York State Newspapers on Microfilm

https://nysl.nysed.gov/nysnp/title4
2•gregsadetsky•15m ago•0 comments

Kalshi and Polymarket bets on clinical trials criticized as 'ghastly'

https://www.npr.org/2026/08/07/nx-s1-5922530/patients-betting-kalshi-polymarket-clinical-trials
2•bryanrasmussen•15m ago•0 comments

Beijing is forcing a mass breakup with AI lovers

https://restofworld.org/2026/china-ai-boyfriend-ban-bytedance-doubao/
3•impish9208•16m ago•0 comments

Using math for solving real-life problems

https://app.notion.com/p/Number-Pi-Podcast-E09-3b46c4fc04cb8077aad7fb4d4b1eb6cc
2•armanj•17m ago•0 comments

Who is Anthropic's auditor – and why should we care?

https://www.ft.com/content/b93d8030-203b-4445-b4a7-49e52d9b17a5
1•petethomas•17m ago•0 comments

Show HN: Harbofly, reclaim the 20–100GB of dev caches on your Mac

https://harbofly.app
2•buildcomcarlos•17m ago•0 comments

Ada 83/TLALOC: a modern Ada 83 compiler with DIANA 86 HLIR and fasmg back end

2•ViMoBr•17m ago•1 comments

Multi-tenant BYOK encryption in PostgreSQL with pgcrypto

https://xata.io/blog/multi-tenant-byok-encryption-in-postgresql-with-pgcrypto
2•tudorg•18m ago•0 comments

Data Center Foes' Newest Tack: Sue Locals over Approval Process

https://news.bloomberglaw.com/litigation/data-center-foes-newest-tack-sue-locals-over-approval-pr...
2•speckx•18m ago•0 comments

Oracle has drawn up plans for a new round of layoffs this month

https://www.businessinsider.com/oracle-is-planning-another-round-of-job-cuts-this-month-2026-8
4•DGAP•19m ago•0 comments

Optimizing SQLite for Servers

https://kerkour.com/sqlite-for-servers
3•cold_pizz4•20m ago•0 comments

Glaciers on the Climate Dashboard

https://climate.metoffice.cloud/glaciers.html
4•mooreds•20m ago•0 comments

DeepSeek V4 Pro 0813 quietly released

https://api-docs.deepseek.com/guides/responses_api/
19•HiPHInch•22m ago•1 comments