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: Bob

https://bob.spif.fyi/
1•androsynth89•49s ago•0 comments

SQLite 3.54.0 Released

https://sqlite.org/releaselog/3_54_0.html
2•thunderbong•2m ago•0 comments

AI's leaders (probably) aren't faking their fear

https://www.vox.com/politics/505834/ai-doom-anthropic-openai-pr
1•simianwords•3m ago•0 comments

Orkut: You deserve better from social media

https://orkut.com/en/
1•yarapavan•11m ago•0 comments

From WordPress to Astro: Zero Maintenance, Maximum Control

https://www.mikeroberto.com/wordpress-astro-migration
1•larrysalibra•15m ago•0 comments

Neuroscience Can Make Decluttering Easier

https://www.nytimes.com/2026/10/11/opinion/clutter-spring-cleaning-psychology.html
1•gumby•15m ago•1 comments

TasteRoute: Personalized Routing for Video Generation

https://zrt.wtf/publication/2026-10-10-taste-route
1•blackcat201•17m ago•0 comments

Show HN: Infinite – open-source node-based DAW for visuals, music and code

https://github.com/n1m21n/Infinite
1•n1m21n•20m ago•0 comments

LiteReview: A self-hosted plane for configuring PR review agents

https://github.com/BerriAI/litereview
1•mfkhalil•23m ago•0 comments

Distanser – Measure Anything on Screen

https://apps.apple.com/us/app/distanser/id6805159232?mt=12
1•j-sanden•25m ago•1 comments

Luke Nichols' (Outdoor Boys YouTube channel) full commencement speech [video]

https://www.youtube.com/watch?v=ttQd5bEdfL0
1•nomilk•26m ago•0 comments

LineageOS 24.0

https://lineageos.org/Changelog-32/
1•timschumi•28m ago•0 comments

Ask Claude Code for a Svelte table and it writes 1k lines of its own

https://svgrid.com/blog/ai-assistant-writes-its-own-table/
1•boikom•30m ago•0 comments

DARPA Selects Companies for Final Stage C Verification Under QBI

https://quantumcomputingreport.com/darpa-selects-atom-computing-diraq-ibm-and-ionq-for-final-stag...
1•donutloop•31m ago•0 comments

Europol urges early action to protect crypto and data from quantum threats

https://www.europol.europa.eu/media-press/newsroom/news/europol-urges-early-action-to-protect-cry...
2•donutloop•33m ago•0 comments

Data Engineering Is the Cache Invalidation Problem FT. Josh Wills

https://motherduck.com/blog/cache-invalidation-problem-data-engineering-josh-wills/
2•zeristor•33m ago•0 comments

No Doodle

https://chromewebstore.google.com/detail/no-doodle/dkbobaklmnjfomfnchhbfcljaeccnmmk
1•sanepara•34m ago•0 comments

Tech firms pledge $2.4B in computing power to Trump's Genesis Mission

https://www.politico.com/news/2026/10/08/tech-firms-pledge-2-4-billion-in-computing-power-to-trum...
1•donutloop•35m ago•0 comments

Show HN: Suta – A skill to reduce AI slop in generated UIs

https://github.com/Guksu/suta
1•yung3152•37m ago•0 comments

Show HN: Another App Store Screenshot Creator, but with high quality images

https://screenbuilder.app/
1•bert2002•53m ago•0 comments

Simple heuristics to run a research group (2022)

https://onlinelibrary.wiley.com/doi/10.1002/pchj.533
1•Tomte•56m ago•0 comments

Stackoverflow 2026 Developer Survey

https://stackoverflow.blog/2026/10/06/the-results-of-the-2026-developer-survey-are-here/
2•marciob•1h ago•1 comments

Show HN: SynoRing – An input ring for smart glasses and everything

https://www.synoring.ai
1•CLCKKKKK•1h ago•0 comments

Spotify Partners With Bookshop.org for physical book sales

https://newsroom.spotify.com/2026-02-05/bookshop-partnership-page-match-announcement/
2•kristianp•1h ago•0 comments

Does Fast Mode Do Anything?

https://doesfastdoanything.com/
3•luu•1h ago•0 comments

Max severity SonicWall SMA1000 flaw now exploited in attacks

https://www.bleepingcomputer.com/news/security/max-severity-sonicwall-sma1000-flaw-now-exploited-...
1•wondersky•1h ago•0 comments

Resident Evil 1995-08-04 Prototype: Full Disk and ASM Disassembly Analysis [video]

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

Ukraine hits second major tech site, expanding range of targets inside Russia

https://www.reuters.com/world/europe/russias-yandex-says-second-data-centre-hit-by-drone-attack-2...
6•JumpCrisscross•1h ago•0 comments

Every lawsuit against an AI company

https://ailawsuittracker.com/
3•marciob•1h ago•0 comments

District Six

https://en.wikipedia.org/wiki/District_Six
1•thunderbong•1h ago•0 comments