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

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 ๐Ÿฅฐ

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

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 .

What will be the Rust-equivalent for ?

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

So in short:
C => C++
JavaScript โ‰ˆ> TypeScript
C++ =>
JavaScript => ???

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

#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! officially supports 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...

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

kubikpixel, to rust
@kubikpixel@chaos.social avatar

ยปTree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited.ยซ

Do any of you developers use this and does it give you a big structured advantage?

๐ŸŒณ https://tree-sitter.github.io/tree-sitter/

โ€”

mo8it,
@mo8it@fosstodon.org avatar

@kubikpixel Yeah, I used it in Neovim (manual configuration, waste of time) and now now use it in Helix (built-in) :D

mo8it, to rust
@mo8it@fosstodon.org avatar

New release by @rusticorn ๐ŸŽ‰

https://github.com/extrawurst/gitui/releases/tag/v0.26.0

GitUI is a terminal UI written in with ๐Ÿญ

The new version adds support for signing commits โœจ

mo8it,
@mo8it@fosstodon.org avatar

@happyborg @rusticorn Should be this issue:

https://github.com/extrawurst/gitui/issues/2098

Until then, cargo install gitui --locked works :)

kubikpixel, to rust
@kubikpixel@chaos.social avatar

I'm thinking about switching from Axum to Ntex for web development in Rust. Since it seems to have the same functionality but is faster than Axum framework, this could be a possibility for a new project. What is your experience or opinion on this? ๐Ÿค”๐Ÿฆ€

๐Ÿš€ https://ntex.rs

โ€“

mo8it,
@mo8it@fosstodon.org avatar

@kubikpixel My opinion: It looks like the original Actix author is reinventing the wheel after rage quitting from Actix.

I don't think that we should listen to micro-benchmarks. It could be the fastest but highly optimized for this kind of micro-benchmark, or not safe and proven, or doesn't offer the same set of features. I don't see a reason to take a look at yet another framework.

mo8it, to rust
@mo8it@fosstodon.org avatar

My proposal to add support for third-party exercises to ๐Ÿฆ€

https://rust-lang.zulipchat.com/#narrow/stream/334454-rustlings/topic/Proposal.3A.20Third-party.20exercises/near/432782898

Feedback is welcome, especially if you think about providing third-party exercises for your crate(s) ๐Ÿ˜‡

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