@yosh@toot.yosh.is
@yosh@toot.yosh.is avatar

yosh

@yosh@toot.yosh.is

Better things are not only possible; they're within reach.

Concurrent Computing ←
Programming Language Design ←
Rust and WebAssembly at Microsoft ←

u(๑╹ᆺ╹)

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

yosh, to random
@yosh@toot.yosh.is avatar

I sometimes wonder: “what if Rust bools were just another enum” and while not actually practical or anything imo, it’s a pretty fun thought exercise?

If/else statements are a really fun one here. We don’t want to have to write:

if let true = x {}

but instead we want to be able to write:

if x {}

Which I think we could do via a trait. But if we allowed that and made the trait stable, other enums could be “truthy” or “falsy”, which I’m not sure we’d want.

yosh,
@yosh@toot.yosh.is avatar

(I’m nearly certain this has been thought through before, and so this really is just a fun thought experiment)

Another option would probably be to “bless” the bool enum using some kind of built in attribute, making it the only type which can work this way. Attributes fall outside of the type system, so it feels like doing this would not actually do anything.

yosh,
@yosh@toot.yosh.is avatar

Another option I see is having an unstable trait for the conditionals, but expose the enum as stable. That’s a way of saying: “yes, bool is an enum. No, you can’t use the trait as a shorthand in your own impls.”

Maybe a better way of doing this would be if we had a first-class way of creating sealed traits, rather than the export hack everyone uses today:

“Heya, here’s the trait which provides this behavior. You can use it in bounds OK. Though the stdlib says you can’t implement it.”

yosh,
@yosh@toot.yosh.is avatar

Even if it doesn’t buy us much, it does seem appealing from a design perspective if all language concepts in Rust are further represented by traits and types.

Bool is this weird almost-but-not-really enum which just sits there goofing around. We can explain equality via traits. Same with closures. The idea of shorthand conditional notation being a trait too feels… nice?

yosh, to random
@yosh@toot.yosh.is avatar

The importance of clear, concise communication:

❌ Please consider washing your hands for your safety and other’s
✅ Wash your hands

yosh, to random
@yosh@toot.yosh.is avatar

I told myself: today is the day I get to write code.

Folks, I did not write any code. I did write several planning documents documents. Can I get an “RIP”?

yosh, to random
@yosh@toot.yosh.is avatar

Success! Managed to get an HDMI out from my iPad!

The trick here was to use a Thunderbolt 4 cable, rather than any old USB-C cable.

A thunderbolt 4 cable, and a usb-c to HDMI converter

TehPenguin, to rust
@TehPenguin@hachyderm.io avatar

Woo! ASAN support for on has now been merged in: https://github.com/rust-lang/rust/pull/118521

It uses the MSVC ASAN libraries, so you can safely link with C/C++ code built by MSVC with it's ASAN enabled.

yosh,
@yosh@toot.yosh.is avatar

@TehPenguin Ohh, huuuuuuge! This should also unblock cargo-fuzz support for Windows if I’m remembering it right?

yosh, to random
@yosh@toot.yosh.is avatar

Oh neat, someone wrote out an initial mapping of the WASI <-> WebIDL type systems! https://github.com/MendyBerger/webidl-wit#conversions-from-webidl-to-wit-types

This is going to be essential to expose Web APIs via WASM Components/WASI to guest languages. I'm excited!

yosh, to random
@yosh@toot.yosh.is avatar

Ohhhh — I just realized something. You know how labels can sometimes be visually noisy or not look good? But they are also often handy and useful!

What if… instead I just used transparent braille labels instead. Yes it requires learning to read braille. But on the flip side: for an occasional tag that has to sit in sight it could be really a really nice compromise!

yosh,
@yosh@toot.yosh.is avatar

One of my pet peeves is that sign language, braille, etc aren’t part of standard educational curriculums. Do people not realize how useful this stuff is?

There are so many situations where sight or hearing is limited – for example at night, or in crowded spots. I’d love it if it was just normal to be able to navigate that more easily.

yosh, to random
@yosh@toot.yosh.is avatar

I feel like the most important thing anyone can work on is their sense of self. Like, it’s so important to understand what it is you like. Which values you hold. How you want to be perceived. How you perceive yourself. All of it.

Most recently I’ve been working on developing a sense of… space? My partner spurred this on, but I’ve kind of gotten into it since. Where it’s okay to create a space which feels uniquely your own. And I think as a result our home feels like a real home. It’s our home.

yosh,
@yosh@toot.yosh.is avatar

I had a friend who was very depressed for a while, and sort of at the bottom of it they had a realization which made them feel better, which they shared with me: It’s okay to not strive for big impressive achievements. Just being kind to those you meet is enough. Being a good person needs to be enough.

And like, I agree so much with it. It’s so easy to get caught up in whatever arbitrary next goal, that we forget about the people around us now. It’s better to be unremarkable than immiserating.

steve, to random
@steve@discuss.systems avatar

Idle thoughts: why on earth do colleges and universities allow students to double major? It's just a trap for overachieving students. In the best case, they get a degree they don't benefit from in any way and miss out on a more well-rounded and less-stressful college experience. Ain't nobody actually needs two undergraduate degrees, and we do students a disservice by letting them think it's some kind of achievement.

yosh,
@yosh@toot.yosh.is avatar

@steve Heh, yeah completely agree. At least for me the point of going to university always seemed like it should be to experience university life.

Figuring out who I was and what I liked always seemed more important to me than academic achievements. It seemed hard to replicate that environment later in life; whereas reading more books or writing more essays seemed relatively easy.

yosh, to random
@yosh@toot.yosh.is avatar

Okay, fine, I’ll bite. What’s “upvar”?

yosh, to random
@yosh@toot.yosh.is avatar

OH HELL YES, TRAIN NEWS!!!! 🚂✨✨

An informal agreement has been reached that trains in the EU will have to have switched to the EU standard rail gage and signaling system by 2040! That means every. Single. Train. in the EU will work on every single track in the EU.

We’re getting one step closer to the dream of transcontinental sleeper trains! Next station: official sign off from EU member states, with votes happening in March and April.

https://www.euractiv.com/section/transport/news/2023-the-year-europe-finalised-its-path-to-greener-transport/

The European Parliament lead on the file Dominique Riquet, a French lawmaker with the centrist Renew group, said with the new rules the EU is "creating the conditions for a shift towards more ecological transport modes, while stimulating the mobility of Europeans and the competitiveness of our economy". However, the centre-right EPP was less impressed, saying that the deal "falls short of our expectations and raises concerns about the real commitment of Member States to create a functioning European transport network". "National priorities jeopardise shared European goals, hindering an ambitious vision for rail," said the EPP's lead MEP on the file Barbara Thaler. "It goes against the EU's commitment to shift traffic from road to rail." The informal agreement will now need to be given the green light by member states and the European Parliament. A confirmation vote in the Parliament's transport committee is expected in March, with a plenary vote in April.

yosh,
@yosh@toot.yosh.is avatar

If this is the first time you’re hearing about gage and signaling interoperability issues in the EU —

— here is a good overview of the issues with the current state of European rail interop: https://youtu.be/Oxz4oY0T85Y

yosh,
@yosh@toot.yosh.is avatar

Oh I guess I completely forgot about the electric system issues 😅

I pulled this image from the video: this seems like it might require some effort.

yosh,
@yosh@toot.yosh.is avatar

I need to log off and go to bed. But also: ohhhhhhhh, a train connection from Copenhagen <-> Verona could actually happen!

https://transport.ec.europa.eu/transport-themes/infrastructure-and-investment/trans-european-transport-network-ten-t/scandinavian-mediterranean-corridor_en

yosh,
@yosh@toot.yosh.is avatar

Oh shooootttt, >200km/hr railway from Copenhagen <-> Stockholm might be on deck too it seems

Document 5 here:

https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:52022PC0384

yosh,
@yosh@toot.yosh.is avatar

@aslakr @sebwilken @jon my understanding is that changing track gauge in countries bordering Russia is less about what it enables, and more about what it prevents.

fasterthanlime, (edited ) to random
@fasterthanlime@hachyderm.io avatar

in an impressive failure of public transportation policy, it’s *about the same price and twice as fast to rent a car and drive to the airport, than to take public transportation + a shuttle (even if you live here)

edit: here’s the detailed breakdown: https://hachyderm.io/@fasterthanlime/111637882952516038

yosh,
@yosh@toot.yosh.is avatar

@fasterthanlime Car infrastructure is so heavily sponsored, it’s bizarre.

Pulling out my go-to infographic for this:

yosh, to random
@yosh@toot.yosh.is avatar

And I’m not even joking

❌ try…catch
✅ try…match

yosh, to random
@yosh@toot.yosh.is avatar

Oh cool, I missed this: Clippy now has a large_futures opt-in lint. If you’re managing async codebases of a reasonable size, this may be worth trying out!

If done right it can help you identify where large state machines are being created, and possibly also identify places where you can use Box to peel off code that’s only occasionally run.

https://rust-lang.github.io/rust-clippy/master/#/large_futures

yosh, to random
@yosh@toot.yosh.is avatar

From what I’m seeing now, both government agencies and consumer advocacy orgs are beginning to encourage organizations to publish roadmaps of how they plan to become memory safe.

I have no inside information on this, so I’m just speculating: but it feels like a first step towards potential regulations? Not sure on what timeline or what scope (e.g. unsafe code needs to be written somewhere). But with memory safety issues being responsible for so many vulnerabilities, it feels like it might stick

yosh,
@yosh@toot.yosh.is avatar

@xgranade yeahhhhh — I don’t think it’s ok to think of memory safety as just another feature or quality.

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