« first day (769 days earlier)      last day (4187 days later) » 

Ell
12:00 AM
For cli. Otherwise gedit and np++
 
It's a lot more lightweight than everything else.
 
Why not a magnetized needle and a steady hand?
 
@ThePhD same problem as any other IDE. :(
 
@ThePhD Sublime Text 2 > Notepad++
 
@EtiennedeMartel Will I have to use it in a Haystack?
 
12:01 AM
Sublime Text 2 was really nice. I liked how it had a visual of where you were in the file.
 
Xeo
@DeadMG: I don't think the "make everything a function object" proposal is ever going to be accepted in that form.
 
But again was impossible for me to actually edit code with it :/
well... at least not without stabbing my face with a spork repeatedly xD
 
@Xeo Well, the whole point of posting it there is so that people can feed back on it.
what about it did you think was especially unpalatable?
 
@nixeagle Fortunately it was a rubbery spork made with poor plastics.
@Xeo link?
 
Xeo
@DeadMG Existing code. What would &less<A> now do?
 
12:05 AM
@Xeo Obviously, you'd have to leave the existing function pointer conversions intact- since & is not applicable to rvalues, which less is (an rvalue of that compiler-internal type), I don't believe it to be ambiguous.
 
Xeo
Eh, aka special language handling..
 
meh
so what? they already have special language handling, I'd just need to not break it.
 
Xeo
And I guess the same goes for explicitly specified template arguments?
 
well, you can't explicitly specify function arguments to a function object (not the same as a function, anyway)
 
@Xeo @DeadMG what are you discussing?
 
but yes.
after all, when you have, for example, less<T>(args), then less<T> is not an expression.
perhaps the wording could be more clear
like, "When the name is used as an expression without the address-of operator"...
 
Xeo
Anyways, I have a proposal in mind that would solve those issues with minimal syntactic noise without any chance of having impact on legacy code.
 
feel free to describe it in that topic
 
Xeo
I was wondering whether to add in that topic or open a new one with a reference to yours.
 
@DeadMG You are referring to a compiler "not sufficiently intelligent". My impression is that you are requiring a lot more from the compiler with these additions to IMO quite little value. Very interesting suggestion though.
 
12:14 AM
@CaptainGiraffe It's a lot harder to write an optimizer to prove that a function pointer has a static value so you can inline it through arbitrary code (i.e., hello Halting Problem), than to write a compiler to generate a small function object (i.e., way simpler than lambdas or polymorphic lambdas).
 
@DeadMG Agreed, but is not this solved in the usual cases in our favorite compiler?
 
hmm
my experience of VC is, better to give the optimizer all the help it can get.
 
I'm ignorant but optimistic. Do you have insight?
 
Xeo
Btw you may want to add the lambda version to your thread (with polymorphic lambdas): sort(f, l, []<class... Ts>(Ts&&... vs){ return less(std::forward<Ts>(vs)...); });
Just to show how unwieldy it is.
 
> In order to preserve legacy code, a conversion to function pointers of an appropriate type must of course be specified.
 
12:17 AM
i made a study
 
Xeo
(not specifyng the template parameters is even worse, IMHO: [](auto&&... vs){ return less(std::forward<decltype(vs)>(vs)...); };)
 
Can you convert a functor to a function?
 
in C++ tags the pros don't vote negative so much, but in C they do a lot
 
@Xeo I did, in fact, consider it. But I remembered that I have no idea what the current idea of polymorphic lambda syntax looks like.
 
Xeo
@StackedCrooked operator Alias<R(*)(Ts...)>() const
 
12:18 AM
@StackedCrooked You can if it defines a conversion operator. But that's not so important.
 
@AlbertoBonsanto The Linus experience. We are all Bjarne here.
 
@Xeo What does the implementation look like?
 
what's more important is that the use cases of the proposal are almost entirely separate from the ones which are current
 
Xeo
@StackedCrooked A non-capturing lambda is a choice.
 
12:19 AM
lol?
 
Or a pointer to a static method?
 
Xeo
@StackedCrooked Nah
 
@AlbertoBonsanto No, I was going for +5 Insightful.
 
@DeadMG Basically you want first class functions?
 
@StackedCrooked That is my impression too
 
Xeo
12:22 AM
@StackedCrooked Thinking again, yeah, should work.
 
@Xeo Since free functions are by default capture-less, and existing capture-less lambdas can already convert to function pointers
the member situation is fine anyway since the process for MFPs is completely different to the proposed syntax and there's no chance in hell of ambiguity.
 
Incredible to see how fast programmers are there, some answer questions in 10 seconds, I hardly can find out the bugs sometimes :\
 
Xeo
// template<class T> bool less(T a, T b);
struct __less_funcobj{
  template<class T>
  static bool __fun(T a, T b){ ... }
  template<class T>
  bool operator()(T a, T b){ return __fun(a, b); }
  template<class T>
  operator Alias<bool(*)(T,T)>() const{ return &__fun<T>; }
};
 
@DeadMG Could you write a program that is able to detect if the compiler implements your proposal?
 
Evening folks.
Back at work on those C++ assignments.
 
Xeo
12:25 AM
@sehe: You wanted to go to bed, not post in the puppy's thread. :P
 
Or is it a completely under the hood thing?
 
@StackedCrooked I reckon so.
void f(); auto p = less; std::is_pointer<decltype(p)>::value should give that.
I think the current Standard allows this (direct assignment without &).
but I also know there are a bunch of extensions w.r.t. this in MSVC and GCC, so I'm loathe to boot up any compiler to check it out
 
Xeo
@DeadMG it does, since function names decay into function pointers at the same rate that native arrays do.
And I think you mean either void less(); or auto p = f;
 
@Moshe Reminds me of my own data structure class. You know, I'm starting to think that "data structures" actually means "90% trees, 10% hash tables".
 
12:28 AM
@EtiennedeMartel Lol, yea.
Exactly that.
So I'm catching up on these assignments, since there's no due date. I'm so behind....
 
@EtiennedeMartel Because it is ;)
 
@EtiennedeMartel I wish data structures gave you more context than "This si what a tree looks like, make one."
 
@EtiennedeMartel A little like when I interviewed at Google -- 90% sorting, and 10% "Hi, how are you today."
 
Google are all about sorting. Didnt they ask Obama what was the best sorting algo for like 1 million ints?
 
12:29 AM
@JerryCoffin Lol.
 
@Borgleader QUICKSORT. Because it has quick in the name.
 
@JerryCoffin did they hire you?
 
Xeo
@Borgleader Yeah, and his answer was: "NOT bubble sort!" IIRC
 
Yeah that's what I recall as well
 
@JerryCoffin Heyyyyy Thanks again for pointing me at the NTFS Change Journal stuff. I think all I have to do now is implement MultiThreading and I'll be able to have a pretty great FileSystemWatcher.
 
12:32 AM
So, anyone want to tell me why my code only loops through the first record?
 
@Moshe ?
 
what code? what loop?
 
which file?!
 
@melak47 main.cpp
 
12:34 AM
@Moshe You want us to... look through all your code and tell you what's wrong.
 
@ThePhD Yessir. :P
No, I'll explain what I think it should do.
It's supposed to loop through a file, and find records which match in a second file.
Then, it copies the new record to a third file.
 
have you tried debugging? :p
 
@StackedCrooked Wasn't really there to get hired. My brother is on one of their hiring committees, and had some misgivings about how they were doing interviewing, so he talked me into doing an interview and giving some feedback.
@ThePhD You're surely welcome.
 
@melak47 yep
 
and?
 
12:36 AM
I can't figure out why it only loops through the first record.
the outer loop, I mean.
 
so find the place it stops, find the condition that made it stop
 
Well, you're using XCode, which I'm 90% sure supports Step-Through debugging (even if it's shitty), so.
 
@ThePhD It does.
 
Quickly, though. I'm about to start on the path to learn how to do Multithreading. Is there an STL way for me to do it? Or am I gonna have to just sack up and write one Threading Implementation per platform I use [which, of course for right now, is all Windows]?
 
@ThePhD std::thread
std::mutex
there you go :)
 
12:39 AM
while(ifstreamInstance){ ifstreamInstance >> someVariable; } // Reads a file, right?
 
also, future and async
 
Not sure why this doesn't work.
 
Based on your description, it should be
std::set<record> records ((std::istream_iterator<record>(second_file)),
std::istream_iterator<record>());
std::remove_copy_if(std::istream_iterator<record>(first_file),
std::istream_iterator<record>(),
std::osream_iterator<record>(third_file),
[](record const &r) { return records.find(r) == records.end(); });`
 
@Moshe Reads some of a file, particularly only about as much data is needed for someVariable .
 
Plus operator>> and operator<< for your record, of course.
 
12:41 AM
@ThePhD Doesn't it iterate the whole file in chunks, each chunk fitting in someVariable?
 
@melak47 All C++11 though, right?
 
@ThePhD yes
 
Ah.
 
Gogo Gadget MSVC! :p
 
I'd hope MSVC would have those, but let's just include stuff and see what breaks first!
 
12:42 AM
it has thread
should have the rest of the concurrency stuff, too
 
This is the kind of questions that makes my day i50.tinypic.com/20r1tfp.png
 
It has <future>, but not <async> apparently
 
async is defined in <future> :)
 
TIL that a famine in China killed 36 million people (1958-1961).
 
@melak47 Ah. Well, okay.
 
12:44 AM
@StackedCrooked that's like, a lot :/
 
@melak47 Percentage-wise, not much for China I don't think. But number-wise...... damn...
 
Nice mao
 
so
what do you guys think about fixing UTF-8 literals?
 
Fixing? o_O
What's broken about 'em?
 
12:49 AM
you can't overload for them
i.e., there's no way to actually deal with UTF-8 information
and in addition, now you can't even deal with information in the regular encoding, because it could be UTF-8 instead.
 
Wait, I know char* is usually considered straight ASCII
Can't they just do unsinged char* for UTF8?
 
that would still be very bad, it needs a distinct type.
 
Hell, they could even prefix UTF8 literals with a BOM and keep it const char*, though that might take a lot more work
 
but more importantly, in C++11 the type is just char*, so fixing it would be a breaking change.
if you were to do const char* p = u8"mah literal"; that would now be illegal.
 
:c The sadness.
 
12:52 AM
I'm not really sad, it's a simple defect with a simple fix, and the break is also simple and clean (compiler error).
the problem is that the Committee is extremely conservative
convincing them to fix it is gonna be tough
 
Hi
 
1:14 AM
Conservative++. I guess it makes sense.
 
Xeo
@DeadMG: Ow, Nicol had it going with your proposal. xD
 
@Xeo Linkme!
 
Also wow this threading stuff seems easy at first blush...
Now I just need to figure out how to signal that something's happened.
Maybe a callback?
 
billy is obsessed with pornography
 
1:20 AM
Oh god, if I do callbacks I have to deal with std::function again, and do a million std::binds and blarghabhagahbhsghagha.
Blech.
 
@Xeo Nah.
@ThePhD Lambdas?
 
Xeo
@DeadMG Now I'm interested what you're going to answer.
 
@DeadMG I... uh. I don't think I've ever used Lambdas, even in C#. They always felt so.... strange, to me.
Guess I should look those up too.
 
> type-expression-thingy
I should really remember what the Standardese is for that
 
If I did ping 127.0.0.1, would it have to do that over the network?
 
1:30 AM
of course
that's localhost
 
Yeah, so it wouldn't be a problem to test your own connection by doing that?
 
connection to what? yourself?
 
If you have any network connection at all
 
you dont
 
ping 127.0.0.1 should always work
 
1:34 AM
ive done my web assignment in the train (no internet connection wireless or otherwise) and i could connect to localhost:8080
 
Okay so it's NOT reliable to test?
 
To check internet connection?
no
 
just ping 8.8.8.8, it's likely to be up :)
 
thats google's dns isnt it?
 
yup
 
1:46 AM
@ThePhD Have you ever used JavaScript?
 
JavaScript is bizarre...
And chat on my iPhone is hard to use...
 
new avatar?
 
Xeo
2:04 AM
That's from Hayate no Gotoku. Hinagiku, right?
 
Sorry for off-topic, but is there any room about assembly on stackoverflow?
 
Xeo
@DeadMG: I think he means operator auto as in normal operator overloading (ReturnType operator auto()), not conversion operator overloading (operator auto())
 
@ElliottDarfink No, but we might be able to speak in mnemonics, if you really want to badly enough.
 
@Xeo That may explain the confusion.
 
@Mysticial Bak Inu!
Assuming that is from Zero no Tsukaima.
 
2:18 AM
@Xeo is right. It's Hina - a really pissed off Hina. :)
 
2:33 AM
interesting new idea with automatic type conversions
 
3:02 AM
What's a good image board or forum for a bored person?
 
@Crowz /b
 
@StackedCrooked /b/ is terrible all the time these days... was good in 2008
 
3:23 AM
So my uncle is cutting the turkey with a chainsaw...
Efficiency to a whole new level...
 
I don't recognize @Mysticial anymore... he's changed so much. He's not who he used to be
2
:P
 
3:43 AM
@StackedCrooked Nope. Why does JavaScript relate to Lambdas, though? o_O
Lollipop Chainsaw? Nah, man. Thanksgiving Chainsaw.
 
Hey guys, quick question here: I have a bunch of public static methods on a class, coupled with a bunch of private static fields on a c++ class. How is it possible that i am getting "undefined reference" errors regarding said fields on my static methods, any tips about this?
 
Do you ever Init() or set these static fields outside of the class?
If so, your private static fields will contain uninitialized JUNK.
 
I'm trying to show my uncle how his wifi router WRT160Nv3 can be hacked. does anybody know of a hacktool that can hack his router?
 
4:01 AM
Hello. I'm a bit confused about why the state statement while(file >> c) {} works. where file is an ifstream.
is there a cast from ifstream to int?
cast operator*
 
Xeo
@Mysticial I can see that being space-efficient, as in, you will need less space to store the turkey after the cutting than you needed before...
 
@ThePhD I call an initialize method on all the static methods. Isn't that enough?
 
Anyone here understand how it works?
 
@ahenderson It's an overload, >> is a template, and there's a "version" for int.
 
@Xeo I mean that it the chainsaw is very efficient at cutting the turkey because it is fast - very fast.
 
4:16 AM
@Borgleader Thanks, I need some resource to read up on this. any suggestion?
 
On what? templates?
 
@Borgleader no, the overload of operator >>. There was nothing about it at cplusplus.com
 
Well it's just a template like any other...
afaik anyway
 
@ThePhD I just had to "implement" the variables in the cpp file, as if they were methods.
 
4:54 AM
Finally back in front of a computer...
 
welp manic was an awesome movie
 
@Borgleader Yeah... now that I look at it again, my new AV does look a lot different than the old one. :)
 
Yay, finished that C++ assignment!
 
@melak47 C. What for?
 
5:24 AM
-2
Q: Need complete android source code to download images from web server database display it in gridview and store it in local database

user1846620Need complete android source code to download images from web server database display it in gridview and store it in local database and perform a slide show when needed in android tablet

^^ epitome of "give me teh codez"
 
@Mysticial Closed-voted as NARQ
 
@Insilico Damn, I went to CV it as soon as I posted it here. And you somehow beat me to it.
 
@Mysticial That should teach you to CV first before posting the link. lol.
What was the fastest that a question has been closed for whatever reason?
 
@Insilico There's a data explorer query I think.
 
Would be interesting to see some close/delete statistics with respect to time between question posting and close voting
 
5:28 AM
26 seconds closed by casperOne.
 
@Mysticial Someone needs to register that domain and use it à la hasthelargehadroncolliderdestroyedtheworldyet.com
 
Hm, in XCOM, when you pick Europe at the start of the game, your main base goes in Germany. What's up with Germany, eh? You'd think it's Europe's largest economy or something. /cc @sbi, @Xeo, @R.MartinhoFernandes
 
I need some help making sense of the shell extension icon overlay, I'm really new to unamnaged code and extensions, so I have no idea what I'm doing. B I have 3 syncing icons I need to add dynamically to each file I'm syncing online, but I don't undetsrand how this example works...
 
5:38 AM
@Insilico Why's your gravatar blue again? Did you move back or something? Home for TG?
 
@Mysticial Yeah, but I've finally added an email address to my SO profile at the behest of the Lounge<C++> regulars.
 
Can anyone help me?
 
@Justin Depends.
 
@Insilico Interesting... I thought the default gravatar is just a hash of your ip address.
 
Lol, on?
 
5:46 AM
But it uses email as well?
 
@Mysticial I think it uses your email if you can't be arsed to make a gravatar account and upload your own pic.
 
@Mysticial holy crap what? i thought it was randomly picked out of a set xD
 
@Insilico on?
 
@Borgleader It definitely uses your ip address to some extent.
And wtf?
 
@Justin How much I care about your problem. Which is zero.
Or at least very close to zero.
 
5:49 AM
Sad. It's not even .0000001?
lol
ad one more zero and it would be a byte...
 
Quite honestly you would have a much better shot at asking a well-formed question on Stack Overflow than here.
Since I know next to nothing about working with the Windows Shell.
 
Every question asked gets reffered to that codeproject link and I can't make heads or tails with it because generally I'm not c++.
 
@Mysticial Is it possible to query closures by non-moderators? I'm not all that familiar with the SO database schema.
 
@Insilico Yes it's possible. But I suck at sql.
All the queries I've done are mostly copy/paste off of existing ones and modify them to do what I want.
 
@Justin "generally I'm not C++".
"generally"? :-P
 
5:54 AM
hey it's past midnight here... lol. I only use c++ when absolutly nesscary because I don't have the brain to wrap my head around all the unmanaged stuff (memory pointers, header files) etc... development is usually too long on anything c++ - that I do.
 
@Insilico You mean "Real C++ programmers haven't..."
There's plenty of bullshit programmers like me who still do that. :)
 
Header files are unmanaged what
 
yeah... well I don't play around with it much. I choose a managed enviorment or pure webservices for mosrt of what I need to do. This time tho, I need to work on dispaly icon overlay's and as I have been searching .net doesn't do that well
 
@Mysticial Says the guy with more rep than 90% of people in this room.
 
5:58 AM
@Justin Here in C++ land there is no such thing as "managed" or "unmanaged" in the way you use them.
 
@Borgleader I didn't get my rep from being a "C++ programmer". :)
 
Managed/unmanaged is very much a Microsoft-ism to distinguish C++ and things like C#.
 
Heck... last time I answered a "real" C++ question, I got a bunch of downvotes... :(
 
@Mysticial Was it a "language lawyer" question?
 
@Insilico Nope. It was actually a C++11 question.
Which of course I failed miserably at...
 
5:59 AM
Meh you can afford the loss, if I do that I'll lose my cool 2k rep privileges.
 
lol
 
@Borgleader After getting >20k rep I kind of stopped caring. lol.
 
I didn't end up deleting the answer though. Since it ended up being +11/-2.
But still... meh...
 
@Mysticial That's not a "bunch of downvotes", no?
 
@Mysticial 2 is "a bunch of downvotes" to you!?
 
6:01 AM
So I take it I've gotten bumped out of the conversation
 
2 downvotes on an answer is rare for me.
 
http://stackoverflow.com/questions/12328301/cleanest-way-to-copy-a-constant-size-array-in-c11/12328330#comment16548632_12328330
I know that trick :D I use it all the time xD
 
@Mysticial It's rare for me too, but you don't see me saying I got downvoted a bunch of times on an answer. :-)
@Justin You should've been here when there was 5 threads of conversation going on at once. :-)
 
@Borgleader How did you find it so quickly?
 
@Mysticial Checked your answers, sort by newest, check for the ones that have a rep of 9 (11 - 2) and look for "c++11" in the title. its the first one to fulfill all these conditions.
 
6:04 AM
I think I'm better off answering Java questions than "real" C++ questions... dammit.
 
@Mysticial See thats why you're a bullshit programmer. It's not because you deal with memory directly, it's because you program in Java :P
@Insilico To be fair, that has nothing to do with C++.
 
I just saw a question tagged and . Now that's a contradication in terms if I ever saw one.
 
@Insilico Are wa C++ ja nai!
 
I understood that sortof :P
 
6:07 AM
@Insilico matter of opionion
 
@Mysticial Not sure how to interpret that. lol.
 
@Insilico I think the translation is "That is not C++" IIRC ja nai is negation, Are wa would be uh... hard to explain. I'm a newb at japanese T_T
 
Well if anyone has a few shell extension tips let me know
 
@Insilico Not that I know any Japanese...
 
Homework Time :P
What are the different types of hash functions ?
 
6:08 AM
@Mysticial Neither do I.
 
"Aare" or "a-re" literally means "that". "wa" is a particle. "ja" is "is".
"nai" is a negation.
 
@Insilico actually I am studying data structure ... so i hope these are the same hash functions
 
At least that's as far as I can construct it to my knowledge.
 
@DextOr Presumably you have a textbook to study from?
 
@Mysticial Yeah... my japanese is getting rusty (or at least the tiny bit I learned)
 
6:11 AM
I have ..... but there is nothing like this .... but it is in previous exam papers :P
 
Welp g2g, have to wake up in 6h to go to class ...
 
@Insilico still your opionion
 
@Justin Oh, it's not my opinion.
 
your right not just your own
moving on...
 
6:23 AM
It's the majority opinion. lol
 
nope
 
I forgot who started it though. But it made front page Hacker News and kinda blew up from there.
Hilarious though.
 
Sine I'm the majority... lol j/k
 
6:58 AM
Technology being utterly shitty is not a matter of opinion.
"It works" is not a quality criterion, either.
Being able to take off and land doesn't make a good plane
 
Says the person who doesn't give a shit about performance. :P
 
I'm researcher at heart.
Also not really relevant to language design.
Wonderful, middle of the night and I have PE class.
 
Lol, middle of the night. It's 8 AM
 
It's dark.
And cold.
 
That's because you're in Poland.
 
7:08 AM
It's dark and cold at night. Therefore, it's night.
QED
Someone repin the rules, I gotta go.
 
Xeo
If you're new here, take a look at the rules or expect to get treated accordingly.
21
 
TLDR: newbies must introduce themselves by posting a question followed by a flashy gif.
 
Ell
Its cold and dark here :o
 
7:35 AM
"It was a dark and stormy night" is an infamous phrase written by Victorian novelist Edward Bulwer-Lytton at the beginning of his 1830 novel Paul Clifford. The annual Bulwer-Lytton Fiction Contest uses the phrase as a signifier of purple prose. The original opening sentence of Paul Clifford is an example: It is also used as the opening sentence of the 1902 novel The Monkey's Paw by W. W. Jacobs: And in the 1962 novel A Wrinkle in Time by Madeleine L'Engle: The opening was popularized by the Peanuts comic strip, in which Snoopy's sessions on the typewriter usually began with thi...
 

« first day (769 days earlier)      last day (4187 days later) »