« first day (1544 days earlier)      last day (3629 days later) » 

00:00
Sony Walkman Reborn (Again) As a $1200 Hi-Res Audio Handset, who the fuck would by that? I can get a whole fucking PC for that price...
That's a lot.
0
Q: Which programming paradigm style does C++11 fit in?

overexchangeThis below program is passing function to a thread constructor of class std::thread. #include <iostream> #include <thread> void thFunc() { std::cout << "Hi from thread\n"; } int main() { std::thread th(&thFunc); std::cout << "Hi from main!\n"; th.join(); return 0; } Whi...

^^ lol
Anybody think that reinterpret_cast should also cover const_cast?
@Mikhail No. Why?
Using libtiff I need to get rid of the const and also change the type to void*. Ended up using a c style cast
The only "paradigm" that matches C++ well is "imperative". Everything else is too vaguely defined. — immibis 46 secs ago
user1804599
00:10
Insanity-based programming. — rightføld 10 secs ago
@Mikhail There’s no need for reinterpret_cast to do the same as a C-style cast as long as you have C-style casts available. What’s the problem?
@Mysticial Horrible question IMHO.
@LucDanton reinterpret_cast didn't let me remove the const?
You can write template<typename To, typename From> To old_style_cast(From from); if you want to improve readability.
@Mikhail So you did a C-style cast, which does what you wanted.
It’s akin to asking 'hey, map doesn’t let me filter out elements, why shouldn’t it do that too'?
@Mikhail ...dealing with horrible code is and should be the exceptional case.
00:12
Because you can map a filter or filter a map, and it’s perfectly fine.
Otherwise, why not merge all language features and just have do_the_thing which does the thing?
Thats a bit extreme, I am still surprised there isn't a cast called fuckit_cast<srsly>(). Maybe the template method is a good idea.
@Mikhail Yeah, I was having fun. More seriously though, reinterpret_cast has never been intended to be a C-style cast with the new notation.
@ThomasMatthews When you say more than one paradigm, In C++11, For the above program, How do i pass my "thread code" that should run on separate thread as an instance of class? because on one side, we have class thread and on the other side we write a function thFunc. I want to only speak in terms of class instead of writing such functions thFunc. How do i do that? — overexchange 5 mins ago
What about leaving the drugs Java alone?
Ell
Ell
My serious study time is approaching
Almost time for a 4 month lounge break
When?
00:24
posted on January 06, 2015 by Steven Gates

Right before the holidays we put together a new release, version 2.4.0, of the C++ REST SDK . One of the new features added in the library is support for targeting Android using the Visual Studio 2015 cross platform mobile development, as well as the...(read more)

@Ell Aww.
Well, can't you lounge and study at the same time?
@Feeds That's pretty win!
@Ell :c
I'm sure he can visit the lounge every once in a while.
Ell
Ell
@sehe I'm leaving when my brother goes back to uni
It will probably be Monday I leave I reckon
00:28
Oh. That's soon
Ell
Ell
@Nooble no, I get distracted easily :(
And this is my last chance. I really gotta give it my all, I want to go to Bristol so badly
Oh, alright then.
Good luck!
Ell
Ell
Thanks :)
I'll be back mid June
@sehe NuGet for C++? :O
Ell
Ell
Hopefully in time for the in conference :3
00:29
@Nican long time now, but it's apparently getting some real use now
@Ell You're going?
Ell
Ell
Not yet
I'll be back on June 18th
Err... to the unconference, I mean.
Ell
Ell
Oh.
That depends where it is and if its before or after June 18th
@Ell I love you.
Be back soon, darling.
00:32
Unconference the movie? Anyone? Take a video for the people who won't be there?
Please
Ell
Ell
@Jefffrey don't worry darling I'll say bye on Monday
@Ell :O You're abandoning us! :(
@Borgleader It's for a good cause :)
Besides, it's only temporarily.
@Nooble Lounge<Cause++>
Ell
Ell
@Borgleader you'll survive :O
00:41
How late am I for the "Elon Musk plays KSP" train?
@Borgleader You did not see the reddit AMA?
@Nican earlier today yes
Besides, doesn't Bartek leave all the time.
@Nooble Not all the time, but he has left for a while a few times. Come to that, it would probably be better if more of us took a break now and then...
Take a break for what reason?
00:49
@Nooble To remind ourselves of what the outdoors look like and such.
I heard it has great graphics.
@Nooble Gameplay sucks though
@Borgleader Yeah, no respawn.
@Nooble No true, cats have the 9 lives DLC
@Borgleader Can you believe it... Actual consequences?!
Story mode takes a whole lifetime to complete!
I just refactored some code. Now all I have is a moving triangle, but the code is so organized.
user image
2
01:06
@Nooble Sounds like a typical Functional programmer: "I have the most insanely cool code you've ever seen to do something so boring you haven't touched it since the second week of your first programming class ever."
We are starting maintence on the SQL cluster in NY and possibly Chat in OR, hangout is up at: http://youtu.be/Hib5Gmj2dbo
@JerryCoffin Haha
Hmm... Why does @rightføld get starred everytime he says "Guys.". Am I missing something?
Bringing down secondary SQL servers for hardware maintence now - this should cause no user-facing impact.
01:33
@Feeds And the server starts play an old ELO song.
01:53
0
Q: nontype template parameter produced with decltype for function

Marcin JedrzejewskiI want to replace writing function signature with decltype, and found out it does not compile with most compilers. Is it a new feature or maybe unspecified behaviour? #include <iostream> template <typename T, T nontype> struct CL { void call() { nontype(123); } }; void f(int n) { std::...

Lol, VC++ ICE
@Columbo lol
@JerryCoffin LOL - Jerry?
Is that your smurf account?
:D
@Columbo Now I'm even more ashamed!
They see me smurfin', they hatin'...
01:56
Foxpro? What have I come to?
#jerryunmasked
LOLLLLLLLLLLLLLL
@Borgleader Faker than.... other fake stuff, I guess.
@Columbo idc, i laughed
02:13
LOL
0
Q: I need a boost::thread example program please

xinthoseCan anyone point me towards a good boost::thread c++ example program? I am a programmer at work and tried running the bulk of my int main in while loops, but it keeps on crashing / hanging. I figure that threads will work better but I don't know how to use them really. I need to be able to ret...

If you can't fix the crashes you have now without threads, adding threads will only make it worse. — Borgleader 6 secs ago
@Borgleader Threads: helping you crash multiple CPUs concurrently since 1988.
Although, I should have written: adding threads it worse will make only
02:34
@Borgleader He should use regex as well.
02:55
We will be taking chat offline in a few minutes to move database servers in Oregon.
03:25
I WANNA SLEEP BUT THIS STUPID NOISE WON'T STOP.
Hi.
@R.MartinhoFernandes What noise?
The noise of genius?
If you want me to stop, I'll try but I can't help it.
03:41
> Stack Exchange is currently offline, we'll be back shortly!
wait what
We are failing over to our redundant SQL servers now, there will be a brief maintenance page.
WHAT IS THIS SHIT
just realised i don't give a fuck#
bai
@Nooble Fucking ringing in my ear.
04:04
started investigating murders in la noire
the game got 10000x more interesting
there's not much depth to each separate case but they seem to build something bigger so I'll wait :(
they seem to revolve around shit like the black dahlia and the zodiac killer
which is awesome
I'm doing geometrical proofs
which isn't awesome.
04:30
The truth is... some of us are just really, really sad. — Lightness Races in Orbit 16 secs ago
#amirite
We are now moving chat - ETA for downtime is a few minutes.
Chat is back online!
0
A: How to explain "instant" answers? Is there a secret queue or notifications for new questions?

Lightness Races in OrbitHonestly, it's simply just because many of us sit at our desks, day in and day out, not only refreshing our email inboxes and Facebook feeds, but also our Stack Overflow front pages. When we see something uninteresting and derivative, we cannot help but answer it. This process takes mere minutes ...

@Feeds Didn't feel a thing.
@LightnessRacesinOrbit I got the connection dead banner for a few minutes.
@Mysticial Winter is coming.
> A month before the start of the financial crisis, the Bank of England was apparently unaware of the impending danger, new documents reveal.
>
> In a unique insight of its workings, the Bank has published minutes of top-secret meetings of the so-called Court that took place between 2007 and 2009.
>
> The minutes show that the Bank did identify liquidity as a "central concern" in July 2007.
>
> However no action was taken as a result.
>
> The documents show that the Bank also used a series of code names for banks that were in trouble.
Wankshaft misleading media
so cold
04:41
I'm drunk so I can't help it. Submitting a formal complaint.
> I usually just post a statement on Facebook about things like this but, this time, I cannot resist. This is just offensive and I don't understand how your editors can justify it.
>
> The article's headline — advertised in the "Most Read" box on your site's every page — reads "Bank of England was unaware of impending financial crisis".
>
> Then the very FIRST few paragraphs read thus:
>
> "A month before the start of the financial crisis, the Bank of England was apparently unaware of the impending danger, new documents reveal. In a unique insight of its workings, the Bank has published min
Troll away, wankers.
(plus or minus some grammar errors here or there; yes there are a few)
@LightnessRacesinOrbit yeaurite
I wish the weather is cooler here
04:57
Hey folks.
0
Q: How to work with if not in PHP?

Sudu PuthaI want to print the div with the class called inner-content-div, if the variable $name is not consisted with the following strings. Gingelly Rolls Kithul Treacle Coconut Vinegar But my PHP code is not working. Here is my code. <?php $vid = explode("/", $_GET["q"]); $name = taxonomy_term...

Whenever anyone tells you that C++ is not over-complicated and esoteric, point them to questions like this. — Lightness Races in Orbit 8 secs ago
@LightnessRacesinOrbit Did you intend to say: "Whenever anyone tells you that C++ is over-complicated and esoteric..."? As it stands, it seems to be saying the PHP is so simple it proves how complicated and esoteric C++ code is, but that doesn't seem to fit well with the code at all.
"MSE is often different from all the 'main' Q&A sites" Read: MSE mostly shouldn't be powered by the SE engine, but by something else entirely, because it is a case study in misuse of a technology for the bloody sake of it and subsequent constant apologies for that fact. — Lightness Races in Orbit 28 secs ago
hope you're enjoying this
ffs meta comment links don't onebox properly
oh well; night
05:10
@Feeds haha
06:01
Anybody used the CUDA thrust library? I'm wasting a lot of time at having to malloc like its 1999
\o/
Morning!
06:57
@VáclavZeman Morning :)
@R.MartinhoFernandes OCD triggered by knives?
07:32
it's good, like your mom
The docs make a good first impression :P
probably vc++
use gcc when you have a codebase that was originally written in gcc
cross-platformness is a property of the code not the compiler
gcc has better C++11 support though
ergh... who the hell is submitting blank responses?
@ScottW oh you
@ScottW I love you
Use the tool that you are most productive with.
@StackedCrooked well, a 'cross platform' compiler would be one that compile to many platforms and/or has an executable for many platforms
07:41
You can use cmake to generate VS projects or Makefiles. That could help to establish a portable base.
it's less worse than most alternatives
Ninja seems to be popular these days. I should try it one day.
I need a little advice about code organization from more experienced programmers.
If it's okay...
I have an old class, from when I first learned object oriented programming. It does useful stuff still, and the math hasn't changed. So, I'm going back to improve it.
It's hard to document because it's huge. Lots of methods, and it could be better organized. But there's no way to get around a performance cost in lookups and copies if I separate it into different headers.
So, I need to know if having a long class with many methods is generally looked down upon.
This is more a pragmatism question than anything. I just want to code politely.
@user2813810 It is. Look up 'separation of concerns'.
Thank you
07:57
That is what we call a monolith
It's true to a certain extent that in C++, the most object oriented way to add functionality to a class is to create a non-member non-friend function that acts upon it
Try to remove some of the methods and turn them into that
This way, you have less code accessing the innards of the class, and the only thing these methods would rely on is a contract you're setting
(Valid function inputs, valid class state, etc...)
lol
Step 8: if it gets dark, apply lipstick. — NothingsImpossible Mar 22 '14 at 15:08
I had a feeling that's the right way. I'm preserving reentrance by using wrappers for certain data. I have to be careful about what acts on the original class because it has many applications.
I started writing that way naturally with some practice. It's easier than lumping everything in one class. This is just the first time I've looked back on code that old.
08:12
So VLAs are a conditional feature in C11.
It seems the C languages are becoming a huge mess of ... stuff.
Ell
Ell
Dasistkomichs
Ell
Ell
08:31
> Get a bloody grip for cock's sake
Lol
The funniest thing about C11 is the generics support.
08:46
@user2813810 this relates to the open-closed principle. Class should be open to extension, but closed to modification. For example, if you have a (mathematical) vector class it should be not much more than a container for the data. The class is closed to modification, you can't change what it is or does, but it is open to extension, ie you can have a free function 'length(Vector3D)' that extends what you can do with that vector.
of course, with that example I'd argue that such trivial functionality should have been provided already
@VáclavZeman oh, like java generics and not templates?
09:01
@rubenvb "becoming"?
@Puppy oh hey, new avatar
yes.
@Puppy ha, well, good point.
They never really were designed... from the bottom up. More like "oh shit, we need this feature, let's just add it this way"
and in most cases they didn't need that feature.
@thecoshman weird macro-based workaround for lack of overloading
oh, C11, I though this was C++, I care less... still curious though
09:48
Good morning.
wheeeee hungover
a hoy hoy
user1804599
@Nooble lol fibonacci in not O(1) space.
user1804599
10:04
@thecoshman hint _Generic is shit
user1804599
Also nobody uses C11.
@rightføld that's the leading argument
last I checked, people are only using C because they can't update or are pro kernal devs who know better than everyone else
being in kernel mode does present some additional challenges over user mode
IIRC, hardly any stack, lots of shitting around with memory, etc.
user1804599
What happens if a finaliser throws in C# or Java? Does it terminate the program like in C++?
10:11
you get slapped, for using Java, for using a final, for throwing in a final, for an even four.
user1804599
Awesome.
A throwing finalizer starts a fail-fast.
user1804599
Would be funny if someone forgets to call Dispose on some resource and then later the GC comes along and the finaliser throws an exception because the resource couldn't be closed.
user1804599
Throwing close methods are shit.
aaand the main site locks up? ah. intermittent
10:20
How does std::sort actually work?
MAGIC
Introsort or introspective sort is a hybrid sorting algorithm that provides both fast average performance and (asymptotically) optimal worst-case performance. It begins with quicksort and switches to heapsort when the recursion depth exceeds a level based on (the logarithm of) the number of elements being sorted. This combines the good parts of both algorithms, with practical performance comparable to quicksort on typical data sets and worst-case O(n log n) runtime due to the heap sort. Since both algorithms it uses are comparison sorts, it too is a comparison sort. Introsort was invented by David...
That's the helpfulness quotum for today :)
the wikipedia article is a good introduction
is it possible to see the code behind std::sort?
for the GPL STL library?
Introverted sort
10:40
@Ell A bloody grip on your cock sounds bad
@edition it's impossible not to, regardless of license
I have found a solution: davekoelle.com/alphanum.html
I'd be surprised if the standard left room for type-erased private implementation
@edition doesn't seem to load. What does it solve? GPL licensing? STL being extinct? Seeing the code? Just open the darn header :)
420
Q: Why can templates only be implemented in the header file?

MainIDQuote from The C++ standard library: a tutorial and handbook: The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this?

> People sort strings with numbers differently than software does. Most sorting algorithms compare ASCII values, which produces an ordering that is inconsistent with human logic. Here's how to fix it.
Collation is the assembly of written information into a standard order. Many systems of collation are based on numerical order or alphabetical order, or extensions and combinations thereof. Collation is a fundamental element of most office filing systems, library catalogs and reference books. Collation differs from classification in that classification is concerned with arranging information into logical categories, while collation is concerned with the ordering of items of information, usually based on the form of their identifiers. Formally speaking, a collation method typically defines a total...
Ah. So, you wanted collation, not sorting.
10:44
And the usual way to solve it is libicu
user1804599
Collision.
Anyway now that the page loads it is clear they just interpret the strings as separate information items and apply a custom (say tuple) sort on those.
user1804599
I like Microsoft.
4
That's not text sorting at all. It's parsing again. Sign of a bad data model. Stringly typed programming
user1804599
Is RxCpp good? Prolly not since they want it compiling on MSVC.
10:46
@rightføld see my tweet of yesterday twitter.com/sehetw/status/552623980478484480
user1804599
return rx::observable<>::range(x, z)
    .filter([=, &c](int y){++c; return x*x + y*y == z*z;})
    .map([=](int y){return std::make_tuple(x, y, z);})
    // forget type to workaround lambda deduction bug on msvc 2013
    .as_dynamic();},
user1804599
lol the example
@rightføld my tweet of ere-yesterday twitter.com/sehetw/status/552121352367636480
@rightføld oh god. they include the MSVC specific performance breakers just so it sorta kinda works "OotB"
user1804599
Doesn't matter; I don't give a shit about performance as long as it's fast enough.
RT @GaryGJohnson: vim users get ready to accidentally power down your new #Macbook every 5 seconds http://t.co/xlLf8frszm
10:49
Isn't Visual Studio still one of the best IDE's?
@rightføld we become immune to repeated jokes
@edition Isn't that an inverted rhetorical?
user1804599
@sehe That button doesn't power down, that would be incredibly moronic.
user1804599
It puts the machine to standby mode.
Oh. That's totally non-disruptive then.
Carry on
user1804599
Never said it was non-disruptive.
user1804599
10:50
But it's totally less disruptive than completely turning off the goddamn thing.
@sehe YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
good night.
Well I sometimes long press the esc key by reflex
@R.MartinhoFernandes Because people don't remap there Caps/Esc/Tab combos
user1804599
It has a delay so if you press another key quickly enough it will not go to standby mode.
10:52
@LoïcFaure-Lacroix A lot actually.
@rightføld Woot. Nice
Because Apple is not very good at computres
Still it's pretty bad design
I need to get going. bbl!
@sehe It's silly regardless.
on my actual macbook it's hard to accidentally press the shutdown button
user1804599
10:53
I need a new PC.
> As long as it's pretty! — S. Jobs†
Don't fuck with keyboards like that.
Gosh that took some editing
user1804599
With a good graphics card so I can run Vim with more colours play video games with max settings.
Don't put the eject button next to the windshield wiper switch.
10:53
@R.MartinhoFernandes :)
user1804599
On my current PC Minecraft gets to 60FPS only when I set render distance to at most three chunks.
Anyway, I realize that vim on macos is slow
actually macos is pretty slow compared to linux on my macbook
the only advantage macos has is that it has battery life of 6 hours while on linux it has around 2 or 3 hours max
pretty sure Minecraft shows signs of lag if maxed out on any configuration
I never saw that game run at a clean framerate
user1804599
> [1, 2, 3].forEach(function(x) { console.log(x); });
1
2
3
undefined
> [1, 2, 3].forEach(console.log);
Uncaught TypeError: Illegal invocation
user1804599
:javascript:
10:55
console.log can take multiple parameters
forEach send 3 parameters
user1804599
You can pass any values you like to console.log and you won't get type-errors. Problem is this.
Xeo
Xeo
So the fact that the first invocation works is the real WTF?
@rightføld not sure, if you're using v8 other parameters are used for formatting I guess
user1804599
[1, 2, 3].forEach(console.log.bind(console));
1 0 [1, 2, 3]
2 1 [1, 2, 3]
3 2 [1, 2, 3]
user1804599
hahaha what the fuck
user1804599
10:57
@LoïcFaure-Lacroix No it only behaves like printf on Node.js.
@LoïcFaure-Lacroix Everything can take multiple parameters in JavaScript :/
@R.MartinhoFernandes I'm aware of that, it's just that when you call forEach(function(x) ..) you're catching the first one only
when you do forEach(console.log) all parameters are sent to console.log which might create errors
user1804599
No, that's not the error. Again console.log accepts and prints everything.

« first day (1544 days earlier)      last day (3629 days later) »