« first day (2435 days earlier)      last day (2508 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
:D
@login_not_failed okay I am interested. Which one would you recommend?
 
I was stunned when I saw SHENZHEN I/O. Then realized that the game was not produced by an Shenzhen firm. Weird.
 
I played TIS-100 first, Shenzhen I/O later, and I liked both of them, so probably in that order :)
 
Well TIS-100 has made me laugh twice so I kind of owe it to them
 
it's pretty hard once you realize its restrictions and how far in the past these approaches are from todays standards :) even though it's all fake
 
@login_not_failed Have you read any hardware books you would like to recommend? I have Computer Architecture: A Quantitative Approach and Art of Electronics
 
4:07 PM
like, you may do first few dozen of challenges in one evening, but the pain comes later :D
 
I'll take your word on it
 
@slaphappy MS VC++/C# /cc @Shoe
 
@Horttanainen not yet, too consumed by software/math books
 
@login_not_failed I can recommend that Art of electronics. I am going to read that computer architecture one after Operating Systems
 
@Horttanainen will add it to my never-ending list of books to read :D
 
4:12 PM
My reading list is only 4 books deep currently
 
there's just too many good books to read before you die
 
But then again thats probably 6000 pages
True
 
yea, normal people don't read books that thick for sure
 
I like em thicc
Okay I am going to try that tis-100 out. Thanks
 
^_^ have fun! it may consume your whole weekend time in the worst case
 
4:15 PM
Manual? pffft!
 
btw! if you open it up at work, people would think you're still working
there's no way to tell if you never saw it before
 
Hm, it's written that cppreference can be filtered to specific C++ version
Does anyone know how to trigger that?
 
4:34 PM
hey hey hey, can we post C++ question here?
I need help with a bubble sorter QQ
 

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
 
Thanks sexy thang <3
awww, nobody is in that room :(
 
@faceless just ask your question
 
Okiieee
 
4:47 PM
If you need to do this in Powershell of all things, why did you tag C#/.NET? AFAIK they are not related. — Borgleader 7 mins ago
Parsing XML in powershell, that's a new one
 
c’est mal
 
5:15 PM
@Borgleader Not all that new. This guide seems to be ~5 years old: blogs.technet.microsoft.com/heyscriptingguy/2012/03/26/…
s/guide/post/, I guess.
 
5:32 PM
@JerryCoffin Huh, interesting
 
@wilx Obviously not worth reading--simply glancing at the name "Areo" it's clear that this is a product of an Aryan supremacy group, and the article itself nonsense, no matter how logical and sensible its arguments may seem.
 
So I just came across this political comment:
> 2 out of 3 of Trump's wives were immigrants...proving once again, there are jobs that native born citizens refuse to do.
 
@Mysticial If 1 out of 3 wasn't an immigrant, it would appear to prove rather the opposite.
 
5:48 PM
There's just so many ways to read that comment no matter your political stance.
 
@Mysticial Like almost everybody else (at least in the US), my political stance is "holding on for dear life, hoping to survive". :-)
 
Source of the comment is somewhere here: yahoo.com/news/yahoo-news-now-191933606.html
 
6:11 PM
is it normal, when learning to code to look up other peoples algorithms and copy them in order to learn. At least, up until you know enough to create your own stuff?
I always feel so discouraged having to look up answers online because I dont know how to problem solve, even when spending hours on a problem
 
yes
 
6:28 PM
@login_not_failed I played Human Resource Machine quite a lot. How is TIS-100 compared to it?
 
@Horttanainen lol the sound at the end
@faceless Give us 3 examples.
 
@fredoverflow Yeah it made me laugh twice
 
@fredoverflow I'm following this forum cplusplus.com/forum/beginner/147214 and trying to understand the code line for line so I can use it for a homework problem
becausse I dont know how to write something like this from scratch
 
> The instructor has us using Visual Studio, and requests that we use 'void main()' to start off the program
 
6:37 PM
India
Actually no, because then it would be Turbo C++
 
Has India received the news about the first C++ standard yet?
 
Everybody that did left for Redmond, WA
 
6:53 PM
Is this related to c or c++?
 
user1804599
That's C code.
 
user1804599
But the question is not worth editing.
 
user1804599
It's shit and should be deleted.
 
Seriously, why would you ever think that code like # define msg std::cout is a good idea? It will break any code that contains the name msg, which is not that uncommon a name, in my experience. — Neil Butterworth 1 min ago
/cc @Mysticial
Gratuitous use of #define is gratuitous
 
facepalm
 
Ell
7:13 PM
@wilx what was the name of that cool underground bar we went to in Prague?
 
@Ell "U sudu", which translates vaguely as "By a barrel/cask/keg."
 
Ell
Thanks :D
 
@Mysticial I dont have that problem because I run with the show whitespace option.
 
"with 17.5% using both"
Also do PHP devs seriously make $35k? At that point you might as well become a primary school teacher or some other low paying job.
 
7:30 PM
@Mikhail Is that in US or elsewhere?
 
@Mikhail What about Botany?
 
@Mysticial How much does a Botanist make? The median annual Botanist salary is $65,181, as of May 30, 2017, www1.salary.com/Botanist-salaries.html
2
 
IOW, evidence suggests that PHP devs should switch to botany.
 
Details for: Evan H Delucia

    Salary:
    $265,989.00
    How paid:

Currently held positions

    Position: PROF
    Department: Plant Biology
 
@Borgleader We need more i-- + --i, at least then we could make a star wars joke about it. — Yakk 8 mins ago
xD
 
8:06 PM
Nice one.
 
8:36 PM
Hey can someone meet me in the C++ questions and answers room? Need help digesting a line of code
 
@Morwenn I felt like going back 10 years
 
@Horttanainen But the track isn't even 10yo AFAICT :o
 
@Morwenn the genre
 
Psychedelic trance? Yeah, the genre hasn't changed much :p
 
I liked the Igorrr tracks you posted a week ago
 
9:04 PM
That said, Psymphony No.1 in F Minor, a 2015 track, shows that people can still write great and original psytrance :D
@Horttanainen Oooooh, you just reminded me that the new album came out today. I should listen to it :o
 
@Morwenn :o
 
Savage Sinusoid
 
@Horttanainen who are you again?
you're not TheBlob right?
 
9:09 PM
TheBlob again huh?
 
I am a Hawaiian Scheme enthusiastic who are you?
 
@Horttanainen Uhhh what
How are you a Hawaiian Scheme enthusiast?
what
@Horttanainen tell me more!
 
Ell
Lol
This is fate
 
TELL ME MOOOOOOORRREEEE
 
Ell
9:13 PM
Unless @Horttanainen is @VermillionAzure's puppet
 
@Ell certainly not an alt. I have THE DEVIL'S SPAWN for that
 
Ell
Inb4 "you don't know how to use possessive apostrophes"
 
@VermillionAzure Don't you see? I am you
 
@Horttanainen nuh uh
 
Together we are TheBlob
 
9:14 PM
But seriously -_-
 
@VermillionAzure You know you're all my sockpuppets. I use cosmic rays to control what you think are your own minds.
 
@JerryCoffin stahp
you are not Bartek
 
We went over this already. That's why I was joking. I am from Finland
 
nwp
I played with a fidget spinner and am officially cool now. Unfortunately it got boring after 3 seconds and all attempts to get amusement out of it afterwards failed.
 
@VermillionAzure Bartek is another of my sock-puppets.
 
9:15 PM
@JerryCoffin You're my socket.
 
@Horttanainen lol
I AM THE HAWAIIAN SCHEME ENTHUSIAST
FEAR ME. shaka
🤙
 
@Morwenn That's what I choose to let you believe...
 
@nwp Some guy in my office has one. It spins so it's cool.
 
@nwp totally worth that $10 am i rite?
 
nwp
@VermillionAzure 3€ and no, not at all
 
9:18 PM
The new Igorrr album is fucked up as always <3
 
9:28 PM
So uh
how's everyone doing?
 
Eargasms and stuff.
 
9:45 PM
Dealing with COM+, apparently you need to cast objects to their bases classes for the correct interface...
 
nwp
planning on DMing for some first try D&D
 
@Morwenn Igorrasms?
 
@JerryCoffin Currently yes :D
There's yet another "r" though.
Here, I'l let you have a nice piece of it :3
 
@Morwenn rrrrrrrrrrrrrrrrrright!
 
x)
 
9:56 PM
@Morwenn Need to add in a bit of tuning that sounds a bit odd to our modern ears.
 
@JerryCoffin Them comments.
 
@Morwenn About on par with YT comments in general, I guess...
 
I was expecting a bit more of allegro though :o
 
0
Q: Static polymorphism: function overloads vs template specializations

StackedCrookedSuppose I want to create a generic Serialize function that allows me to serialize built-in types, composed types and user-defined types. Then I see two ways to do it: Overload based: Serialize() is overloaded for all (supported) builtin-types function template overloads are added for vector/m...

^ Feel free to answer :)
I hope the question is clear, since it's kinda brief.
 
@StackedCrooked Use customization points for that :p
 
10:09 PM
Both solutions already support user-defined types. Not sure how what else needs to be hookable.
In an RPC project at work I used the overload-based solution. It works but I feel that the compile-time overhead is to high.
 
Download moar ram.
 
Overload resolution is a lot of work for the compiler . And and the serialize for tuple will internally call serialize overload for each element.
 
On the other hand, specializing a class in another namespace is quite painful :/
 
And some overloads have enable_if for overloading enums.
@Morwenn Yeah.
Hm, so maybe a hybrid approach would work.
 
There are proposals to expand namespaces from anywhere else with a syntax like namespace ::std { /* stuff */ } but it won't be availlable before a while.
 
10:14 PM
boost::serialization uses ADL for finding the user type. But then each member variable will be serialized using a class template specialization. One of which does ADL.
 
I remember doing horrible things with ADL a while. I'm not sure I'm fine talking about them :x
 
I prefer the "class template helper" approach because ADL is cancer
 
I care nothing of that. I prefer to not pass this to a lambda.
 
@milleniumbug I've not been bitten by ADL yet.
 
@StackedCrooked I've come to abuse ADL a bit when doing very high-level TMP.
 
10:25 PM
TMP?
 
template meta programming
 
I suppose unintended ADL can be avoiding by using prefixed function names. (Like asio_handler_allocate(...)).
 
@StackedCrooked I haven't been hit by unintended ADL. But I have been into a few cases where I unintentionally relied on it. And then suddenly a small refactor broke the ADL and everything stopped compiling.
 
@Mysticial It's addictive.
 
10:27 PM
sure, then you go something like client::client(){ asio::callback = this.callback; }
and then client is moved.
and then you wonder why valgrind complains about a stack allocated object. That is exactly what you wanted.
And then you realised, this is not this anymore and you feel like the earth is sinking. But there will probably other days when you feel more like an idiot, so this day isn't that bad.
 
@StackedCrooked Yeah. The case that got me into it was that in my pi program, I originally had two very large algorithms (each about 30k LOC) which were almost completely identical at the top level, but completely different at the low-level.
But each of them rested in different namespaces.
So I refactored out all the top-level code (20k LOC) into a 3rd namespace as templates. And that had hundreds of calls into low-level functions defined in each of the two algorithms in their original namespaces.
And that worked, until I changed one of those functions, which broke the ADL and everything fell apart. lol
 
that's really the power of templates.
 
That's actually when I learned about ADL.
So then I fixed it up in a way to "properly" rely on the ADL to work.
 
Accordion blastbeat ♥
 
10:46 PM
@Morwenn I still think I agree with Bierce's definition of a gentleman: "a man who knows how to play the accordion--and doesn't."
 
@JerryCoffin I don't think I truly get the subtlety that there might be in this definition :/
 
@StackedCrooked Though TBH, when performance isn't critical, I do prefer the virtual method route since it's more elegant and more readable.
 
Yep. Definitely.
 
@Mysticial Depending on the situation, there's often some middle ground where you pass the lower-level class as a strategy parameter to the higher-level template.
 
@StackedCrooked Didn't your question just get closed as a duplicate of a question that isn't yours?
 
10:50 PM
@Morwenn It's marked as a duplicate, but not yet closed (I think.)
 
@StackedCrooked Well, we can vote to reopen it, so...
 
Gold badge users can insta-close as duplicate :p
I wanted to try a "yo mama is way too broad", but that's a bit risky and I'm tired.
 
@StackedCrooked Looks closed to me.
 
Have a good night (or whatever else you might enjoy) ^_^
 
10:59 PM
@Morwenn same to you <3
 
@jaggedSpire Thanks :3
 
@Morwenn I'd enjoy a nice glass of Petrus right about now (but I'd probably enjoy even more having the money that a bottle of Petrus would cost). Anyway, good night.
 
@JerryCoffin Haha, I'm not sure I could truly enjoy something that expensive. It would be wasted on me. Thanks xD
 
@Morwenn I could truly enjoy it. A friend of mine bought a case of Petrus back before wine prices got so inflated. By the time he shared some with me, a single bottle was probably worth more than he'd paid for the whole case. I'm not sure it's worth its current prices, but it really is very good wine.
 
11:17 PM
night morwenn
 
@JerryCoffin That is kinda what I do. Most of the highest-level code is done with virtuals. The lower level stuff is templated where necessary.
Granted most of the highest-level code has run-time determined types. So templating isn't always possible.
 
@Mysticial Yeah, that does throw a wrench in the works.
 
It's largely because of the tuning and algorithm selection.
A bunch of algorithms that do the same thing. At run-time it looks at the hardware and the settings to pick an algorithm.
 
@Mysticial Recently I just did that. It turned out that the compiler devirtualized the calls. It looked something like this.
 
11:33 PM
@Mysticial Life would be so much easier if we could just get the hardware vendors to pick a spec and stick to it. Given that we now want vector ops in consumer machines, I vote that AMD and Intel standardize on the Cray 4 ISA, and make our lives a lot simpler (at least for a few years).
 
Note the the virtual calls re-appear in the assembly if you remove the final specifiers.
 
@StackedCrooked Yeah, if the compiler can prove that the type can only be one thing, it'll devirtualize it. Even if it can't it is theoretically allowed to speculate on which is the most likely, branch on it, and inline it.
 
@Mysticial Pretty sure the latter remains mostly theoretical though. I suppose Intel might implement it, but I'm pretty sure I've never seen it from gcc, Clang, or VC++.
 
@JerryCoffin ICC does the worst thing actually. It branches on purecall rather than putting it into the vtable.
 
@Mysticial This is really great because it's one interface that works for both dynamic and non-dynamic/inline invocations. That's great flexibility.
 
11:40 PM
@StackedCrooked Final isn't even necessary if the object is declared in a local scope where the compiler knows how it's constructed.
 
Yeah. But compiler sometimes seems to need the extra hint.
Oh, now I see why the compiler can't see it.
 
Though I don't think compilers can currently devirtualize: new Object()->method()
Even though it's obvious when you look at it, the static analysis needed to make it possible is quite non-trivial.
Since it needs to recognize constructors as a special entity.
 
@StackedCrooked It always strikes me as strange how the vast majority on SO (and Reddit, for that matter) seem to think the compiler is nearly magical in its ability to optimize any "equivalent" input to the most optimum possible object code, but all of us who actually look at the object code find that we need to pretty much force-feed it hints just to keep it from doing horribly stupid things.
 
Well another problem is that the static analysis might need to evaluate across function boundaries in a way that would exploded the inline limit. Its trivial to make something on GodBolt that shows de-virtualization in action.
 
@JerryCoffin I suppose the compiler really wants to avoid the worst-case scenarios. So it remains conservative unless you force it to optimize further.
@Mikhail This code was based on real code in our company.
I didn't know it inlined the virtual calls until I noticed in callgrind's output.
 
11:54 PM
Sorry, didn't see the conversation on top. One other fun thing to do is to add the final specifier everywhere. Also LTO.
 
Unfortunately GCC has trouble using LTO on large code-bases. Especially if debugging symbols are also enabled.
 
Hmm, I thought they mostly fixed it. I typically build a lot of Gentoo packages with lto.
 
damn, why is there no cpu benchmarks for compiling source code
download boost, compile it, measure the time it took
 
00:00 - 16:0016:00 - 00:00

« first day (2435 days earlier)      last day (2508 days later) »