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

Comments

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

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

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

"Mathematics is a fundamentally *human* story"

https://twitter.com/getjonwithit/status/2009602923970568586
1•notRobot•5m ago•0 comments

Sandbox filesystem and network access without requiring a container

https://github.com/anthropic-experimental/sandbox-runtime
1•selvan•5m ago•0 comments

ByteCode C2 is now open source. A C2 framework that bypasses Defender

https://github.com/wadecalvin9/ByteCode
1•KIRA404•6m ago•0 comments

How Tech Loses Out over at Companies, Countries and Continents

https://berthub.eu/articles/posts/how-tech-loses-out/
1•pabs3•16m ago•0 comments

Preliminary in-progress RISC-V "P" Extension

https://github.com/riscv/riscv-p-spec/blob/master/P-ext-proposal.adoc
1•camel-cdr•16m ago•0 comments

The model is still not the product

https://adlrocha.substack.com/p/adlrocha-the-model-is-still-not-the
1•adlrocha•20m ago•0 comments

Peter Thiel Flees to Argentina

https://www.thenerdreich.com/peter-thiel-flees-to-argentina/
3•devonnull•22m ago•0 comments

Show HN: Phonetic Formatter – offline English text to IPA on iPhone and iPad

https://apps.apple.com/us/app/phonetic-formatter-english/id6757941187
1•louischen•24m ago•0 comments

Show HN: Economic growth is a power law

https://julienreszka.github.io/economic-simulator/armey-curve.html
2•julienreszka•31m ago•1 comments

Why C Remains the Gold Standard for Cryptographic Software

https://www.wolfssl.com/why-c-remains-the-gold-standard-for-cryptographic-software/
2•LinuxJedi•33m ago•1 comments

40 Years Ago, a Nuclear Catastrophe at Chernobyl

https://www.nytimes.com/2026/04/26/world/europe/40-years-ago-a-nuclear-catastrophe-at-chernobyl.html
2•HelloUsername•34m ago•0 comments

Codex MSN Interface

https://codexmessenger.net/
1•blef•39m ago•0 comments

Headless websites and the cost of engineering vanity

https://www.jonoalderson.com/conjecture/headless-websites/
1•misone•40m ago•0 comments

Quick tutorial to get a blog online from Org Mode thanks to Org Social

https://en.andros.dev/blog/c68f00c3/quick-tutorial-to-get-a-blog-online-from-org-mode-thanks-to-o...
1•andros•41m ago•0 comments

APL is more French than English

https://www.jsoftware.com/papers/perlis78.htm
2•tosh•41m ago•0 comments

The Knight Programming Language

https://github.com/knight-lang/knight-lang/tree/master
3•tosh•43m ago•0 comments

Exposing Floating Point – Bartosz Ciechanowski

https://ciechanow.ski/exposing-floating-point/
9•subset•46m ago•1 comments

Seven database engines in a single Rust binary

https://github.com/nodeDB-Lab/nodedb
1•mansarip•50m ago•0 comments

Tip: Web requests should not be measured in Hz [Hertz]

https://mastodon.catgirl.cloud/@sophie/116467789133733136
2•robin_reala•52m ago•0 comments

Self-Updating Screenshots

https://interblah.net/self-updating-screenshots
2•bjhess•1h ago•1 comments

Open grid data has a public benefit

https://nworbmot.org/blog/open-grid-data.html
2•lyoncy•1h ago•0 comments

Airprompt – SSH into your Mac from your phone for AI agent prompts

https://www.npmjs.com/package/airprompt
2•hatefrad•1h ago•1 comments

Show HN: A community powered global network of probes

https://github.com/jsdelivr/globalping
1•jimaek•1h ago•0 comments

The Scrum-to-POM Transition Is a Role Repositioning Event

https://age-of-product.com/scrum-to-pom-transition/
1•swolpers•1h ago•0 comments

Pytest-cloudreport – local HTML reports and flaky-test detection for pytest

https://github.com/ahmad212o/pytest-cloudreport
1•ahmad212o•1h ago•0 comments

Blueprint: AI Hardware Design

https://www.blueprint.am/
1•handfuloflight•1h ago•0 comments

US is making Europe pay dearly for its half-hearted electrification

https://www.programmablemutter.com/cp/195461224
3•hackandthink•1h ago•0 comments

The reporters at this news site are AI bots. OpenAI's super PAC is funding it

https://twitter.com/TheMidasProj/status/2047692328396034490
2•pretext•1h ago•0 comments

San Francisco must preserve the birthplace of the Mission burrito

https://www.sfchronicle.com/food/restaurants/article/el-faro-mission-burrito-creator-22206173.php
3•divbzero•1h ago•0 comments

Enterprises Are Rethinking Kubernetes

https://www.infoworld.com/article/4161056/enterprises-are-rethinking-kubernetes.html
6•milkglass•1h ago•0 comments