Ashley Mannix

1K posts

Ashley Mannix

Ashley Mannix

@KodrAus

Engineer @datalust_seq he/him

Brisbane Katılım Ağustos 2017
113 Takip Edilen399 Takipçiler
Ashley Mannix
Ashley Mannix@KodrAus·
@slightlycode @lukeed05 Oh I’m no expert, but it’s weird isn’t it. Decimal formats pick a value for the binary64 that roundtrips. Many of our favourite base10 numbers aren’t exactly representable in a binary64 so they’re encoded as something very close. As you do math on them, they become less close
English
0
0
2
47
marais
marais@slightlycode·
@lukeed05 @KodrAus you'd know all about this. You did some work on floating point to info recently for Rust?
English
1
0
0
126
Ashley Mannix
Ashley Mannix@KodrAus·
@ArmyOfBruce For sure 👍 I think I should maybe also try back up my claims that upgrading is easy by going through and submitting PRs to libraries still on 1.x
English
0
0
1
95
Bruce Mitchener
Bruce Mitchener@ArmyOfBruce·
@KodrAus I think we talked some years ago about the usefulness of a janitorial team that would help do ecosystem-wide updates … might be useful to think about again.
English
1
0
1
14
Ashley Mannix
Ashley Mannix@KodrAus·
@ArmyOfBruce It’s a totally valid concern though. I don’t want to make breaking bumps frequently, even when they don’t actually break things
English
1
0
1
16
Ashley Mannix
Ashley Mannix@KodrAus·
@ArmyOfBruce Yeh, as a consumer you should be able to go from 1.x to 2.x or 3.x (or 4.x or further) without needing to issue any major bump of your own. The differences between 2.x and 3.x only affect the behavior of edge cases
English
1
0
1
21
Patrik Svensson (@patriksvensson@mstdn.social)
Does anyone know of a good cloud logging provider that supports structured logging? I really like Seq and have been using it a lot in the past, but for this thing, I would prefer to not host and maintain things myself. I'm looking for a dedicated SaaS solution for this.
English
43
2
22
19.5K
Ashley Mannix
Ashley Mannix@KodrAus·
@steveklabnik @fasterthanlime For this case specifically I still believe we should deprecate std::sync::Once in favor of std::sync::OnceLock<()>, but not as firmly as I once did
English
0
0
0
32
Ashley Mannix
Ashley Mannix@KodrAus·
@burntsushi5 Having to answer the question “would someone have a bad time implementing this” is a nice grounding principle for taming complexity in trait systems I think
English
0
0
1
97
Ashley Mannix
Ashley Mannix@KodrAus·
@burntsushi5 I’ll out myself with bitflags. It’s got a BitFlags trait that was written just to be implemented by the macro so I sealed it. That decision made it into a dumping ground
English
1
0
1
111
Ashley Mannix
Ashley Mannix@KodrAus·
I think we all need to stop using sealed traits and custom derives to paper over design incoherence in Rust libraries
English
3
0
2
1.6K
Ashley Mannix
Ashley Mannix@KodrAus·
@burntsushi5 I’m specifically talking about using these techniques to try hide poorly designed abstractions. Reaching for sealed or custom derive to hide a trait just because it’s been made difficult to implement
English
1
0
0
119
Andrew Gallant
Andrew Gallant@burntsushi5·
@KodrAus What's the alternative in today's Rust? I use them in byteorder, bstr and aho-corasick. Makes it nice and easy to add new required methods without worrying about backcompat.
English
1
0
3
857
Josh Triplett @josh@joshtriplett.org
@KodrAus Can you give some examples of the design incoherence you mean? I'd love to figure out whether there's something we could improve to systematically help libraries do better designs than they currently can with today's Rust.
English
2
0
1
452
Ashley Mannix
Ashley Mannix@KodrAus·
@josh_triplett To be fair, I’m certainly not innocent here. Both of these traits in bitflags should be publicly implementable: github.com/bitflags/bitfl… Designing BitFlags specifically as if it’s just a target for the macro has made it a weird blend of operators and iterators
English
0
0
0
37
Ashley Mannix
Ashley Mannix@KodrAus·
@josh_triplett Actually, one other case I can think of for sealed traits is for object-safe versions of generic traits, where there’s no “valid” impl of the object-safe version that isn’t from the generic one. That’s pretty niche though
English
1
0
0
41
Ashley Mannix
Ashley Mannix@KodrAus·
@sadisticsystems I find sealed traits can be markers of incomplete or false abstractions where properties of the blessed impls leak back into the trait, and forced custom derives can hide spaghetti
English
0
0
1
81