4 ms·
I'd like to challenge your theories. > syn itself is essentially a hack that has become so entrenched that there is little incentive to improve rusts metaprogr
by Ygg2 2y ago
I'd like to challenge your theories.
> syn itself is essentially a hack that has become so entrenched that there is little incentive to improve rusts metaprogramming story
It's not a hack it's a way to expose compiler internals, by way of 3rd party crates.
I think rust developers don't want to maintain it, because it would lead to compiler calcification, via backwards compatibility guarantees.
> rusts type system is strong enough to build extremely powerful zerocopy serialization
Unclear what you mean, but other than syn and quote you don't have a way to reflect and do code gen, outside of build script. Which also use it.
Note there are alternative like mini serde and nano serde, but no library for type reflection.
> the author of serde and syn has been at the center of a ton of drama
By ton you mean two. First drama was that he expressed interest in Jean Heyd's project (because of reduced build times) but thought it not best presentation for RustConf. He wasn't the only one. But his vote led to Heyd burning all bridges with Rust project.
Second is doing a speedup of serde by converting some crates to binary blobs. This broke reproducibility of some builds, even if it's not a SemVer violation.
> being the final descision maker of the latest core::time
[Citation needed]
I've seen https://github.com/rust-lang/rust/issues/127343#issuecomment-2218261296 https://github.com/rust-lang/rust/issues/127343#issuecomment...
That's just notes from the meeting. Do you have proof he was the deciding vote?
> and being ex-palantir
Ok. This is straight up conspiracy theory. It implies everyone working for Palantir is Mossad level spook.
> the rust community is perceived as being unprofessional and overly dramatic
Rust community can be overly dramatic and unprofessional without dtolnay. He wasn't the one harassing Actix developer via GitHub.
---
Problem with your theory, is that it's disjointed and too simple. It makes sense in pieces but not as a whole.
Dtolnay needs to want comptime reflections for compilation speet reduction, but also sabotage them. He needs to promote binary blobs but also leave the source. He needs to sabotage time for ??? And make Rust community seems deranged, when they are doing fine job on their own.
- j-pb 2y agoIt might be that I'm shooting the messenger here, and that he was just the one that closed the issue. But my point, is that his crates (and thus he) hold too much power, even if there had been 0 incidents. That's not his failure per-se, but it's rusts failure if a single person can hold this much power, and be involved with this many shit-storms, without someone stepping up and being like "maybe we should put the decisions for this essential infrasructure on more shoulders". Even if he was the rust messiah himself, I wouldn't be comfortable with that Bus factor. No grand conspiracy needed. Being ex-palantir just makes me believe him more if he acts like a jerk, that he mighy actually be a jerk, nothing more nothing less.
- cstrahan 2y ago>> rusts type system is strong enough to build extremely powerful zerocopy serialization > Unclear what you mean, but other than syn and quote you don't have a way to reflect and do code gen, outside of build script. Which also use it. > Note there are alternative like mini serde and nano serde, but no library for type reflection. Reflection/comptime/codegen are all orthogonal to zero copy (de)serialization. To briefly(ish) describe zero copy by way of comparison, consider JSON: there's no way to parse a JSON object into your language's data structures without (among other things) copying any strings you come across (rather than directly borrowing a slice of the original buffer). Why not? Consider escapes: you must first unescape the string, which entails a new allocation. But this doesn't stop at strings: if you have an array, you must first parse that array (usually accumulating a copy of the elements in a Vec<Object> or similar, which in turn means that the whole array was effectively copied), rather than providing a "cursor" into the original buffer. Parsing JSON requires traversing the entire buffer and copying everything you come across. Protocol buffers works much the same way: because structures are variable length (and in fact, scalars are too -- integers are stored as base 128 varints), if you want the Nth element of an array, you have no choice but to parse all the proceeding elements (rather than nudging a cursor's offset by N×sizeof(Elem) -- you can't do that because the size of any element is unknown until after you've parsed it). Because you want O(1) indexing after parsing, the logical implication is that whenever you parse a protobuf message, the protobuf library parses (and copies) the entire thing, and any array/repeated field ends up as a new array allocation in your language (e.g. Vec<Elem>). Contrast with something like flatbuffers or Cap'n Proto: the code generated from your schema file gives you structures that (more or less) have two fields: a reference to a buffer, and an offset into that buffer. When you do something like person.age(), the offset of the age field (which is constant) is added to the offset of this person record, and that combined offset if used to index into the buffer (something like buffer.read_u32(offset)). Using a library like this gives you performance similar to what you'd have dereferencing array indices and struct fields in plain old data types in your language of choice. You don't pay in memory and processor time parsing everything up front, you only pay for the scalar memory reads you actually use (and a little bit of quasi-pointer chasing, not unlike what would happen with native structs). Put another way: a zero copy (de)serialization protocol is one where the on-disk format is the same as the (readily usable) in-memory format. This rules out things like string escaping (just store the original bytes), variable sized records/integers, variable length arrays stored inline with records (otherwise that would make records themselves variable length), storing pointers in records (because those pointers will be meaningless when read from disk; instead: store offsets), etc. You can read more about zero copy as it relates to Rust here: https://manishearth.github.io/blog/2022/08/03/zero-copy-1-not-a-yoking-matter/ https://manishearth.github.io/blog/2022/08/03/zero-copy-1-no... Here's the Wikipedia article: https://en.wikipedia.org/wiki/Zero-copy https://en.wikipedia.org/wiki/Zero-copy Examples of zero copy (de)serialization libraries: https://github.com/rkyv/rkyv https://github.com/rkyv/rkyv https://github.com/google/flatbuffers https://github.com/google/flatbuffers https://github.com/capnproto/capnproto https://github.com/capnproto/capnproto
- mardifoufs 2y agoI mean, not everyone working with FSB related organizations are Mossad level spooks either, but it would still be weird to not be suspicious about it. And it sure wouldn't be weird to not want to associate with said person. Not sure why that doesn't apply to organizations that are super connected to the CIA and a lot of other intelligence/security agencies. Though I agree that I wouldn't mind as much if I was american, it's just my "foreign" perspective.