frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Medieval King Arthur manuscript could fetch £2M at auction

https://www.theguardian.com/books/2026/may/26/medieval-king-arthur-manuscript-auction
1•sandebert•3m ago•0 comments

Inside Google’s Agentic Search Revolution

https://puck.news/inside-googles-agentic-search-revolution/?sharer=425101&token=b032e98a72528abbe...
1•thm•4m ago•0 comments

Checking the math behind OpenAI and Anthropic's latest headlines

https://garymarcus.substack.com/p/checking-the-math-behind-openai-and
1•ColinWright•4m ago•0 comments

How to write code, miss every deadline, and make everyone miserable

https://github.com/Senuto/nodeshub-seo-skills
1•NodesHub•6m ago•1 comments

Scoped Error in Rust

https://kanru.info/scoped-error/
1•fanf2•8m ago•0 comments

The robots are replacing the packages

https://spatie.be/blog/the-robots-are-replacing-the-packages
1•moebrowne•14m ago•0 comments

A Practical Order Matching Framework for High-Frequency Strategy Backtesting

https://medium.com/@DolphinDB_Inc/a-practical-order-matching-framework-for-high-frequency-strateg...
2•dbaa4real•15m ago•0 comments

OpenClaw for Sales – Using Local-First AI Agents for Sales Workflows

https://www.kickscale.com/en/blog/openclaw-sales-ai-agent-revolution
3•mjenul•16m ago•0 comments

25th of May – Towel Day

https://en.wikipedia.org/wiki/Towel_Day
2•smig0•17m ago•0 comments

The Simula One: Linux VR Computer

https://shop.simulavr.com/
2•poly2it•18m ago•0 comments

Your Python Scraper Has a Tell. Curl-Cffi Is How You Hide It

https://medium.com/@farbodkhorramvatan/your-python-scraper-has-a-tell-curl-cffi-is-how-you-hide-i...
2•theanonymousone•26m ago•0 comments

Autonomous bus collided with tram on its first day of service in Sweden

https://brusselssignal.eu/2026/05/tram-hits-self-driving-bus-on-first-day-of-passenger-service-in...
4•zx8080•26m ago•0 comments

Peter Higgs: I wouldn't be productive enough for today's academic system

https://www.theguardian.com/science/2013/dec/06/peter-higgs-boson-academic-system
1•Anon84•30m ago•0 comments

Sentry.io DE Region Outage

https://status.sentry.io
1•coronapl•32m ago•0 comments

RSS Anyway

https://astrohacker.com/blog/2026-04-24-introducing-rss-anyway/
1•berlianta•32m ago•0 comments

La Page Du Temps

https://vigilix.fr/
1•zekinht•33m ago•0 comments

AI overly affirms users asking for personal advice

https://vechron.com/2026/05/ai-overly-affirms-users-asking-for-personal-advice/
6•ofcyes•34m ago•2 comments

OWASP CVE Lite CLI

https://github.com/OWASP/cve-lite-cli
1•mjtk•34m ago•0 comments

Oak Ridge Starts Weaving Together a Quantum, Classical HPC, and AI System Stack

https://www.nextplatform.com/hpc/2026/05/21/oak-ridge-starts-weaving-together-a-quantum-classical...
1•rbanffy•36m ago•0 comments

Ask HN: How do you deal with analysis paralysis on big goals?

2•SidVikJay•37m ago•0 comments

Citing Gandalf, Pope Leo says we must "disarm" AI

https://arstechnica.com/tech-policy/2026/05/citing-gandalf-pope-leo-says-we-must-disarm-ai/
2•rbanffy•38m ago•2 comments

RetinaDesk: Definitive guide to 5K and 6K displays for Mac

https://retinadesk.com/
1•ingve•39m ago•0 comments

Launching Avrea: CI that helps teams ship faster

https://avrea.com/blog/launching-avrea
1•_Ormod_•39m ago•0 comments

Show HN: Layered retrieval beats grep alone for LLM-generated engineering docs

https://github.com/rduffyuk/engineering-memory-benchmark
1•rduffyuk•41m ago•0 comments

SkillOpt – Executive Strategy for Self-Evolving Agent Skills

https://microsoft.github.io/SkillOpt/
2•gfortaine•45m ago•1 comments

News about Raspberry Pi 6 and Microcontroller Development – Jeff Geerling

https://www.jeffgeerling.com/blog/2026/news-about-raspberry-pi-6-and-microcontroller-development/
2•rbanffy•48m ago•0 comments

Out of the Loop

https://volary.ai/articles/sdlc-agents
1•CamouflagedKiwi•49m ago•0 comments

Meteor strike captured on volcano livestream [video]

https://www.youtube.com/watch?v=kRntP5h3AqI
3•hermitcrab•53m ago•0 comments

Agent Activity: User Activity Recon Toolkit

https://github.com/RafaGomezGuillen/agent-activity
1•rafagomezgu•53m ago•0 comments

Improving Local Techdocs for Your AI Coding Agent

https://www.heltweg.org/posts/improving-local-techdocs-for-your-ai-coding-agent/
1•rhazn•53m ago•0 comments