r/elixir • • 16h ago

asdf 0.1.0 — Elixir library for the Advanced Scientific Data Format

0 Upvotes

ASDF (pronounced “Az-diff”) is a scientific interchange format: a YAML metadata tree plus binary array blocks in one file. The Space Telescope Science Institute develops it. JWST, Roman, DKIST, and Rubin use it. This library is an Elixir implementation of standard 1.5.0. It is not the asdf version manager.

0.1.0 reads and writes file format 1.0.0. Open reads the header, the tree, and the block headers, and does not decode payloads until you ask. Contiguous numeric blocks and zlib work. Elixir ~> 1.17. BSD-3-Clause.

def deps do
  [
    {:asdf, "~> 0.1.0"}
  ]
end
:ok = ASDF.write!("observation.asdf", %{"count" => 2, "items" => [10, 20]})

handle = ASDF.open!("observation.asdf")
ASDF.read!(handle, ["items", 0])
ASDF.close!(handle)

ASDF.read!(handle, ["items", 0]) returns 10.

Not in 0.1.0: bzip2, lz4, external URLs, streamed writes, astronomy schemas. see the roadmap.

  • https://github.com/baoulo/asdf-elixir
  • https://hex.pm/packages/asdf
  • https://www.asdf-format.org/en/latest/overview.html

r/elixir • • 5h ago

Conditionally Render a Non-blank HEEx Slot

Thumbnail krasen.be
3 Upvotes

r/elixir • • 16h ago

Malachi v0.29.1: six durability and recovery fixes

Thumbnail
malachi-hq.github.io
4 Upvotes

A patch release of Malachi, the log broker I introduced here last week. Acknowledgements under group commit now wait for the primary's own flush, rebalancing respects quorum and its lease, healing follows the topic's placement policy, and a crash on an empty segment file is gone. Most were found by chaos drills, and the post has a diagram for each fix.

Happy to answer questions about any of them.

Code: https://github.com/malachi-hq/malachi