« first day (1870 days earlier)      last day (1620 days later) » 

 
7 hours later…
9:19 AM
@Stargateur Your version is better, you should go for it
 
9:47 AM
@Stargateur ROFL
 
11:20 AM
@SébastienRenauld amen.
 
 
1 hour later…
12:29 PM
Not my article but a very good one
 
 
2 hours later…
2:01 PM
Hey guys, I've been looking for a nice logging crate... I see a lot of them, and I think I like this one the most https://github.com/rust-lang/log
Do you know any other that it's nicer/better?
 
@Flashito log is not a logging crate...just an interface of logging crate :p
 
@Stargateur What I understood from your reply: There's logging built in in rust, and log is just a crate that makes it easier to work with?
 
no
it makes logging easier, but you still need another crate to log
 
oh.... I understand now
 
2:06 PM
Ah ok, I get it
 
there's a dependency towards log AND an logging crate (simplelog)
 
that's why I can see all those executables with logging
I see I see
hmmm now the question is... Are you guys using something like this? or do you have a better suggestion for logging?
 
I am using it (broot is one of my programs) but you may not need it. For simple cases you may just play with dbg!
What's your use case ?
 
I didn't know about dgb!, but I think you just discovered me a nice way to avoid having to print a lot of things
I need a proper logger though
I'm having a multi-threaded environment and I need to be able to identify threads and timestamps
 
Needing to identify threads is a bad smell IMO. You might have a too rigid or heavy use of threads
 
2:21 PM
Thanks for the info :)
@DenysSéguret Why would that be a bad smell? I like to have threads telling me their name
It makes it clearer for me to identify who's logging what. Why do you think it's a bad smell?
 
It might be about taste: I consider threads in rust to be light disposable entities, not something that should be fetishised or whose identity matters. Even when you're using an actor model, you don't need to identify threads but actors
When you distribute tasks to pool threads, what matters is the task
 
That's true
I'm actually identifying the actor, but I have one thread per actor
I do like your point
 
 
1 hour later…
3:52 PM
> Which language among Rust, Erlang, Haskell is fit for 100M users application
the magic language
on the magic computer
and the magic mathematic
 
I don't understand the question. How is the number of users mattering ?
 
4:06 PM
@Stargateur We should provide an honest answer: Rust is only capable of handling 99,999,999 users, 100M would be too much.
 
4:56 PM
Is there a canonical duplicate for this? stackoverflow.com/questions/59073701/…
 
5:24 PM
Nevermind, I've done it by myself
 
@FrenchBoiethios outch I'm not sure I agree with your answer :p
multi threading is very open minded
I don't think there is one and good way to do it
 
6:24 PM
@FrenchBoiethios You do realize that ` handle.join().unwrap()` in your question's code does return the String created in the thread? If it's a "single job" thread (i.e. only one result has to be returned), then I'd say using that mechanism is preferred over channels.
I'm also a bit torn on the question. "a idiomatic way" comes dangerously close to "opinion based". What about rephrasing the question to "What are idiomatic ways to send data between threads?". Then the answer could enumerate several ones.
 
 
1 hour later…
7:30 PM
@LukasKalbertodt As you wish. Please go for an answer, or you can edit mine and I'll make it a wiki answer. It is a nice idea to just take the result of join for the one shot computation also. TBH, I was tired to see the same question with Arc<T>s and other Rust anti-patterns. I know that my answer is far from perfect, tho.
@Stargateur Please add yours
 
@FrenchBoiethios I mean yeah, thanks for creating this Q&A to point people to. Immensely useful! Sorry if my message just sounded like I was critiquing you :P
Great edit of the question, thanks!
 
@FrenchBoiethios like I said I don't think there is a good answer also I don't think I skilled enough in multi threading in Rust
new phrasing is way better
 
@LukasKalbertodt I have said that a lot, but you have to try hard to trigger me :P
@Stargateur Note the question: how to SEND data. That means that the data "flows" in one direction. Using a synchronization variable like Mutex is an anti-pattern in this case.
Most of the time, the newcomers want an answer to this problem.
 
7:55 PM
@FrenchBoiethios How do you think channel work :p
 
@Stargateur For the user, that's a huge conceptual difference
 

« first day (1870 days earlier)      last day (1620 days later) »