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?

Self-Hosting Behind Cgnat – Be Libre

https://david.alvarezrosa.com/posts/self-hosting-behind-cgnat/
1•dalvrosa•1m ago•1 comments

Thread Trace Part 1: ROCprof Compute Viewer – ROCm Blogs

https://rocm.blogs.amd.com/software-tools-optimization/thread-trace/README.html
1•ankitg12•4m ago•0 comments

Show HN: Audit your site's structure for AI search crawlers (ChatGPT, Claude)

https://ukaiseoconsultant.co.uk/ai-driven-seo-audits/
1•auaiseo•4m ago•0 comments

Amazon blocks Meta's Muse AI agent from checkouts

https://www.neowin.net/news/amazon-blocks-metas-muse-ai-agent-from-checkouts/
1•bundie•9m ago•0 comments

Project Lily Video is getting censored by Google

https://www.youtube.com/watch?v=kQ-i642z3jc
1•frag•13m ago•0 comments

WTFs per Minute (2008)

https://www.osnews.com/story/19266/wtfsm/
1•vladde•14m ago•0 comments

Show HN: An extension to capture and annotate screenshots, with a terminal skin

https://chromewebstore.google.com/detail/webmend-–-full-page-scree/blfeopjadgdflmnibdobadhonmoe...
1•frontweb•14m ago•0 comments

Show HN: Witdem – Did your AI Agent accomplish its task? and at what cost?

https://demo.witdem.com
1•ebrahimisoheil•14m ago•0 comments

Replacing Linear MCP with linear-CLI

https://thebiglog.com/links/linear-cli-instead-of-linear-mcp
1•shibel•17m ago•0 comments

Show HN: Skillgesture – versioned, on-demand skills for AI agents

https://github.com/Gabry848/skillgesture
1•Gabry848•17m ago•0 comments

US and China Discuss Alerting Each Other to AI National Security Threats

https://www.wired.com/story/us-and-china-discuss-alerting-each-other-to-ai-national-security-thre...
3•joozio•19m ago•0 comments

What re AI in software engineering are you struggling with the most?

https://twitter.com/mitsuhiko/status/2101401648543195328
1•tosh•19m ago•0 comments

The Bounding Simplex: A SIMD-Era Rejection Primitive [pdf]

https://mcnett.org/bounding_simplex.pdf
1•ibobev•22m ago•0 comments

I built a small Instagram backup tool for my own posts, stories, and highlights

https://hikerapi.com/
2•sheraziuy•22m ago•0 comments

Neural Texture Compression in Metal 4

https://syllogi-graphikon.vercel.app/posts/metal-neural-texture-compression/
1•ibobev•22m ago•0 comments

Show HN: Search API for 3M govt contracts in 63 countries

https://www.selltostate.com/
1•nadyyym•22m ago•0 comments

First Shader from Zero in Godot 4

https://www.gdquest.com/library/first_shader_godot4_portal/
1•ibobev•22m ago•0 comments

Australia banned these Chinese CCTV cameras. Now they're turning up in EVs

https://www.abc.net.au/news/2026-09-21/ev-electric-vehicle-leapmotor-chinese-cctv-cameras-dahua-b...
2•colinprince•25m ago•0 comments

ROM Magazine Interviews Roberta Williams (1983)

https://computeradsfromthepast.substack.com/p/rom-magazine-interviews-roberta-williams
2•rbanffy•25m ago•0 comments

Show HN: Maki, an open-source multi-agent LLM framework (local or hosted)

https://github.com/BowlOfData/maki
2•bowlofdata•27m ago•0 comments

Show HN: Proxy-benchmark – is it the proxy, the browser, or your machine?

https://github.com/nodemaven/proxy-benchmark
2•pia-nm•28m ago•0 comments

New low-cost burstable Amazon EC2 T8i instances are generally available

https://aws.amazon.com/blogs/aws/new-low-cost-burstable-amazon-ec2-t8i-instances-are-generally-av...
1•mariuz•31m ago•0 comments

Microsoft Systems Journal Interviews Gordon Letwin (1987)

https://computeradsfromthepast.substack.com/p/microsoft-systems-journal-interviews
1•rbanffy•37m ago•0 comments

Been thinking about our platforms and information diet we consume lately

1•rej_log101•37m ago•0 comments

How to export ChatGPT to Google Docs without losing formatting [video]

https://www.youtube.com/watch?v=zUzkUI7U-A4
2•quysala12•41m ago•0 comments

AI is reaching new highs with AROM Labs

1•project_silenc•45m ago•0 comments

On Contagion (2019) – Boris Cherny

https://borischerny.com/philosophy/of/programming/2019/09/08/On-Contagion.html
2•tomasyany•46m ago•1 comments

ZuckOff Know when a camera is in the room

https://zuckoff.app/
122•Bluestein•47m ago•23 comments

Forward Deployed Engineers from the Trenches

https://javisantana.com/fde/en/
1•adastral•47m ago•0 comments

Are We Free?

https://unixdad.com/are-we-really-free/
1•lignux•48m ago•0 comments