4 ms·
> Serde ... is often credited as a reason people reach for Rust. I've heard this narrative a lot, but I'd challenge it. I tend to actively disable serde featur
by j-pb 2y ago
> Serde ... is often credited as a reason people reach for Rust.
I've heard this narrative a lot, but I'd challenge it. I tend to actively disable serde feature flags and don't use libraries with mandatory serde dependencies.
It seems to be one of those things that are good enough™, while still falling short of being actually good.
- rusts type system is strong enough to build extremely powerful zerocopy serialization, but people don't explore that space because of serde
- macros and especially proc-macros in Rust are horrible, and are only feasible because of the syn crate
- syn itself is essentially a hack that has become so entrenched that there is little incentive to improve rusts metaprogramming story
- serde adds a ton of compile time whenever used because of the heavy macro usage
- the author of serde and syn has been at the center of a ton of drama, being at the root of the keynote incident that essentially stalled comptime reflection (Zig is eating Rusts lunch in that department) and caused a huge setback on rusts inclusivity, shipping binary blobs in serde to make a point and push an RFC (essentially abusing the power he has with serde), being the final descision maker of the latest core::time breakage, all leave a bitter after-taste for someone who doesn't aparently have any official position in the rust foundation with the appropriate accountability, yet holds an enormous amount of hidden power (and being ex-palantir also makes me a lot less inclined to give him the benefit of doubt, that these were all unfortunate misunderstandings)
I think the overall impact of serde and syn, including the authors behaviour has been a net negative for the rust ecosystem,
both technically, personally, and marketing wise (the rust community is perceived as being unprofessional and overly dramatic).
Having written this down like that, makes me realised that I don't just avoid serde, I boycott it.
- aabhay 2y agoThe fact that most crates are compiled with serde as feature flag and the fact that you can raise a PR on most things that aren’t — are both great cases for Rust having an awesome ecosystem. Just as with async support, serialization support is a free market of ideas.
- steveklabnik 2y agoThat proc macros have significant drawbacks, and you personally weigh those drawbacks as having a lot of significance, doesn’t change that for many people, the juice is worth the squeeze. 375M downloads don’t lie. I agree with you that there are significant drawbacks, which is why I’d love to see reflection happen in Rust. > being at the root of the keynote incident I don’t believe this to be true, based on what I know from both public and private information. I think a lot of people don’t like dtolnay due to the Palantir thing, and decided to try and inflate his involvement. But even from just public information: blame lies with the decision makers. By his own account, Josh Triplett suggested a demotion, and Sage Griffin set that into motion. They’ve both since apologized. I do not believe they are solely to blame, but if you want to point fingers at individuals, they’re who I would describe as “in the center.” Overall the blame relies on Rust’s continual failure to do governance in a way that’s responsive and legible to its users, and continually ignores the written rules to just do whatever whoever has the soft power wants. This isn’t a unique story in open source, of course. > someone who doesn't aparently have any official position in the rust foundation The Rust Foundation does not govern most of the things you’re upset with. He is a member of the libs-api team in the Project, though. > being ex-palantir I’ll be the first to say “Fuck Palantir” but being upset at people for where they worked a long time ago just doesn’t sit right with me. Do you think that anyone who’s ever worked anywhere objectionable should be branded with that decision for life? Many people don’t like me for working at Cloudflare. Is there no possibility for change in your mind? If we truly want to play that game, you’re gonna have to exclude like half of the industry.
- j-pb 2y ago> 375M downloads don’t lie. That de-facto standartisation (and resulting monopoly due to the network effect) is exactly why serde should either be part of std or be replaced with a more heterogeneous ecosystem. You conveniently ignore the other incidents. Had it only been the keynote incident (including the non-apology 3 months later after he was ousted by someone else, and the therein included misrepresentation of thephds' opinion regarding his own talk) I would have brushed it off, but there is a pattern to it. The palantir thing is just the cherry on top because it is indicative of questionable moral compass to me. A compass which can of course change, but if I had such a controversial former employer I'd distance myself from them after having such a change of heart (which to my knowledge hasn't happened). Too long of a "Series of Unfortunate Events" to have this much power consolidated with a single BDFL for rusts serialization and metaprogramming story. > If we truly want to play that game, you’re gonna have to exclude like half of the industry. Completely unrelated, but maybe that's what it takes to grow as a field. As a german I have a lot less bussiness with palantir, but I'm reminded of the situation after WW2 where we had to essentially fill major political and bueraucratic roles with literal Nazis because we didn't have anyone else. The german internal intelligence service has been involved in a lot of crazy neonazi terrorist attacks to this day. Go figure.
- steveklabnik 2y ago> That de-facto standartisation Sure, that's a fine opinion to have, but you were challenging my "people use serde" assertion. All I'm saying is that people do in fact use it. > You conveniently ignore the other incidents. Yeah, I submitted this post two days ago, but it hit the front page now. I was not exactly prepared to see comments here, I was on my morning walk, and typed that out on my phone. It was already getting too long. > including the non-apology 3 months later after he was ousted by someone else A "non-apology" because he wasn't the one at fault! And he was "ousted" because people were crying for his head, specifically, because of the Palantir thing. Not because he had any real thing to do with it. Yet people seem to want to blame him regardless of the actual facts. But sure if you want to get into the other things, now that I'm at a computer: > shipping binary blobs in serde to make a point and push an RFC It is incredibly normal to ship binary blobs in other ecosystems. pjmlp will post on basically every Rust thread that Rust isn't a serious language until it can ship binary libraries. People care about compile times, and a binary serde would help with that. With ineffectual Rust leadership, sometimes just doing the thing is the only way to actually get things done. I don't see responding to the needs of your users in spite of other people dragging their heels as "abuse of power." > being the final descision maker of the latest core::time breakage Do you have a citation on this one? I agree that this probably shouldn't have happened, but given that it took five minutes to recognize that it happend, type "cargo update -p time", and then move on with my life, it's not a huge deal to me. But Rust decisions aren't usually made by a single person, so that he personally somehow made the call would surprise me. > (which to my knowledge hasn't happened). As someone who is reasonably well known on the internet, it's still wild to me how much people expect others to put out in public about their personal lives. Asking for someone to publicly denounce an employer from years ago is just weird. People are free to keep their private life private. Furthermore, even if he did do that, it's pretty clear that the folks who talk like this: > Too long of a "Series of Unfortunate Events" to have this much power consolidated with a single BDFL for rusts serialization and metaprogramming story. wouldn't even accept the apology. It's been years of casting every single thing into the worst light, in bad faith. I am glad that he is seemingly unphased by what I would describe as a borderline harassment campaign.
- Ygg2 2y agoI'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.
- mardifoufs 2y ago>(Zig is eating Rusts lunch in that department) I mean, has it? I find the way it works in Zig rather clunky, and unless I'm missing something (and I know comptime reflection isn't the same), I just usually end up needing or wanting something closer to c++ templates or even consteval/constexpr. Again, I'm pretty sure this is a total skill issue and just a lack of imagination from my side, but I don't see what I could do with zig that I can't with c++ (I'm specifically referring to comptime here). I know the difference in theory, as c++ doesn't have actual reflection, but I wonder what's the practical difference in use cases. (In fact I used to think that not having a separate metaprogramming language was awesome, as I really disliked the language inside a language that are c++ templates but I'm not sure I agree anymore. Especially with additions like constexpr/eval)