« first day (1739 days earlier)      last day (1732 days later) » 

1:42 AM
100% me, and manish is calling me tf out
 
 
4 hours later…
5:18 AM
Wut ? This is a strange account
 
 
3 hours later…
8:20 AM
@набиячлэвэли ...wait, @dril_rs is yours?
 
8:54 AM
@набиячлэвэли wtf
all the tweet are crazy
 
And they're not even funny. I don't get the intent
 
9:09 AM
Neither do I
That's a Millennials humor, maybe :P
 
9:42 AM
Is that true that the std's channel is synchronous?
 
you can create both normal asynchronous ones and synchronous channels
but I don't think I'll ever come back to mspc after having used crossbeam. The select! is so neat... like... it's as good as Go
 
9:58 AM
@FrenchBoiethios I amend my previous comment, @ should be as not in (because you could use it for other things than ranges). And since the as keyword cannot be on the left hand side of the pattern anyway, I think it would be a nice simplification/deobfuscation of the language
match matchable
{
    Some(Type::String("hello")) as hello => hello,
    Some(Type::Integer(1..=9 as number)) => Some(Type::Integer(number + 1)),
    _ => None,
}
 
And I've still never used @... I should start to learn the basics...
 
it is super useful, I love, but at the same time it looks weird, all the time
I think my as looks very natural compared to the @
not just because of an actual word
but also because of the order: var @ expr vs. expr as var
 
Every time I glance at the syntax of @ I understand I'm not smart enough to use it.
 
@DenysSéguret @ is USELESS
 
@Stargateur Why? What makes you say that?
 
10:07 AM
@PeterVaro everytime I want to use it for fix some problem I can't because of limitation
show me a usecase I will wait
 
@Stargateur first code snippet on the page: doc.rust-lang.org/reference/patterns.html
 
that would be great if we could make a search on github to search every use of @ in Rust
found zero occurrence haha
@PeterVaro did you see one code just one real code that is really used that do that ?
 
@Stargateur I believe people are not using it because 1. the syntax looks weird/alien/scarry, 2. have no idea this notation exists, and 3. doing the same old things they got used to in other languages makes them happy
you asked for a proper example, I gave you one, now you complain about the lack of usage in real code
:)
 
@PeterVaro you say that because you don't know the limitation of @
 
a bit unfair, wouldn't you say?
:D
 
10:13 AM
a real word example
 
@PeterVaro This firsr example looks ridiculous, you could remove person_age @ in the matching and then just use person.age instead of person_age.
 
@Stargateur I asked you "why" you said give me an example. I ask again "why" -- here's your chance to elaborate on the limitations!
 
I'd also love a real world example where it makes things better rather than just more verbose
 
@DenysSéguret and then you have to have another if to chech the range
 
@PeterVaro no
 
10:15 AM
one word: USELESS
 
@Stargateur is that actually leaking?
 
(I'm on mobile, and can't see the output..)
@DenysSéguret gotcha, fair enough!
 
> John has a car and is 15 years old.
 
pattern matching may have improved since the time @ was useful
 
10:17 AM
and me is :
 
bbiab
 
> error[E0303]: pattern bindings are not allowed after an @
U S E L E S S
src/libstd/sync/mpsc/oneshot.rs:            s @ EMPTY |
src/libstd/sync/mpsc/oneshot.rs:            s @ DATA |
src/libstd/sync/mpsc/oneshot.rs:            s @ DISCONNECTED => s,
src/libstd/sync/mpsc/shared.rs:            data @ Ok(..) => unsafe { *self.steals.get() -= 1; data },
src/libstd/sync/mpsc/stream.rs:            data @ Ok(..) |
src/libstd/sync/mpsc/stream.rs:            data @ Err(Upgraded(..)) => unsafe {
src/libstd/sys/sgx/abi/entry.S:.section ".note.x86_64-fortanix-unknown-sgx", "", @note
funny that std use it only in wtf8 and mpsc that @DenysSéguret hate :p
 
10:39 AM
"hate" is exagerated. I just don't find mpsc good enough but it's what I use in broot
I'm sure there's already a issue asking to remove @ from the language...
 
11:06 AM
Looking at some crates I found one case where it was slightly useful (meaning the code was a little clearer):
        b'\x1B' => {
            // This is an escape character, leading a control sequence.
            match iter.next() {
                Some(b'O') => {
                    match iter.next() {
                        // F1-F4
                        Some(val @ b'P'...b'S') => {
                            InputEvent::Keyboard(KeyEvent::F(1 + val - b'P'))
                        }
                        _ => return Err(error),
                    }
                }
                Some(b'[') => {
 
look ok
better than if guard XD
miri as this one:
 dtor = match this.machine.tls.fetch_tls_dtor(Some(key)) {
                dtor @ Some(_) => dtor,
                None => this.machine.tls.fetch_tls_dtor(None),
            };
so strange
just use or_else XD
 
Even when it's slightly useful, it's not a game changer. I would gladly vote for its removal from the language.
 
11:36 AM
so far, it looks like @Stargateur was right, and clearly, I wasn't thinking clearly when I said it was a rather useful feature I was wrong.. but I will think about a good example later, for now, I have to work :/
 
There are some OK examples. They seem to be in the middle of buggy and hard to decipher codebases, though
 
 
2 hours later…
1:27 PM
Why do people drop those chunks of code like that -_-
0
Q: How to fold properly a multipart field?

dronte7My attempt is to implement an image preprocessor before saving received image to fs. it is supposed to be received from actix-multipart. But I don't understand what is wrong in my attempts: fn handle_file_from_multipart(field: Field) -> impl Future<Item=HttpResponse, Error=actix_http::error::Error

 
because they have < 100 rep
 
But nobody wants to read that
 
@E_net4 no, I'm not funny enough
 
Added to post ... — dronte7 3 mins ago
I don't know how to answer this without insult
so I give up
 
Why would you need to insult ? I'll show you
see
Such a wall of code makes it difficult to spot problems and it makes people reluctant to read the question. You really should have a look at how to ask and at the link I previously gave you. Remember: we're not a paid debug service. — Denys Séguret 34 secs ago
At the same time a friend asked me this question:
How strange that there's an error here (I found it BTW)
 
1:44 PM
Nice request :P
 
 FROM (((((((
 
I hope that you don't use Oracle, because their error messages do not even indicate the line.
 
I'm not involved
 
Your friend*
 
I'm just the guy who spent decades writing bugs and so is trained to spot them in seconds
 
1:46 PM
Only a fiend would devise such a SQL query though.
 
He inherited the query. He just entered the job two weeks ago...
 
Poor guy :(
 
:(
 
"left outer join" I don't even know if you can do that with an ORM
 
For the many fans of broot here: I just released the version 0.9.
4
(and now I must think about the 1.0 because 0.10 is confusing)
 
2:03 PM
I am broot
 
I just checked. Your code definitely doesn't return "PlingPlong" on 21. Please read what you wrote again and precise what you get and what you expect and why. — Denys Séguret 1 min ago
I might have misunderstood the question
 
2:21 PM
Nah, the question really had issues.
 
 
4 hours later…
6:26 PM
Hmm, is there any way to store a trait which requires Clone? Because this work :v
well, doesn't work but tpiong hrad
 
6:59 PM
I don't think you can
 
@набиячлэвэли wron,g link
 
@Stargateur Ah, yes. This is the right one
 

« first day (1739 days earlier)      last day (1732 days later) »