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?

5 Monitors on a Commodore 128 [video]

https://www.youtube.com/watch?v=ul5hC3PY1Yg
1•amichail•38s ago•0 comments

Ask HN: Anyone notice World Cup video feeds look like AI?

1•TZubiri•1m ago•0 comments

Be Realistic. Demand the Impossible

https://syndekit.substack.com/p/be-realistic-demand-the-impossible
1•Tomte•1m ago•0 comments

Show HN: MdFried, the Ultimate Markdown Viewer

https://github.com/benjajaja/mdfried
1•the_gipsy•5m ago•0 comments

Someone Build a OS for Claude Code

https://github.com/mateolafalce/claudios/blob/main/README.md
1•lafalce•6m ago•0 comments

Cross-LIB – WORA for vintage devices

https://www.igdb.com/game_engines/cross-lib
1•goldenxp•6m ago•0 comments

Show HN: A 'boggle-like' daily word game

https://www.categori.app
1•lumpycustard•6m ago•0 comments

Portfolio Covariance Optimization and Market Impact Capacity Engine

https://github.com/dy9gzbph7m-cpu/quant-frontier-capacity-solver
2•cjb6s•10m ago•0 comments

JSON-LD Explained for Personal Websites

https://hawksley.dev/blog/json-ld-explained-for-personal-websites/
3•ethanhawksley•13m ago•0 comments

Peakload Benchmarks for Operating Systems

https://linuxcommunity.io/t/peakload-benchmarks-for-operating-systems/9459
2•ashitlerferad•16m ago•0 comments

Show HN: Gaming is YouTube bigges category and the least criticised we scored it

https://ctrl-watch.xyz/
2•deimos459•21m ago•0 comments

A cheaper and safer agentic AI workflow

https://danuker.go.ro/a-cheaper-and-safer-agentic-ai-workflow.html
2•danuker•25m ago•0 comments

I make good money. Why do I still feel like this?

https://yourbrainonmoney.substack.com/p/i-make-good-money-why-do-i-still
2•momentmaker•26m ago•0 comments

Oasis Ambient – Wi-Fi LED Light Teardown

https://www.ifixit.com/Teardown/Oasis+Ambient+Teardown/221776
2•z3ugma•28m ago•0 comments

Tech pundit Cringely cofounds startup '2Brains Inc' to solve LLM hallucinations

https://slashdot.org/story/26/06/20/0556251/tech-pundit-cringely-co-founds-startup-2brains-inc-to...
2•MilnerRoute•29m ago•0 comments

List of Unusual Deaths

https://www.orangecrumbs.com/l/unusual-deaths
2•octopus143•30m ago•1 comments

Open-source Vulkan driver NVK gains experimental DLSS support

https://www.tomshardware.com/pc-components/gpu-drivers/open-source-nvidia-vulkan-driver-nvk-gains...
2•rndsignals•32m ago•0 comments

How Old Are You in Space?

https://ethanwillingham.com/space-age.html
3•Willingham•33m ago•0 comments

Flic Mic for AI – The Wireless Voice Button

https://mic.flic.io/
3•jamie4224•34m ago•0 comments

The GLP-1 boom is the biggest climate story no one is pricing in

https://fortune.com/2026/06/21/glp1-drugs-climate-food-system-emissions-investment/
4•jtbayly•40m ago•1 comments

Tech Company Finder

https://tech.bingo/
2•thisismytest•42m ago•0 comments

MicroVM sandbox solves one problem well, but not the agent security problem

https://decodebytes.substack.com/p/why-your-microvm-sandbox-solves-a
2•decodebytes•43m ago•1 comments

Netflix, A24 and Focus Pass on Luca Guadagnino's Movie 'Artificial'

https://variety.com/2026/film/global/luca-guadagnino-artificial-sam-altman-netflix-a24-mubi-12367...
4•theanonymousone•43m ago•0 comments

Chatting with an AI Won't Make You a Top Programmer

https://lemire.me/blog/2026/06/21/chatting-with-ai-wont-make-you-a-top-programmer/
5•jjgreen•45m ago•2 comments

MMTk – Memory Management Toolkit

https://www.mmtk.io/
2•smartmic•47m ago•0 comments

Mark Zuckerberg wants to replace your phone with (10 years of work)

https://thenewassociationwebmasters.blogspot.com/2026/06/mark-zuckerberg-wants-to-replace-your.html
2•laurentlof•48m ago•1 comments

Why everyone is talking about real-time analytics

https://clickhouse.com/blog/why-everyone-is-talking-about-real-analytics-yellow-company
4•saisrirampur•51m ago•0 comments

Polymarket reportedly paid people to post fake videos of themselves placing bets

https://www.theverge.com/tech/953285/polymarket-fake-viral-video-bets
4•thm•53m ago•0 comments

Horus – Zero-dependency C++ CLI for malware IOC analysis and enrichment

https://github.com/mobinert/horus
2•fergalina•55m ago•0 comments

Introducing ZSoftly Cloud Platform, a Canadian public cloud

https://zcp.zsoftly.ca/blog/introducing-zsoftly-cloud-platform/
2•dckzs•55m ago•0 comments