@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 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 rust
@ekuber@hachyderm.io avatar

Sometimes I wish that rustc had a database of small breaking changes that affect only a handful of crates, so that we could on the fly patch them going forward. Things like "we now correctly check for lifetimes in assoc types" can technically be a breaking change that affects a handful of crates, but I want to ensure that building a project from today in 15 years doesn't require a compiler tool chain from today.

I guess this is the windows backwards compatibility approach.
#rust #rustlang

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

The online discourse:

"It's like C++ and OCaml had a baby! (Positive)"
"It's like C++ and OCaml had a baby! (Pejorative)"

ekuber, to rust
@ekuber@hachyderm.io avatar

Request for feedback: how would you change this compiler error? Can you tell what's going on? What the problem is? Do you get a sense of how you might be able to solve it?

ekuber, to rust
@ekuber@hachyderm.io avatar

Proc macros in are objectively bad in a number of ways (limited to only dealing with tokens/no type system access, hard for newcomers to grasp and write, force a lot of attributes to be written to annotate specific items, etc.) but they exemplify "worse is better" perfectly. They are incredibly powerful and allow people to build amazing abstractions that are in some cases best in class. We want to have something better, but there isn't a pressing need now to rush a replacement.

ekuber, to random
@ekuber@hachyderm.io avatar

Twitter was always a PvP arena full of griefers and grifters, but X seems to be only griefers and grifters.

ekuber, to rust
@ekuber@hachyderm.io avatar

Out of curiosity, I did a quick check to see how many impl Trait return types are object safe in the rustc codebase, meaning they could always be turned into a type-erased Box<dyn Trait>, and the ratio of object-safe/not object-safe is ~10:1.
I don't know what that tells us, but found it interesting.
I wonder what the performance impact in compile times and the produced binaries of turning these into trait objects automatically and transparently.

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 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, to rust
@ekuber@hachyderm.io avatar
ekuber, to rust
@ekuber@hachyderm.io avatar

Somewhat cursed idea: "attributes at a distance"

#![attr(target = crate::foo::Bar)]

mod foo {  
 struct Bar;  
}  

What would you use this for?

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 photography
@ekuber@hachyderm.io avatar
ekuber, to random
@ekuber@hachyderm.io avatar

Everyone used to sum types doesn't get why they are a big deal and everyone who hasn't used them doesn't get why they are a big deal

ekuber, to rust
@ekuber@hachyderm.io avatar

impl dyn Foo + 'static where Self: 'static {
fn hello(&'static self) where Self: 'static {}
}

For when you want to really be sure that your trait object method is invoked on an owned type.

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, 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

Perhaps unsurprising observation that caught me by surprise at first: people don't read error messages.
It might read "say 'friend' to enter" and users will stand around in a circle next to a monster infested pond as if you had given them a riddle.

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 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 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

async/await is sparkling cooperative multitasking

ekuber, to random
@ekuber@hachyderm.io avatar

Replacing a film camera light seal is nothing more than reapplying a fancy sticker, but it is somehow a fun exercise that gives me a profound sense of satisfaction. I think it's hitting the same part of my brain that activates when I solder something.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • tacticalgear
  • magazineikmin
  • khanakhh
  • everett
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ethstaker
  • InstantRegret
  • thenastyranch
  • JUstTest
  • ngwrru68w68
  • cisconetworking
  • cubers
  • osvaldo12
  • modclub
  • GTA5RPClips
  • tester
  • Durango
  • provamag3
  • anitta
  • Leos
  • normalnudes
  • lostlight
  • All magazines