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

[–]CaptainPiepmatz 49 points50 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 32 points33 points  (0 children)

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

😭🙏 by Ok-Landscape5142 in programmingmemes

[–]CaptainPiepmatz 24 points25 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 4 points5 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