« first day (664 days earlier)      last day (4284 days later) » 

11:00 PM
@kbok bars are really not my thing, but I guess I could try it someday
 
linux.die.net/man/3/posix_spawnp or something to that effect. I don't really use that low-level APIs.
 
@TonyTheLion I was going to make a bar->cage->lion pun, but I'm too tired for this.
 
lame pun alert!
Hahah
 
okay i had that one too, i was just not certain whether i had the right function set
anyway thx @CatPlusPlus
 
Xeo
@LucDanton you there?
 
11:08 PM
@Xeo Yes and yes.
 
Xeo
heh
concurrency is really not my thing (yet), didn't do anything with it
 
forkIO. <3
I'm in a Haskell mood today.
Ask me things.
 
There needs to be a concurrency TC because as you've seen std::future should provide more.
 
@CatPlusPlus When writing elegant Haskell, how fast can one expect it to be?
 
Xeo
@LucDanton Good thing there's a Concurrency subgroup with ~40 members IIRC :)
 
11:10 PM
Usually pretty damn fast. You have to watch out for laziness-induced space leaks or whatnot, but pure functions are generally better optimisable than non-pure ones.
And laziness makes things like filter then map then filter go through the input list only once.
 
ohhhh all that pureness
 
Xeo
hmm... wait
 
@CatPlusPlus which is nice for a dataset where N is very large :P
 
@CatPlusPlus I didn't look much into it, but from what I've seen Haskell can only really achieve C-esque performance when writing specially optimized (and ugly) code
 
Xeo
I could make the wait_for_any thing asynchronous easily by launching another std::async task
 
11:12 PM
WTF does "C esque performance" even mean?
 
Xeo
(I think)
 
First you optimise on high level, profile, then you go to lower level code.
 
performance has very little to do with the language the code is written, at the end of the day, the code running on the machine is machine code, not C or C++ or Java or whatever.
 
Xeo
@Luc, opinions?
 
With ST monad you can write pretty much C inside Haskell, but still produce a Haskell value at the end and not disrupt the rest of the code.
 
11:13 PM
@Xeo It doesn't really matter where the busy-waiting takes place, it's still a busy-wait.
 
@TonyTheLion some languages are easier to make go faster, and in practice do.
 
Xeo
true enough, but he wanted a more async way :P
 
@CatPlusPlus Makes sense
 
@MooingDuck that perhaps, yes
 
And you can always go all the way down to C and FFI the function to Haskell.
So, you can optimise as aggressively as you want.
 
11:14 PM
@Xeo Ya, something like polling/selecting/whatnot. It's a common primitive that I wouldn't want to reimplement.
 
It shouldn't be needed except for some cases, though.
 
@TonyTheLion By C-esque perf I mean perf of perf-oriented compiled languages ;) Could have been C++ in there just as well ;)
 
Xeo
This way, the main thread will not block until requested
 
And type system isolates ugly side-effect computations nicely.
 
@NikiC ok
 
Xeo
11:14 PM
@LucDanton Do want .then
 
@TonyTheLion Actually the more layers of intermediate results there is the more information about what the code should do is lost. That's why languages with bytecodes are inherently slower.
 
@Xeo That's a different primitive that you also don't want to reimplement.
 
@CatPlusPlus Haskell started to make a lot more sense to me after a few linear algebra courses in university
Because Haskell is very much like university math ^^ (And much unlike school math ^^)
 
I don't worry about performance until the program is working, and Haskell has really nice profiling tools.
I don't really see that much math in it.
 
@kbok but the bytecodes store all this information?
 
11:16 PM
Sure, category theory and stuff, but you don't really need that background.
 
@CatPlusPlus The approach is rather mathematical though ;)
 
> They therefore allow much better performance than direct interpretation of source code.
 
Xeo
template<class FwdIt>
std::future<bool> wait_for_any(FwdIt first, FwdIt last)
{
  return std::async([=]{
    for(FwdIt cur(first); ; cur==last?cur=first:++cur){
    // could add a timeout period to not completely busy-wait the CPU
    if(cur->wait_for(std::chrono::seconds(0)) == std::future_status::ready)
      return cur->get();
  });
}
 
this claims bytecodes allow for faster perf
 
Xeo
that should work, I guess.
 
11:17 PM
Nobody does direct interpreters.
 
wikipedia, that is
 
99% languages are compiled.
Because that's the sanest implementation.
 
@TonyTheLion in very specific circumstances it might be possible, due to increased code density? maybe?
 
@TonyTheLion Not really. The java bytecode has a very limited set of instructions (as well as CLR FWIW) whereas a C++ compiler, for instance, can map your code to any x86-64 opcode. And there is thousands of them.
 
@CatPlusPlus Yeah, you don't need background, but I think it helps to see why functional is so incredibly powerful :)
 
11:18 PM
Bytecode VMs are better than source-level interpreters.
@NikiC Maybe. I see it regardless. :P
 
@TonyTheLion I totally misread that quote. Cat's right
 
@TonyTheLion For instance, the ocaml compiler can do one-stage compilation (directly to machine code) or generate an IL language. The IL language is thus slower
 
VMs/JITs are also one of the few areas that can still benefit from using assembly directly.
 
am I misunderstanding that quote?
 
If you keep information in the IL language there is no point in compiling in the first place
 
11:19 PM
@TonyTheLion interpreting bytecode is faster than parsing text.
 
@TonyTheLion Faster perf than what?
 
I understood it as "the bytecode is faster, than just compiling source code directly to machine code"
 
I had a nice post about that somewhere, but I lost it. Search for LuaJIT and performance of direct-threaded interpreters. Or something like that.
 
@MooingDuck right
 
@TonyTheLion no, it says interpretation of source code
 
11:20 PM
ah
which means exactly?
 
@TonyTheLion no JIT, no bytecode, straight interpretation from text.
 
right
ah, but how is that even a comparision
 
@CatPlusPlus Could it be nominolo.blogspot.co.uk/2012/07/… ? Seen that one on r/programming recently
 
Yeah.
 
@TonyTheLion it isn't a good one
 
11:21 PM
interpreting bytecode to interpretating source code text, that can't really be compared
 
Xeo
oh my gosh, it's 1:20 AM already
 
A good bytecode with a good JIT compiler could probably come very close to matching what something like a typical C or C++ compiler produces. The main reason they usually don't is pure practicality: optimization can be slow (e.g., compare Intel C++ to almost anything else) and the user is waiting while the compiler runs. Ergo, expensive optimization isn't used.
 
Xeo
normally I'd be asleep for 2h by now
 
@Xeo Wimp!
 
11:22 PM
@JerryCoffin interesting
 
@JerryCoffin And for many apps, it doesn't make a difference.
 
@Xeo Yeah, but it's Friday :)
 
If your application is I/O bound or mostly waits in an empty GUI message queue, aggressive optimisations are unlikely to buy you anything.
 
@CatPlusPlus I'd say "most" rather than just "many", but yeah, same basic idea.
 
11:23 PM
not that it matters much, I have work to do tomorrow
 
@TonyTheLion Poor you :(
 
lol
well, I call it work, but I'm helping a friend with his computer issues
I've been helping this guy for many years now, on and off, with various computer thinsg
 
Yeah, anyway the CPU is almost never the bottleneck. If it really is, nowadays you can still use your GPU or something.
 
question is, should I start charging him to do it now, when I never really charged him before?
cuz you know, life costs money
and he's using my time
 
You don't charge friends for help.
 
11:25 PM
@TonyTheLion no ^^
 
If you do, you ain't friends.
 
@CatPlusPlus Just wanted to say exactly that...
 
@TonyTheLion I usually ask for food and alcohol for these kind of things. Nothing is free.
 
11:25 PM
@TonyTheLion Is he a real friend, or is he just using you? If he's honestly a friend, I wouldn't charge him. Otherwise...
 
@TonyTheLion it might be too late to demand money, but it's never too late to demand pizza.
 
Xeo
You could charge him for a symbolic 1 cent, just to kinda show that your time isn't free. :P
@MooingDuck Yummy, pizza. Where do I have to introduce UB to get one right now?
 
That's silly.
 
@MooingDuck Screw pizza. Demand booze.
 
@Xeo In your wallet.
 
11:27 PM
@JerryCoffin well, he's a friend alright. :) Maybe I'm just becoming an asshole.
 
well, I'd say
 
Xeo
@TonyTheLion Spending too much time in here?
 
if he's a friend, he should either learn to not get viruses (as you've instructed) or stop calling you when he does
 
@TonyTheLion Take him out for dinner afterwards, but when it's time to pay suddenly discover that you accidentally left your money at home. :-)
 
@Xeo here and reddit, it really doesn't make you a friendly person, from what it seems :P
 
Xeo
11:27 PM
@CatPlusPlus But but... I don't have a programmable wallet. :(
 
@JerryCoffin hahah
 
Xeo
It makes you a rather pragmatic person with a thick skin.
 
@Xeo Then no pizza for you
 
Xeo
(how does that idiom correctly translate to English? ...)
 
reddit is meh.
 
11:29 PM
the internet does seem to have a rather interesting effect on how I deal with people
 
Especially mainstream /r/s. Full of crap.
/r/haskell is cool though.
 
yea, a lot of shitty reposts
but I mindlessly read and browse anyways, have tried to find some new stuff lately
 
And /r/askscience.
 
oh I should add those :)
 
fuuuuuuu
 
Xeo
11:31 PM
what is a file called that's used as a kind of lock?
 
y i buy and eat shit
 
I love r/fuuuuuuuuuu
rage comics are funny and good entertainment
 
Xeo
room topic changed to Lounge<C++>: Notepad, multiplayer mode. [c++] [c++11] [c++-faq] [nsfw]
 
wut?
@CatPlusPlus hahah
 
11:34 PM
@CatPlusPlus Seems to be missing guts.
 
sooo siiicckk
 
what did you do to your stomach now?
 
regular abuse
 
Ate a banana.
 
11:38 PM
lol
 
@DeadMG I'm suspecting the time between the eating and the pain is just a too long to teach your brains the link.
 
well, there's another aspect
regular abuse should lead to regular sick, not this
 
no, it's not that complicated, he knows he shouldn't, but the temptation of that nice food, just overwhelms him and he goes for it :P
 
I know all about it.
 
It's like I know I shouldn't walk long distances, cause agony, yet I do it from time to time and then suffer
 
11:40 PM
@TonyTheLion I mean that if he would start feeling sick 2 seconds after eatiing then he would stop doing it.
 
though I'm very aware of the consequences, just I'm stubborn
 
Life is about knowing your limits and then ignoring them and doing stupid shit.
4
 
naw, I don't want to eatany of this shit in the first place
don't even know why I do
 
Xeo
@CatPlusPlus that thread is golden
 
it's like I wake up and I already did it
 
11:41 PM
@Xeo Yes, it is.
 
@CatPlusPlus Apparently I'm succeeding at life :p
 
@CatPlusPlus #yolo
 
@EtiennedeMartel I don't get it. :(
 
@CatPlusPlus good
@EtiennedeMartel he's a cat. so... yolnt
 
11:42 PM
@CatPlusPlus "You only live once".
A phrase said by stupid teenagers when they're about to do incredibly stupid stuff.
 
As stupid adults, we should adopt the practice.
 
We should aim for a Darwin Award.
Like playing russian roulette with a semi-automatic.
 
Gold badge in life.
 
@StackedCrooked or full auto
 
@StackedCrooked So, just playing Russian roulette.
 
11:45 PM
@StackedCrooked oh, that one's been done already. (in America, who's surprised?)
 
It's one of the awards I think.
 
@CatPlusPlus Well, well.
 
I think all pistols that are not ancient are semi-automatic. Revolvers probably too, but I'm not an expert.
 
"Jumping out of a plane to film skydivers without wearing a parachute (U.S., 1987)" en.wikipedia.org/wiki/Darwin_Awards
 
There was also one where a guy used a chainsaw to decapitate himself just to look tough.
 
11:46 PM
Well, revolvers maybe not.
They don't really load bullets.
 
Roulette is all about revolving.
^ Great book! (Only read one chapter yet) Teaches you how to understand compiler generated assembly, which is useful for debugging and optimizing. (I'm not really interested in reverse engineering.)
 
onebox fial
 
@StackedCrooked I have that book, great book indeed
 
@CatPlusPlus Double-action revolvers are semi-automatic.
 
@EtiennedeMartel Beaten only by "a man's gotta do what a man's gotta do!" as lame justification for being incredibly stupid.
 
11:52 PM
Yeah if you can't spin the cylinder it's not really roulette.
 
Music dump!
 

« first day (664 days earlier)      last day (4284 days later) »