Tootfinder

Opt-in global Mastodon full text search. Join the index!

@frankel@mastodon.top
2024-05-11 17:23:02

Accumulating Results in #Rust With Validated
beachape.com/blog/2016/10/24/a

@Xavier@infosec.exchange
2024-03-09 17:58:24

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?

@frankel@mastodon.top
2024-05-09 17:11:11

What is in a #Rust #Allocator?
blog.sulami.xyz/posts/what-is-

@khalidabuhakmeh@mastodon.social
2024-04-02 22:35:39

Oh right, I wrote a new #rustlang blog post about testing.
Rust Unit and Integration Testing in #RustRover

@shuttle@mastodon.online
2024-04-10 09:00:13

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!

@frankel@mastodon.top
2024-05-03 17:18:03

Announcing #Rust 1.78.0
blog.rust-lang.org/2024/05/02/

@khalidabuhakmeh@mastodon.social
2024-03-07 18:47:00

Is it common in #Rust to have tests side-by-side with the implementations?

Side-by-side tests in Rust in RustRover
@kornel@mastodon.social
2024-04-14 19:23:53

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
github.com/rust-lang/rust/pull

@Ozzy@social.linux.pizza
2024-02-25 20:34:13

#rustlang may bring #linux to desktop 😂
blog.rust-lang.org/2024/02/19/…

@michabbb@social.vivaldi.net
2024-03-07 15:59:12

Open-sourcing our progress on #TailwindCSS v4.0 Alpha
It introduces #Oxide for faster builds, smaller footprints, #Rust integration, with a

@shuttle@mastodon.online
2024-03-02 19:51:34

We wrote a #Rust article about what we think the best ORM is 👀
Check it out: shuttle.rs/blog/2024/01/16/bes

@khalidabuhakmeh@mastodon.social
2024-02-28 12:28:29

Just published my first #rust blog post for #jetbrains #RustRover about building your first web app.

@smurthys@hachyderm.io
2024-03-21 11:13:34

Rust for C#/.NET Developers
#rustlang

@mgorny@social.treehouse.systems
2024-04-25 15:54:46

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

@mgorny@pol.social
2024-05-04 09:46:15

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

@niklaskorz@rheinneckar.social
2024-04-30 08:57:17

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

The background is a photo of the city of Zürich. On the right, there is a photo of Niklas, wearing a red suit, a white shirt and a black bow tie. On top of the background, there are the following texts:

Top-left: "RustFest Zürich"
Top-right: "21th to 22th June 2024"
Bottom-left: "Interactive Exploration of Nonlinear Ray Casting with Rust and wgpu"
Bottom-right: "Niklas Korz. Co-Founder of alugha GmbH."
@chrysn@chaos.social
2024-03-07 16:26:55

I won't name concrete issues, but I just had to post this to a #RustLang library issue regarding trouble with the C wrappers:

Meme based on the "Story of Darth Plaguseis" template:

Did you ever hear of ASAN?
I thought not. It's not a story Rust developers would need.
@khalidabuhakmeh@mastodon.social
2024-03-06 16:26:40

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.

Result propagation in Rust
@frankel@mastodon.top
2024-04-08 17:23:11

#XKCD comics is a game using #Rapier, a #Rust-based physics engine

@jtk@infosec.exchange
2024-05-10 12:42:54

Weekend Reads
* FCC open internet order analysis #FCC #DNS #ICANN #RustLang #DDoS

@khalidabuhakmeh@mastodon.social
2024-03-07 18:28:36

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.

fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
    if x.len() > y.len() {
        x
    } else {
        y
    }
}
@crell@phpc.social
2024-02-21 05:05:37

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. :-)
youtu.be/sbVxq7nNtgo

@ThePinkHacker@social.linux.pizza
2024-05-09 23:02:54

Ok, so I'm trying something out…
#XEMU #Xbox #OriginalXbox #Rust

A XEMU window that just contains the text "Hello from Rust!"
@khalidabuhakmeh@mastodon.social
2024-03-07 18:03:51

I really like #rust shorthand syntax for constraints on parameters by using the sign with traits.

pub fn some_func(item: impl SomeTrait + OtherTrait) -> bool {
    item.some_function() && item.other_function()
}
@shuttle@mastodon.online
2024-02-29 01:50:03

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: shuttle.rs/blog/2024/02/28/rag

@grifferz@social.bitfolk.com
2024-03-21 21:21:44

Ian Jackson: "How to use Rust on Debian (and Ubuntu, etc.)"
#rustlang

@chrysn@chaos.social
2024-03-07 16:26:55

I won't name concrete issues, but I just had to post this to a #RustLang library issue regarding trouble with the C wrappers:

Meme based on the "Story of Darth Plaguseis" template:

Did you ever hear of ASAN?
I thought not. It's not a story Rust developers would need.
@khalidabuhakmeh@mastodon.social
2024-03-07 16:27:05

I’m learning about #rust traits today, which behave like interfaces. They can also have default implementations, which is cool. 😎

pub trait Summary {
    fn summarize(&self) -> String {
        String
@MBrandtner@gruene.social
2024-04-17 11:24:38

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.

@frankel@mastodon.top
2024-02-22 09:09:00

#Rust #Tooling: 8 tools that will increase your productivity
dev.to/shuttle…

@khalidabuhakmeh@mastodon.social
2024-03-07 21:10:18

I still think ownership transfer will be the most challenging part of wrapping my brain around #rust, especially with nearly two decades of #dotnet programming.
The shoe collection ownership is passed to the function, so it can't be used after the function call.

let shoes = vec![
            Shoe { size: 10, style: String
@cyrevolt@mastodon.social
2024-02-13 11:22:45

A #poem
This cannot be true
You make my buffer overflow
Though I am written in #Rust,
Give you all my trust,
Call you with 'unsafe', - oh
And take input from you.

@khalidabuhakmeh@mastodon.social
2024-03-05 14:54:22

I learned that #RustRover can detect logic improvements like De Morgan's Law in #Rust logic and recommend a change. That's pretty neat.

De Morgan’s law improvement in Rust code with RustRover
@mgorny@social.treehouse.systems
2024-03-05 20:04:14

#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

@shuttle@mastodon.online
2024-02-25 19:28:02

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!
shuttle.rs/blog/2023/12/13/usi…

@risottobias@tech.lgbt
2024-04-12 18:53:43

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?

@frankel@mastodon.top
2024-04-21 19:07:32

I wrote previously about libs for error management in #Rust. This week, I want to write about the #try block, an experimental feature.

@crell@phpc.social
2024-03-22 04:29:06

Type driven design in #Rust.
Most of these concepts apply in any language, subject to the limitations of the language's type system. The better the type system, the more logic you can push into the type system and thus out of runtime.

@khalidabuhakmeh@mastodon.social
2024-03-04 19:24:16

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.

Rust code starts here:

fn read_pizzas() -> Vec<Pizza> {
    let mut reader = csv
@khalidabuhakmeh@mastodon.social
2024-03-04 15:42:46

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.

CSV table output with Rust and RustRover
@khalidabuhakmeh@mastodon.social
2024-03-06 14:26:13

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.

Cannot borrow mutable because it is also borrowed as immutable.
@grifferz@social.bitfolk.com
2024-02-28 14:26:16

I look forward to the Putin/Trump response to this one.
"white house issues report that Rust is superior." - Low Level Learning
#rustlang

@khalidabuhakmeh@mastodon.social
2024-03-04 19:44:54

I like the #rust, it gives me avenues to explore the ecosystem.

crates.io site
@crell@phpc.social
2024-03-22 04:29:06

Type driven design in #Rust.
Most of these concepts apply in any language, subject to the limitations of the language's type system. The better the type system, the more logic you can push into the type system and thus out of runtime.

@frankel@mastodon.top
2024-03-02 17:15:00

#Pingora is a #Rust framework to build fast, reliable and programmable networked systems.
Pingora is battle tested as it has been serving more than 40 million Internet requests per second for more than a few years.

@mgorny@social.treehouse.systems
2024-05-04 09:46:17

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

@khalidabuhakmeh@mastodon.social
2024-03-05 19:15:37

I do wish that #rust had picked a better symbol for mutable references other than `&mut`, maybe something like `&!` or `&&`.

print_months(&months);
    print_months_reversed(&mut months);
    print_months(&months);
@mgorny@pol.social
2024-03-28 18:17:20

#RustLang idzie super!
Pewnie słyszałoście, że #uv jest przyszłością instalowania paczek Pythona. Niestety, pośrednio zależny jest od crate "ring". Ring używa sporo nieprzenośnego C/asemblera, więc działa tylko na kilku architekturach (znacznie wężej niż sam Rust, a na Rusta narzekałem…).
No…

@khalidabuhakmeh@mastodon.social
2024-03-05 14:12:15

Shadowing is a neat #Rust concept. It gives the illusion of mutability but with immutable variables. I'm reusing the `x` variable name.

fn main() {
    let x = 5;

    let x = x + 1;

    let x = x * 2;

    println!("The value of x is: {}", x); // outputs 12
}
@Ozzy@social.linux.pizza
2024-02-14 23:02:45

#cpp #rust #rustlang

@khalidabuhakmeh@mastodon.social
2024-03-05 17:32:26

Yesterday, someone recommended once_cell for #rust compared to !lazy_static, and it was a very good recommendation. This is much more straightforward.

static PIZZAS: once_cell
@khalidabuhakmeh@mastodon.social
2024-03-05 15:44:29

I learned you can use the `break` inside a `loop` to return a value. It feels strange coming to #Rust from #csharp. I would have expected to use the `return` keyword, but I guess it makes sense.
By the way, I'm taking the

Break within a loop returning a value.
@mgorny@social.treehouse.systems
2024-05-05 13:21:29

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

@khalidabuhakmeh@mastodon.social
2024-03-04 18:20:28

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!

Inlay hints changing types
@frankel@mastodon.top
2024-04-28 07:24:45

In a previous life, I was a big fan of #mutationtesting.
I found these two crates in #Rust for this:
* cargo-mutants: mutants.rs/

@khalidabuhakmeh@mastodon.social
2024-03-04 19:54:30

In #csharp, the "YOLO" operator is the “!" symbol, but in #Rust, it's the "?" symbol. Oh this is going to mess with my brain isn't it?

fn main() {
    let connection = Connection
@khalidabuhakmeh@mastodon.social
2024-04-03 18:53:48

This is pretty cool. I'm calling #rustlang from #dotnet. That said, there's a lot to think about when it comes to this interop-style code, especially the memory handoff.

C sharp code calling Rust library
Rust code with exports so it can be consumed from a .NET application
@frankel@mastodon.top
2024-02-13 17:28:06

Extending #Rust's Effect System
blog.yoshuawuyts.com/extending

@khalidabuhakmeh@mastodon.social
2024-04-03 18:53:48

This is pretty cool. I'm calling #rustlang from #dotnet. That said, there's a lot to think about when it comes to this interop-style code, especially the memory handoff.

C sharp code calling Rust library
Rust code with exports so it can be consumed from a .NET application
@khalidabuhakmeh@mastodon.social
2024-02-17 17:13:34

#rust

@khalidabuhakmeh@mastodon.social
2024-02-25 18:19:00

Hey @…, check this out. #rust

@shuttle@mastodon.online
2024-04-16 20:00:04

Tomorrow, Maxwell Flitton will be covering how to use #docker as a private crates registry that you define in your #rust cargo.toml, end to end testing, and the concept of nanoservices. 🚀
Get notified when we’re live 🔔

@khalidabuhakmeh@mastodon.social
2024-02-21 18:52:11

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 Code sample in Rust Rover

Code is:

use std
@khalidabuhakmeh@mastodon.social
2024-02-16 21:23:01

Not going to lie. This is going to take some getting used to in #rust coming from the land of #dotnet

In Rust, the semicolon ; is used to separate statements. It denotes the end of one statement and the beginning of another. Rust is an expression-oriented language, which means that most things in Rust are expressions that return a value. However, if you place a semicolon ; at the end of an expression, it becomes a statement -- and statements do not return values.
@khalidabuhakmeh@mastodon.social
2024-02-16 21:23:01

Not going to lie. This is going to take some getting used to in #rust coming from the land of #dotnet

In Rust, the semicolon ; is used to separate statements. It denotes the end of one statement and the beginning of another. Rust is an expression-oriented language, which means that most things in Rust are expressions that return a value. However, if you place a semicolon ; at the end of an expression, it becomes a statement -- and statements do not return values.
@khalidabuhakmeh@mastodon.social
2024-03-13 00:30:05

Cool #rustlang post about iterators by @…

@khalidabuhakmeh@mastodon.social
2024-03-18 18:39:06

I found this really cool repo for particle simulations in #rustlang using the #bevy game engine.

Rust particle simulator.
@frankel@mastodon.top
2024-02-15 08:33:14

From #Go to #Rust: The Two Types of #Readable Code

@khalidabuhakmeh@mastodon.social
2024-02-21 19:13:45

It turns out that #Rust has something similar to extension methods in #csharp. You can create additional implementations outside of type definitions to include more functionality at the call site.
Update: not traits 😅

Rust traits implementation in RustRover

—

struct Person {
    first_name: String,
    last_name: String,
}

impl Person
{
    fn hello(&self) {
        println!("Hi, my name is {} {}",
                 &self.first_name, &self.last_name)
    }
}

fn main()
{
    let me = Person {
        first_name: String
@khalidabuhakmeh@mastodon.social
2024-02-21 12:48:51

#Rust is known to solve certain problems, but nothing is free, right? What are common mistakes you might see in a Rust codebase?

@khalidabuhakmeh@mastodon.social
2024-03-15 13:26:19

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.
doc.rust-lang.org/cargo/guide/

Package Layout: https://doc.rust-lang.org/cargo/guide/project-layout.html
@khalidabuhakmeh@mastodon.social
2024-04-03 14:35:36

What’s neat about #JetBrains #Fleet is the polyglot nature of it. I'm writing a #rustlang library that I later consume in a

Fleet showing Rust and C# code.
@khalidabuhakmeh@mastodon.social
2024-03-15 13:29:38

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.
xion.io/post/code/rust-example

@khalidabuhakmeh@mastodon.social
2024-02-20 19:52:49

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

JetBrains RustRover running Axum web application
@khalidabuhakmeh@mastodon.social
2024-02-20 23:26:09

Can someone explain #rust lifetimes to me? Coming from #csharp my brain sees generics.

@khalidabuhakmeh@mastodon.social
2024-02-19 15:02:38

Hey #rust folks, I'm trying to figure out how to handle invalid form submissions with #rocket. There's a global catcher that returns a 422 (unprocessible entity), but I'd like to be able to handle a form post for a specific endpoint.

@khalidabuhakmeh@mastodon.social
2024-03-14 18:52:29

This is a cool #rustlang project for accessing #SQL #databases.