@ekuber@hachyderm.io
@ekuber@hachyderm.io avatar

ekuber

@ekuber@hachyderm.io

"We spent decades trying to invent a sufficiently smart compiler when we should have been inventing a sufficiently empathetic one."

Rust Compiler team member. If you have to search for answers when the compiler is talking to you, that's a bug.

There are no bad programmers, only insufficiently advanced compilers.

Cache-locality awareness evangelist.

💼@aws, opinions my own

he/him

Trans rights are human rights

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ekuber, to random
@ekuber@hachyderm.io avatar

"You can say 'all are welcome,' but if wolves and sheep are both welcome then you're only going to get wolves. The the smart sheep will go somewhere else and the naive sheep will be eaten and processed. [...] Refusing to choose is a choice. It's a choice in favor of the people who prey on others and who refuse to acknowledge the humanity of those they hate."

ekuber, to rust
@ekuber@hachyderm.io avatar

Researchers at the University of California, San Diego are conducting a research study on Rust errors and how we can help make it easier to learn . They made a VSCode extension, SALT, which includes a borrowing and ownership error visualizer. Opt-in, it can also send them data regarding the errors you’ve experienced while compiling; they plan to use that information to evaluate the impact of our extension as well as to give you feedback on your progress.
https://marketplace.visualstudio.com/items?itemName=kale-lab.salt

ekuber, to rust
@ekuber@hachyderm.io avatar
ekuber, to rust
@ekuber@hachyderm.io avatar

Regular reminder that if a compiler error isn't clear, we consider that a bug. File a ticket! Worst case scenario it gets closed as a duplicate. Second worst it takes us a long time to get to them. But I assure you I've read every single open A-diagnostics ticket at least twice.

ekuber, to random
@ekuber@hachyderm.io avatar

"When people tell you what doesn't work, they're usually right. When they tell you how to fix it, they're usually wrong."
– Bill Hader

I couldn't have come up with such a succinct way to frame it. You need to listen to people complaining about problems, but don't over index on the solutions they propose.

ekuber, to rust
@ekuber@hachyderm.io avatar

I love it when I get errors that I worked on and forgot about

ekuber, to random
@ekuber@hachyderm.io avatar

Whenever the "free fare transit" conversation comes up in US circles, I am always peeved with the big problem of transit in the US: whether from the left or the right, everyone agrees "buses are for poor people", so it doesn't get proper funding so anyone using transit ends up waiting an hour at bus stops with no seating or shade next to 6 lanes or traffic and changing three lines to get where they need to, because "poor people's time is cheap and they don't care about quality".

ekuber, to random
@ekuber@hachyderm.io avatar

Every time I'm halfway through a nasty rebase, I can hear the project's voice in my head: "I've altered the upstream, pray I do not alter it any further."

ekuber, (edited ) to rust
@ekuber@hachyderm.io avatar

Meet Red Pen, a rudimentary #Rust linter: https://github.com/estebank/redpen
I cleaned things up to the point where you can actually use this, but it is v0.1 and I mean it. It most likely won't work when you first try it (linux only for now), but I'm really happy with the first useful lint it has: assert that a function cannot call panic.

PRs very welcome.

ekuber, to rust
@ekuber@hachyderm.io avatar

" development is going too fast (because they are stabilizing features I don't care about) and going too slow (because they are not stabilizing features I care about!"

There are only so many contributors, hours in a day, days in a year to get to everything now, and some features are reliant on other, less flashy work that needs to happen before they can be even attempted.

But people are putting in a lot of work, the codebase changes so quickly that it is hard to keep up.

ekuber, to random
@ekuber@hachyderm.io avatar

Every time there's a CVE affecting some fundamental part of modern computing that Rust provides a dot-release for, it seems multiple publications find out first from the Rust blog and publish titles implying that Rust is the only affected thing. It's not only mildly annoying hearing the echos of "har, har, I thought it was 'safe'", it does a complete disservice to anyone that doesn't use Rust because they won't find out they have to update or mitigate the issue too!

ekuber, to rust
@ekuber@hachyderm.io avatar

Rust's unexpected super-power is just how flexible it is. It allows you to write very high level looking code on a low level language. That caused people to use it beyond its intended niche. But it is fundamentally a low level programming language. It will continue becoming easier to use (that's my personal goal!) but there are "obvious" changes that would make things easier at the cost of speed or correctness that cannot take.

ekuber,
@ekuber@hachyderm.io avatar

I think there is a Rust-like language that accepts inference at the cost of perf and speed, that has less stringent backwards compatibility assurances, that interacts with Rust natively. But that can't be "Rust".

ekuber, to rust
@ekuber@hachyderm.io avatar

The project on Mastodon: https://social.rust-lang.org/@rust

ekuber, to rust
@ekuber@hachyderm.io avatar

Hot take: is not the end-all be-all of languages. Other languages will come forth with improvements in multiple axes. I also think that it has made a lot of good choices on trade offs, but some of those make it harder than it could be. I think there's space for an EasyRust, that could be developed independently, but it could be part of the same existing codebase and leverage it as a testing ground for changes to Rust itself. You could even say that nightly is that language already.

ekuber, to rust
@ekuber@hachyderm.io avatar

Please, don't extrapolate from a single job posting at Microsoft that they are "abandoning C#". That's not how that works. They are adopting Rust more and more, yes. Feel happy or dismayed about that, as you will. But disregard editorials trying to read the tealeaves about unrelated product roadmaps, including this one.

ekuber, to rust
@ekuber@hachyderm.io avatar

https://blog.rust-lang.org/2023/09/22/crates-io-usage-policy-rfc.html
New policy likely to be adopted around crates.io name-squatting

ekuber, to random
@ekuber@hachyderm.io avatar

"IO error", "couldn't write to file", "couldn't write to file '/tmp/foo-bar'", "couldn't write to document metadata file '/tmp/foo-bar' because the file already exists and their permissions dont permit this user to write to it; you can change the path with '--metadata-path=/path/to/file'" are all the same error and require approximately the same amount of effort to produce. Give your users the last one.

ekuber, to photography
@ekuber@hachyderm.io avatar


I wish I had increased the shutter speed with such a long lens (2x + 135mm @ 2.8) because it's not sharp, but like the composition.

ekuber, to random
@ekuber@hachyderm.io avatar

"I will not engage in the Discourse. Discourse is the little-death that brings total obliteration. I will read the Discourse. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the Discourse has gone there will be nothing. Only I will remain."

ekuber, to animals
@ekuber@hachyderm.io avatar
ekuber, to rust
@ekuber@hachyderm.io avatar
ekuber, to rust
@ekuber@hachyderm.io avatar

I'm super proud whenever a newcomer asks a question in a forum, and the response is "if we run the code you want, the compiler tells you this, which explains why it can't doesn't work", and then goes on to expand. I'm terribly against RTFM attitudes, but Read The Friendly Compiler Output should be a valid learning strategy.

ekuber, to rust
@ekuber@hachyderm.io avatar

What would you take out of this diagnostic? Is this too much information? Would you prefer to have a shorter message at the cost of needing multiple cycles of the compiler telling you you're missing a change?

ekuber,
@ekuber@hachyderm.io avatar

Here is the last version of the diagnostic. First is the case people are realistically going to encounter, second is the "worst" possible case. Last one is what it looks like now. Feel free to give feedback!
The code that produces it is at https://github.com/rust-lang/rust/pull/121274

ekuber, to photography
@ekuber@hachyderm.io avatar
ekuber,
@ekuber@hachyderm.io avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • osvaldo12
  • mdbf
  • Youngstown
  • cisconetworking
  • slotface
  • rosin
  • thenastyranch
  • ngwrru68w68
  • khanakhh
  • megavids
  • ethstaker
  • tacticalgear
  • modclub
  • cubers
  • Leos
  • everett
  • GTA5RPClips
  • Durango
  • anitta
  • normalnudes
  • provamag3
  • tester
  • lostlight
  • All magazines