« first day (1841 days earlier)      last day (1868 days later) » 

08:03
There's currently no way (except using lazy_static/once_cell) to have a static string built with format ?
 
2 hours later…
10:16
Since Option is an IntoIterator you can send an empty iterator for your case like this : print_iter(Some(None)) , PlaygroundÖmer Erden 1 min ago
Hi all, is this a good practice for this case or just an ugly hack, what do you think ?
It's not really better than using the turbo fish, is it ?
(and I don't understand why it works and how the type is found)
@DenysSéguret you don't need to add type, turbofish expects type
@DenysSéguret Inference from the function
@ÖmerErden I mean you have to add a verbose thingie
@ÖmerErden oh yes, I had forgotten that the concrete type was provided in the function declaration. This question is too old for me ^^
Is there a non ambiguous word in English to designate a time range (meaning the range between two instants) ? "period" isn't really OK, right ?
Interval maybe ?
10:37
The hell
0
Q: Rust -- How to handle error when programming with multi-threads

EvianIn my application, I want to call foo recursively and concurrently. foo may produce Err, but I don't know how or where to handle these errors. My code is listed as below: type Result<T> = std::result::Result<T, MyError>; fn foo(tx_global: Option<Sender<bool>>) -> Result<()> { let (tx_globa...

How is that one unclear?
10:57
@SébastienRenauld Not really unclear but a little open-ended and there's a high risk of having a lengthy discussion with somebody lacking some basics. That's why I preferred to pass.
Passing is fine, closing it isn't, imho
it had enough info to provide a semi-decent answer pointing the dude in the right direction
At this rate, should also close this one stackoverflow.com/questions/58601143/…
Oh, I hadn't seen the closing. Voted to reopen
4 of the 5 CVs are from people without any answers in rust
and I won't touch that one about "copy data with dfferent TcpListener" between threads
@SébastienRenauld that's why they found it unclear I guess ^^
The TcpListener one deserves a CV
I was going to suggest this to the Error guy: play.rust-lang.org/…
that way, I'm also setting him up on the way to considering his channel as a stream
11:24
In the loop you're filling a buffer, that you keep for the whole loop. And at each iteration you're splitting it again. Obviously you want to split only the current line so peticion and respueta should be declared in the loop. And you probably shouldn't create a ReadBuffer at each iteration. — Denys Séguret 9 secs ago
I started to make an answer but there are too many logical problems here
@DenysSéguret The BufReader in the loop makes sense - remember, it's one iteration per incoming connection
i.e. the BufReaders are technically independent
oh you're right I missed what it was...
you know why I missed it: I had changed the tcp thing in the playground to stdin ^^
11:47
Just a survey, who recognizes this ?
@SébastienRenauld I don't think module_path! can be used. Or am I missing something?
nice pun tho ^_^
12:24
@LukasKalbertodt it was puntastic ;-) you can generate a call to module_path at compile time and have the macro use it at run-time
that's what I meant with the comment
@DenysSéguret smol player
I don't usually do PR, I have enough with my own projects
@SébastienRenauld Are you a player too ?
and I have 9 more PRs in the process
also, I use a variant of gitflow for all my projects so I naturally PR all the time
There's no reason to have no process just because it's a one-man band
It just happens I had to contribute to crossterm to fix things but I normally mostly "contribute" to my projects
12:27
especially since the moment it turns into a two-man band you suddenly need to get all processes going
all that score is from projects which I'm the owner of, mostly
my PR on openapi-codegen is taking forever to go through
and my PRs to elasticlunr landed a week before hacktober started
well, I do accept PR but I've not found any major contributors, just a lot of small contributors
I didn't even knew you could hack your path towards a t-shirt on your own project. Seems a little to easy to just create a dummy repo and do 4 PR
there are some rudimentary checks
for instance, I didn't really "hack" my way through it - the repos I contributed to are used
I just happen to be the owner
apart from elasticlunr, but at this point the only reason I am not the owner of that is because the real owner refuses to hand control
@SébastienRenauld True, but you couldn't get it into the doc string, I think.
Not familiar with that, also why I only commented
:-)
13:01
@DenysSéguret Hacktoberfest, of course. :)
@E_net4isstillonstrike did you play ?
@DenysSéguret Aye, although I haven't made as many PRs as the last two years.
Thanks @Shepmaster. Removing "obviously" is always a good idea.
...Obviously
;-)
13:20
I was going to use that joke.
I need to resurect my SO chrome extension and make it hit me when I type "obviously"
13:40
Pavlov's electric shock?
14:23
@SébastienRenauld And I don't understand what you mean by block layout. Please elaborate by pointing out the code. — listerone 2 mins ago
I give up on this one
Dude fixated on the minor differences in implementation and ignored the fact that one is inlineable, the other isn't
15:06
@DenysSéguret the t-shirts are still in stock BTW
my PRs just went through and I got the email
I have still no idea
Then it'll get accepted soon and you'll get the order link too
comes by email
the t-shirt is neat as well, it's the logo on a dark grey-ish fabric
I'm hoping there are some stickers as well, my new laptop needs some
And it's the usual problem... try guessing what's the correct size for this tshirt maker ^^
It's either "Unisex" or "Women". This is unfair!
this one is male/female
which I was surprised at considering the whole gender problems these days
sizing was US (as evidently as them suggesting up to 5XL)
@SébastienRenauld They pretend there are some stickers, yes
but I'm already good:
15:24
Wow, so rebel
this reminds me
I'm going to remind the wowhead staff that we should get writer/staff swag
it's a laptop provided by my work and I didn't want anything which might make some random "colleagues" ask too many questions.
The sticker is just to be sure to recognize my laptop at end of meetings.
But it's an old laptop. My new one is so massive I don't get stickers to recognize it...
this company had company laptops but I got really tired of the differences between MacOS gnu utils and actual gnu utils, so I went full BYOD
My company is only able to pick executive laptops. So I always choose one and make them pay it, a process which always takes a few weeks during which they pretend they can select one good enough and I say that I need a bigger one...
The most difficult is to pick a laptop which doesn't look like a gamer one... Most powerful laptops have funky shapes and colored leds
@SébastienRenauld pedantically, they aren't GNU utils, they are BSD utils. Thus the differences :-)
@DenysSéguret Dell XPS 15
literally cannot recommend anything else at this point, they even fixed the thermal issues so you don't need to repaste them
XPS 13 if you want smaller, but there you'll have to repaste if you really want to get the full power out of it
15:35
I don't care for the size and weight
I mean, the XPS 15 is light still
I usually end up with something from DELL anyway
it's what, 2kg maybe?
the XPS 13 is thin as a feather, but the thermal throttling was too much for me
2kg, that must be the weight of my current battery charger
posted on October 29, 2019 by The Rust Core Team

What will Rust development look like in 2020? That's partially up to you! Here's how it works: Anyone and everyone in the Rust community writes a blog post about what they'd like Rust development to be like in 2020. The core team reads all the posts, and writes up a "Roadmap RFC" to make a formal proposal. The RFC is reviewed by everyone, comments are made, adjustments are made, and

15:40
1.8kg @DenysSéguret
another 170g with the beefy charger, 65g with the USB-C variant
This call for blogs smells like leadership fatigue...
(it can charge either on USB-C or a dedicated power adaptor)
> Anyone and everyone in the Rust community writes a blog post about what they'd like Rust development to be like in 2020.

GAT manifesto anyone?
@DenysSéguret there's been the same request each year.
@SébastienRenauld I almost never travel so I don't really care for the weight and it always end up being a kind of monster that should probably have wheels
15:42
I've seen a few posts lately about the community being "toxic" ? Are there big problems or just small events ?
It's mostly people complaining, incidentally, about stackoverflow more than rust
there have been a few issues outside of that but they've been mostly isolated
@DenysSéguret where you seen them?
@Shepmaster for example on twitter. But I'm not really into the community so I can hardly remember names
also, @DenysSéguret I used to be saying this and then one day I had to carry 3 laptops to another country
one of them was a full gaming brick
let's just say it wasn't enjoyable
Ah. I haven't been exposed to anything there.
15:44
Somebody from the german rust company notably
Ferrous Systems?
Wow,this is an annoying comma.
which, one ?
16:16
The full width comma.
16:36
What's that concat method here ?
Uh, what are you asking? Why he's using it, or actually what the method is?
If the latter, doc.rust-lang.org/1.35.0/std/primitive.slice.html#method.concat (under the impl<S> SliceConcatExt<str> for [S])
I don't see a concat method
Click Show hidden undocumented item
Is it like a join without argument ?
16:51
Yeah, that's sort of what the implementation is for str at least doc.rust-lang.org/1.35.0/src/alloc/str.rs.html#78-80
why do we have this on slices and not on iterators...
Similarly, in the question it seems odd to use .collect::<Vec<&str>>().concat() instead of directly .collect::<String>()
17:29
I feel like I can't even keep up with the bad questions
why do they come in chunks
17:42
@trentcl does make me wish that tap was a standard library thing (play.rust-lang.org/…)
 
1 hour later…
19:11
@Shepmaster eh, feels extraneous to me
sometimes I wonder why we're all allergic to semicolons now
@trentcl That's how I felt about the same function when it was added to Ruby
but I've greatly enjoyed it there
@SomeGuy I imagine whoever wrote that probably thought they'd be saving allocations because the String doesn't have to grow
@trentcl something about elegance, at least for me
@Shepmaster I can see the appeal, but I also think it's easy to slip into "this code is so elegant that it makes me feel smart" rather than "this code is so stupidly obvious that it couldn't possibly be wrong"
It's highly contextual, definitely.
@trentcl pure correctness wasn't really a factor here though. Elegant code that is the most performant is even tougher
and in many cases in Rust, the iterators are the most performant
19:23
@Shepmaster There's "correct" and then there's "trivially correct"
Trivially correct is better, obviously, because you don't need to think about it.
In some cases I think iterator adapters make things less trivial because the order of execution, as well as the borrowing relationships, can be interwoven between steps
But that interweaving is often what makes the performance improvements.
True. But for loops are more general.
It comes down to what I'm going to curse myself for next time I edit the code
if I write a for loop and later realize it can be rewritten as an iterator adapter to gain performance, that's fairly simple
but if I write an iterator adapter and then later want to come back and stick an early return in the middle...
Talking with dtolnay at RBR, they stated that they often rewrite adapters as for loops (in response to me saying I go the other way)
 
2 hours later…
21:52
@DenysSéguret duration

« first day (1841 days earlier)      last day (1868 days later) »