@mo8it@fosstodon.org
@mo8it@fosstodon.org avatar

mo8it

@mo8it@fosstodon.org

A computer nerd passionate about #RustLang :ferris:

A #Rustlings maintainer 🦀

Working on my master's thesis in Computational Sciences in Mainz, Germany

I post about …
:ferris: #RustLang
:tux: #Linux
:opensource: #FOSS
📦️ #SelfHosting

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

hywan, (edited ) to rust
@hywan@fosstodon.org avatar

Faster linking times on nightly on Linux using `rust-lld, https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html.

> Here are more details from the ripgrep example mentioned above: linking is reduced 7x, resulting in a 40% reduction in end-to-end compilation times

tl;dr: Rust now packages a rust-lld linker (it’s LLVM’s lld), and uses it on Linux by default on nightly, which decreases compilation time greatly.

mo8it,
@mo8it@fosstodon.org avatar

@hywan Why not mold?

mo8it, to linux
@mo8it@fosstodon.org avatar

roomlab is an awesome wiki about some and topics:

https://roomlab.eu 🐧✨

by @potatomeow

swiftcoder, to rust
@swiftcoder@mastodon.social avatar

I guess a stealth MacOS update decided I don't get to use #rustlang anymore... How's your Monday?

mo8it,
@mo8it@fosstodon.org avatar

@swiftcoder Fedora Linux never did that to me :P

mo8it, to random
@mo8it@fosstodon.org avatar

Wasted hours setting up a Windows VM to debug a Windows terminal issue.

Windows 11 just refused to finish the setup…

Windows 10 needed multiple restarts to install all the ADs and spyware…

Then I had to install Git using the browser and click next 10 times… Just to experience that Git didn't work as I would expect. Some problem with linking probably…

I almost forgot how much Windows sucks.

If you are a developer and don't want to use Linux: Please, at least use WSL 🙃

mo8it,
@mo8it@fosstodon.org avatar

Oh, out of the box, Windows can't deal with symbolic links in Git repositories… Wonderful 🤦🏻

mo8it, to rust
@mo8it@fosstodon.org avatar

Announcing axum-ctx: Axum error handling library inspired by anyhow :ferris:

Documentation with examples 📚️
https://docs.rs/axum-ctx

The first screenshot shows the code without axum-ctx, the second one with it ✨

It lets you write concise "one-liners". Any chaining fans here? ⛓️🤩

I will write a blog post about it. But first, I would like to get some feedback here 🥰

#RustLang

With axum-ctx

bd103, to opensource
@bd103@hachyderm.io avatar

I'm happy to announce that I'll be participating in the Contributor's Guide working group alongside the wonderful TrialDragon, NthTensor, and more! We'll be writing a new section to the Bevy website covering all you need to know to contribute to the engine!

If you're a newcomer or an experienced contributor and would like to see a specific topic covered, please make sure to let us know! The goal is to consolidate all internal documentation into one singular source. :D

mo8it,
@mo8it@fosstodon.org avatar

@bd103 My wish is to keep the number of requirements low. No conventional commits, no signing of commits, etc.

niklaskorz, to rust
@niklaskorz@rheinneckar.social avatar

I'm happy to announce I will be speaking at this year. My talk is about Linon, a graphical application I began writing during my MSc studies at @uniheidelberg for interactively exploring the visual effects of continuous refraction or distortion of light rays. The application is based on , making heavy use of compute shaders.

https://rustfest.ch/talks/interactive-exploration-of-nonlinear-ray-casting-with-rust-and-wgpu/

mo8it,
@mo8it@fosstodon.org avatar
danielsreichenbach, to rust
@danielsreichenbach@mastodon.world avatar

I generally like #rustlang but I think every project developer should be forced to use it on a Raspberry Pi with 4GB RAM... had to build Vaultwarden (https://github.com/dani-garcia/vaultwarden) on one, and man,,, after 15 minutes compilation is no longer running because the device went OOM and now is so hot the fan is louder that a datacenter server...

Just to be clear, I think this is a Rust problem, not a project problem.

mo8it,
@mo8it@fosstodon.org avatar

@danielsreichenbach It is neither a Rust problem nor a project problem in my opinion. You shouldn't compile on a potato xD

Don't get me wrong, I love such boards, I even have one. But you can just cross compile and transfer the binary.

mo8it,
@mo8it@fosstodon.org avatar

@danielsreichenbach @FSMaxB These two lines cause the problem:

https://github.com/dani-garcia/vaultwarden/blob/0fe93edea6cb8d4b30416a6d319164f8828ad8b7/Cargo.toml#L172-L173

The devs opt in for more optimizations. But these optimizations consume more resources during compilation and make the compilation time longer.

Scrolling down, I found this custom profile which is optimized for compiling on systems with low resources:

https://github.com/dani-garcia/vaultwarden/blob/0fe93edea6cb8d4b30416a6d319164f8828ad8b7/Cargo.toml#L196

To use this custom profile, you need to pass --profile release-low to cargo build (instead of --release) or cargo install

ellie, to random
@ellie@hachyderm.io avatar

If you ever find yourself writing an issue comment like

> any news?

> plz add

> this is a dealbreaker

Please... don't. Give the op a 👍, and move on. It'll show up when maintainers sort by reactions, and avoids mildly unpleasant emails in our inboxes.

mo8it,
@mo8it@fosstodon.org avatar

@imsnif @ellie I might not have the same perspective since I newly became a maintainer of a project used by many (Rustlings). But the comments you both posted are normal communication comments for me (except the "deal breaker" one, it communicates frustration, but it is too harsh). Unless they are spammed, I would give a short answer and move on.

e.g. answer "I am focusing on releasing x now and would get back to this afterwards. My estimate is about 2 weeks"

mo8it,
@mo8it@fosstodon.org avatar

@imsnif @ellie Again, I don't want to compare with you, you maintain huge projects for a long time. I just want to understand why these comments are that annoying.

Especially if it is a PR, I remember my inpatient me who gets too excited sometimes about a contribution and can't wait for the maintainer to review it to maybe start the next one. I don't spam, but I sometimes ask kindly after about 2 weeks if there is something wrong. Sometimes things just get out of your radar.

mo8it, to rust
@mo8it@fosstodon.org avatar

v6 beta is here! 🤩🎉

Russtlings is an official Rust project offering a set of interactive exercises to practice 🦀

I have been working on the rewrite for about a month 😇
Now I hope to find some people willing to test the beta release and provide some feedback 🥰

You want to test it? 😃 Here are the instructions:
https://github.com/rust-lang/rustlings/tree/v6#getting-started

Issue for feedback ✍️
https://github.com/rust-lang/rustlings/issues/1960

A tiny demo of Rustlings v6 (beta) in Zellij

0xSim, to rust
@0xSim@hachyderm.io avatar

Love #rustlang, 8GB of dependencies to build a 2.8MB executable :|

mo8it,
@mo8it@fosstodon.org avatar

@0xSim The code of dependencies is in ~/.cargo/registry/src

You probably mean the target directory. This is the build directory where things are cached and so on. Its size is irrelevant.

prma, to random
@prma@fosstodon.org avatar

At this point, I think we should accept that there is no rule, not even rules of thumb governing over genders in German language. Each time some one suggest a rule, it takes less than 10 seconds to say:
"Actually, in 40% percent of cases this rule does not apply."

mo8it,
@mo8it@fosstodon.org avatar

@prma Tip: If you aren't sure if it is "der" or "das" but you know for sure that it is not "die", then you might be able to reformulate your sentence to make the word in "Dativ" so you can just use "dem" for both xD

Actually, even if you aren't sure if it is not "die", try to use "dem" with Dativ because your probability of being correct is 2/3 instead of 1/3 😂

mo8it, to rust
@mo8it@fosstodon.org avatar

Use --locked with cargo install or be prepared for random compilation errors at some point in the future.

Example:
https://github.com/rust-lang/rustlings/issues/1958

#RustLang

mo8it,
@mo8it@fosstodon.org avatar

@lx Because these errors should actually not happen if correct semantic versioning is applied. --locked means that you don't get any bug fixes.

I hope that cargo-semver-checks makes these errors even more rare in the future:

https://github.com/obi1kenobi/cargo-semver-checks

janriemer, to rust

C++ will be taken over by #Rust.

What will be the Rust-equivalent for #JavaScript?

I mean #TypeScript is a very good first step, but it's basically the C++ for C.

So in short:
C => C++
JavaScript ≈> TypeScript
C++ => #RustLang
JavaScript => ???

I think it will be a looong way to go, but maybe, maybe we'll see more and more #WebAssembly in the #frontend, but not quite sure yet.

#WASM #ProgrammingLanguage #CPlusPlus #C

mo8it,
@mo8it@fosstodon.org avatar

@janriemer Currently, TS is the best available option. WASM is the future, but it is not there yet. I mean, you get problems if you try to launch a thread…

mo8it,
@mo8it@fosstodon.org avatar

@janriemer I can't point to anything specific and don't have enough experience in WASM anyway.

I just found out that I can't run my program with egui in the browser, most probably because I spawn threads in it. But the debugging experience was… there was none. The error that I got said nothing, similar to the experience with a SEGFAULT. Something went wrong, no idea what.

Don't get me wrong, WASM is the future, but not the present for me.

prma, to rust
@prma@fosstodon.org avatar

Ok, I tried every single app under the sun for the learning genders in German.

I made something that works for myself.

I put the code and everything here:
https://sr.ht/~prma/DerDieDas/

Under GPL-3.

This little prompt is going to pop up every single time that I open my terminal (approximately 100 times per day).

mo8it,
@mo8it@fosstodon.org avatar

@prma Why? Could please share a comparison summary? :D

timClicks, to rust
@timClicks@mastodon.nz avatar

petition to add std::os::all_args() to the Rust standard library. all_args() returns Vec<String> avoiding the need to tell beginners about iterators, collect and Vec<_>.

please sign by adding a star this post.

mo8it,
@mo8it@fosstodon.org avatar

@timClicks In my opinion, collecting Args is the wrong method anyway. I see it used by some but they could have just used .next()

hongminhee, to Matrix
@hongminhee@todon.eu avatar

, a client app for , is pleasing to the eye and very convenient to use! Maybe it's because it's written in but it doesn't crash at all.

https://gitlab.gnome.org/World/fractal

mo8it,
@mo8it@fosstodon.org avatar

@SnorriSturluson @hongminhee Sounds like a Manjaro problem xD

Any errors?

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

mo8it,
@mo8it@fosstodon.org avatar

@TehPenguin Could you please use the RustLang tag? 🥰
Background: https://fosstodon.org/@mo8it/112056453394255413

ekuber, to rust
@ekuber@hachyderm.io avatar

Somewhat cursed #RustLang idea: "attributes at a distance"

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

mod foo {  
 struct Bar;  
}  

What would you use this for?

mo8it,
@mo8it@fosstodon.org avatar

@ekuber It will lead to a lot of confusion for no significant win. Effects that are very hard to track back.

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