@TehPenguin@hachyderm.io
@TehPenguin@hachyderm.io avatar

TehPenguin

@TehPenguin@hachyderm.io

Microsoft Dev bringing Rust to Windows and Azure. D&D nerd and Audi fanboi. Thoughts, opinions and words are my own. He/Him. :rust: :csharp: :cxx:

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

TehPenguin, to DnD
@TehPenguin@hachyderm.io avatar

Gotta love the Animate Objects spell: "I need you to make a contested Athletics check against the dresser"

https://pca.st/episode/8e777cb6-1424-416c-9f85-0689983223d1

#dnd #ttrpg

TehPenguin, to random
@TehPenguin@hachyderm.io avatar

I've been helping to investigate a few LLVM and Rust bugs recently, and I keep running into pet peeves with how these bugs are reported, so I'm going to put together some

I don't want to discourage anyone from filing a bug, please do! But... be aware with how you represent the issue that you're seeing.

I also know that there are folks on here who are vastly more knowledgeable than I am, so feel free to suggest corrections, perhaps by filing some sort of report...

TehPenguin,
@TehPenguin@hachyderm.io avatar

If you're going to claim something is a security issue, please explain what the attacker has gained by exploiting the bug. That is, what they can now do they couldn't before.

If you can't explain what the attacker has gained, then that's not a security bug, that's just sparkling MS07-052 (https://web.archive.org/web/20100930203109/http://blogs.msdn.com/b/oldnewthing/archive/2007/08/07/4268706.aspx#4282521)

TehPenguin,
@TehPenguin@hachyderm.io avatar

If the feature has docs, then please explain how the actual behavior doesn't match the docs.

If you don't like how the feature works, that's not a bug, but you can still ask for the feature to be changed.

If there are no docs, or there's a gap, then please help to fill that gap (adding your own observations in the bug report are a good start).

TehPenguin,
@TehPenguin@hachyderm.io avatar

The more specific you can be on when a regression occurred, the better. A range of versions is good, a single version is great, a single commit is amazing.

Tools like git bisect are really helpful for this.

Providing a standalone example that reproduces the issue so that someone else can do that work is also great, with the bonus that it can be added to the regression tests.

orhun, to random
@orhun@fosstodon.org avatar

why Rust? this guy knows

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

I've begun the process of switch Rust's Windows CI to Server 2022, starting with the mingw builders: https://github.com/rust-lang/rust/pull/124562

This was tried a couple of years ago, but there some issues with mingw - so kudos to the folks that investigated and fixed those (sorry that I don't have links)!

Next step, the MSVC builders, which will require bumping the version of Clang that's used to build LLVM first...

TehPenguin,
@TehPenguin@hachyderm.io avatar

Fully on Server 2022 and using the latest Clang https://github.com/rust-lang/rust/pull/124850

It'll be interesting to see if 1.80 has improved build times on Windows now that it's using an up-to-date Clang to build LLVM...

TehPenguin,
@TehPenguin@hachyderm.io avatar

Which is all, of course, part of the Grand Master Plan™️ to get Arm64EC promoted to tier 2 https://github.com/rust-lang/compiler-team/issues/746

#RustLang #Rust #windows

TehPenguin, to rust
@TehPenguin@hachyderm.io avatar

When posting your programming language comparison article, can you please include the context of your comparison?

"Rust vs Python, which is better? "
"Sir, this is a kernel"

"Why I switched from C++ to Go"
Taps sign: "No GC or green threads in the kernel"

Sincerely, a systems dev who'd like to remind you that APIs existed before REST...

TehPenguin, to random
@TehPenguin@hachyderm.io avatar

Gets email reminder for internal training.
Clicks link.
Video has 1/5 star rating, 259 reviews.
Well, this is going to be fun...

TehPenguin, to llvm
@TehPenguin@hachyderm.io avatar

Glad sanity prevailed with this one https://github.com/llvm/llvm-project/pull/90520

Just a reminder that loading dlls from the application directory is not a security vulnerability.

But restricting the search path to System32 for well know dlls is not a bad idea...

TehPenguin, to rust
@TehPenguin@hachyderm.io avatar

Only took it a couple of years, but the cc-rs crate will finally use the spectre-mitigated CRT if you're building in a spectre-mitigated VS Command Prompt (or happen to set the correct env var): https://github.com/rust-lang/cc-rs/pull/673

It'll be a while before this flows into the Rust Compiler itself, so in the meantime we did publish a crate to do the same thing: https://crates.io/crates/msvc_spectre_libs

renedudfield, to rust
@renedudfield@fosstodon.org avatar

Was crate digging for no_std goodies, because miserable outside today. Morning was great but 🌞

Some cool stuff in there.
And then I saw a yak.
That needed shaving.
And where did the day go?

TehPenguin,
@TehPenguin@hachyderm.io avatar

@renedudfield any fun crates to shout out?

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

Finally, it's done! #rust officially supports #arm64ec https://github.com/rust-lang/rust/pull/123144

Of course there's still more work to do - file an MCP to promote to tier 2, add tests to various dependencies...

#RustLang #Windows

TehPenguin,
@TehPenguin@hachyderm.io avatar

@thejpster @yosh except that Arm64EC doesn't just use the AArch64 instruction set. Yes, that's what LLVM generates for it, but a single Arm64EC binary can contain a mixture of (modified) AArch64 and x64. It'd also be legit for LLVM to produce only x64 and then have the linker link that as Arm64EC (such that it wouldn't run on x64 Windows).

Arm64EC is... weird. I've tried my best to provide guidance on how to think about it: https://doc.rust-lang.org/nightly/rustc/platform-support/arm64ec-pc-windows-msvc.html#reusing-code-from-other-architectures---x86_64-or-aarch64

TehPenguin,
@TehPenguin@hachyderm.io avatar

@thejpster @yosh just to confuse things more, there's also Arm64X, which is where you mush AArch64 and Arm64EC into a single binary: https://learn.microsoft.com/en-us/windows/arm/arm64x-pe

It also has my favorite diagram from any Microsoft tech docs:

Basmitharts, to random
@Basmitharts@weird.autos avatar

Trying to think of a contemporary sedan that wouldn't be improved by having a hatch instead of a trunk.

The Charger I suppose...

TehPenguin,
@TehPenguin@hachyderm.io avatar

@Basmitharts very annoyed they didn't give the Audi e-tron GT a hatch, I mean the RS7 is sitting right there! Use the exact same back end and I'd be happy...

TehPenguin, to rust
@TehPenguin@hachyderm.io avatar

The Xr0 project (https://xr0.dev) that got called out in the last This Week in reminds me of the old Checked C project (https://github.com/microsoft/checkedc) from Microsoft Research.

I really hope that some project like this takes off, there's so much low-hanging fruit when it comes to #C safety.

My worry with Xr0 is the lack of back-compat, Checked C was designed so the new keywords it introduced could be turned into no-ops via macros to allow code to be built by an unenlightened compiler.

TehPenguin, to rust
@TehPenguin@hachyderm.io avatar

It took me days to debug this, but I'm finally one step closer to supporting Arm64EC on : https://github.com/rust-lang/rust/pull/123467

Unfortunately there's one more fix needed in so it may take a little while longer yet...

TehPenguin, to folklore
@TehPenguin@hachyderm.io avatar

My 3yr old just called St Patrick's Day "Leprechauns' Day" and I'm all for it.

Question is, how best to celebrate the Fair Folk on this day?

TehPenguin, to rust
@TehPenguin@hachyderm.io avatar

The saga of updating cc-rs in the repo continues...
First there was a Linux host issue: https://github.com/rust-lang/cc-rs/issues/913
Then MacOS host: https://github.com/rust-lang/cc-rs/issues/902
Then FreeBSD host: https://github.com/rust-lang/cc-rs/issues/945
And now Android target: https://github.com/rust-lang/cc-rs/issues/990

Turns out that cross platform is hard...

TehPenguin, to cpp
@TehPenguin@hachyderm.io avatar

I think the most interesting thing about the White House announcement today is the discussion of software metrics. Anyone who's had to deal with "enterprise" software has experienced the CIO buying some slideware which you then have to use/manage/secure. It'd be nice to point to a set of industry standard metrics and say "how about we don't buy the thing with a negative ROI... "

https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/

TehPenguin,
@TehPenguin@hachyderm.io avatar

It also means that execs can't just pay lip service to improving quality, reliability and security of their products since customers and investors will hold them accountable when the metrics don't improve.

TehPenguin,
@TehPenguin@hachyderm.io avatar

But, if they're the wrong metrics, then we'll be back in the world of paying per LOC or bug fixed...

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