2024-05-11 17:23:02
Accumulating Results in #Rust With Validated
https://beachape.com/blog/2016/10/24/accumulating-results-in-rust-with-validated/
Accumulating Results in #Rust With Validated
https://beachape.com/blog/2016/10/24/accumulating-results-in-rust-with-validated/
I have a question for those who know #rust. When I went to school I learned Assembly, ANSI C, Java, and Perl (oh... and Mathematica, but I'm trying to forget it). Then I learned VB (later .NET), C , and Python on my own. I've never been a full-time developer, but I will pick up an occasional pet project. Nearly everything I've done in the last 10 years has been in python.
Should I learn Rust? Are there new #programming concepts? Are there other reasons, as am #infosec professional, that make it worthwhile to run to an "Intro to Rust" class?
Oh right, I wrote a new #rustlang blog post about testing.
Rust Unit and Integration Testing in #RustRover
We're excited to share how #OpenTelemetry enhances observability in #Rust applications later today! 🦀
We'll be diving into setup and practical examples. Perfect for Rustaceans looking to elevate their monitoring game. Stay tuned for the full article!
Is it common in #Rust to have tests side-by-side with the implementations?
I like to minimize the size of binaries I build. Unremovable debugging strings annoyed me, so I've added an option to completely neuter `Debug::fmt` in #Rustlang
https://github.com/rust-lang/rust/pull
Open-sourcing our progress on #TailwindCSS v4.0 Alpha
It introduces #Oxide for faster builds, smaller footprints, #Rust integration, with a
We wrote a #Rust article about what we think the best ORM is 👀
Check it out: https://www.shuttle.rs/blog/2024/01/16/best-orm-rust
Just published my first #rust blog post for #jetbrains #RustRover about building your first web app.
Rust for C#/.NET Developers
#rustlang
New #RustLang projects are popping up all over the place. Many of them quickly reach feature parity with their non-Rust predecessors, then beat them both in functionality and performance. Seeing all this, it's hard not to think of Rust as a language that makes rapid development and deployment possible, and that outperforms other programming languages.
While I won't argue that Rust has its advantages, that's not the real reason here. In my opinion, it's all about its popularity. All the cool kids use Rust nowadays, and cool kids are precisely the kind of people who have time and energy to develop stuff rapidly. Add to that corporations investing in the next boom, and delivering a full-time paid workforce and funding, the culture of code reuse (i.e. sharing lots of crates), and last but not least, the benefit of starting from scratch.
Old folk like us, who barely manage enough energy to keep things alive, can't compete with that. However, we have one advantage. We don't care about being cool anymore. We aren't going to pack our bags and run after the next shiny thing, whenever the next best thing since sliced bread gets invented.
#Gentoo #OpenSource
Jest sobie zespół o nazwie Monolord, i ten zespół ma piosenkę (i album) pod tytułem "#Rust". Całkiem dobry kawałek muzyki. A do tego słowa "Jest tylko ból, nienawiść, chciwość i smutek" doskonale pasują do moich odczuć jako programisty (nieużywającego Mono, ani Rusta).
I'm happy to announce I will be speaking at #RustFestZurich this year. My talk is about Linon, a graphical #RustLang application I began writing during my MSc studies at @…
I won't name concrete issues, but I just had to post this to a #RustLang library issue regarding trouble with the C wrappers:
TIL about the #Rust “?" operator, which is shorthand for Error propagation in a method. If a call fails, the Error will be sent to the caller, and the method’s execution ends there. That's pretty neat.
Onto #rust lifetimes. It makes sense. Lifetime definitions imply the lifetime relationships between parameters and the return type. When you have branching logic and a potential for multiple paths, it's vital to pick a lifetime.
This video is about #Rust, but it's comments about error handling are valid for anyone in any language. PHP friends especially, this is the kind of stuff I've been ranting about for a while now. :-)
https://youtu.be/sbVxq7nNtgo
Ok, so I'm trying something out…
#XEMU #Xbox #OriginalXbox #Rust
I really like #rust shorthand syntax for constraints on parameters by using the sign with traits.
Hey everyone!
We wrote an article about implementing OpenAI and Qdrant to write our own RAG LLM powered web service in #Rust!
Check it out: https://www.shuttle.rs/blog/2024/02/28/rag
Ian Jackson: "How to use Rust on Debian (and Ubuntu, etc.)"
#rustlang
I won't name concrete issues, but I just had to post this to a #RustLang library issue regarding trouble with the C wrappers:
I’m learning about #rust traits today, which behave like interfaces. They can also have default implementations, which is cool. 😎
Was mir in der Berichterstattung über den tödlichen Unfall am Filmset von #Rust manchmal fehlt, ist die Tatsache, dass dieser ohne die laxen #Waffengesetze in den #USA niemals hätte passieren können.
I learned that #RustRover can detect logic improvements like De Morgan's Law in #Rust logic and recommend a change. That's pretty neat.
#RustLang is the perfect language for the "move fast, break things" era. No, I'm not implying it encourages you to break stuff. All I'm saying is that all these modern languages are specifically designed for that mindset. They optimize for corporate greed — nicely dressed as "valuing developer's time".
Developers aren't supposed to slow down and think things over. They should finish feature after feature, project after project, profit after profit. When things break, that's bad for profit. However, putting an effort to prevent things from breaking is not cost-effective.
People love to point out memory safety problems with C. However, there are two other important problems affecting C libraries — ABI and API stability. An uncontrolled ABI breakage means that existing programs suddenly breaks. An uncontrolled API breakage means that programs don't build anymore. Combine both and you're in a tight fit.
There are reasonably good solutions to both these problems. However, they require conscious effort, they require thinking — and that is costly. There are also cheap workarounds. If you link libraries statically, you don't need to worry about their ABI changes. If you vendor dependencies, you don't even need to worry about API changes. That's much cheaper for the company — though in reality, it just moves the burden down the line, to distribution developers and users, who end up fighting old, broken or even vulnerable vendored dependencies.
The problem with Rust and #Cargo is that it embraces these hacks into glorified 20M executables. Everything is linked statically, everything is vendored. You can move fast without actually breaking things — at least for the significant majority of users. To the minority, you always have the usual excuse — "we're sorry, we're just volunteers, we can't spend more energy on this, and you should get newer hardware anyway". Not that doing things better wouldn't benefit all users.
#Gentoo
Interested in trying out Rocket and #Rust? We've got you 👀 check out our article that does a deep dive into using the Rocket web framework as well as deployment!
https://www.shuttle.rs/blog/2023/12/13/usi…
what are the power-saving settings in a CPU?
like if you had a task scheduler and wanted to fill in a very low priority nice job
but only when the voltage isn't asleep
like is it per core?
how would you design a kernel for something silly like that?
I dunno but most #rust kernels aren't suspending cores right now, right?
It’s pretty neat in #Rust that type usage in multiple locations can be inferred from the return type of a function. So while you could explicitly set the types, you don't have to.
Continuing to experiment with #Rust, #RustRover, and some basic workflows. This time, I was able to read data from a `csv` and output it to the terminal in a pretty table.
This is a neat #rust compiler error. If you take a reference to an element in a list, it won't let you modify the collection because it might lead to a bug.
I look forward to the Putin/Trump response to this one.
"white house issues report that Rust is superior." - Low Level Learning
#rustlang
There's a band called Monolord, and they have a song (and an album) called "#Rust". And it's pretty good. And the lyrics "There's only pain, hate, greed and sorrow" definitely fits my feelings as a (not Rust, neither Mono) programmer.
#DoomMetal #StonerMetal #metal #MusicRecommendation
I do wish that #rust had picked a better symbol for mutable references other than `&mut`, maybe something like `&!` or `&&`.
Shadowing is a neat #Rust concept. It gives the illusion of mutability but with immutable variables. I'm reusing the `x` variable name.
Yesterday, someone recommended once_cell for #rust compared to !lazy_static, and it was a very good recommendation. This is much more straightforward.
Am I missing something or is it basically impossible to have `cargo update` actually select dependencies that are acceptable for the specific minimal `rust-version`? Like, even if you install old #RustLang version, `cargo update` from this version will update `Cargo.lock` to dependencies that require a newer Rust version and render the package non-buildable?
So yeah, I suppose you either end up requiring newer Rust (but you don't really know which version, since you don't know what's the highest minimal requirement in your dependencies), or you update `Cargo.lock` by hand. Such a great tooling!
#Gentoo
Learning to use `lazy_static` in #Rust and found that #RustRover helps visualize what type you're dealing with when working with pointers and references. Check out the inlay hints. They're great!
In a previous life, I was a big fan of #mutationtesting.
I found these two crates in #Rust for this:
* cargo-mutants: https://mutants.rs/
Extending #Rust's Effect System
https://blog.yoshuawuyts.com/extending-rusts-effect-system/
Learned how to increment a static count in #Rust and about the built-in AtomicI32 type. Also had other tries with the `unsafe` keyword and the use of Mutex.
#Rust is known to solve certain problems, but nothing is free, right? What are common mistakes you might see in a Rust codebase?
I just learned that #rustlang has a `bin` folder that allows you to create multiple executables from a single project, and now I think my 🧠 is broke.
https://doc.rust-lang.org/cargo/guide/
What’s neat about #JetBrains #Fleet is the polyglot nature of it. I'm writing a #rustlang library that I later consume in a
I love the #rustlang concept of building examples directly into crates as a first-class citizen. It fosters a mindset of thinking about other developers and being empathetic.
http://xion.io/post/code/rust-example
My dive into #Rust and its web ecosystem continues. This time, I'm using #Axum to serve HTML from an endpoint and sending static files from a directory.
The IDE I'm using is #JetBrains
This is a cool #rustlang project for accessing #SQL #databases.
https://