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?

Turso Now Includes Unlimited Active Databases for Everybody

https://turso.tech/blog/turso-now-includes-unlimited-databases-for-everybody
1•tjek•4m ago•0 comments

LiteLLM Agent Platform: Run Claude Code/Codex On-Prem Sandboxes and Vaults

https://github.com/BerriAI/litellm-agent-platform
1•ij23•5m ago•0 comments

New Nightmare Just Dropped: '3D' Animated Ads on Trucks in Traffic

https://www.thedrive.com/news/new-nightmare-just-dropped-3d-animated-ads-on-trucks-in-traffic
2•cf100clunk•6m ago•0 comments

Terence Tao: New Mathematical Workflows – Future of Mathematics

https://www.youtube.com/watch?v=Uc2zt198U_U
2•tcp_handshaker•7m ago•0 comments

NASA Captures Volatile Changes in Earth's Artificial Light

https://www.universetoday.com/articles/nasa-captures-volatile-changes-in-earths-artificial-light
1•tcp_handshaker•7m ago•0 comments

Second Automaker Sounds Alarm over Dwindling Motor Oil Stock

https://www.thedrive.com/news/second-automaker-sounds-alarm-over-dwindling-motor-oil-stock
1•cf100clunk•8m ago•0 comments

Show HN: Epiq – Distributed Git based issue tracker TUI

https://ljtn.github.io/epiq/
2•jolaflow•9m ago•1 comments

NYT and Vaping: How to Lie by Saying Only True Things

https://gwern.net/vaping
1•Ariarule•11m ago•0 comments

AGI and the Future of Reasoning – Future of Mathematics

https://www.youtube.com/watch?v=gf1uwCH0HUU
1•tcp_handshaker•11m ago•0 comments

Ken Liu on AI and Freedom

https://www.chinatalk.media/p/ken-liu-on-ai-and-freedom
1•alexnew•17m ago•0 comments

Amazon pressured one of its teams to develop an AI game: Project Trident

https://www.eurogamer.net/amazon-ai-game-project-trident-laid-off-anyway-report
2•oceansky•20m ago•0 comments

Conscience-Performance Risk in AI Governance Language

https://philpapers.org/rec/AEGRRA
1•aegissolis•28m ago•0 comments

We Can Now Read What Claude Is Thinking. Kind Of

https://priorcontext.substack.com/p/we-can-now-read-what-claude-is-thinking
2•contextwindow•29m ago•2 comments

Crystals found inside wreckage from the first nuclear bomb test

https://www.scientificamerican.com/article/strange-crystals-found-inside-wreckage-from-the-first-...
1•jumploops•33m ago•0 comments

Google explains why some new Gmail accounts only get 5GB storage

https://www.androidauthority.com/google-free-15gb-gmail-storage-ending-explanation-3667360/
1•sumanep•33m ago•0 comments

World’s first native color LiDAR gives machines human-like vision

https://newatlas.com/technology/ouster-rev8-native-color-lidar/
2•breve•34m ago•0 comments

We built an agent specialized for CI (using the 3 Claude models)

https://www.mendral.com/blog/same-llm-different-agent
1•shad42•36m ago•0 comments

I recreated the experience of reading the morning sports section

https://thesportspage.app
1•anjrued•42m ago•1 comments

ExploitGym: Can AI agents turn bugs into exploits?

https://arxiv.org/abs/2605.11086
1•p_stuart82•46m ago•0 comments

The main thing about P2P meth is that there's so much of it (2022)

https://dynomight.net/p2p-meth/
9•tomjakubowski•50m ago•1 comments

Context Forking to Save Time, Tokens and Trouble

https://www.humanlayer.com/blog/context-forking-to-save-time-trouble-and-tokens
2•0xblacklight•50m ago•0 comments

Show HN: Pico-intl – Type-safe internationalization with CLI localization gates

https://github.com/Elioz404/pico-intl
2•Elioz404•52m ago•0 comments

Gas Stations Under Attack

https://www.newsweek.com/iran-hacking-tank-readers-us-gas-stations-report-11957814
3•yoloman2•52m ago•1 comments

Erlang/OTP 29.0

https://www.erlang.org/news/188
8•pyinstallwoes•54m ago•0 comments

Urlsify.com Free (forever) Link shortener with Analytics

https://old.reddit.com/r/startups_promotion/comments/1te5th8/urlsifycom_free_forever_link_shorten...
1•godlymod•56m ago•0 comments

Broken windows theory

https://en.wikipedia.org/wiki/Broken_windows_theory
1•Austin_Conlon•57m ago•0 comments

Ghost Job Detector – AI that decodes fake job posts and HR lies

https://ghost-job-detector-rlcx.vercel.app/
1•aliabdm•57m ago•0 comments

NASA-cleanroom microbial isolates survival in simulated space/Martian conditions

https://journals.asm.org/doi/10.1128/aem.02065-25
1•bookofjoe•58m ago•0 comments

Colorado governor commutes sentence of election denier Tina Peters

https://www.theguardian.com/us-news/2026/may/15/colorado-governor-tina-peters
2•asib•1h ago•0 comments

SQL patterns I use to catch transaction fraud

https://analytics.fixelsmith.com/posts/sql-fraud-patterns/
2•redbell•1h ago•0 comments