« first day (356 days earlier)      last day (3136 days later) » 

11:38 AM
Jon Clements has unfrozen this room.
 
Thank you @Jon
 
user1804599
yay
 
We need Bartek
 
dum dum duuuuummm
 
grejt
 
11:46 AM
I'd like to say that Haskell is a better and more usable language than Rust.
 
For the record
 
at least that's my impression so far
but Rust seems funny enough to do something in it
 
I will probably never use Rust for anything but it looks nice
 
user1804599
Who is room owner?
 
user1804599
Oh robor.
 
11:47 AM
Maybe Robot
dunno why Jon did not trust us
well I understand why he does not trust elyse :)
 
ueh Peter is here as well?
I remember him from the C room
handing terrible hobbyist advice to beginners
 
user1804599
let's sehe
 
user1804599
@sehe you should learn Rust too.
 
yes
who more needs invites?
 
user1804599
Andy.
 
11:53 AM
 
what did he write
 
star the room
makes it convenient to auto join later
 
@BartekBanachewicz מנא ,מנא, תקל, ופרסין
 
Ideally we want one row of regs
to keep the noise autogenerating
 
user1804599
@sehe אױ װײ
 
11:59 AM
או כן
 
@JRichardSnape @JoaoCarlos @samayo open
We should write WPF for Rust.
xplat and all
@sehe you in?
we could dogfood and write an editor while we are at it
The editor could be named WD-40
 
user1804599
12:16 PM
Rust/CLI
 
. @thegrugq @gcouprie Very similar: #Cujo will likely be more popular b/c makes you /pay/ instead https://www.indiegogo.com/projects/don-t-get-hacked-get-cujo#/ #blackbox #devices
Finally, an "in" to plug that crazy Cujo hoax to some serious security folks
@JohanLarsson No thanks
 
Maybe base it on svg
 
Anonymous
12:37 PM
thanks for opening it mod
 
Anonymous
@JohanLarsson I'm in.
 
@samayo I don't know any Rust :)
Are you a Linux hipster?
 
Anonymous
I'm new to Linux, but my Rust is a bit rusty :)
 
I'm a Windows clicker
Do you write wpf?
 
Anonymous
Nope
 
12:42 PM
@JohanLarsson meh
 
what is so meh?
 
WPF was designed for a particular ecosystem. Shoehorning it into rust doesn't make much sense.
Say "I want to design a GUI system for Rust" and it sounds way better even if you add "stealing ideas from WPF"
 
this will be a complete rewrite
 
besides I think Rust can do way more in the FRP department than C#
 
but maybe ms will be grumpy if someone steals
frp?
 
12:44 PM
Functional Reactive Programming
or, the newest hype (tm) in GUI coding
 
wpf is pretty reactive with bindings
 
wanted to say that
 
so you are in then
 
Well, I can always point, laugh and comment
I've my DB project in Rust right now that remains my main playground
 
Anonymous
not good enough
 
12:46 PM
nope, not even close
 
I want to push it further, with unit tests and benchmarks
see how well it performs
 
we need rants about purity etc
 
oh sure can do that
 
and huge amounts of perfect code
 
well that's the harder part
Rust is kinda clunky to write
To put it in perspective, if C is a wooden stick and Haskell is a battle mech, Rust is a rusty soviet-era mech.
 
1:23 PM
Why did you even invite me? It's not like I never voiced my general dislike of the language or such... :P
 
We need some noise so it stays on the first page of rooms.
 
boom boom boom
 
Nice, Andy woke up :)
 
noise is the only thing I can give you guys, sorry
 
 
1 hour later…
2:31 PM
hiyo
 
@JohanLarsson Are you a room owner? How about you change the subtitle to "In Rust we trust"? ;)
 
nope, not owner
@fredoverflow Robot is.
 
Robot is probably too busy with cubes and boobs.
 
yeah, stuck with primitive shapes :)
 
coobs
 
2:36 PM
is everyone here using rust
I never tried it
 
@Griwes I am p sure the dislike can be boiled down to "it's not C++"
@AlexM. I'm experimenting with it
 
I have only written a couple of lines and will probably never use it
 
I tried like lots of months ago and gave up
I should get back to it
 
Just want to lurk
 
I'm just here to make noise
I hope you guys appreciate that
 
2:37 PM
yes
 
@AlexM. Welcome to the club.
 
How can we attract some actual skill?
 
I think a lot of people say "I'm interested in Rust" but don't really mean anything when saying this
 
so this is like a chatroom for rust programmers
NOT
right?
 
2:38 PM
Maybe spam this room in commenst on rust questions?
 
@AlexM. that's what happens when you make a chatroom for an esoteric language
 
@AlexM. like any chatroom on SO I'd imagine
 
we can make this room a study group
2
 
asked a mod to unfreeze it today
 
but then all the experts will run away
 
2:39 PM
well it's better to rant here than in lounge
 
time to work out
(very rust related)
 
@AndyProwl we can try fanboiing them
 
hopefully they won't mind if we post stuff that's not related to Rust here
I mean the Lounge is 50% bullshit
and it works perfectly
 
bubot
 
50%? you're generous today
 
2:40 PM
yeah I was trying to be conservative
 
@AndyProwl I suggested we write an UI framework like WPF :)
 
this is way too big imho
6
I think rust is meant to be used mostly as a replacement for C anyway
for small native modules with minimal runtime
that can be easily called from different languages like Haskell or Erlang or Lua
my plan is to work on the lib im making for a while and see how easy it is to hook it up to an actual haskell program
and if it actually brings in the perf/memory use benefits
intuitively low-level Rust should be clearer and more intuitive than low-level haskell
 
@BartekBanachewicz Count me in!
@BartekBanachewicz Isn't Mozilla using Rust to write a next-gen Browser?
 
@fredoverflow of course they're overhyping it
 
@AndyProwl What's the other 50%?
 
2:53 PM
@fredoverflow oh well, that's stuff that doesn't have much to do with C++ really
:P
 
 
1 hour later…
4:04 PM
@fredoverflow yeah Servo
@R.MartinhoFernandes owner us all
That way people will keep coming to this room so it survives
 
4:18 PM
Hi all. Are we turning this into "Lounge 2: Return of the memory safety" or something?
6
 
sort of
a Lounger brought this room back to life so this room's soul is now belong to us
 
@AndyProwl All your base soul are belong to us!
 
4:34 PM
@JerryCoffin I hope so, I'm a collector of chats to lurk in.
Have you tried the language?
 
I don't even know Rust
 
Is this just a ruse to hang out in another chat the noobs don't know about?
 
@JohanLarsson Not enough to notice. I've looked at a tutorial, copied a few bits from the tutorial to one of the online compilers, made some innocuous modifications and saw that they did about what I'd expect, but that's about as far as I've gotten.
@TomW Shhhhhh....no, absolutely not. We'd never do a thing like that!
 
@TomW I'm trying to get one row of regs :)
@JerryCoffin That makes you one of the best of us.
senior in the room
 
(he means old)
 
4:42 PM
@milleniumbug not many do
 
@TomW I'm pretty well accustomed to being an old fart by now...
 
user406009
@JerryCoffin Well, Rust is designed as a direct competitor to C++.
 
user406009
So it's sorta expected that C++ users will be interested in it.
 
@Lalaland Yup--much more so than (for one obvious example) Go ever was. Although they pushed the idea that Go was a systems language, it seemed to me much more like a Python, with just enough more restrictions that it was a lot easier to statically compile.
That's not to say there's anything wrong with Go--just that it strikes me as a lot more appealing as a faster Python (or Ruby, etc.) than anything like an attempt at a modernized version of C (or C++).
 
@TomW old friend yes
 
4:53 PM
@JerryCoffin that's the same as my experience except for the fact that the compiler screamed at me every time I tried an innocuous modification
but it was quite long ago
 
It would be nice with editor support for the borrow thing
gray/fade out things that can no longer be touched
or something
but guess it is too early for fancy tooling
 
@AndyProwl Sometimes, "about what I'd expect" included the compiler whinging at me... :-)
 
@JerryCoffin where is the blackjack and hookers
 
Luc you are an actual Rust expert right?
 
@JohanLarsson no
 
5:03 PM
@JohanLarsson don't trust him Luc is expert on every language
 
@AndyProwl s/ language/thing/ :-)
 
right
 
He can probably draw CAD better than I can.
 
@LucDanton A wide choice of gorgeous Hookers. Blackjack is down the hall.
 
@JohanLarsson I did follow language development closely all up to the 1.0 release but I haven’t really kept up since then. I don’t really write Rust at all either.
 
5:09 PM
^ is such a sad and pure fail
always on the demo
 
@JohanLarsson wow such sad
 
I could not find any rust on livecoding
 
Looking for an online compiler?
 
I know the rust play thing
 
I'll distribute ownerships when I get home
 
5:17 PM
great, we will abuse it
do you write much rust?
 
much rust, wow
:D
 
@JohanLarsson No, but a lot of my C++ is getting really old... SCNR.
@R.MartinhoFernandes Oh, hey. That's what my name looks like without Italics...
 
@LucDanton because you did not like the result?
 
5:33 PM
@JohanLarsson No, not really. Never really had an opportunity, is all.
 
ok
risky with new languages
 
user1804599
awesome
 
5:52 PM
have you played with rust @Reed?
 
barely
not a lot, but it's fairly interesting to me
 
yeah, looks nice
star the room imo :)
 
6:07 PM
I played a little trying to benchmark it vs linq, was surprised that rust was only 10x faster than linq
 
@BartekBanachewicz lol
 
@JohanLarsson only 10x faster? Is LINQ so fast or is Rust so slow?
 
@milleniumbug Linq is fast. I used this C# code. And this rust code.
C# was twice as fast as Rust when Rust was built in debug.
crappy indentation in the rust code, guess ctrl+k+d did not work in Sublime Text
@milleniumbug Are you writing a C baseline?
 
@JohanLarsson lolno not crazy enough
:P
 
6:22 PM
would be interesting to compare to C++ and standard library, too
 
STL-like algorithms? Probably slower (no lazy ranges), although I won't swear my little finger
 
@ReedCopsey yeah, I would expect them to be similar
@elyse ^ you are on it right?
 
what
 
we unfroze the room if you are interested
 
I'm not sure, lol
 
6:38 PM
@milleniumbug could always use boost::irange, but yeah, C++ standard library needs lazy range generators
 
7:20 PM
@sehe ^^ what do you say?
 
7:35 PM
@JohanLarsson oh I've noticed only now
 
curious about how linq & rust compares to c++
don't have the skill to write the c++
 
Ok, nearly done
Not optimizing for now (wife wants attention)
 
ty sir
do you have rust installed?
 
@JohanLarsson yes. Later though.
 
clone my rust repo and: cargo run --release
@sehe np
 
7:44 PM
Here's the first-draft and the output: paste.ubuntu.com/12691624
@JohanLarsson why not cargo bench :)
 
never heard of it :)
 
Second run more stable
 
it's not doing enough work to be stable for timings
same issue is true in all langs, though
 
Almost true :) You counted outside the use of Nonius!
 
rust took 1ms on my crappy laptop, so about the same then
 
7:47 PM
@ReedCopsey Nah, there are proper benchmarking tools in Rust. Use them
if you're interested in the benchmark game, here is the code https://github.com/Geal/nom_benchmarks/tree/master/http and the results http://dev.unhandledexpression.com/slides/strangeloop-2015/#35.0 #strangeloop
Look at that ^
I dunno what it uses, but it looks like the Rust bench is properly done /cc @ReedCopsey
I redid the C benchmark with a C++ compiler+Nonius for them here
 
user1804599
Just wrote a type checker in Rust.
 
Just what COBOL needed
 
user1804599
8:03 PM
let expr = Expr::Let(
    Rc::new("x".to_string()),
    Box::new(Expr::Boolean(true)),
    Box::new(Expr::Name(Rc::new("x".to_string())))
);
let result = analyze_expr(&expr, &Env::new());
println!("{:?}", result);
 
user1804599
Prints Ok(Boolean).
 
@sehe yoda conditions?
 
@JohanLarsson always
 
blue is the sky
Nonius looks nice, unsurprisingly
4
 
inb4 someone says "That's how grammar in my native lang actually works"
 
8:07 PM
@elyse what does "{:?}"do different than {}?
 
user1804599
It uses the Debug trait instead of the Display trait.
 
@TomW oh well. many language have the isnull() kind of unary anyways. I read 0==expr as (zero? expr) effectively
I find that very directly readable.
 
native as in, spoken language
 
Compare with: if (-1 == some_syscall(....)) vs if (some_syscall(...) == -1)
 
user1804599
8:12 PM
Yoda comparisons are awful.
 
@TomW I know what you meant. That's irrelevant so I ignored the argument :)
@elyse Meh. It's not Yoda comparisons anyways.
1 min ago, by sehe
@TomW oh well. many language have the isnull() kind of unary anyways. I read 0==expr as (zero? expr) effectively
 
@elyse did you know that zneak coined the term?
 
user1804599
No. Who is zneak?
 
it's much older than this guy lol
yoda comparisons dates from early C
 
8:16 PM
@JohanLarsson {:#?} is even fancier
 
@LucDanton what does it do?
@LucDanton before star wars?
 
@JohanLarsson Some sort of pretty printing, I haven’t looked up the docs but it’s there.
 
ok good to know
 
Try it with a struct, the difference is visible
 
@JohanLarsson empire strikes back is 35 years old
 
8:20 PM
@LucDanton do you know if there is an IDE for rust being developed?
@Mr.kbok ok maybe I'm wrong but I backed it with an internet source :)
 
I just don't think he was the one to coin it
 
Guess we must invite @zneak and find out.
 
@JohanLarsson No clue
 
@Mr.kbok Not really from what I'd call early C. As far as I know, I was the first to advocate for them, around 1987 or so. Communication was slow back then though--it wasn't until around 1991 that I saw other people pushing them much.
I suppose somebody else may have had the idea first, but I certainly hadn't seen anybody else use them when I first did.
 
8:35 PM
And you called them Yoda comparisons?
 
@JohanLarsson I didn't call them that directly, but practically the first time I recommended them to somebody, he said something about Yoda.
 
maybe it was zneak, from the womb?
 
@JohanLarsson I s'pose anything's possible... :-)
 
yep, internet source and all
 
9:08 PM
@Mr.kbok the +term+
@Mr.kbok the empire strikes waaaaay back
 
bear is back
did you stop streaming?
 
Should I start (must close porn tab...)
 
I'm watching a tutorial
@sehe was just curious
the c++ looked much nicer than I expected
 
I stayed true to the c#. Did not optimize a thing
 
9:18 PM
Started streaming. Let's see what optimizations yield performance
 
Are you gonna show cargo benchmark?
 
Maybe. Does it work with nightlies?
 
no idea, never tried it
 
We'll find out then :)
 
@sehe here
it is written and bin, think it need to be --lib to work with the benchmark
 
9:23 PM
Are you watching?
It looks to be building fine
There we go
     Running `target/release/benchmark`
499500000: 1 ms
166499870: 1 ms
Looks very much like the measured times are below thresh
 
yeah, I did not tweak it much, ran a thing that took 10s the 10x diff vs linq was the same
for anyone interested
 
@JohanLarsson modern C++ is pretty nice, actually
it's only bad when you realize you can do all of the stupid stuff available pre C++11 :p
 
It's still bad enough :)
 
@sehe maybe you need a dependency for the benchmark thing?
in the toml
shot in the dark
 
gosh. Of course. But I had the project defs siode-by-side a second ago
@JohanLarsson Did you spot a diff?
 
9:36 PM
9
A: "use of unstable library feature 'collections'" using nightly

DK.You need to explicitly opt-in by placing #![feature(collections)] at the top of your crate's root source file. Using a nightly compiler merely permits you to use unstable features, it doesn't automatically enable them. See also this related SO question.

@sehe ^ maybe?
profit
upvote
 
Nope. How does one return a value?
How do I make it not optimize the whole thing out due to unused?
 
@elyse halp
 
user1804599
woo wrote a parser in Rust
 
woo later, we have problems
 
user1804599
9:43 PM
lol
 
Are you sure you're watching?
Latency is not /that/ bad I hope
 
user1804599
lag is fine\
 
So. That's it
Cargo-culted all the way :)
 
c++ wins
 
9:48 PM
Obviously
 
user1804599
@sehe dat pun
 
@sehe best stream ever imo!
 
Look at this though
@JohanLarsson pfffft bias
My C# timings:
sehe@desktop:/tmp$ ./test.exe
499500000: 11 ms
166500000: 11 ms
 
@sehe I suck at git :)
 
Everyone does
Woohoo: Added a FilterDivideAndSumEx that is slightly optimized: mean: 3.58912 μs, lb 3.58675 μs, ub 3.5944 μs, ci 0.95
 
10:03 PM
clock resolution: mean is 17.1597 ns (40960002 iterations)

benchmarking FilterDivideAndSum
collecting 100 samples, 1 iterations each, in estimated 95.2192 ms
mean: 951.692 μs, lb 951.153 μs, ub 952.348 μs, ci 0.95
std dev: 3.01651 μs, lb 2.59589 μs, ub 3.48979 μs, ci 0.95
found 19 outliers among 100 samples (19%)
variance is unaffected by outliers

benchmarking FilterAndSum
collecting 100 samples, 1 iterations each, in estimated 95.4132 ms
mean: 955.816 μs, lb 954.309 μs, ub 962.738 μs, ci 0.95
 
Good job
Just posted a newer version too, that does the filter differently
I bet we can do the same in Rust/C#
If we take division out of the loop and make the sum use integer domain, the compiler probably just statically evaluates the loop:
benchmarking FilterDivideAndSumEx
FilterDivideAndSumEx failed to run successfully
benchmark aborted
This is what GCC leaves of the foo() implementation there :)
Clang++ does the same, essentially
 
10:37 PM
The following C++ snippet compiles down to this assembly: paste.ubuntu.com/12692739 /cc @JohanLarsson
double foo() {
    return boost::accumulate(
            irange<size_t>(0, 1000000) |
                filtered([](auto x) { return 0 == (x%1000); }) |
                transformed([](auto x) { return x/3.0; }),
            0.0
        );
}
That's pretty terse for all those layers of template wankery going on
 
10:52 PM
@sehe that just makes me realize I will never be a real programmer :)
 
Because you don't read assembly?
As long as you know how to benchmark, you can treat it like a black box. Curiosity is really not required
 
11:09 PM
@sehe nite
 
sleep well
 
11:20 PM
@sehe It could be quite a bit shorter too, but it generates some tricky code for the if (x % 1000) == 0) without using an actual division. Straightforward code would be shorter, but almost certainly quite a bit slower (my immediate guess would be by a factor of 2 to 3).
 
@JerryCoffin Scroll up :)
I merely gawked at the emitted code for the full-boostey-rangey-adaptey version to see how bad it would be
Actually, in the livestream we've seen that a more reasonable implementation (so not the faux-C#-linq imitation) gets statically evaluated and the function just returns the constant double value
 
@sehe I'm too lazy to try to figure out what I should be comparing to what else.
 
Point is, of course it can be shorter. It's just still kinda amazing what results after inlining dozens of layers of template instantiations :)
@JerryCoffin Hyperlinked the relevant thing
 
11:35 PM
@sehe Yes, but I'm saying the length is probably intentional--i.e., somebody working on gcc is perfectly aware of how they could have generated shorter code, but went for what they did to make it faster. In fact, if you compiled with -O1, it wouldn't surprise me if it did produce shorter output.
@sehe I only see one hyperlink, which is to the code I was commenting on.
 
@JerryCoffin Same code, in all cases where I compared
@JerryCoffin i.imgur.com/rnerJip.png Does not point to that
(I noticed a lot of smardities there; the imul 3-oper instruction was nice and the use of rep ret for pipeline optimization)
 
@sehe Oh, sorry--I'd forgotten that one. Completely optimizing out dead code/computing completely constant results at compile time is so routine I hardly notice it any more.
 
lel
Adjective: blasé ‎(comparative more blasé, superlative most blasé)
  1. Unimpressed with something because of over-familiarity.
  2. blasé m (feminine singular blasée, masculine plural blasés, feminine plural blasées)
  3. blasé ‎(invariable)
 

« first day (356 days earlier)      last day (3136 days later) »