« first day (532 days earlier)      last day (4399 days later) » 

3:00 PM
how does that not look delicious?!
@tom_mai78101 Top middle one is
 
you took the worst picture of all pictures google gives you
 
This is the real ramen.
 
this look better
 
that actually looks good
 
3:01 PM
What are those white-pink things?
 
@TonyTheLion That, my friend, in English, it's a shrimp roll.
 
Yep, seems way better.
 
I think. My English isn't that good.
 
ARGH
I linked myself to tvtropes and now I can't stop!
 
@tom_mai78101 perfect so far…
 
3:03 PM
@DeadMG back at you!
 
@Potatoswatter Thanks!
 
Anyway, @tommai78101, the pictures you linked actually do look better than the one I posted
Now I’m getting hungry
 
@KonradRudolph Exactly. :D Ramen is unstoppable.
 
luckily there’s a bowl of hummous in my fridge
brb
 
tiles=(Tile***)malloc(tiles_w*tiles_h*sizeof(Tile*)); // does anyone have any idea what could be wrong with this line?
 
3:04 PM
I'm eating pizza and pancakes today -_-
 
@KonradRudolph Wow, wished I can taste that.
 
@Lohoris What's wrong is that you are using malloc, and C-style casts, and pointers…
 
@Lohoris You casted to triple pointer when you allocated an array of pointers. You want a double pointer.
 
I want to have a 2-dimensional array of pointers
 
@Lohoris And you made a 3-dimensional pointer.
 
3:05 PM
so that tiles[x][y] gives me a Tile*
 
Or a flat array of Tile if the array is not dynamic.
 
Or just a vector of vectors.
 
@Lohoris There are different approaches to multidimensional arrays in C. You can have any number of dimensions without any pointer indirection.
 
@KonradRudolph The hummous in your fridge looks like the one on Wikipedia :)
 
3:06 PM
Photo rotation exercise for computers.
 
@StackedCrooked caught me ;)
 
Know what's awesome? Homemade hummus.
 
@Potatoswatter But they all looked like mashed potatoes made into a ring and baked beans spread across the center.
 
Merely by DIY it becomes half as expensive and twice as good.
 
We need a Kitchen room in SO.
 
3:09 PM
@TonyTheLion lols
 
Isn't there a "food" overflow already ?
 
@tom_mai78101 Hummus is the ring thingie, the other stuff is not hummus. Also, not an appetizing picture
 
@Potatoswatter Oh..
 
@ereOn The world could only wish for a food overflow.
 
@ereOn Oh, didn't realize that.
@daknok_t Don't worry, it will come in October. I just need to dig up some old news.
 
3:11 PM
 
Note: "arguement" is misspelled.
 
@TonyTheLion: How/where do you find these ?! :)
 
@Potatoswatter Hmm, tastes differ I guess. That picture makes me horny.
 
@KonradRudolph wut>
@ereOn it's called www.reddit.com/r/funny
 
Oh no, you're an Redditor?
puts on Reddit mask
 
3:16 PM
@TonyTheLion: Thanks.
 
yes, narwhal bacons
@ereOn You can checkout, but you can never leave...
just warning you
 
I usually just hang out on /r/Minecraft, /r/gaming, and /r/mindcrack
 
hmmm, I don't hang out on any of those
r/programming is interesting from time to time
 
They are new, but viral.
 
And while we’re at viral, this is why I love technology and progress:
 
3:19 PM
I don't believe those news. They report them, and then disappear.
Unless they have a deadline this year...
 
ok, back to C++: How can I get the type name of a template argument as a string, to display in a static_assert error message?
what I want is basically static_assert(same_type<T, foo>::value, STRINGIFY(T) "is an invalid type"); … possible at all?
 
@LearningC Here's a rough idea of the extreme hassles you'd go through in C: http://ideone.com/FAQSm
 
@KonradRudolph typeid(T).name() ?
 
@LearningC Brilliant. That's Learning C :)
 
Sorry, that probably won't work.
 
3:28 PM
1 message moved to bin
@KonradRudolph Don't believe it's possible
 
@DeadMG Can you stop doing that? If you think that is necessary, call in a moderator.
 
@StackedCrooked I can’t paste that in the error message, though
 
He didn't say anything out of the ordinary, did he?
in bin, 1 min ago, by Learning C
@sehe gee thanks but I figured it out a few minutes ago.
 
I did call a moderator, actually, a little while ago
and I was a little more, hell, even a lot more pleasant about the first five times I spoke to this guy
so I think it's about time he got the point
 
@KonradRudolph You could wrap static_assert in a class print_assert< T ... >, just so the compiler prints the names of given parameter types in the same diagnostic message.
 
3:31 PM
@DeadMG Ah. Ok, so you can take it easy from now. Care to tell me what for, exactly?
Did I miss profanity? Threats? Swearing? Fighting?
I always miss the action :)
 
@Potatoswatter It’s already wrapped in a class, GCC doesn’t print any context :(
template <typename Source, typename Target>
union union_cast_helper<Source, Target, false> {
    static_assert(false, "Source and target types must have same width");
};
 
@sehe You must not be the Teenage Mutant Ninja Turtles...
 
@KonradRudolph That's BS. Write a bug.
 
lol, I just realise that this is deprecated code anyway
@Potatoswatter Well, the complete error message is “casts.hpp:16:9: error: static assertion failed: Source and target types must have same width”
that’s it
 
Yeah. Write a bug against GCC and they should add the feature. static_assert diagnostics should have template context like everything else.
 
3:33 PM
Hmm
I hate their bug tracker :(
but OK
 
@sehe Generally, because he's spent weeks whoring this place for C questions
and we are not a helpdesk, and certainly not a place for random other-language questions, and especially not when you've been told to move on repeatedly
 
Ah damn, and I lost my login information
 
@DeadMG he was whoring for answers to his C questions <-- FTFY
 
heh
yeah, that :P
 
That explains everything, now.
 
3:39 PM
Hm, in another example it correctly provides context
 
Hi :)
 
Ah, it's the devil! Been a while mate!
 
@Potatoswatter yeah , usual struggle :)
How're ya all?
 
My and my other self are pretty good :P
 
@DeadMG Oh well. Can't we just not-answer him. It's not like the 1131997 guy... That guy was burning everyones energy with seemingly intelligent questions, on widely varying topics. He can't be a research fellow on all those topics at once and still suck at the questions he asked. Besides some of questions were flagrant cases of Copy/Paste. Now that is food for mods (they did get called, BTW).
What LearningC is doing, is trolling at best. Just put him on your ignore list. Did I miss something he did that was much more aggravating?
 
3:44 PM
Ooh, the static_assert is executed regardless of context
but isn’t this still a bug?!
 
how is asking questions considered trolling though?
 
@TonyTheLion missing your porn stuff on this chat :P
 
template <typename T, bool Good = (sizeof(T) == 1)>
struct X;

template <typename T>
struct X<T, false> {
    static_assert(false, "Invalid type");
};

template <typename T>
struct X<T, true> { };

int main() {
    X<char> xc;
}
 
I mean, some of the regulars also ask questions, at times, and they aren't considered trolls
@MrAnubis why does everyone think I post porn on this chat?
 
The wrong kind of questions, when everyone tells you it's C and they won't answer it.
If you keep going, that would be trolling >at best<
 
3:45 PM
This yields the error:
 
@TonyTheLion lol
 
there's a difference between asking a question, and whoring up the chat for weeks
 
@KonradRudolph You mean that one is executed without instantiation because it's not dependent?
 
mini.cpp:6:5: error: static assertion failed: Invalid type
 
especially after being told to stop by several owners
 
3:45 PM
@Potatoswatter Exactly … I had thought that since the template isn’t instantiated, it shouldn’t execute the assertion
 
I DON'T POST PORN ON THIS CHAT, I NEVER WILL POST PORN, DON'T EVER ACCUSE ME OF THIS AGAIN!!!
 
those guys who love Haskell were told to stop after a while too
 
@sehe ah I see
 
@DeadMG I must have missed something. There are much worse examples than LearningC. And still: you can just ignore him
 
@DeadMG lol, Haskell
 
3:46 PM
@TonyTheLion Eye of the beholder. I know it when I see it.
 
@Potatoswatter wut?
 
@TonyTheLion erm... was that a response to something?
 
@sehe I'm more of the "kill it with fire" mindset
 
@TonyTheLion porn. There's some pretty saucy code around here.
 
I mean, more realistically, I can ignore him, but I can't ignore everybody who ever responds to a message he writes, for example
 
3:47 PM
2 mins ago, by Mr.Anubis
@TonyTheLion missing your porn stuff on this chat :P
 
@DeadMG Great. What does that have to do with us?
 
If C++ developers socialize by talking about Haskell, then how do Haskell developers socialize?
 
@Potatoswatter whatever turns you on
@StackedCrooked by talking about C++ :P
@DeadMG you'd kill everything with fire, if we weren't careful in here
 
While eating ramen, I couldn't help but notice there's a sub-drama going on.
 
@DeadMG Like that happened a lot. Again, I'd get it if you took the 1131997, or hoxie_boy and some of his friends about a month ago (his group was also learning C), but not this one. For one thing, the ignore works miracles here.
 
3:48 PM
@DeadMG then you'd have to leave this chat and never return, and go read tropes for the rest of your life :P
@tom_mai78101 lol @ sub-drama
 
@TonyTheLion hehe ok I'll not accuse ever:)
 
@MrAnubis othx
 
@je4d thx
 
@DeadMG ignore me? 0_o
 
not unlikely :/
 
3:50 PM
@MrAnubis Zing!
 
@KonradRudolph Just tried and it does print context for dependent static_asserts… so no worries, then. Just introduce a false dependency if necessary.
 
actually, I did, initially, just /ignore him
but was forced to conclude that it was ineffective
 
ohh then I should leave :)
 
@Potatoswatter Yup, trivial. But just to be clear: my understanding is wrong then, this should unconditionally assert?
 
You can try threatening with an /ignore, and psychology will take over on its own.
 
3:51 PM
and that 1131997 guy, if he was on more in my time zone, I probably wouldn't go any easier on him
 
@DeadMG Ok. I appreciate that. I trust you thought it was really annoying. Just be glad I'm not a room owner. If I'd start binning everyone who, though on my troll ignore list is still dominating the chat...
@DeadMG He is. AFAICT
 
I don't really see him often
 
@DeadMG Open your eyes.
 
@KonradRudolph Generally things that aren't dependent are handled completely in the first pass. I'll check if the standard specifies anything…
 
whereas I see LearningC here very often
 
3:52 PM
Hello guys
1 simple question
 
Learning C is not even in your timezone
 
there is no string type in C right?
 
@DeadMG thanks for clarifying your motives. Can I just ask you to not suspend judgement next time. I don't think that last message needed to be binned, and I consider it impolite to me that you did.
 
aaaargh
 
3:53 PM
only const char*
 
yes, no string type.
 
@KonradRudolph I don't think it does. So your understanding isn't incorrect, there's a hole in the language.
 
but in C++, yes?
 
in C++ std::string
 
3:53 PM
@DeadMG with your explanation, it is already 'forgiven' but I'd sure like you to know that I didn't appreciate that happening.
 
That's a class type.
 
But yeah.
 
@TuralTeyyuboglu what about it?
 
@sehe Sure, no problem. It can be unbinned, as far as I'm aware
 
3:54 PM
@DeadMG Or perhaps, bin my answer as well :)
 
@TonyTheLion I mean there is string type in C++
 
@DeadMG it might have gone smelly in the bin :P
 
That'll keep him in the bin - muhahaha
@TonyTheLion Even smellier? Nah
 
@TuralTeyyuboglu Yes, it's called std::string
 
Aha thx very much
 
3:54 PM
room topic changed to Lounge<C++>: Not the room in which to ask random C questions. [c++] [c++11] [c++-faq]
 
How does rand() work in C?
 
what about non-random C questions
 
@KonradRudolph Hmm, wait, no. A static_assert renders the program ill-formed. But a template with no valid instantiation is already ill-formed, no diagnostic required. So an implementation is free to either diagnose early with no context, or wait until instantiation.
 
@StackedCrooked Fuck that :)
 
Bottom line, don't write non-dependent static_asserts because the mode of failure is ambiguous.
 
3:58 PM
@Potatoswatter I don't understand most of that sentence.
 
@StackedCrooked If a template contains a static_assert, even if it's notionally not processed until instantiation time, it still renders the template invalid if it would always fire.
 
Something bad about Java or PHP.
5
Now star me :D
 
The implementation is free to flag such an invalid template (GCC), or just ignore it (MSVC).
 
man, r/shittyadvice is really just that, shitty!
 
@Potatoswatter Where is the ambiguity in that?
 
4:02 PM
Ok, thanks for looking that up @Potatoswatter.
 
@StackedCrooked now you come in here to starwhore???
why?
 
@TonyTheLion Yeah, occasionally.
 
@StackedCrooked GCC will claim that the static_assert fired, even though it really didn't, but it's OK because the template was invalid. MSVC won't, it could successfully produce a program, which is also OK. Ambiguous result.
 
@Potatoswatter Ah, I see.
I often wonder about this. When I'm 60 will I then find 60 year old women attractive?
 
4:12 PM
@StackedCrooked You'll say that they have experience, which is true.
 
And will a 50-year old look dangerously young?
 
Madonna is 50+ now.
 
ask sbi - he wouldn't want some 20-year-old whippersnapper
 
@DeadMG Doesn't "whippersnapper" refer to a male person?
 
4:13 PM
how do we get from static_assert to women over 60?
 
AFAIK, it's just for young people in general
 
> A young and inexperienced person considered to be presumptuous or overconfident.
 
> 2.(Noun)Term used to describe a woman who likes to be smacked in the face with a shlong.
 
^ Urban dictionary. But not highly voted.
 
4:13 PM
shlong???
I'm not Googling that
 
It's also on urban dictionary.
Anyway, I guess whipper snapper is also used to refer to females. Good we got that cleared out.
 
> penis = shlong
lol
 
2
Q: How do I make TODO comments show up in the task list for C++ projects in Visual Studio 2010?

Chris SimmonsI'm trying to get my TODO comments to show up in the task list in Visual Studio 2010 for a C++ project, but they don't. I looked at this, but see no caveats other than the TODO comments need to be in the currently-open file. For example, creating a new Win32 console app places this: // TODO: r...

 
@StackedCrooked It was of critical importance to global security
 
4:18 PM
// if I have
class Foo {
   Foo(const Foo&);
   Foo(Foo&&);
   void swap(Foo&);

// is it good idea to make
   Foo& operator=(Foo rhs) { swap(rhs); return *this; }
// instead of
   Foo& operator=(const Foo& rhs) { Foo tmp(rhs); swap(tmp); return *this; }
   Foo& operator=(Foo&& rhs) { Foo tmp(std::move(rhs)); swap(tmp); return *this; }
 
^ whippersnappers at work
 
4:31 PM
man
 
hm... with operator=(Foo rhs) it's not possible to optimize assigning to self (this == &rhs)
 
I want to watch the IGN Pro League, but they have this really disturbing advert about rape :(
@Abyx Self-assignment is actually incredibly rare and not worth the conditional branch in the general case.
 
Ell
hi guys
 
4:44 PM
@StackedCrooked What happened to Massachusetts?
 
Zoom in to street view!
 
Ell
anyone have any suggestions for a config file?
xml? json? ini? yaml? It needs to be human readable
 
ini
 
hello
 
@StackedCrooked Carmen Sandiego must be in there somewhere…
 
Ell
4:49 PM
@Pubby why Ini?
I need it for stuff like include directiories for searching for images
 
you can put a list of include directories in a plain text file "as is"
 
Ell
yeah I suppose
but it wont just be images, it will be tilesets, sounds, etc.
and I want to be able to go "load tilesets here, here and here(recursively)", "load sounds from here recursively as long as they end in .mp3" or something
meh I'll leave this till later @:
 
TVTropes is really filled with pure awesomeness.
 
Ell
tvtropes?
 
Oh dear.
 
Ell
5:04 PM
:P
anyway i must go :L see you later
 
5:23 PM
I have a string class, like std::string, if its internal buffer always have terminating zero, is it good idea to allow str.at(str.size()) ?
 
no
 
CString allows such thing, but it's the CString %)
 
5:56 PM
Zero termination is silly.
 
@CatPlusPlus why?
 
Because it's error-prone and sometimes downright inefficient, like most things C does.
 
anyway, zero termination is required when you want to work with C API (including OS API)
 
@sehe just trying to do my part :)
 
@Abyx Sure, but you can just add it on demand
 
6:08 PM
@DeadMG what do you mean? add what?
 
the null terminator
 
MyStr someLongStringCopy = someLongString + '\0'; api_fn(someLongStringCopy.data()); ?
 
std::string has a c_str() member which does it in place
 
^ bullshit.
since C++11, it's const charT* c_str() const noexcept;
 
yes
I'm aware of the signature
 
6:12 PM
so it doesn't add anything to string
 
that's not strictly true
it only has to remain logically const
if you have spare capacity, you could, for example, simply add the \0 on the end without changing any of begin() or end()
 
and it's O(1)
 
and leaving the string untouched from the API's PoV
what?
 
wait a sec, reading standard...
it's nothing... anyway, in C++11 c_str can't reallocate string
 
no, it can't
but you can use the unused capacity
and nothing says that when you say str.reserve(n) the implementation can't actually allocate one more for \0
 
6:20 PM
so... what we are talking about?
@DeadMG it's not "on demand"
it might be c_str() { m_data[m_size] = '\0'; return m_data; } instead of resize() { ...; m_data[m_size] = '\0'; }, but I don't think that it's useful
especially for debugging
 
well, if you can avoid the NULL terminator from ever being exposed to the C++ API, then you've achieved a positive effect
 
saving 1 byte of memory?
 
heh, no
saving, for example, operator==
if String A has a null terminator and string B doesn't, are they equal? or not?
do they hash to the same value?
if I have std::unordered_map<YourStringClass, X> can I look up in it with the non-NULL-terminated version?
and find an entry created with the NULL terminated version?
it's just easier to always hide the terminator
 
oh! that's great! thank you Dog, I figured out that I can have operator==(const char(&rhs)[N]) for effective comparison
 
puppy
 
6:29 PM
other tens of overloads...
 
not dog
 
ok, thank you puppy, I believe once you'll become a dog
 
heh
if you actually met the puppy in question :P
 
oh puppies
generally they're quite cute, but I"m not sure how cute you really are :P
 
6:44 PM
He's probably as uncute as Qt.
 
lol
 
hey
how can I cout Hebrew characters?
 
7:00 PM
You'll need an encoding that supports such characters.
 
am I supposed to do that with locale.h?
I tried setting new locale though
 
7:15 PM
This doesn't work?
 
depends on compiler
 
It's not standardized?
 
on MSVC, for example, I doubt that code would work correctly
 
it prints '???'
 
you have to use wcout and wchar_t for Unicode on Windows
 
7:24 PM
@all:hi.i am new in this chat room
 
didn't print hebrew yet
 
@ScottW You have three options: (1) perform all tasks synchronously, (2) delegate them to someone else, (3) don't do them at all.
I often tend to go for (3).
For a sec I thought you meant that your brother was typing stuff here while you were away.
 
Gah, tomorrow's (I WILL NEVER LEARN) that stupid international day of utter annoyance again.
 
7:52 PM
what's the difference between "cough- and bronchial tea" and "cold/chill tea" ?
i wonder whether that's suitablefor cooking.SE
 
8:12 PM
must ... stay ... awake ...
 
hava cup o java
@DeadMG in Informix-SQL's C-ISAM file structures, \0 is used for flagging a table row as being deleted, although the row is still physically present.
 
@FrankComputer ewwww, Java
that'd just send me right to sleep
 
Java as in Coffee, or as Ausies say, a cup o Joe :)
 
8:44 PM
just broke my chair again
I think that it's finally kicked the bucket, so to speak
 
sbi
Damn, this was good.
Not that I want to make you jealous, but for dinner I had two slices of pork roast with a marvelous mushroom-burgundy gravy, curly kale, tomato-mozzarella tortellini, and a bottle of beer. To wrap this up, I am now having a glass of pretty decent red port. Yum!
 
you bastard, I've eaten nothing but yoghurt for 15 months :(
 
sbi
Oh, poor puppy. I am so sorry!
 
lol
me too :D
 
Quickpoll®: How do you guys unit test for compile-time assertions that should fail
 
8:49 PM
well, I've done all I can do for today, and shall now attempt sleep
good night, everybody
 
for instance, I have a method that shouldn’t be usable with certain template argument types and I want to have a unit test ensuring that this restriction correctly prevents compilation
@DeadMG Night
 
sbi
Really, curly kale is actually something I'd eat in the autumn or winter time, not in the spring, but when I was at the supermarket and had to decide for a vegetable, this kale kept nagging me. What could I do? I bought it, and, somewhat surprisingly, it's good in spring, too. At least given all the onions, garlic, and ham I put into it. :) And those tortellini seemed strange with this arrangement at first, and so does having a beer with this stuff, but it was a marvelous feast. :)
@DeadMG Sleep well, and do not dream of pork slices!
 
never been partial to kale :(
 
sbi
@KonradRudolph I mean, did you really have to do that? Posting a programmer's question right while I'm wanking over my incredibly good dinner? Can't you instead, say, call your girlfriend or something? It's Saturday night, after all, and in England, where you live, everyone is drunk. And you program? You have my sympathy.
 
@sbi My girlfriend excels at many things. C++ ain’t one of them.
wrong gf ;)
 
sbi
8:52 PM
@KonradRudolph Oh, c'mon! I most certainly didn't not mean to suggest you two talk about programming, let alone C++!
 
And as for getting drunk, I went out the two previous nights, had an amazing dinner with friends yesterday and now I’m broke ;) Quite posh shop
 
sbi
Ah, being broke is something I can relate to very well...
 
@sbi Hehe … she did mention just now that she went lingerie shopping :D
 
sbi
@KonradRudolph What for? I mean, it's not like you're currently in a position to appreciate that, huh?
 
@sbi Soon ;)
 
sbi
8:54 PM
@KonradRudolph Ah, sounds better.
You're being in Berlin for Eastern, then?
BTW, I used to not like Grünkohl, either, but I learned to appreciate it in my 30s. For a XMas dinner goose, it's a quite fitting vegetable. Or, as it is with me tonight, for a few slices of pork.
 
@sbi Nope, my SO is in Heidelberg, and there I’ll go
but Berlin is definitely on the list for a trip soon, we might catch a beer then
in the meantime, nobody has an opinion on how to handle my unit testing dilemma?
 
sbi
@KonradRudolph Ah, so you're used to leading a remote relationship (or whatever that's called in English)? Ah, I had this for half a years in my early twenties. Then my girlfriend decided to move to Berlin, too. I thought that was a pretty good decision she made. :)
 

« first day (532 days earlier)      last day (4399 days later) »