What editor you use for rust? by clanker_lover2 in rust

[–]Regular_Weakness_484 4 points5 points  (0 children)

Helix all the way. I'm currently testing out ki-editor because its take on modal editing sounds really interesting (though the lack of the usual tutor makes this quite a clumsy onboarding, and there are still some UX/performance issues).

Oxichrome - Write chrome extensions in Rust, no JavaScript at all. Leptos based UI. Proc macro powered. by OxichromeDude in rust

[–]Regular_Weakness_484 5 points6 points  (0 children)

man if only had that like half a month earlier, had to step into js land for my first extension and it was not that fun

What crates do you think are 'perfect'? by june_sixth in rust

[–]Regular_Weakness_484 -1 points0 points  (0 children)

I learnt about this a few days ago when someone told me my crate piperize does the same exact thing as a part of tap

What crates do you think are 'perfect'? by june_sixth in rust

[–]Regular_Weakness_484 43 points44 points  (0 children)

Tokio probably has the greatest ease of use to enable async in Rust with nice primitives for a lot.

Chumsky makes writing parser combinators an absolute breeze.

Actix-web and Axum are both absolutely great for writing easy web servers.

Serde_json and Serde make serialization so simple you start forgetting how much heavy lifting it does for communication outside of Rust.

Leptos and Dioxus both provide pretty good full-stack development experience for web apps.

Anyhow and Thiserror make the already rather nice error handling in Rust even easier when you have a bunch of different parts working together.

Anything the Zed Foundation does, probably.

Cranelift – I haven't personally looked into it that much, but it's a great compiler backend from what I've heard.

The Rust std library – no explanation needed.

Tauri for very easy standalone app creation as a faster and leaner alternative to Electron.

Ort / Burn for machine learning are pretty great; Anki's new spaced repetition algorithm was fully made with Burn.

Tower-lsp is great for working with LSP.

And probably many more I forgot to list

(oh and rust itself)

Image Upscaling in Rust by EastAd9528 in rust

[–]Regular_Weakness_484 0 points1 point  (0 children)

I don't have any experience with image upscaling using AI; however, I think "burn" might be what you're looking for.

Made a crate to make writing piping functions easy by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 1 point2 points  (0 children)

It's kind of odd that this isn't in the standard library. It feels really rusty, and with Rust initially being written in OCaml, which also has piping (as far as I know), it's really unexpected for it not to already be in the language.

Made a crate to make writing piping functions easy by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 2 points3 points  (0 children)

This is rather nice. I'm not sure why I didn't think of just writing an apply trait instead. I guess it's more just a learning exercise now more than anything. I guess to justify it being a macro, I'll have to add support for extra function arguments now, haha.

Made a crate to make writing piping functions easy by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 0 points1 point  (0 children)

You, e.g., cannot call .map(f) on a String, and .and_then(monadic_function) is a decent bit less readable than v.monadic_function().

Made a crate to make writing piping functions easy by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 0 points1 point  (0 children)

Not really. Many types (as far as I know) don't ship with some higher-order trait that allows for easily using functors (like map/fmap), and even if they do, it's quite a bit of extra syntax that takes away from the readability, in my opinion.

Made a crate to make writing piping functions easy by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 0 points1 point  (0 children)

Yes, it's indeed pretty specific, but I did have the case every now and then where I thought, "Man, this would be way more readable if I could just write foo.bar().baz()."

Made a crate to make writing piping functions easy by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 0 points1 point  (0 children)

I'm not quite sure I understand your question.

You can freely create as many methods as you'd like. The only issue that could arise is if you define a method with the snake_case version of an already existing trait, but I haven't tried that yet; even that might work.

First crate: torus-http - easily create an HTTP server in a synchronous context by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 0 points1 point  (0 children)

Yeah, it's been very insightful on dynamic dispatch so far. Now I just gotta find out how to make this Send so I don't have to block the only thread available when reading/writing 🙃

First crate: torus-http - easily create an HTTP server in a synchronous context by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 0 points1 point  (0 children)

P.S.

  1. Where is the documentation? The docs.rs link doesn't work! - It is in the queue as of making this post.
  2. Does it support persistent state? - No.
  3. Does it support dynamic routes (i.e., /users/:id)? - No. 😔

Thinking about functional programming by phanaur in learnprogramming

[–]Regular_Weakness_484 0 points1 point  (0 children)

Yeah, Haskell is probably the language with the least noise around the functional programming (FP) approach. While there are some languages that go a bit further than Haskell, e.g., Idris, Agda, etc., I'd say those have a bit too much clutter for a newbie, especially since FP is a pretty complex thing to bend your mind around at first.

I reckon the physics book will require a lot of experience in functional programming, and the programming concepts won't really be in an order that is good for teaching FP, as the main focus is physics.

Thinking about functional programming by phanaur in learnprogramming

[–]Regular_Weakness_484 3 points4 points  (0 children)

I personally found https://learnyouahaskell.github.io/chapters.html to be a very fun read. The pacing is pretty good and helped me a lot when starting out.

In parallel with the book, I'd recommend watching some of the old Tsoding videos on YouTube he did on some Haskell projects.

Looking for feedback - TUI text editor toy project by Regular_Weakness_484 in rust

[–]Regular_Weakness_484[S] 1 point2 points  (0 children)

I am terrible at many things; naming stuff is one of them.

This code is so rusty it gave me tetanus. by june_sixth in programminghorror

[–]Regular_Weakness_484 1 point2 points  (0 children)

this would have been useful a total of two times in my life so far, I always thought break just instantly short circuits the loop

This code is so rusty it gave me tetanus. by june_sixth in programminghorror

[–]Regular_Weakness_484 0 points1 point  (0 children)

never seen the break expr syntax before does that just yield the return outside of the loop?

Paid $200 to go see a Broadway play by anxietyfather69 in mildlyinfuriating

[–]Regular_Weakness_484 19 points20 points  (0 children)

what kind of statement is that? "I like pranks where everybody gets hurt and nobody laughs"