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

Comments

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

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

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

Don't believe the hype – quantum tech can't yet solve real-world problems

https://www.nature.com/articles/d41586-025-01142-8
1•QueensGambit•54s ago•0 comments

Buy 2MMC, 4MMC, 3CMC, Crystal Meth, Ketamine, Ephedrine WhatsApp:+447447025920

1•Scotmicky•1m ago•0 comments

Buy MDMA, amphetamine and cocaine online WhatsApp:+447447025920

1•Scotmicky•2m ago•0 comments

QuackStack

https://quackstack.siddharththakkar.xyz/
1•woustachemax•8m ago•1 comments

Build waitlists that rank on Google

https://getranklist.vercel.app/
1•astralshard•11m ago•0 comments

Apple plans to remove Wi-Fi network syncing on Apple Watch in the EU

https://appleinsider.com/articles/25/11/05/apple-plans-to-remove-wi-fi-network-syncing-on-apple-w...
1•dmitrygr•12m ago•0 comments

How would a 4D Camera work?

https://dugas.ch/funderstanding/4d_camera.html
1•chronolitus•14m ago•0 comments

100th GitHub Release, yet It's Day 1

https://signoz.io/blog/100th-github-release/
1•ak_builds•14m ago•0 comments

OpenAI Hypocrisy on Paying for IP

1•moosedman•15m ago•0 comments

The American Catalog Home Boom and Bust

https://www.youtube.com/watch?v=3chhIdyeSEA
1•bane•22m ago•0 comments

'Everybody should simply decide to give me more money' is also my financial plan

https://twitter.com/ositanwanevu/status/1986170006124507596
4•moosedman•25m ago•1 comments

Making Conway's Game of Life Playable

https://blog.unsupervision.com/game-of-life-or-death/
2•unsupervision•27m ago•1 comments

Retractable lightsaber with instant extension [video]

https://www.youtube.com/watch?v=0QArAMtBGx8
1•carabiner•30m ago•0 comments

Myers Diff for Tab Management: Part 2

https://deontevanterpool.com/blog/3
1•deontevant•30m ago•0 comments

C___ – A simple programming language with clean syntax

https://github.com/DarianJones-Cunderscore/CUnderScore
2•C__Owner•31m ago•1 comments

A Guide to My Organizational Workflow

https://cachestocaches.com/2020/3/my-organized-life/
1•confusedalex•34m ago•0 comments

Notes Apps

https://cao.sh/blog/2024-12-27--on-notes-apps/
1•confusedalex•35m ago•0 comments

US Government to Cut Air Traffic in 40 Major Markets If Shutdown Continues

https://www.nytimes.com/2025/11/05/us/politics/faa-flights-air-traffic-government-shutdown.html
3•chirau•35m ago•0 comments

The Race to Win Staten Island [video]

https://www.youtube.com/watch?v=Ex74x_gqTU0
1•thunderbong•35m ago•0 comments

Geometric formulation of quantum mechanics (2015)

https://arxiv.org/abs/1503.00238
1•measurablefunc•36m ago•0 comments

Build123d (A Python CAD programming library) Roadmap

https://github.com/gumyr/build123d/wiki/Roadmap
1•yehoshuapw•36m ago•0 comments

Mamdani Broke the Democrat Machine

https://www.theguardian.com/commentisfree/picture/2025/nov/06/how-zohran-mamdani-broke-the-democr...
4•handfuloflight•37m ago•1 comments

NetNewsWire 6.2 for Mac and iOS – RSS Plus Markdown

https://netnewswire.blog/2025/11/05/netnewswire-for-mac-and-ios.html
2•zdw•37m ago•0 comments

Arles Schwab close to deal for private share exchange Forge Global

https://www.ft.com/content/ffa0dabd-7e87-4327-b788-73e8fb598de3
1•JumpCrisscross•38m ago•0 comments

Dearly Departed Datasets

https://essentialdata.us/in-memoriam.html
1•djoldman•39m ago•0 comments

Bluetooth 6.2 – more responsive, improves security, USB comms, and testing

https://www.cnx-software.com/2025/11/05/bluetooth-6-2-gets-more-responsive-improves-security-usb-...
1•zdw•46m ago•0 comments

Stepping Down as Framework Linux Community Ambassadors

https://community.frame.work/t/stepping-down-as-framework-linux-community-ambassadors/77374
15•wormslayer666•50m ago•0 comments

CoAgent = AI-container, RepoZipper = GitHub backups

https://github.com/rickballard/gh-rz/releases/tag/v0.2.1
1•RickBallard•51m ago•0 comments

Student of the Game

https://twitter.com/blakeir/status/1986103593720598846
1•jger15•57m ago•0 comments

Unfolding Patterns

https://secondvoice.substack.com/p/unfolding-patterns
1•jger15•1h ago•0 comments