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?

Show HN: A purely in-browser harness – let SaaS users act with natural language

https://gametorch.app/ibh
1•gametorch•48s ago•0 comments

Code Review Agent Should Run in CI, Not on Your Computer

https://epho.io/blog/code-review-agent-in-ci/
1•terzioglub•2m ago•0 comments

Show HN: I built a phone app to gamify fitness with friends

https://pactpals.com
1•rephus•2m ago•0 comments

Zxc 0.15.0 – decompression 2x faster than Zstandard

https://libzxc.org/
1•birdculture•2m ago•0 comments

Tell HN: Wise holds my company's $22,954 for 27 days, then goes silent

2•piotrreich•2m ago•0 comments

Show HN: An Algol 60 compiler with a LuaJIT runtime

https://github.com/rochus-keller/Algol60/releases/tag/2026-10-09
1•Rochus•5m ago•0 comments

War Games of Dimming the Sun

https://www.wired.com/story/they-war-gamed-dimming-the-sun-it-went-even-worse-than-you-think/
1•elo2000•5m ago•0 comments

I'm Not a Robot: The Internet's Human Test

https://foundinthemachine.com/episodes/8-i-m-not-a-robot-the-internet-s-human-test/
1•surprisetalk•6m ago•0 comments

WHO report on Russian lab worker death highlights "key uncertainty"

https://arstechnica.com/health/2026/10/who-report-on-russian-lab-worker-death-highlights-key-unce...
1•rbanffy•6m ago•0 comments

OnlyOffice 10.0 Released with AI Features, 1k Bug Fixes

https://www.phoronix.com/news/ONLYOFFICE-10.0
1•rbanffy•7m ago•1 comments

Gaming on Linux Without Cheating

https://onlineservices.epicgames.com/news/introducing-easy-anti-cheat-linux-v2
1•water-drummer•7m ago•0 comments

Asterinas 0.19.0

https://asterinas.github.io/2026/10/13/announcing-asterinas-0.19.0.html
2•pjmlp•8m ago•0 comments

Show HN: MLX Direct Decider, Mac local decider without fine-tuning

https://github.com/ItsOdeLeo/MLX-Direct-Decider
1•LeoisNotAI•8m ago•0 comments

Netflix is laying off roughly 6% of its workforce

https://www.cnbc.com/2026/10/14/netflix-layoffs.html
5•nabbed•8m ago•1 comments

Ported2Browser

https://ported2browser.com/
1•luispa•9m ago•0 comments

ESA targets Anbernic emulation handhelds as "superfake" piracy enablers

https://arstechnica.com/gaming/2026/10/esa-targets-anbernic-emulation-handhelds-as-superfake-pira...
2•rbanffy•9m ago•0 comments

Hash-consing MMDB search trees: 31% smaller files, identical lookups

https://ipinfo.io/blog/how-made-mmdb-files-smaller
2•mmaia•10m ago•0 comments

Flashcards in ChatGPT

https://help.openai.com/en/articles/20001533-flashcards-in-chatgpt
1•joshdavham•10m ago•0 comments

Bitwise-identical training and inference across GPU vendors – Nvidia, AMD, Apple

https://github.com/mojolearn/mojolearn
1•andrewhendel•11m ago•0 comments

Show HN: BScaff – A CLI tool for project scaffolding and snippets

https://github.com/akashnag/bscaff
1•akashnagcs•12m ago•0 comments

Domain Aware Software Factory

https://sohit.substack.com/p/domain-aware-software-factories
1•sohitkeshri•12m ago•0 comments

Show HN: Merlin, Run Your Claude Code and Codex from Slack, Linear and GitHub

https://usemerlin.ai
1•dottchen•12m ago•0 comments

Apply as a team and earn €50M in Mollie equity

https://www.mollie.com/nightshift
1•koenvanham•13m ago•0 comments

Show HN: Open-source DFM checks for manufacturing and MCP

https://openmrp.ai/dfm
2•dalbaugh•14m ago•1 comments

Man, SF is downright gloomy these days

https://12gramsofcarbon.com/p/notes-from-the-sf-safety-scene
2•theahura•15m ago•0 comments

GitHub Actions has added lock files

https://github.blog/changelog/2026-10-14-github-actions-workflow-lockfiles-in-public-preview/
3•bengotch•16m ago•0 comments

Cancellation of this year's Grace Hopper Celebration

https://ghc.anitab.org
1•bobbiechen•17m ago•0 comments

Mathematical proof in the age of AI

https://rutar.org/writing/mathematical-proof-ai/
1•arutar•17m ago•0 comments

The Silicon Compiler Comes Back as an AI Agent Factory

https://brianroemmele.substack.com/p/the-silicon-compiler-comes-back-as
1•MaysonL•18m ago•0 comments

Pumbkin – Roll your own custom voxel jack-O-lantern

https://pumbkin.xyz/
1•internetguy•19m ago•0 comments