« first day (1062 days earlier)      last day (3869 days later) » 

12:00 AM
Eh, metadata.
Who pays attention to metadata.
 
Xeo
firefox, apparently
 
12:14 AM
I'm watching Scott's talk. Interesting stuff.
> gcc takes a little shortcut. they don't implement the standard properly
lolll
 
Xeo
Scott was in a bully-mood while giving that talk :>
also, past 2am already. G'night.
 
gnight
 
A) What should I/we get from this? B) I should learn more about std::future
 
The author seems to favor async operations (i.e. callbacks) over futures.
 
12:20 AM
std::future et al are one of the things I don't know much about C++11.
 
Xeo
I dislike how callbacks are just all over the place, especially with ownership :(
@StackedCrooked I like how he managed to work futures, coroutines and those fibers in
 
futures and scope-based resource management work nicely together, callbacks can get messy indeed.
 
Rj.
hey guys, quick quesiton, if you delete a question you have that has a bounty do u get ur points back (if no one answered it)
 
Xeo
@StackedCrooked FWIW, I was pondering about how the std::future model doesn't necessarily work well for Asio
Maybe I should mail that guy my thoughts.
But for now, it's sleep time.
 
You guys make me wanna learn about futures
 
12:31 AM
The basic usage is simple.
I think it can be nice to combine them with callbacks. E.g
std::future<StatusCode> http_get(std::string url, receive_callback);
StatusCode result = http_get("google.com", [](const std::string& some_data) {
    std::cout << some_data;
}).get();
Also futures are great for forwarding exceptions.
The Boost Coroutine stuff is really foreign to me though.
 
var result = await http_get("google.com");
do_stuff(result);
// :v
 
wget google.com
 
Futures really shine when there's real language/compiler support for them.
(And that's just a step away from generic monad support, really.)
 
@CatPlusPlus What is the await doing?
@CatPlusPlus What do you find lacking in C++11 futures? (Apart from .then())
 
12:43 AM
> The await operator is applied to a task in an asynchronous method to suspend the execution of the method until the awaited task completes. The task represents ongoing work.
 
@StackedCrooked Language support to hide .then chains, duh.
Task = future.
 
> return std::move(f);
Hey, STL told us not to do that!
 
1:02 AM
The really annoying part of Java is trying to do a mass-upgrade of it.
 
s/do a mass-upgrade/get rid of/
 
@Borgleader Nice grammar.
 
pff you got the idea
 
1:22 AM
Hm..
Hopefully satire?
 
I hope so. Otherwise that's just sad.
Alright time for chandler's talk!
 
@Rapptz The internet offers a great variety of things :)
 
1:42 AM
I didn't know midori was a (coktail) word.
But it means green in Japanese :)
 
@chris It's a brand of melon liqueur (and yes, it's green).
 
Oh damn... the clang formatting thing o.O
plz plz plz plz integrate it in VS
 
What Clang formatting thing?
 
@Rapptz In Chandler's talk, he just edits code and presses one button and it gets auto formatted
 
1:55 AM
How does a compiler format text? I'm pretty sure that's an external tool (there are a plethora of them)
 
ok llvm whatever -.-;
 
LLVM wouldn't do it either I'm sure.
For some reason I thought you meant the static analyser lol
 
his python script is: ~/src/llvm.git/tools/clang/tools/clang-format/clang-format.py
 
pythong?
 
@Mysticial sorry i was distracted by @StackedCrooked "The new pornographers"
 
1:58 AM
Yeah.. so an external tool.
 
does anyone know of a service that will let me forward emails through it to some address without modifying the email at all
 
Well there already exist multiple format tools.
 
@Rapptz I think that's just the script for vim, they want to integrate it in other things too
anyway, i want it in vs
 
You can have it in Sublime Text 2 and probably Vim lol
 
fuck vim
 
1:59 AM
 
and i dont do c++ in ST2
 
=-o
 
Why can you not use DLL's that link to the standard library dynamically while linking the standard library statically for the actual application?
 
@Borgleader I picked my nickname in 2007. I no longer associate it with the song. So when I happen to see the song title I'm a little startled. (Like, hey, that's my name.)
 
I use ST2 for my C++ about 98% of the time
 
2:01 AM
clang-modernize o.O you have my attention
 
@JerryCoffin Do you think or slightly suspect Michael Bloomberg has partly caused GFC?
Not directly but through his influence and policies
 
@Telkitty猫咪咪 GFC = geriatric fight clubs?
Assuming that's correct, then I'd say probably not.
 
@JerryCoffin I have observed, in developed countries, when super rich people get involved in politics, bad bad things happen
 
s/super rich//
 
Ok, fine, I correct my last statement, I meant: "I have observed, in developed countries, when super rich people get involved in politics, extra bad bad things happen"
 
2:13 AM
Well I checked the path where his script was an I found ClangFormat.sln
fuck yeah
 
@Telkitty猫咪咪 so deep
@CatPlusPlus s/.*// is like zen meditation
 
@Telkitty猫咪咪 Still not sure what GFC is, but I haven't seen much indication that it's particularly restricted to developed countries either.
 
She observed it.
 
@JerryCoffin Great Financial Crisis?
Nothing great about the financial crisis though
Unless you have shorted a billion in the stock market
 
@Telkitty猫咪咪 ah -- in that case, I'd say mostly no. At least in the US, most cause was at the federal level, not a mayor, regardless of how big a city.
 
user425495
2:29 AM
I wanted to have a free function that would return the size of any container provided it has support for begin and end calls, any critiques? coliru.stacked-crooked.com/a/0ba1fbbdfd46eb44
 
@justinls The Container requirement says they have to have size and empty, so this is useless. (size is also a O(1) operation, yours is possible O(n))
There is only one container that doesn't have size, I think. That's std::forward_list.
 
user425495
@Rapptz thank you, with that in mind these are indeed useless
 
2:44 AM
@justinls en.cppreference.com/w/cpp/concept/Container if you're interested
If you still want size and empty free-functions, just re-route them to c.size() and c.empty().
 
user425495
@Rapptz ah that's a good link - thank you
 
user425495
I was thinking I would do that now that I know every container must implement a size and empty method
 
Well, std::forward_list doesn't have size.
While writing Concepts I found the standard likes to cheat.
 
std::forward_list, even more useful than std::list.
 
user425495
I could keep my version around and add some enable_if magic to get sfinae for forward_list callers
 
user425495
2:54 AM
or just never use forward_list, which is probably the case for my little project
 
No need for enable_if.
 
user425495
oh, just a template specialization?
 
Nah
 
user425495
heh, just a declaration that takes a forward_list
 
Ok the clang sanitizers are insane o.o
 
user425495
2:55 AM
working my way from complex to simple :V
 
You can't forward declare things in the standard library.
 
user425495
rather I meant define a template function that takes a std::forward_list<T> by reference and returns it's size by std::distance
 
user425495
function template I mean :\
 
user425495
@Rapptz hm that's interesting I wouldn't have thought to do that
 
3:08 AM
@Rapptz: nice
 
Surprisingly took a while to find that :s
 
user425495
I'll have to take some time to digest that thread
 
user425495
I don't completely understand sfinae
 
@justinls Few does.
I too sometimes do SFINAE the wrong way.
 
3:39 AM
I was digging in microsoft headers and realized they found a way to put globals in headers and therefore bypasses the static-initialization-order-fiasco.
 
3:51 AM
I'll bow down to anyone who can parse this, except to the OP: stackoverflow.com/q/18755029/1619294
 
@MarkGarcia lolwut
 
anyone here is an url encoding expert?
 
@Telkitty猫咪咪 Ask javascript and php people, as they always go through hoops to get their urlencode/decode functions to work right. ;)
@Mysticial What do you mean by "wut"?
 
@MarkGarcia More like wtf. :)
 
Oh.
@Mysticial I'm surprised someone has actually understood and answered it.
 
3:59 AM
@MarkGarcia New user. Sockpuppet. :)
 
@Mysticial Now I come to believe that noobs have some underground, secret language that only they can understand!
 
4:28 AM
-1
Q: error LNK2019: 无法解析的外部符号 "public: int __thiscall insert ,该符号在函数 _wmain 中被引用

wingOFeagleQUESTION: I do not know why this happens since I have given declaration in Hash.h and definition in Hash.cpp.Before this question is posted,I have searched answer through the Internet but no answers are what i want.Is the reason that there are some special ways in using template while I misuse it...

 
@Mysticial Text should be justified!
 
@Mysticial apparently he forgot to implement a member function
 
> Blizzard has ruined diablo
Uh.
Facebook comment are the lulz.
 
I tried to reformat the code but blimey there is a lot! — dreamlax 41 secs ago
I bow down to you!
Hail!
WTF!
 
74
Q: What's the point of "javascript:" in code (not URLs)?

sitifensysI stumbled upon something strange that I never really seen before: javascript:a=a+10; The line above seems to be correct and evaluates happily (at least in Firefox) just like if the javascript: part never existed. While I do understand the purpose of the old javascript:void(...) style <a href...

Wow this scored high.
 
4:48 AM
I could not believe that I would see the day where wall of text, shittily indented code could be transformed into something beautiful. beta.indentcode.net
 
Code beautifiers have been around for ages.
 
@Rapptz Well, yeah. But at least I came to know that there are online ones.
 
There are multiple (that one is surprisingly bad)
I thought it'd be good but it fails with basic templates.
 
I'll try the other ones. You need to watch for // comments when formatting code.
 
5:03 AM
Does anyone here use CScope?
Man I'm bored today.
 
user1804599
5:59 AM
@JohanLarsson I don't know anymore.
 
@Rapptz I've used it in the past.
 
user1804599
@Rapptz lol a label in onclick handlers.
 
user1804599
Also lol inline JavaScript.
 
user1804599
Always attach handlers using myElement.addEventListener('click', …).
 
user1804599
jQuery caches data attributes ugh. What a piece of shit.
 
6:08 AM
lol
 
user1804599
var y = $(x);
y.data('foo', y.data('foo') + 1); // not working
 
that's horrible
Even I can see that.
 
user1804599
++x.dataset.foo; // works fine
 
user1804599
jQuery should be split into separate well-designed libraries rather than just a single clusterfuck.
 
user1804599
Like Boost.
 
user1804599
6:15 AM
Not to mention the annoying implicit foreach. :puke:
 
Ell
6:31 AM
Are there good c++ code beautifieres?
 
user1804599
What would such a tool output? D? C#?
 
Ell
xD
 
@Ell You mean formatters?
There's astyle.
 
Ell
Yeah
Oh cool. Ill look into it at some point
 
Am I right on my points in here? coliru.stacked-crooked.com/a/a5f59119c5936e64
Also a disadvantage of the first is additional allocation when elements already exist.
 
Ell
6:42 AM
I can't read it sorry :/
My mobile doesn't like Coliru code widget
 
Xeo
@MarkGarcia throw the second form into a merge_elements method and don't think about it
 
@Ell Oh. Ahahaha. It's OK.
@Xeo I don't get you. Is that something in <algorithm>?
 
Xeo
No, I mean write a function yourself
 
@Xeo Your use of the word "method" sounds like you're referring to something like C# extension methods... So you mean the second one is more OK, and my points valid?
 
Yeah, he's not very methodic about it.
 
6:47 AM
In how I would use it, I prefer to call it replace_elements or something with "replace".
 
Xeo
@MarkGarcia I'm prone to saying method to mean function
 
@Xeo I'll be sure to remember that. :)
 
Even Xeo has been tainted by OOP.
 
tainted? are you a scripter?
 
I don't fully trust myself when it comes to STL especially with iterators. Perhaps I just have to use it more.
 
6:50 AM
I definitely would go with Method 1
 
I mean for like 30 seconds.
Until you get a question wrong and then you curse and close the window.
 
Oh no 502 this time
Might as well try
 
@Rapptz I'm preferring that in most cases, but I'm going to put this into a function.
Guess I'll have to go with method 2.
 
I see no big benefit to method 2.
Your score is 1700!

Play again
 
@Rapptz The possible two lookups is actually what I'm saving optimizing for especially in large sets. Though also important, the allocation would be negligible on large sets.
 
Xeo
6:56 AM
lolz, I just found a comment from some "Richard Smith" on Real World Haskell
 
they got legs!
 
@StackedCrooked Got 1300. And I've gotten wrong with the PHP one. Yes!
 
Your score is 5100!

Play again
weird
 
Congrats, you indeed are a nerd!
 
7:08 AM
1 message moved to bin (oh well, 2600 pts)
 
7:22 AM
@sehetw I was having a moment of profound productivity. Thanks for fixing that for me.
 
... I have not been productive for ages ...
:(
Maybe I could start now ... for the next 90 mins ...
yoyo doggie
 
user1804599
You're all noobs.
 
user1804599
7:49 AM
SourceTree is bad at graphs.
 
@not-rightfold Use SmartGit.
 
Wait what?! #metamonad has do-notation as well #mindblown #cpp http://www.youtube.com/watch?v=aIj034VCUD8&feature=player_detailpage#t=3558
 
JBL
Why the hell does Microsoft hides VS features considered necessary ?
 
"considered"
 
JBL
7:51 AM
Yeah, for large definition of "considered" (though Bruce says it has been asked for a long time now)
 
@Rapptz nice
 
user1804599
I wonder if PostgreSQL supports sum types. Would come in handy.
 
> Your score is 3200!
I should start working.
 
user1804599
Noob.
 
Well, it's a Hello World quiz...
 
8:03 AM
Well, Hello! It's a quiz world...
 
user1804599
Hmm.
 
@Jerry I heard of some really bad floods where you live. Is it bad?
 
inb4 <bloop/> <bloop/>
 
How would you change a long hex stream like "474554202f646f776e..." to a C-style array? Vim macro?
 
C-style array of what?
int? chars? hex digits? pointers? binary digits?
 
8:13 AM
your moms
 
28 secs ago, by StackedCrooked
your moms
 
Array of unsigned char to represent a blob.
 
I didn't know I had more than 1 mom
 
Everything is copyable.
 
I sure hope I am not copyable
 
8:16 AM
@StackedCrooked od
 
Hey, anyone here watched "Terms and Conditions Apply"
Documentary released in 2013
 
Hello! Do you remember me?
 
very unpleasantly
 
@DeadMG lol
 
The last time I post here, I get banned for 30 min.
 
8:23 AM
@Servant Pick a good time where there aren't mods or mod flaggers.
 
i.e., nobody.
 
What is the use of "star this message"?
 
Don't!
 
@StackedCrooked (echo "const unsigned char binary_data[] = {"; od -txC - | sed -e "s/^[0-9]*//" -e s"/ \([0-9a-f][0-9a-f]\)/0x\1,/g" -e"\$d" | sed -e"\$s/,$/};/") Live Demo
 
star this one, it's good
 
8:24 AM
Don't listen to him!!!
NOooooooooooooooooooooooo!!!!
 
DO IT!
 
No..
 
you know you want to.
 
I already pressed it on the post that I like.
 
@Servant Hey, you're a fellow countryman.
 
8:25 AM
@MarkGarcia Yeah..
 
Magandang hapon or maayong hapon, whatever suits you.
 
@MarkGarcia Anung job mo?
 
is that Tagalog?
 
@MarcClaesen The former, the latter is Cebuano/Bisaya.
 
meh, close enough
 
8:27 AM
@Servant Freelance, do anything, and still learning.
 
@MarkGarcia Eh natapos?
 
@Servant Soon BSCS.
@Servant Ikaw?
 
@StackedCrooked oh damn, od -txC -v - (otherwise it will dedup identical lines :/)
 
@MarkGarcia Wala, e-learning lang..
 
... ok that's enough gibberish for now :)
 
8:29 AM
@sehe Ya all speaking German! Discrimination!!!
:P
 
@MarkGarcia Ang daing loko-loko dito eh..
 
@Servant You unto C++? Or just because the room is named "California"?
 
Xeo
@MarkGarcia We're not.
(Okay, they are always speaking in Dutch, but that's another thing)
 
@MarkGarcia No, the previous name of this forum is Lounge<C++>.
 
@Xeo I always see all foreign words spoken in here as german. ;)
 
8:32 AM
@MarkGarcia Gumagamit kaba ng Vim?
 
Xeo
3 mins ago, by sehe
... ok that's enough gibberish for now :)
 
@Servant ^ Yeah. We should follow the owners. :P
 
Xeo
No, you should follow SO :P
 
@Servant Still practicing using it. I do mostly VS and Qt Creator with MingW.
 
@Xeo Never a conversation. Always a sentence like "just shut up" or "good night". It's a thing like when not-rightfold says "Später"
 
8:34 AM
@MarkGarcia I have a bounty question about it. Tignan mo.
 
Xeo
Eh, I've seem him write Dutch for quite a few messages.
 
@Servant Oh. That. I'll see to it... Nah. I'm no self-proclaimed Vim expert. :) And TBH, I'm still halfway through the Vim tutor.
 
I remember once when he didn't seem to want to tell publicly about some company or something. I keep tabs on my use of furreign languages. I think I might net an equal amount of gibberish in semi-French und halb-Deutsch for good measure
@MarkGarcia Meh. I never completed it. Doesn't really say much
 
@MarkGarcia What are your freelance services?
 
user1804599
> ERROR: operator does not exist: boolean && boolean
 
user1804599
8:38 AM
Wtf PostgreSQL.
 
@Servant Horrible things. PHP and web stuff. Some photoshopping, though never been a design enthusiast. Now I'm going on pilgrimage with C++.
Not to say that all web stuff are horrible. Just that one language...
 
Wouldn't it be demi-Français?
 
user1804599
Oh wait, it's AND.
 
@MarkGarcia C++ is hard.. What's horrible, PHP?
 
@not-rightfold lol. You're anti-SQL subconscious is working!
@Servant Sadly, yes. And I'm not even willing to go into a debate about that issue.
 
8:40 AM
@sehe nice
 
@MarkGarcia For what reason? Just a little bit..
 
@Servant C++ is hard when you're just starting. Also template metaprogramming.
 
@sehe Didn't know that stdin is passed along to the next statement if the first statement ignores it.
 
@Servant It's just so easy to write bad spaghetti code. Also, you cannot easily separate your views and models. Your business logic (mostly SQL stuff) and views (HTML) are just so interleaved.
 
@StackedCrooked it isn't passed on. it's just the stdin of the containing subshell
@R.MartinhoFernandes you know, maybe it is
 
8:43 AM
Oh right.
That's clever.
 
@MarkGarcia So anung more hard for you? C++ programming or (PHP, SQL, HTML and CSS)?
 
@StackedCrooked It's basically the reverse of my suggestion last night ("sharing" or "accumulating" stdout):
11 hours ago, by sehe
for compiler in g++ clang++; do $compiler --version; done |openssl sha1 would be easier
 
@Servant Still, I would be willing to do some small tasks using it given a decent amount of money. ;)
 
What does openssl sha1 do ?
 
user1804599
Calculate the MD5 sum?
 
8:45 AM
@Servant The latter. I've learned so much from Stack Overflow and this chat room. ♥ Lounge<C++>.
 
Ah, basically the same as shasum.
 
@not-rightfold sha1!=md5
 
IIRC sha is designed to be slow. So perhaps I should consider a quicker hashing algorithm.
 
user1804599
@sehe I was making a joke.
 
@StackedCrooked No, it's not.
 
user1804599
8:46 AM
@StackedCrooked Use PBKDF2!
 
@MarkGarcia What!! Do you mean, desktop development is more easiest than Web development?
 
If that was what they were going for, they failed tremendously.
 
@StackedCrooked Git uses SHA1, AFAIK.
 
@R.MartinhoFernandes Atwood told so in his blog! :)
 
@not-rightfold lol.... ?! :/
@not-rightfold stop "making a joke"s
 
8:47 AM
I don't need a secure hash.
 
@FredOverflow Hmmm, lambda prompts :)
 
@StackedCrooked If he did, the world would have performed autocorrect on him in the typically violent ways of the internet
 
@Servant I'm currently learning ASP.NET MVC, as it's so much better for serious web development. And I haven't done much desktop development. I mostly do support stuff in C++ (open source libraries).
 
@R.MartinhoFernandes I notussed that too :/
 
He didn't really say sha is slow, but "secure hashes are designed to be slow".
 
8:49 AM
@MarkGarcia Is that true that there are more income on Java programming?
 
> (...) but my Duden from 1926 (...)
 
@Servant Yes, because there's more work to do.
 
@Servant Depends on your notion of "income". Though I think there's probably more jobs available for Java, especially in the Philippines.
@StackedCrooked lol
 
@StackedCrooked secure hashes, which neither sha or md5 are (not in the sense that requires them to be slow anyway)
 
@MarkGarcia Okay, that's it for now.. *Maglalaba pa ko.* Bye..
 
8:51 AM
@R.MartinhoFernandes not indexed by google
 
@R.MartinhoFernandes I forgot how I did it. Now I can never reinstall my system :(
 
@Servant Kita kits :)
 

« first day (1062 days earlier)      last day (3869 days later) »