Twitter | Search | |
Josh Triplett
Free and Open Source Software developer. developer and language lead. Principal Engineer at Intel. Speaking only for myself. he/him or they/them
3,314
Tweets
170
Following
1,529
Followers
Tweets
Josh Triplett Dec 6
Replying to @aaron_turon
A helpful phrase: "I have other arguments/points, but here's one: ...". That establishes a more friendly convention than "once I stop talking, I'm expected to have supplied a complete self-contained set of reasoning with all supporting points, ready to have holes poked in it".
Reply Retweet Like
Josh Triplett Dec 6
Replying to @aaron_turon
You don't need to communicate the complete picture that's in your head all at once. You can cooperatively figure out what additional information to provide.
Reply Retweet Like
Josh Triplett Dec 6
Replying to @aaron_turon
One thought that has helped me: communication is a multiplayer ideally-cooperative game, where you need to model others. Consider the concept of "inferential distance": how far apart are you and your model of them, and how can you efficiently communicate the delta you want?
Reply Retweet Like
Josh Triplett Dec 5
The v2 proposal allows safe `&T` to `&U` in-place conversions, and even safe `&mut T` to `&mut U` in-place conversions. It uses bytes to represent the underlying representation in memory, and to avoid needing n^2 conversion traits.
Reply Retweet Like
Josh Triplett retweeted
Ryan Levick Dec 5
Version 2 of ’s and my pre-RFC on safe transmute in is up. Please let us know what you think!
Reply Retweet Like
Josh Triplett Dec 3
I don't typically favor "code golf", by either line count or character count, except as a learning activity. But it can be *useful* to know what functions exist. For instance, both `lock()` and `lines()` are quite useful outside of one-liners.
Reply Retweet Like
Josh Triplett Dec 2
Replying to @TroyLonely_ @rustlang
Note that the trailing `?` assumes you're using ?-in-main; if not you'll need another .unwrap().
Reply Retweet Like
Josh Triplett Dec 2
Replying to @TroyLonely_ @rustlang
I don't think it's any *simpler*, but if you really want a single line of code: `std::io::stdin().lock().lines().next().unwrap()?`
Reply Retweet Like
Josh Triplett Nov 26
Replying to @whitequark
Note that graphviz *can* do some rudimentary styling, and if you just want "this node is blue" or "this node is square and that one is round", that works alright. And it's *great* to generate programmatically (dump debug info in graphviz format and get a graph, for instance).
Reply Retweet Like
Josh Triplett Nov 26
Replying to @whitequark
Graphviz when I don't care about the visual appearance, only the semantic structure. TikZ if I care at all about the appearance, such as node positioning or style. For the diagram you show, I'd use TikZ.
Reply Retweet Like
Josh Triplett Nov 25
Is anyone aware of an Open Source clone of GitHub's "Spokes" distributed git storage (formerly known as DGit)?
Reply Retweet Like
Josh Triplett Nov 22
Replying to @sunshowers6 @rustlang
No problem! I'll file an issue so it doesn't get lost.
Reply Retweet Like
Josh Triplett Nov 21
Replying to @sunshowers6 @rustlang
I would really like to have this! Seems like we could easily make both a UnixPath and a WindowsPath available unconditionally, then make one or the other Path. (Ditto PathBuf.) Interested in posting a pre-RFC to that effect?
Reply Retweet Like
Josh Triplett Nov 21
I specifically proposed allowing SIMD types, yes. This is for transmuting to and from byte slices safely, not directly to other types. I don't know if the compiler can completely optimize away a pair of conversions via bytes. We might need a different trait for what you need.
Reply Retweet Like
Josh Triplett retweeted
Ryan Levick Nov 21
With the help of , I've authored a pre-RFC to add APIs to for performing safe transmute of types to and from bytes (with safe unions as an added bonus). Let me know what you think!
Reply Retweet Like
Josh Triplett retweeted
Pete Cordell #NoDealNoWay 29 Jan 14
Telling a programmer there's already a library to do X is like telling a songwriter there's already a song about love
Reply Retweet Like
Josh Triplett Nov 19
I really like Warp, by . Its best feature: type-safe routing! Abbreviated macro: path!("add"/u64/u64).map(|a, b| (a+b).to_string()); Functions and type inference: path("add").and(param()).and(param()).map(|a: u64, b: u64| (a+b).to_string());
Reply Retweet Like
Josh Triplett retweeted
Intel Software Nov 14
We’re excited to be co-founders of the Bytecode Alliance and to team up with , , and !
Reply Retweet Like
Josh Triplett Nov 13
Replying to @nick_r_cameron
More importantly, I think we can start taking steps to improve error handling in std/core now, and we shouldn't delay that by trying to reach consensus on syntax changes.
Reply Retweet Like
Josh Triplett Nov 13
Replying to @nick_r_cameron
Debatable, considering some of the issues around specifying properties (traits) of the return value. But in any case, I think there's a material difference between async functions and functions that return Result. This feels like the domain of proc macro syntax, not lang. :)
Reply Retweet Like