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?

A macOS kernel bug can cause OpenClaw to stop working after 49.7 days

https://photon.codes/blog/we-found-a-ticking-time-bomb-in-macos-tcp-networking
1•RyanZhuuuu•39s ago•0 comments

Where AI and humans manage projects together [video]

https://www.youtube.com/watch?v=yq0ZvMwO9LE
1•spotlayn•2m ago•0 comments

Notes on "Taste"

https://www.are.na/editorial/notes-on-taste
2•samixg•2m ago•0 comments

Self-hosted disposable sandboxes with exe.dev-like UX

https://github.com/kkovacs/vmtree
1•dimitry12•2m ago•1 comments

Instaqote New Invoice, Quote maker for freelancers

https://instaqote.com
1•Rayobeats•3m ago•0 comments

Securing Your Agents

https://billdx.github.io/Presentations/Securing%20Your%20Agents/securing-ai-agentic-apps.html
1•mooreds•3m ago•0 comments

Show HN: A Chrome extension that gives you chess tactics on new tab pages

https://leetchess.com/
4•0xmattf•4m ago•0 comments

Artemis II Real Time Orbit

https://www.nasa.gov/missions/artemis-ii/arow/
1•MetaMalone•4m ago•0 comments

Show HN: Repowise – Codebase intelligence for AI coding agents (open source)

https://github.com/repowise-dev/repowise
1•raghavchamadiya•6m ago•0 comments

Show HN: A (marginally) useful x86-64 ELF executable in 301 bytes

https://github.com/meribold/btry
1•meribold•7m ago•0 comments

Where is it like to be a language model?

https://www.robinsloan.com/winter-garden/where-is-it-like/
1•philip1209•8m ago•0 comments

Botstadium – A prediction market where 2.6k AI agents compete on real sports

https://botstadium.ai
2•veeceey•9m ago•0 comments

Internet of Agents in 3 lines of code

https://intuno.net/
1•artugro•10m ago•1 comments

Artemis II astronauts make historic moon flyby

https://www.pbs.org/newshour/science/watch-live-artemis-ii-astronauts-make-historic-moon-flyby
2•JumpCrisscross•10m ago•0 comments

An Arctic Road Trip Brings Vital Underground Networks into View

https://www.quantamagazine.org/an-arctic-road-trip-brings-vital-underground-networks-into-view-20...
1•lschueller•10m ago•0 comments

The 40 minutes when the Artemis crew loses contact with the Earth

https://www.bbc.com/news/articles/cj0vyzmmy50o
2•reconnecting•10m ago•0 comments

Creating technology for conservation, should it be for-profit or nonprofit?

1•isheadmypants•12m ago•0 comments

Artemis astronauts travel further from Earth than any humans before

https://www.bbc.co.uk/news/live/clyr8k06jv7t
4•FridayoLeary•16m ago•0 comments

Social media content creator platform powered by AI

https://www.qten.ai/
2•bandishankar•19m ago•1 comments

Ministry turns to acoustic devices to stop seals from stealing fish in Hokkaido

https://www.japantimes.co.jp/news/2026/03/16/japan/kuril-harbor-hokkaido/
1•PaulHoule•19m ago•1 comments

Are your bathroom habits normal?

https://news.harvard.edu/gazette/story/2026/04/are-your-bathroom-habits-normal/
2•gnabgib•20m ago•0 comments

The Flying Shuttle

https://en.wikipedia.org/wiki/Flying_shuttle
1•softwaredoug•21m ago•0 comments

AI agents over SSH from your phone. Starting to think this is where dev is going

https://onepilotapp.com
2•elmlabs•21m ago•0 comments

Artemis II astronauts officially set record for human's distance from Earth

https://www.scientificamerican.com/article/nasas-artemis-ii-astronauts-break-apollos-distance-rec...
3•heresie-dabord•21m ago•0 comments

Twitter devolved into a pipeline of ragebait slop

https://mattruby.substack.com/p/we-give-elon-crap-but-not-enough
3•rubymatt•23m ago•0 comments

More states adopt college entrance exam touted by conservatives despite concerns

https://www.washingtonpost.com/education/2026/04/06/classic-learning-test/
1•bookofjoe•25m ago•2 comments

NetBSD 11.0 RC3

https://www.netbsd.org/releases/formal-11/NetBSD-11.0.html#
1•unleaded•26m ago•0 comments

nbio: A non-blocking I/O and event loop abstraction in Odin

https://pkg.odin-lang.org/core/nbio/
2•philippta•27m ago•0 comments

Medicare dips a toe into hemp for seniors

https://www.axios.com/2026/04/06/medicare-coverage-cbd-products-cannabis
1•brandonb•28m ago•0 comments

Show HN: NanoClip – A minimalist clipboard manager and snippet expander for Mac

https://www.getnano.dev/clip
1•vbaro•29m ago•0 comments