8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions
comment 4y ago · link · parent
With low compression levels, you can actually tune things to get faster write times than raw bytes, depending on CPU speed vs IO speed. So that's cool.
comment 4y ago · link · parent
There's a couple of squicky things, for one, it looks like the extension model may allow RCE behaviors by deserializing arbitrary classes. It looks like it uses a URI/registration based system so by default, it is limited in what types it can try to load, but it's plugin-based, so a library you import could theoretically expose you. But that seems relatively low risk.
But overall this format is really cool. Supports linking across multiple ASDF files, which I can see getting messy, but this is an incredibly powerful technique and they do it in a sane way.
comment 4y ago · link · parent
What I'm looking for is basically something that ticks all the boxes of LOC's 7 Sustainability Factors. Is able to store arbitrary binary data, along with metadata, in a single file. Easy to pack/unpack, particularly in Python. I'm pretty well covered for image/audio/video formats, but none of those lend themselves to n-dim arrays.
Ogg, matroska, and HDF5 are all container formats which can ostensibly do this, possibly even well. Ogg and matroska are supposed to be able to support arbitrary data steams and metadata, but actually finding tooling to do the operations I want to do has yet to bear fruit. HDF5 is insanely complex, and I have some concerns about performance and data corruption risk.
Tar is tempting but it does some really goofy things, like ending an archive with 1kB of zeros.
What actually looks most promising as an existing "format" is the RIFF family of chunked encoding. Dead simple, python stdlib even has a reader. Only real downside is 2*32 ~= 4 gigabyte size limit, though this can be overcome by using a "stream of chunks" model.
Alternatively, a stream based on Msgpack, with some slight constraints, is very appealing.
Sqlite3, also very tempting.
If I did write such a "format", it would definitely be built on the primitives of either RIFF, Msgpack, or Sqlite-as-application-file, so it'd be less of a "file format" and more of "existing format with some opinions about schema".
Protip for anyone also thinking about making their own file format: make sure the API/format supports some sort of arbitrary metadata model! Apache Feather and Parquet are pretty recent, but don't really support writing metadata, you kind of have to hack around it. IMHO, this is a huge oversight, especially considering the internal metadata is literally just JSON-encoded fields.
Edit: actually just reread the follow-up to "moving away from hdf5" and it mentions ASDF format. This looks really promising. YAML metadata header with binary blocks. Normally it's not a good idea to start with UTF8 and later go binary, but if you know when to stop reading text, it's not the worst. Also, it's a name collision with the asdf version manager (and also anything else named after rolling the left hand home keys)
https://cyrille.rossant.net/should-you-use-hdf5/
https://towardsdatascience.com/saving-metadata-with-datafram...
https://en.m.wikipedia.org/wiki/Resource_Interchange_File_Fo...
https://msgpack.org/index.html
comment 4y ago · link · parent
Pragmatically (but not legally speaking, INAL) you could probably get by with summarizing and linking (especially to web archive).
comment 4y ago · link · parent
It's definitely at the sweet spot of "terrifying" and "completely plausible."
comment 4y ago · link · parent
How is this different than English? For one, English relies heavily on the copula (is/to be) for statements of fact ("it is raining" vs "I see rain"), and secondly it's baked into the grammar. Stating something without evidence would sound just as wrong as "Me fail English? That's unpossible!"
The one exception might be the "uncertainty suffix" -ish.
comment 4y ago · link · parent
I'm not sure why the metal phosphide class isn't more popular in America. They hydrolyze in the stomach to produce toxic phosphine gas, which doesn't persist. Seems to be used in conjunction with SGARs but not as a first-line.
comment 4y ago · link · parent
But I agree you shouldn't be "writing Haskell in Rust".
https://blog.rust-lang.org/2021/08/03/GATs-stabilization-pus...
comment 4y ago · link · parent
The smaller the aperture, the more constrained the light field, thus the smaller the circle of confusion (at the expense of light collection). That's how pinhole cameras work in fact.
Shrinking the aperture also increases the depth of focus. Pinhole cameras have ~∞ depth of field because there is ~1 path every photon can take (ignoring hole width, diffraction, etc).
comment 4y ago · link · parent
comment 4y ago · link · parent
More lift capacity also means less weight optimization and more emphasis on robustness, reliability, redundancy, and power.
comment 4y ago · link · parent
That is kind of what I figured, basically it always boils down to divide and conquer.
It just feels like with software, it's simultaneously easier than mech eng in so many ways (everything is in silico, near infinite abstraction power, ability to automate so many parts), yet it feels like we are constantly struggling with complexity. It starts simple but then quickly becomes a ball of yarn.
Maybe that perception is wrong, but if there is some truth to that intuition, I think it is due in part to this: software is all degrees of freedom and very few invariants to start, but then the system space quickly fills with rigid rules than can intersect in unpredictable ways. Physical engineering, you start with lots of invariants (the laws of physics, materials, chemistry, electronics, and geometry) but they are all thoroughly documented at this point. Things intersect, systems interact, but it feels much more bounded. You're only ever gonna have 3 dimensions, 6 simple machines, 92-ish usable elements, the standard model and universal constants.
This is why I value Rich Hickey's "Simple made easy" as the the exemplar of software philosophy. It's easy to say "oh yeah modular code good" but it's another to actually write code that is naturally decoupled.
As an aside, both disciplines tend to benefit from "throw more hardware at it!"
comment 4y ago · link · parent
$10B buys a lot of QA and I'm sure they try to engineer everything with the right margins, but it's still an unfathomable amount of state space.
Are there techniques to stay sane and manage risk without just throwing money at it? I feel like that kind of knowledge could be useful for software test development.
comment 4y ago · link · parent
I realize that isn't an easy thing to do. Often the best bet is to just jump around till you find a company that isn't a cultural superfund site.
comment 4y ago · link · parent
It's like a seed for crystal growth. Small company is exactly the best time to implement these things, because other employees will try to match the cultural norms and habits.
comment 4y ago · link · parent
Mom: Alexa, did you break something?
Alexa: No.
M: Really? What's this? 500 Internal server error
A: ok maybe management console is down
M: Anything else?
A: ...
A: ... ok maybe cloudwatch logs
M: Ah hah. What else?
A: That's it, I swear!
M: 503 ClientError
A: ...well okay secretsmanager might be busted too...
comment 4y ago · link · parent
No-blame analysis is a much better pattern. Everyone wins. It's about building the system that builds the system. Stuff broke; fix the stuff that broke, then fix the things that let stuff break.
comment 4y ago · link · parent
There's so much nuance and it's easy to let things lapse, or make a small mistake and silently get all your mail rejected, lose/corrupt a bunch of data, etc.
comment 5y ago · link · parent
Side note: does anyone know why dig's output is so...eye-bleeding? Why does it show so much info by default? +short should be the default. Why the ;; "comment" prefix?
comment 5y ago · link · parent
... ok I'm reading about the material properties of SiC and it's insanely complex so I'm just going handwave and say that α-SiC has tighter packing with stronger bonds because of the alternating Si and C atoms.