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•11mo ago

Comments

nine_k•11mo 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•11mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•11mo ago
They mention this in the article.
spockz•11mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•11mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•11mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•11mo 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•11mo 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•11mo 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•11mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•11mo ago
This was very well written. Excellent article!
NetOpWibby•11mo ago
Is this like MessagePack for Haskell?

Miasma: A tool to trap AI web scrapers in an endless poison pit

https://github.com/austin-weeks/miasma
1•LucidLynx•1m ago•0 comments

Alpaca: Cross-Border Balancing Capacity Cooperation for aFRR

https://www.entsoe.eu/network_codes/eb/alpaca/
1•doener•9m ago•0 comments

IAMPerformance Issue 001 – Physics-based quantum hardware intelligence report [pdf]

https://iamperformance.online/IAMPerformance_Issue001.pdf
1•hmahaffeyges•10m ago•1 comments

Show HN: WhatToBuy – Describe your situation, get AI-curated shopping carts

2•crackeddude•12m ago•0 comments

Hledger AI Policy

https://hledger.org/AI.html
1•yehoshuapw•13m ago•0 comments

Beasts of the Southern Wild

https://medium.com/luminasticity/on-beasts-of-the-southern-wild-40fc0ea39a2b
1•bryanrasmussen•19m ago•0 comments

Native Jellyfin Client for macOS

https://github.com/CustomIcon/Lume
1•CustomIcon•20m ago•1 comments

New Infinity Stealer malware grabs macOS data via ClickFix lures

https://www.bleepingcomputer.com/news/security/new-infinity-stealer-malware-grabs-macos-data-via-...
1•01-_-•22m ago•0 comments

Overestimation of microplastics potentially caused by scientists' gloves

https://news.umich.edu/nitrile-and-latex-gloves-may-cause-overestimation-of-microplastics-u-m-stu...
1•giuliomagnifico•24m ago•0 comments

Cicada Variant 2026: The New Covid Threat Emerging in Silence

https://comuniq.xyz/post?t=891
1•01-_-•25m ago•0 comments

Scion: Running Concurrent LLM Agents with Isolated Identities and Workspaces

https://googlecloudplatform.github.io/scion/overview/
2•smartius•31m ago•0 comments

ESP32-S31: 320MHz 2C RV32IMAFCP+CLIC, 512KB SRAM, GbE, 802.11ax, 61 GPIO

https://www.espressif.com/en/news/ESP32_S31_Release
1•topspin•32m ago•0 comments

What fork() Actually Copies

https://tech.daniellbastos.com.br/posts/what-fork-actually-copies/
2•thunderbong•37m ago•0 comments

Are LLMs a Dead End? [video]

https://www.youtube.com/watch?v=9IMV80GvBpU
2•pullshark91•39m ago•0 comments

How Developers use AI

https://vibecodingstats.com/
2•krenerd•40m ago•0 comments

Lithuanian Legislation as a Git Repo

https://github.com/Yiin/lt-teises-aktai
1•debesyla•42m ago•0 comments

Should you do a PhD? (2025)

https://neurofrontiers.blog/should-you-do-a-phd/
1•lentoutcry•44m ago•0 comments

DaVinci-MagiHuman: Open-source AI model for realistic video generation

https://firethering.com/davinci-magihuman-open-source-ai-video-model/
1•steveharing1•47m ago•0 comments

Working on Products People Hate

https://www.seangoedecke.com/working-on-products-people-hate/
2•herbertl•47m ago•0 comments

Vibe physics: The AI grad student

https://www.anthropic.com/research/vibe-physics
1•cl3misch•53m ago•0 comments

A minimal React shopping list app structured for Capacitor/iOS packaging

https://github.com/sangress/shopping-list
1•sangress_dev•55m ago•0 comments

From Agent to Domain Intelligence: A Self-Evolving Knowledge Engine

https://simaxiaoqian.substack.com/p/from-agent-to-domain-intelligence
1•qingant•1h ago•1 comments

City Skylines II: Office Evolution and City Stations Available Now

https://www.paradoxinteractive.com/games/cities-skylines-ii/news/office-evolution-and-city-statio...
1•doener•1h ago•0 comments

Debugging and Fixing Interaction to Next Paint (INP)

https://www.remoterocketship.com/advice/how-i-debugged-and-fixed-inp/
1•Lior539•1h ago•0 comments

Iceflake's First Patch for Cities Skylines 2 Is Good [video]

https://www.youtube.com/watch?v=pNL0iYIj0mA
1•doener•1h ago•0 comments

Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

https://github.com/1st1/lat.md
1•doppp•1h ago•0 comments

Tried a New AI Image Tool for Real-World Design Work (Nano Banana Pro)

https://www.nanobananapro.org
1•nanobananapro•1h ago•0 comments

LinkedIn uses 2.4 GB RAM across two tabs

3•hrncode•1h ago•0 comments

How to use ETag header for optimistic concurrency

https://event-driven.io/en/how_to_use_etag_header_for_optimistic_concurrency/
1•birdculture•1h ago•0 comments

30 Years Ago, Robots Learned to Walk Without Falling

https://spectrum.ieee.org/honda-p2-robot-ieee-milestone
1•vinhnx•1h ago•0 comments