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?

How AI proof is my business?

https://keithbrown.com/tools/ai-proof
1•drewlem•4m ago•0 comments

Show HN: TheFairNet Professional Networking Platform

https://thefairnet.com/
1•christos-mak•5m ago•1 comments

Forgejo v17.0 Is Available

https://forgejo.org/2026-10-release-v17-0/
1•Hissigh•6m ago•0 comments

Dailycal is live – Your clear view on the day

https://apps.mjanssen.nl/dailycal/
1•marc0janssen•7m ago•0 comments

JPEG XL vs. AVIF for web use-cases

https://jakearchibald.com/2026/jpeg-xl-vs-avif/
1•Hissigh•7m ago•0 comments

A migration job failed against a "healthy" Postgres

https://blog.hubfly.space/docker-compose-migration-job-service-completed-successfully
1•octave12•7m ago•0 comments

AI Prompt Hub – 150 categories of ready-to-use AI prompts and custom generator

https://play.google.com/store/apps/details?id=com.ai_prompt_hub.setuvio&hl=en_IN
1•setuvio•11m ago•0 comments

Implementing a GPU-accelerated JPEG XL encoder

https://martinopilia.com/posts/2026/09/07/gpu-jpegxl-codec.html
1•Lwrless•13m ago•0 comments

AI has killed my passion for coding [video]

https://www.youtube.com/watch?v=Htdy1dsuSLY
1•abdullahalharir•13m ago•0 comments

Proofpoint to buy Varonis Systems in $6.3B all-cash deal

https://www.reuters.com/legal/transactional/proofpoint-buy-varonis-systems-63-billion-all-cash-de...
1•sorokod•16m ago•0 comments

Computers Made of Human Brain Tissue Identify Braille Letters in Breakthrough

https://www.404media.co/computers-made-of-human-brain-tissue-identify-braille-letters-in-breakthr...
1•beardyw•20m ago•0 comments

KNOD: Offloading Linux network packet processing to AMD GPUs

https://www.servers99.com/blog/linux-knod-amd-gpu-network-offload/
2•servers99•23m ago•0 comments

Sift – Analyse every file with local LLMs

https://github.com/c0decave/sift
2•dash0r•25m ago•0 comments

Ukraine's Starlink restrictions raise suspicions of Musk, Trump retaliation

https://www.axios.com/2026/10/14/ukraine-starlink-zelensky-spacex-musk-trump
2•jazzdev•27m ago•0 comments

The Tesla Roadster 2 Is Here–and It Flies

https://www.wired.com/story/tesla-roadster-2-launch/
2•lisper•27m ago•0 comments

Tesla's Flying Roadster Revealed [video]

https://www.youtube.com/watch?v=TWHXrLzUKJc
1•lisper•33m ago•0 comments

Technical Cofounder Wanted

https://inspiration-agent.emergent.host/
1•Harshad2820•34m ago•0 comments

OpenClaw Enterprise – The Open Agent Platform

https://openclaw.ai/blog/openclaw-enterprise
1•benzowander•35m ago•0 comments

Thoughts on Man's Purpose in Life

https://govleaders.org/rickover-purpose.php
1•iaziz786•35m ago•0 comments

Leymosun Science: Quantum Research Toolkit: Python 3.15 Release

https://pypi.org/project/leymosun/0.4.42/
1•northlondoner•36m ago•1 comments

Beyond the Glass

https://longreads.com/2026/10/15/mother-museum-skulls-grief-agni/
1•Petiver•37m ago•0 comments

When Software Meets Hardware

https://martinfowler.com/articles/software-meets-hardware.html
1•Mr_superuser•37m ago•0 comments

Lean Now Ships with Verified Kernels

https://leodemoura.github.io/blog/2026-10-15-lean-now-ships-with-verified-kernels/
1•matt_d•38m ago•0 comments

Shared organizational memory for agent teams turned out to be the missing piece

https://github.com/Mininglamp-OSS
1•ElenaDaibunny•39m ago•0 comments

The Agentic Scientist – SakanaAI

https://github.com/SakanaAI/AI-Scientist-v3
1•maddyfrank•39m ago•0 comments

Investors dump data centre bonds as AI borrowers face 'Darwin moment'

https://www.ft.com/content/678bcd31-6c2a-447b-a68c-ce6dec220bbc
5•vrganj•42m ago•1 comments

Regarding Xbox – Big Walk by House House

https://bigwalk.game/xbox/
1•razorbeamz•45m ago•0 comments

I Applied Autoresearch to the Economy

https://www.primeforesight.ai/blog/auto-research-technology-markets
1•gigagiova•46m ago•0 comments

Dwarkesh Patel on what the public doesn't know about AI

https://www.nytimes.com/2026/10/15/opinion/interesting-times-dwarkes-patel-tyler-cowen.html
1•kraf•50m ago•1 comments

'StarGate,' Ukraine's first aerial drone to evacuate wounded soldiers

https://apnews.com/article/ukraine-medevac-drone-russia-war-stargate-c93f86db16cc34fcc75deb5efc8a...
2•geox•51m ago•0 comments