« first day (979 days earlier)      last day (2492 days later) » 

2:04 AM
@E_net4 Ok, +1, voldemort types, I can die now.
 
To be transparent, we stole that wholesale (I think from D)
 
yeah, I saw that
who many duplicate before SO crash ?
 
2:19 AM
@Stargateur You mean... total duplicates in all of SO?
I'm guessing at least 2^63
 
maybe, but I said that because you add a third duplicate to a question :p
We don't see that very often
 
I love that feature
it's newer, which is why it's not as common
 
more than 1 duplicate is new ?
I am only on SO from less than 1 year
 
@Stargateur It's always been possible to have one question be the duplicate target of many others, of course. It's also always (?) been possible for one question to have multiple duplicate targets, but that was more of a moderator thing.
Like if questions were merged, or somesuch
but recently (this year, IIRC) they enabled gold badgers to edit the list
 
\o/
 
 
6 hours later…
8:36 AM
Here is me peace piping with the Julians. github.com/JuliaLang/julia/pull/22433
 
 
5 hours later…
1:29 PM
@E_net4 what?!?!!
but we aren't winning the benchmarks
you aren't supposed to publish benchmarks where we lose ;-)
 
@Shepmaster What do you mean, we lose? We even beat C on most of them!
TBH I find the mandel benchmark intriguing. But the other ones are definitely on our favour.
(It might be that the iterator alchemy over here was not optimized that well, but I can't be sure)
 
I can't even build your repo:
../kernel/x86_64/dgemm_kernel_4x8_sandy.S:1849:1: error: unexpected token at start of statement
#### Writing Back ####
^
make[1]: *** [dtrmm_kernel_LN.o] Error 1
sad BLAS
 
wat
 
Should I have installed a system BLAS? it appears to be compiling its own
 
1:44 PM
@Shepmaster Yes. OpenBLAS.
 
@E_net4 why is there trailing whitespace in this file
 
@Shepmaster Why is that even relevant?
 
what kind of half-implemented editor are you using
 
Why are you avoiding the original problem?
Also, no, I don't trim trailing whitespace automatically. </thug-life>
 
fn mandel(z: Complex64) -> u32 {
    use std::iter;

    let c = z;
    iter::repeat(z)
        .map(|z| z * z + c)
        .take(80)
        .take_while(|z| z.norm() < 2.0)
        .count() as u32
}
@E_net4 Cause I was just commenting out all the blas stuff
 
1:53 PM
:<
YOU CAN'T CUT BACK ON BLAS! YOU WILL REGRET THIS!
 
@E_net4 My editor highlights erroneous whitespace if the file starts with it, otherwise it keeps it trimmed when i save. It's a good mix. But it also shows me all your whitespaces
@E_net4 Nice simcity ref
 
@Shepmaster Heh, whitespace is called whitespace for a reason. :P
@Shepmaster You can't reticulate splines without BLAS.
 
2:08 PM
@Shepmaster Also, bin der dun dat before.
 
whoa that example code was all wrong
lemme fix
 
What?
 
2:23 PM
fn mandel(z: Complex64) -> u32 {
    use std::iter;

    iter::repeat(z)
        .scan(z, |z, c| {
            let current = *z;
            *z = current * current + c;
            Some(current)
        })
        .take(80)
        .take_while(|z| z.norm() <= 2.0)
        .count() as u32
}
just seeing what an iterator version would look like
@E_net4 it might be a smidge faster with the iterator...
I get 0.120431 (iter) vs 0.127655 (for)
feel like ive seen that pattern in scan before though
 
@Shepmaster No can do. That would make an unfair comparison. See #13729.
The benchmark must compute the array, regardless.
 
@E_net4 Why you think an iterator is optimization?
wait
what array
 
Or maybe I still don't understand what you did there.
...
 
mandel computes the complex number until a threshold or a max of 80 iterations
that's the same
 
:|
 
2:34 PM
old:
fn mandel(z: Complex64) -> u32 {
    let mut z = z;
    let maxiter = 80;
    let c = z.clone();
    for n in 0..maxiter {
        if z.norm() > 2.0 {
            return n;
        }
        z = z * z + c;
    }

    maxiter
}
 
Fair enough.
Well, that makes a slight improvement, although not enough to beat Julia.
 
2:51 PM
booooo
 
@Shepmaster Dooooo better
 
A wild @LukasKalbertodt appears!
And disappears
 
3:49 PM
@Shepmaster boo!
Gotta need to fix monospace font
 
Gotta need?
 
Look at @E_net4 with his correct English and all!
:<
 
@LukasKalbertodt It's not inherently wrong. Just odd. :[
 
^_^
so what's going on here? I've seen some complex numbers and a bit of mandelbrot?
 
Aaanyways.
@LukasKalbertodt It's because of me peace piping with the Julians.
I ported their micro benchmark to Rust and got mostly better perf, 'cept for mandel.
 
4:02 PM
Okay, already figured out why it's slower?
 
.. Nay. :'D
Not that that would be required for contributing to their benchmarks.
At first I thought their JIT compiler was being smart, but then I read it's a dumb JIT compiler. :|
 
Is it really only the mandelbrot iteration function? Because that's small enough to inspect the assembly, right?
I mean, it's probably difficult to find out what instructions the Julia JITted code actually executes during runtime, but at least we could find out what Rust is doing?
Sorry for being too lazy to read all of the above discussion, but: what is the fastest Rust code for mandelbrot so far? I might want to have a look ^_^
 
Although we could indeed look into the Rust assembly, that might not give us a clue on what Julia is doing better.
Now I wonder if Julia is using another version of OpenBLAS...
Would it matter tho..
Oh well. Benchmarks are tricky.
And I was just suggested not to use nightly Rust. Bye bye black_box.
 
@E_net4 Why not?
 
But yeah, sort of a moot point. :|
Gotta keep on peace piping.
 
4:18 PM
Gotta need*
;-)
 
@LukasKalbertodt Har har
 
5:10 PM
@E_net4 I was going to recommend copying blackbox, but then realized it needs assembly, which needs nightly
so that wasn't useful
\o/ hi @LukasKalbertodt
 
Hi Shepmaster!
I worked 65 hours in the last 5 days. That was exhausting °_°
But now I have a bit of free time, so... stackoverflow ^_^
 
@LukasKalbertodt what kind of work?
 
@Shepmaster For university. I needed to write C++ :<
But at least I was mostly able to write new C++ using good practices n stuff
But I also had to dig through shit loads of old, really really incredibly ugly C++. Only made me love Rust more...
 
@E_net4 WDYT about
(0..21).flat_map(|i| (0..26).map(move |j| {
    let x = (j - 20) as f64 / 10.;
    let y = (i - 10) as f64 / 10.;
    let z = Complex64::new(x, y);
    mandel(z)
})).collect()
hmm. I wonder if there's a size_hint "adapter" that forces the size_hint
@LukasKalbertodt this classwork or instructor work?
 
5:28 PM
@Shepmaster classwork actually. (if I understand both terms correctly, classwork being stuff that I as a student have to do)
 
@Shepmaster Have you benched that?
I'm not in a dev system right now.
 
@E_net4 It looked about the same to me. I'm in no rush, you can take a look when you get around to it
@LukasKalbertodt yeah, that's how I meant the terms
 
@LukasKalbertodt Good practices in C++ are often "think like a Rust compiler". :>
 
@E_net4 indeed. @LukasKalbertodt do you think rust experience helped at all?
 
And this does not invalidate C++ either. Stroustrup knows what he's doing.
 
5:52 PM
only Stroustrup knows what he's doing :p
 
6:05 PM
@Shepmaster I thought about that quite a bit before. But I don't know if I am actually the right person to ask. I programmed a lot of C++ before (learning Rust), including C++11, C++14 and all that jazz. So I kind of knew about quite a few of the common pitfalls concerned with ownership and lifetime.
 
@LukasKalbertodt Well, should we be talking to old-school C++ programmers? I find that thought alone terrifying. :P
 
However, today I spoke with a friend of mine, who is in the same course and also needs to program in C++. She is new to C++ and took my Rust course last semester. Today she told me how everything in Rust suddenly made sense. And that she often thought to herself (why programming in C++) "wait, why am I allowed to do this? Isn't this a lifetime violation something something".
So yeah. I quite liked what she said :D
Basically, getting to know C++ made her appreciate all the Rust things :P
 
Rustify all the things! :D
 
Oh and she also mentioned what many I heard many Rustaceans mention, too: C++ deep copying objects by default seems so strange now 0_o
It's astonishing how a programming language tuned for performance makes it easier to deep clone an entire vector than pretty much anything else :P
@E_net4 I'm not quite sure what you mean by that :/
 
This recent OP is going to be angry that I answered the question they asked.
I love and hate that
 
6:11 PM
Yeah, I almost commented your answer, but given the question as it currently is... don't care. :3
@LukasKalbertodt Just keeping in mind that many C++ programmers still follow old, bad practices.
 
@Stargateur ++ for inlining the code example!
 
@Shepmaster np, but I can't answer ^^
 
@E_net4 Oh, yes, so true. I mean I read an incredible amount of incredible ugly code in the code base I was working on. Mostly written by the guy who gives the C++ course at our university. °_° it's so sad
 
@LukasKalbertodt Hah, been there, done that.
IIRC the little of C++ I was taught included barbarities such as "make all member functions virtual".
 
@LukasKalbertodt you know the old saying...
 
6:15 PM
And comparing: I think really bad Rust code is still way better than really bad C++ code. At least when you restrict it to safe-Rust.
 
> Those who can, do. Those who can't, teach
(burn)
 
What's the worst that can happen? A bunch of clone()s to make the borrow checker shut up :P
@Shepmaster "if you can't explain it simply you don't understand it well enough" -- a stone
 
@LukasKalbertodt It might become slower than Java, though. :P
 
@E_net4 True that. Change all data types to Arc<_> to make clones less expensive :D
 
@LukasKalbertodt Congratulations. Now it's roughly as fast as Python. :P
 
6:17 PM
@E_net4 but with multithreading
 
@Shepmaster Indeed.
 
@E_net4 That's nice, too. Encountered that a lot too in the current code base. Especially nice: Vector::operator+ or something like that. You sure want a virtual call for 3D vector operations...
 
Rc would be closer to Python, no?
 
@E_net4 Yes, but still: compare it to really bad C++ code which leaks, is memory unsafe, crashes from time to time randomly...
 
You have to make things virtual, otherwise you can't reuse code via inheritance
 
6:18 PM
@Shepmaster Because, as we all know, code reuse via inheritance is the best idea evar
 
@Shepmaster Right! Inheritance over composition! :P
I'm enjoying this too much.
Ah, sorry. I actually wanted to convert a Vec<T> to Arc<[T]>. I did not think it was trivially possible to create Arc<[T]>. I will edit the question back to its (nearly) original form... — John 7 mins ago
Bonk.
 
What are you doing to poor John? :o
 
I did nuthin'.
 
/me looks at the sheep in the room
 
@LukasKalbertodt I answered the question. Then the OP changed the question so my answer wasn't valid. That seems rude so I downvoted.
 
6:29 PM
@Shepmaster O no you di-in't.
I really wish I could prove that UB.
 
6:45 PM
Who's gonna find the dupe for this one
 
Dunno. But the answer's a total taker.
 
Why does the RSS bot in this channel always shows everything twice?
 
@LukasKalbertodt We've had that issue for a while... There's a meta question somewhere...
17
Q: Duplicates in chat feed ticker

Andras DeakThere's been a drop-down feed ticker in the MATLAB & Octave room on SO chat for a long time. Last night we noticed that each post started appearing twice in the feed: The raw RSS feed contains each post once. The URLs in the feed links are identical and contain no protocol header (so if it's d...

 
Mh I see
 
I bet we gonna live with that for a while ^^
 
6:55 PM
I wish I could bounty meta stuff
 
@Shepmaster New meta question: "Why hasn't this meta question received enough attention?" :P
Meh, this isn't as applicable as we could have wished: meta.stackoverflow.com/q/266782/1233251
 
We could ping SO dev in comment :p
"hey listen, hey listen, watch out !"
 
 
2 hours later…
9:22 PM
    fn write_line(&mut self, args: std::fmt::Arguments) {
        write!(self.writer, "{}\r\n", args).unwrap();
        self.writer.flush().unwrap();
    }

    fn identify(&mut self) {
        let nick = &self.name.clone();
        self.write_line(format_args!("USER {} {} {} : {}", nick, nick, nick, nick));
        self.write_line(format_args!("NICK {}", nick));
    }
A pleasing reduction in allocations
 

« first day (979 days earlier)      last day (2492 days later) »