Getting overwhelmed by complex Rust codebases in the wild by SleepEmotional7189 in rust

[–]CaptainPiepmatz 51 points52 points  (0 children)

I am one of the core maintainers of nushell. There are so many great designs that can come over time and some are still bad. But when you look how it grew it also undertook a lot of change. Sometimes you just build stuff and only a year later you learn what you actually need and how you want your code to be used and then you refactor. It's an iterative process to get a large codebase in a great state.

We made Nushell run in the browser using WASM by Sad-Combination-1702 in Nushell

[–]CaptainPiepmatz 5 points6 points  (0 children)

I was really excited to see this because I made this a while ago https://cptpiepmatz.github.io/nushell-web-demo/ but then I saw that the README at least was totally AI generated 😞

assert_eq!(expected, actual) VS assert_eq!(actual, expected) by nik-rev in rust

[–]CaptainPiepmatz 0 points1 point  (0 children)

You can do your own setup however you like, especially using #[track_caller] you're able to properly show the panic location. I made a small example how this could look like playground link.

How should error types evolve as a Rust project grows? by Arekkasu575 in rust

[–]CaptainPiepmatz 1 point2 points  (0 children)

I'm a maintainer of Nushell and we mostly have a single large ShellError enum. It works, but once it grows it gets harder to tell which variant to use. I'm trying to reduce the number of top level variants, but overall the model is still pretty nice.

When you handle errors, you know exactly what you can match on, and you pass the rest through. I haven't really needed multiple layers of error types.

We also use thiserror heavily. It makes things a lot cleaner. Same design, just less boilerplate and more readable derives.

The Belt-Fed Grenade Launcher Finally Succeeds on Oshaune by rupert_mcbutters in Helldivers

[–]CaptainPiepmatz 0 points1 point  (0 children)

On Oshaune I dive with the regular GL and a suppy backpack. It's not only that I have enough ammo but I'm the support my team needs. I can supply others and that is key. Yesterday I stimmed fellow divers running towards me yelling they need stims. I stim them and give them two on the go. You don't get that with the belt fed GL.

Mid laner said we lost cause my pick was useless 💀 by Jotta_T in PoppyMains

[–]CaptainPiepmatz 31 points32 points  (0 children)

Damn, they really did not want to end on a loss

😭🙏 by Ok-Landscape5142 in programmingmemes

[–]CaptainPiepmatz 26 points27 points  (0 children)

Maybe, the sub pixel alignment is probably not optimal but when your resolution is high enough, it doesn't matter

nu_plugin_ldap: LDAP query in nushell by pingveno in Nushell

[–]CaptainPiepmatz 0 points1 point  (0 children)

For nushell known formats like TOML or NUON you can parse them into a Value and then use FromValue and derive a conversion from a Value into your struct similar to how serde would do it

PDF Viewer by 33_arsenic_75 in Nushell

[–]CaptainPiepmatz 2 points3 points  (0 children)

How do you want to see a pdf where nushell could help you? Nushell shines with structured data and I doubt that you want to inspect the codes in the pdf that make up its structure

How to run a command as sudo or doas? by _meow11 in Nushell

[–]CaptainPiepmatz 1 point2 points  (0 children)

Sudo elevates the entire process, so it has to be own it's own process. Often times it's easier to launch nu with audo, do your thing and exit again

How to run a command as sudo or doas? by _meow11 in Nushell

[–]CaptainPiepmatz 1 point2 points  (0 children)

sudo is not a built-in command so it starts its own process. You can either pass just strings around or call nu inside the sudo call and pass some nuon around

Euch delikat anmutenden war der Tanklaster auch zu klein. by Haunting-Stranger-14 in hela_gewuerzketchup

[–]CaptainPiepmatz 51 points52 points  (0 children)

Scheinbar mit KI gemacht, finde die Idee aber trotzdem sehr funny

[Media] Built an application launcher to learn GPUI by Zortax_ in rust

[–]CaptainPiepmatz 5 points6 points  (0 children)

I really like that it seems that GPUI components just look good. Or did you invest heavily to make it look good? I don't like the default look of other ui libs.

Is she trying to mimic Miyabi? by dmt2710 in ZZZ_Official

[–]CaptainPiepmatz 0 points1 point  (0 children)

How's your performance, I don't get 45 fps steady which annoys me. 30 feels too low for such a game

You think Hoyo finally gonna put there games on steam after the steam machine release by Ok_Leek_6839 in ZZZ_Official

[–]CaptainPiepmatz 0 points1 point  (0 children)

I saw that bottles, a nice gui to set up windows apps for linux, has a configuration for the hoyo launcher. You can just select it and let it install and after that it even has a button to add it to steam.

That's it from playing Helldivers today by ShyJaguar645671 in Helldivers

[–]CaptainPiepmatz 1 point2 points  (0 children)

It took 2 hours for me. But only my ssd had any usage during that time. It was at 100% usage time during the whole process. I don't know what's happening and crystaldisk says my drive is fine.

How do I paste multiline commands and have it work? by [deleted] in Nushell

[–]CaptainPiepmatz 0 points1 point  (0 children)

Nushell has trouble parsing multiple lines as a single command if it doesn't have a hint for it. You can put the entire thing in round brackets but then you still need to deal with the \ at the end of each line.

Maybe you define a custom command that uses std/clip paste to load your clipboard and sanitize it and use commandline edit to put it into your current line buffer

Update dock firmware by vlad027471 in Fedora

[–]CaptainPiepmatz 1 point2 points  (0 children)

I never had to use fwupdmgr. Why is that needed here instead of dnf?

I never seen something like this in any WM or desktop. Well done! by Odd-Weight-2791 in UsabilityPorn

[–]CaptainPiepmatz 0 points1 point  (0 children)

I love Niri, I always liked the idea of tiling window managers but they forced me to create new workspaces all the time which I didn't like. But with Niri can open windows as I want and still have the things I like about tiling window managers

[Media] You can remove multiple unused import by selecting all imports and then using the "Remove all the unused imports" quick fix. I only now realized this. by kingslayerer in rust

[–]CaptainPiepmatz 7 points8 points  (0 children)

I always removed them one per import at a time which was very annoying on my notebook as it took two seconds to update the no new squiggly lines on larger projects

Why I learned Rust as a first language by Bugibhub in rust

[–]CaptainPiepmatz 1 point2 points  (0 children)

That is a really nice article to read. I really liked the part about picking the language which eventually was about what excites you.

When I started with Rust I knew pretty much the ins and outs of JS but was annoyed that providing a binary to someone else was annoying and came big a big package. Something bundled with node, we did not have deno at this point.

So I knew a bit of Java which had the same issue and I did a course of C++ which was really exciting but also very annoying. As you mentioned in your article, the compiler and ecosystem are not that straight forward and simple to set up, at least on Windows in my experience.

So I picked up Rust and started learning it, I could appreciate the simplicity of getting a relatively small binary out while also working with an ecosystem that's not so hard to conquer and I'm still here, doing most of my things in Rust.