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?

Filmgrab: Films A-Z

https://film-grab.com/movies-a-z/
1•hopelessluca•2m ago•0 comments

Why do people hate the tech industry? (2023)

https://www.sevarg.net/2023/03/25/why-people-hate-tech/
1•dsego•5m ago•0 comments

Midnight social media curfew proposed for UK teens aged 16 and 17

https://www.bbc.co.uk/news/articles/c982857nlrlo
1•chrisjj•8m ago•0 comments

Prioritize mental health, and why communication is so important

https://ramones.dev/posts/mental-health/
1•ramon156•9m ago•0 comments

Show HN: For 10 World Cups, my model's 2 favorites had the champion every time

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7013338
1•fabioricardo7•10m ago•0 comments

Xmark: Chat with your saved X bookmarks

https://www.xmark.dev
1•jclvsh•11m ago•0 comments

I reverse-engineered the three biggest agent-memory tools

1•pauliusztin•13m ago•0 comments

Show HN: Update on my media editor in browser no back end

https://www.masterselects.com
1•Sportinger•15m ago•0 comments

Physicists Have Argued over This Problem Since 1883. It May Now Be Solved

https://www.nytimes.com/2026/07/14/science/reverse-sprinkler-physics-problem.html
1•JackFr•21m ago•1 comments

Show HN: Browse, search, stats, skills from your Claude/ChatGPT chats, locally

https://colloquary.com/
1•egntms•21m ago•0 comments

HyWiki: Zero Markup Hypertext

https://www.chiply.dev/post-hyperbole-hywiki
1•thunderbong•22m ago•0 comments

GLNBench – Benchmarked GNNs under label noise and found they collapse

https://glnbench.github.io/website/
1•Syedatheprog•24m ago•1 comments

Projected Business Formations Within Four Quarters: Professional Services in US

https://fred.stlouisfed.org/series/BFPBF4QNAICS54SAUS
1•bookofjoe•24m ago•0 comments

My Custom Life OS Software

https://sveder.com/blog/?p=402
2•mikle•29m ago•0 comments

Microsoft Reports a 25 Percent Jump in Emissions

https://www.wired.com/story/microsoft-25-percent-jump-in-carbon-emissions/
3•__natty__•33m ago•2 comments

A man who would change Russia

https://economist.com/leaders/2026/07/09/the-man-who-would-change-russia
1•runeks•33m ago•1 comments

Weathergotchi – an open-source climate Tamagotchi

https://github.com/Michael-Manning/E-Paper-Climate-Logger
1•luanmuniz•34m ago•0 comments

How much of ML research is about AI safety, what is it about, and who's doing I

https://www.lesswrong.com/posts/hcq4ZDoijSjy3Wrba/how-much-of-ml-research-is-about-ai-safety-what...
2•joozio•34m ago•0 comments

Floating Companion: Exploring Design Space for Soft Floating Robots in Indoor

https://dl.acm.org/doi/10.1145/3800645.3813051
3•hopelessluca•34m ago•0 comments

Show HN: Prijm – a minimalist link-sharing and discussion platform

https://prijm.com/
1•rakibtg•36m ago•2 comments

Fylepad – Thoughtful, secure, and intelligent writing

https://github.com/imrofayel/fylepad
1•imrofayel•37m ago•0 comments

The CIA's Family Jewels (2007)

https://nsarchive2.gwu.edu/NSAEBB/NSAEBB222/index.htm
1•robtherobber•39m ago•0 comments

Societal Impacts: Claude's values across models and languages

https://www.anthropic.com/research/claude-values-models-languages
1•taubek•40m ago•0 comments

Cyber Resilience Act

https://digital-strategy.ec.europa.eu/en/policies/cyber-resilience-act
2•Rygian•43m ago•0 comments

Anthropic's state-by-state plan to ratchet up AI rules

https://www.politico.com/news/2026/07/15/inside-anthropics-state-by-state-plan-to-ratchet-up-ai-r...
1•JumpCrisscross•44m ago•1 comments

Show HN: PromptMan: A native macOS app for saving and reusing AI prompts

https://promptman.app/
1•Karym09•45m ago•0 comments

Never procrastinate again. Stick to TaskLoco super smart sticky notes

https://www.taskloco.com/
1•taskloco_nyc•46m ago•0 comments

FOSDEM 2026: Multi-relay msging & cryptographic identities w/ DeltaChat/Chatmail

https://fosdem.org/2026/schedule/event/3F9VTU-deltachat-chatmail-relays-multi-transport/
2•xeonmc•47m ago•0 comments

ChatGPT Subagents 2

1•217•48m ago•0 comments

Show HN: AI-CLI – tiny C terminal assistant powered by local LLM

https://github.com/vkataev/ai-cli
1•novaRom•50m ago•1 comments