251
13
submitted 3 years ago by Xophmeister@lemmy.world to c/rust@lemmy.ml
252
35
Open Sourcing Ferrocene (ferrous-systems.com)
submitted 3 years ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
253
6
.@eurorust is sold out! (cdn.fosstodon.org)
submitted 3 years ago* (last edited 3 years ago) by crabnebula@fosstodon.org to c/rust@lemmy.ml

.@eurorust is sold out!

This is your only chance to win a FREE virtual ticket!🎫👇

@rust @TauriApps

https://fosstodon.org/@crabnebula/111141727642280464

254
30
submitted 3 years ago by zquestz@lemm.ee to c/rust@lemmy.ml
255
49

This is the resource I've been looking for. I'm working my way through the book but it gets in the weeds really early. It's all fun and games and then chapter 4 just hits like a brick wall. Amos does a tremendous job explaining the why behind things, in a more wheels to the pavement way.

256
28
submitted 3 years ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
257
9
What does criterion measure (discuss.tchncs.de)
submitted 3 years ago by heimchen@discuss.tchncs.de to c/rust@lemmy.ml

I would like to benchmark my rustcode with criterion, but the information it presents to me do not match up. Here is some of the output I get

Benchmarking big/big decoding: Warming up for 1.0000 s
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 306.4s.
big/big decoding    	time:   [632.40 ns 724.40 ns 899.80 ns]
                    	change: [+0.7649% +16.645% +46.889%] (p = 0.04 < 0.05)
                    	Change within noise threshold.
Found 2 outliers among 10 measurements (20.00%)
  1 (10.00%) high mild
  1 (10.00%) high severe

If it took a criterion only 724.40 ns to run the code, why couldn’t it run the code 10 times in 5 seconds. I looked at the outliers in the browser and the one outlier took 1.5 microseconds to run so this could not be the problem.

258
7
submitted 3 years ago* (last edited 3 years ago) by nothingness@lemmy.world to c/rust@lemmy.ml

Is there any library for the queueing mechanism?

What's used by the most - Cron? But a task or rather script executed by Cron won't access to the context of an application. Meaning, a task will have be an independent unit. Whereas I want is a library to use inside a project such that it'll have access to everything.

Anything similar to Sidekiq exist in Rust?

259
14

Spacebar is an already existing, open-source reimplementation of the Discord.com API. Chorus aims to provide tooling to write software for and with Spacebar, using Rust.

Polyphony was born out of my desire to finally learn Rust, and to write a client-application for Spacebar with it. However, things are never as straightforward as they seem. I sadly had to discover, that already existing Discord-libraries did not provide the set of features needed to properly connect to, and interact with a Spacebar instance.

I have learned a lot in the past 4-5 months, in which I basically commited all my spare time to writing Rust and working on this project, and I am still learning a lot, daily. My greater motivation with this project is:

  • Enable Rust Developers to write Software for Spacebar
  • Eventually write my client in pure Rust, and to make it darn good
  • Provide an alternative server implementation to Spacebar-Server in Rust
  • Create tooling that can rival Matrixes Privacy and Security, while being as easy to use as Discord. I truly believe that self-hosted communications Software like Matrix is being held back through endless complexity, making it impossible to convince any layperson to actually give it a fair shot. Also, most of the Matrix clients I have tried so far are simply... not very user friendly. Our end-goal is to create free, open-source and easy-to-use software, which can provide secure communication for the masses.

This library is currently in an early alpha-stage. Most APIs should be stable, but nothing is guaranteed, up until the 1.0 release.

Please check out Chorus and the Polyphony GitHub-org here if you're so inclined, and perhaps leave a star and join our Discord server, if you'd like to follow the project more closely. :)

260
14
submitted 3 years ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
261
7
submitted 3 years ago by dessalines@lemmy.ml to c/rust@lemmy.ml
262
125
submitted 3 years ago by asal@lemmy.world to c/rust@lemmy.ml
263
8
submitted 3 years ago* (last edited 3 years ago) by calcopiritus@lemmy.world to c/rust@lemmy.ml

I want to do basically this:

struct MyStruct < T> {
    data: T
}

impl < T> for MyStruct < T> {
    fn foo() {
        println!("Generic")
    }
}

impl for MyStruct < u32> {
    fn foo() {
        println!("u32")
    }
}

I have tried doing

impl < T: !u32> for MyStruct < T> {
    ...
}

But it doesn't seem to work. I've also tried various things with traits but none of them seem to work. Is this even possible?

EDIT: Fixed formatting

264
20
submitted 3 years ago by sebsch@discuss.tchncs.de to c/rust@lemmy.ml
265
41
submitted 3 years ago by Sibbo@sopuli.xyz to c/rust@lemmy.ml
266
7
submitted 3 years ago by kixik@lemmy.ml to c/rust@lemmy.ml

comments on r/rust

267
11
submitted 3 years ago by kixik@lemmy.ml to c/rust@lemmy.ml

I've been reading a bit the tracing crate documentation, trying to find out if there's a way to rate limit logs.

What I refer with rate limiting, is that once a particular log has shown up with some frequency (x amount of times in a given time) then it won't be captured or shown anymore, until certain amount of time... This to avoid getting the logs space/buffer being eaten by just one, or a few high frequency errors for example.

Thanks !

268
46
submitted 3 years ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
269
19
submitted 3 years ago by uncle_agrey@lemmy.ml to c/rust@lemmy.ml

Hello, I really need help figuring out Rodio audio playback for a rust project. I need to play a short audio clip of a casino wheel turning a certain amount of times in a loop. When I run the main function, the program plays the audio clip once and then stops completely. If anybody who has used Rodio can give me help it would be greatly appreciated. Also, I have tried using a longer duration in the play_sound function but it doesn't change anything. Thank you

270
66
submitted 3 years ago by dessalines@lemmy.ml to c/rust@lemmy.ml
271
31
submitted 3 years ago by Sibbo@sopuli.xyz to c/rust@lemmy.ml
272
43
submitted 3 years ago by arashsm79@lemm.ee to c/rust@lemmy.ml
273
29
submitted 3 years ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
274
128
submitted 3 years ago by erlend_sh@lemmyrs.org to c/rust@lemmy.ml
275
64
submitted 3 years ago by wolf4ood@lemmy.ml to c/rust@lemmy.ml
view more: ‹ prev next ›

Rust Programming

9435 readers
1 users here now

founded 7 years ago
MODERATORS