« first day (803 days earlier)      last day (4146 days later) » 

user142019
3:01 PM
lol Objective-C#.
 
1
A: Jay, the mono C# compiler and changing the grammar

seheFrom README.makefiles: If your program has 'built sources', that is, source files generated from other files (say, generated by jay), define a variable called BUILT_SOURCES and do not list the sources in $(PROGRAM).sources: ======================================== PROGRAM = myprogram.exe...

/cc @ZoidBerg ^
@ScottW Done
 
user142019
var foo = [[NSArray alloc] init];
 
user142019
Objective-C# :)
 
IMPAHTANT
Objecting-C#
 
Ell
is objective-c dynamically typed?
 
3:03 PM
@Ell no yes. sometimes
 
@Zoidberg'-- That's like the most ugliest language ever
2
 
user142019
@Ell both dynamically and statically.
 
@NikiC It's the whole Paula bean done right. If you do something badly, make sure you do it +all the way+
 
user142019
The C subset is statically typed. Think, struct, int, etc...
 
@NikiC It's just "Thinking differently"
 
3:04 PM
@NikiC I admit, taking second place to PHP is quite an achievement.
 
@yetihehe Yup.
 
user142019
Objective-C layer is dynamically typed.
 
user142019
Duck typing, that is.
 
@ScottW ...
 
user142019
Objective-C is very similar to Ruby. The major difference is that sending a message to nil is a no-op.
 
3:05 PM
@ScottW Why does it bother you?
 
hehe
 
sbi
@sehe OMG, you're a cat, too?
 
user142019
I wish Objective-C got its GC back. :^(
 
user142019
GARBAGE COLLECTOR Y U DEPRECATED
 
user142019
ARC sucks ballz.
 
3:06 PM
fuckdiddlies
 
@sbi cats are superset of bears, apparently
 
sbi
So @sehe says hehe.
 
@sbi Useless cat
 
libstdc++ y u only have a setting for MSVC and GCC, and not Clang?
 
sbi
@BartekBanachewicz What?
 
3:06 PM
@Zoidberg'-- That's very unfortunate to say in the C++ room.
 
user142019
I love garbage collectors.
 
user142019
They are superior.
 
@Zoidberg'-- You can date them
 
user142019
No thanks. :L
 
@ScottW Darn. Why you troll so hard?
 
user142019
3:08 PM
Because he's hungry.
 
user142019
@NikiC says a PHP developer.
 
@sbi Well, okey, Felidae and Ursidae are different families
 
Quick. Beam him some vanilla flavoured crisps
 
@ScottW Too bad. Sorry, I won't change it, I'm too attached to it.
 
@Zoidberg'-- Even taking that into account ;)
 
sbi
3:08 PM
@Zoidberg'-- I don't know. Here, they are badly paid, work outside in any weather, and their job is smelly. Also, I have never seen an old guy doing the job, and those jobs always make me suspicious.
 
@BartekBanachewicz Not to mention the spelling is different.
Butm then there is the Meerkat
 
sbi
@sehe Which is a primate!
 
user142019
Hmm.
 
user142019
C# without garbage collector.
 
@Zoidberg'-- I think you can, on mono. At least you can switch implementations
 
user142019
3:11 PM
C# Standard is only 553 pages.
 
@Zoidberg'-- That's a positive (-553, OTOH...)
 
Is there a case where std::pair can deduce it's template args w/o having to explicitly specify them?
 
@Nils std::make_pair, std::make_tuple, uniform initializer syntax
 
autoboxing example? ;)
 
ah..
lol
 
3:13 PM
lol
 
@ScottW /me hugs @ScottW ; // I still like you
 
lol... "Chad knew just enough PHP to be dangerous"
 
sbi
Once we're at cats...
 
If I sort a vector of shared_ptrs using std::sort, is there a way to use the objects overloaded < operator?
 
3:22 PM
Or do you have to write a lambda func / external operator?
 
Here's mine.
 
@BartekBanachewicz sooooo cute!
 
sbi
@BartekBanachewicz You live in a box?
 
@sbi I was experimenting on him. There's a myth that if you give a cat a box, it will surely get into it.
 
Myths are only myths until experiments make them into theories.
 
3:24 PM
anyone?
 
sbi
@ShotgunNinja Like Mythticial's (in)ability to write proper C++?.
@Nils It's sorted according to the container's content's operator<(). The container's content is pointers, so it's using those.
 
Sure, @sbi.
lol, sort by pointer value :P
 
@sbi I get that, but is there a way to tell it like "dereference the containers content first and then check for the < operator"?
Using a lambda function works find too of course, but I am just wondering.
 
@ShotgunNinja why not?
 
sbi
@Nils Yes. You provide a sorting criterion as a third parameter to std::sort(). I haven#t had a chance to use them, but it is said that lambda functions fit into the niche beautifully.
 
3:28 PM
Any sort of classical functor would work, but lambdas make those possible in one line of code, rather than 20.
 
@ShotgunNinja more like... 6 or 7 perhaps
 
sbi
IMO the greatest advantage of using lambda functions is that you have the sorting criterion spelled out right where you call the sorting function, instead of having it in some function object type that's defined elsewhere.
 
Well yeah, but LoC is an inexact metric.
 
@sbi but if you have to repeat the same lambda over and over, it stops to make sense
 
@sbi stuck with old compilers at work?
 
sbi
3:31 PM
@BartekBanachewicz If it's as trivial as in Nils' problem, I don#t see a problem in doing so.
@Nils What are you using plural for?
 
@BartekBanachewicz not a problem in practice, you will simply define the lambda only once i.e. auto lf = [](...) {...}
 
sbi
@BartekBanachewicz Shirley, writing *lhs < *rhs several times isn't really repeating yourself, is it?
 
@AndreiTita but your hypothetical lf has to reside somewhere. It's not a solution
 
@BartekBanachewicz yeah, depends on the situation at hand, as always
 
3:33 PM
@sbi if the class has standard, easy to grasp < operator (number, for example), you don't have to use lambda at all.
 
@ScottW They have that, it's called Python...
Okay. Then let's do it.
 
sbi
@BartekBanachewicz What are you getting at? If you haven't been following the discussion, please at least read the code. (That's comparing the objects pointers reference, rather than comparing their adresses.)
 
@sbi k, nvm
 
@sbi just one? Well we have multiple.
 
sbi
@ScottW The first questions to address when you plan to create your own programming language should, IMO, be: What is it for? What niche does it fill? What programs should one be able to write in it? "Something easy to fiddle with while hanging out in the lounge" sounds like a very bad answer to all of them.
@Nils It used to be that my code had to compile on half a dozen platforms. Now I target only one. Not an improvement, IYAM.
You do come across like having a very negative attitude today.
 
user142019
 
user142019
Do you object to that?
 
sbi
Yes, you.
@Zoidberg'-- You don't "solve" relationships. After the initial $time_span any relationship always is a constant uphill battle. You live, you fail, you learn.
 
@sbi yeah I agree
 
sbi
@ScottW I explain why I think what you are suggesting is a bad idea, you reply by "and that's exactly why we should do it", and now you're asking me why you come across negatively?
That surely must be the language barrier.
 
Hi, since I guess Barosz converted every C++ dev to Haskell PP I wonder does anybody here knows any Coursera like Haskell course. Checked Coursera and only FP course is Scala, and start date is TBA. :(
 
sbi
3:43 PM
That makes @NoSenseEtAl.
(SCNR.)
 
Xeo
@Zoidberg'-- Same place as before, Oberhausen in North Rhine-Westphalia. :)
 
user142019
Cool!
 
sbi
@Zoidberg'-- Actually, currently they have it warmer there, and I think that's also true in general.
 
user142019
@sbi stop misinterpreting my words!
 
Xeo
s/my/our/
 
sbi
3:45 PM
Why should I?
 
Xeo
It's not only you, really.
 
user142019
Why not?
 
sbi
@Zoidberg'-- Because others do the same, maybe?
 
wooo, misinterpretations!
I like to think of them as runtime errors.
 
sbi
That "runtime" term always sounds so hurried.
 
3:47 PM
@sbi Bartosz Milewski is a C/C++ dev that has a crush on Haskell. Either way intro was a joke obviously, but Im really looking for online Haskell course .
 
@NoSenseEtAl Try Channel9
 
@vivek I saw those lectures from Meijer
they are basic
 
Real world Haskell >
 
Xeo
or PHP
 
sbi
@NoSenseEtAl You've come to the right place, only the usual suspects don't seem to be around currently. Usually, every time someone mentions Haskell, there's about half a dozen people here whose eyes you can see light up. There's a Haskell room, even, but I don't know if it's even still usable. If so, you can go there and ping those who frequented it at one time.
That said, usually everybody recommends something that sounds like Learn You Haskell For Greater Good or something similar.
 
user142019
3:50 PM
@sbi :P
 
@sbi Learn You A Haskell For Great Good
 
user142019
@Xeo or Objective-C#!
 
Xeo
@Zoidberg'-- Wait, what?
 
user142019
:P
 
user50049
There are no runtime errors in PHP. There are merely runtime misunderstandings
7
 
sbi
3:51 PM
@DeadMG See. I was that close!
 
@TimPost :D
 
Xeo
@TimPost The whole language is a misunderstanding. It was never meant to be more than an April Fool's joke, but somehow that fact got swiped under the rug...
 
user50049
@Xeo I blame perl.
 
Xeo
@ScottW Doing it wrong?
 
@Xeo Actually, it was supposed to be a language for personal home pages, hence the title. Whether or not that spawned from an April Fool's Joke is another story.
 
sbi
3:52 PM
Hey, Uncle @Tim, what brought you here? Do the mods now have the chat server plink them when someone's dissing PHP? (Then you would have to become a resident of this room.)
 
hmm
I thought that Clang could compile calls to GCC's extensions and __builtin functions
 
@sbi This room has been automatically frozen for inactivity


The last message was posted 67 days ago. :) Im late to the functional lang bubble... :P
 
sbi
@TimPost How cheap! Few things are easier to blame than Perl.
 
@sbi still tnx
 
Xeo
@ScottW Err, you should be able to do that from the file properties.
 
sbi
3:54 PM
@NoSenseEtAl Ah, I thought so. They are all always discussing it here, though. So if you're that depserate, ping them here. Meanwhile, what the puppy said.
 
@ScottW Yeah, I've had things like that happen in previous versions of VS... it's a pain I lived with for a while.
 
sbi
Oh, and stop starring random messages replying to you. That makes @NoSenseEtAl.
 
user50049
@sbi Well, blaming PHP on Perl is kind of recursive, as PHP was originally written in Perl
 
sbi
@R.MartinhoFernandes You in Texas, buddy?
 
3:55 PM
hmm
 
@sbi How funny.
 
evening roboticus
 
sbi
@TimPost Ah, that's why no significant improvements are made to it, huh? Perl is a write-only language, after all.
@R.MartinhoFernandes For a robot, your sense of humor isn't all that bad.
 
user50049
@sbi Hey, come on .. in the bleeding edge version, empty() can now evaluate function calls!
 
sbi
@TimPost You mean PHP has edges so sharp, you're bleeding? And those guys think C++ is too scary.
 
sbi
The robot most be online via UMTS. Normally he isn't way more talkative. I bet we will get 500 replies to old messages trickling in in the next 60mins, that he has already typed by now.
 
@BartekBanachewicz That's an oldie.
@sbi Nah.
 
@R.MartinhoFernandes just found it
 
sbi
@BartekBanachewicz That's lacking FileNotFound.
 
@sbi what's with your ' key?
 
sbi
4:00 PM
@R.MartinhoFernandes Hey, this one came through synchronously!
 
@BartekBanachewicz 2 of 5.
@sbi Also, "isn't"?
 
@R.MartinhoFernandes even better
 
sbi
@BartekBanachewicz I was wondering the same. Beginning last night, I seem to have trouble hitting Shift and # at the same time. I dunno whether this is a problem with the keyboard or my old age kicking me into the nuts.
@R.MartinhoFernandes Ha, never miss a chance to wait for those two mins to expire, do you.
So, @Tim, again — what's a PHP pro chimp like you doing hanging out here in the C++ room?
 
@sbi {german keyboard layout} I have " as Shift+'
 
user50049
@sbi Recovering from Stockholm Syndrome.
2
 
sbi
4:03 PM
@BartekBanachewicz Yeah, of course I am using German layout. Sorry, I thought that was obvious.
 
@TimPost Nice.
 
@sbi Well, I came to that conclusion after you mispelled # for the 3rd time
 
Xeo
@sbi How could it, you're writing English all the time after all!
 
sbi
@TimPost You were abducted? Must have been those pesky orangs, huh?
 
Xeo
@BartekBanachewicz ' is shift-# on German layout.
 
user50049
4:04 PM
@sbi And, I'm not quite sure we've seen the last of that ... earlier disruption, so I'm parked here for at least a few days.
 
@Xeo ... oh, rly?
 
Xeo
Wait, I forgot something.
 
sbi
@BartekBanachewicz You must have missed about three dozen times this morning alone... :(
 
Xeo
Ah, nope, I didn't.
 
@Xeo Love when that happens.
 
sbi
4:05 PM
@TimPost You speak in riddles, man ape! Can't you spill the beans and tell us what happened?
 
Xeo
@sbi Flagging and disruption.
I guess.
 
sbi
@Xeo But there wasn't any flagging this morning, was there?
 
user50049
@sbi Let's just say you have a penchant for finding rather odd things.
 
sbi
@ScottW I'm not gonna follow that link, but I bet that's where I got it from.
 
Xeo
So much for not talking in riddles?
 
sbi
4:07 PM
Indeed.
@TimPost That sockpuppet guy from yesterday?
 
user50049
@sbi Ayup.
 
So @TimPost, I take it you're a moderator?
 
sbi
@TimPost Oh, is he still amongst us? Looks eagerly at the list of users currently in the room.
@ShotgunNinja Why do you think his name is in blue? (That's because that moderator job gives you the blues. And that diamond is actually a sapphire, BTW.)
 
The ape sounds inspired today.
 
user50049
@sbi That's .. why I'm here (apart from actually getting back to C and C++ and enjoying watching people work out problems here)
 
4:10 PM
Oh noes, you mentioned the dreaded "C/C++" beast.
Prepare to be lynched.
 
Welp, I'm a Java developer, so consider yourselves lucky. EDIT: And believe me, it's not by choice.
 
@sbi they also glow in the dark.
 
@R.MartinhoFernandes Ohai
 
sbi
@TimPost Well, then make yourself wanted here by answering my question.
 
@TimPost that's better.
@ShotgunNinja YOU should consider yourself lucky
 
4:11 PM
Bananable. FTFA
 
@TimPost DIE C/C++ INVADER!
 
sbi
@sehe You fixed what?
 
anyway, if C == -1, C/C++ throws. up.
 
sbi
@DeadMG Stop barking at that chimp, puppy. He could tear you in two without even straining his biceps.
 
apart from being UB, if I'm right.
 
4:12 PM
I run faster
 
@sbi Stop phrasing everything as morally outraged semi-rhetorical non-questions?
:)
 
@sehe He's phrasing what?
 
Zing
 
sbi
@sehe What tells you I am not morally outraged?
 
Point well taken
 
user50049
4:13 PM
@sbi I take it the new job with the XP laptop is going well then. Thanks for the update.
 
@sbi Dammit, you fixed it.
 
sbi
See, I can't even type anymore.
 
That#s okay.
 
btw, roboticus
 
So much snow outside.
 
sbi
4:14 PM
@BartekBanachewicz Of course, it is. Even the pirate is accepted here. And no one can possibly be worse than him!
 
I fixed my Clang name lookup problem and my ownership problems and my code generation problems
and Clang doesn't crash that often anymore
 
sbi
@TimPost What update?
And regarding that job, lemme...
 
all I have to do now is fix linking to libstdc++, and then I might actually be done with the Clang API for a while
 
sbi
@TimPost Regarding Windows XP, you start reading here.
4 mins ago, by sehe
Zing
@TimPost Then you remember what I wrote on Twitter, and piece it all together.
 
4:22 PM
IOW something happened.
I came here looking for entertainment but you guys are boring.
 
@sbi Boom. Target confirmed destroyed.
 
sbi
@R.MartinhoFernandes Actually, it became significantly more boring the very moment you entered.
It was all sex and drugs and C++ before that.
3
 
@sbi So you play boring on purpose for me?
 
sbi
@ShotgunNinja Actually not. I consider it a sign of a really good company, when the words of the developers have so much weight.
 
Not sure how I should feel about that.
 
4:24 PM
@R.MartinhoFernandes You should drink.
 
sbi
@R.MartinhoFernandes We're not playing. We are bored since you entered.
 
Meh C++ is confusing.
I have objects which I want to put in groups, every group has an id
 
sbi
What language is Meh C++?
 
@sbi That's what I mean. Confirmed winning.
 
4:26 PM
let's meet up and do a C++ quiz evening party
 
So I thought that a std::map<int, std::vector>> would be a good choice.
 
sbi
Oh no. Johannes and his C++ quizzes.
 
riddles all night long
 
Should I bring a gun?
 
Now given the id (int) how can I get a reference or a pointer to the found vector?
 
4:27 PM
You know, just in case I want to take my own life.
 
sbi
Famous last words: "So I thought that a std::map<int, std::vector>> would be a good choice."
 
you forgot to push empty slots into your russian roulette container!
 
Or should I use multimap?
 
sbi
@Nils std::map<int, std::vector<blah>>::find(int)?
 
@Nils the_map[the_id]?
 
sbi
4:28 PM
@R.MartinhoFernandes Or that, if you're fine with empty vectors added to the map.
 
0
Q: increment operator not working with sizeof

user1367292Just wondering why the increment operator is not working in the below code snippet: int main() { int a = 10; int b = sizeof(a++); cout<<"a: "<<a<<endl; cout<<"b: "<<b<<endl; return 0; } Output- a: 10 b: 4

Hahaha.
 
@Nils get_ref_to_old_vector_given(id)?
 
I have seen that question at least 3 times the past 2 days.
 
@sbi yes that gives me an iterator to a single element, so if I write vector<Thing> things = *myMap.find(myId); I get a copy, right?
If I write vector<Thing>& instead I get no copy.
 
sbi
@Nils No, you'd get a compile-time error.
 
4:30 PM
@Rapptz Sounds like it is from some teacher's homework then.
 
@R.MartinhoFernandes I thought the [] syntax is only for insertion?
 
@Nils No. It gives back references.
@Nils It gives back references.
 
sbi
@Rapptz Ha, it's all sockpuppets! We must tell @Tim!
 
ah
thx :)
 
back-references?
 
4:32 PM
@Rapptz Let's close it as dupe then.
 
sbi
Really, @Nils, using a std::map is so basic, you failing at this tells me you did not read even the first three chapters of any decent C++ book. Do yourself a favor: Get yourself a good C++ book.
 
I flagged it as a dupe of stackoverflow.com/questions/8225776/…
just like I did with the other ones
-1
A: increment operator not working with sizeof

lbonnsizeof is not a function in C. Its argument is not really evaluated, only its type is and this is done at compile-time. In your code, the assignment is equivalent to : int b = 4

lol
 
i added a more elaborate analysis of the phenomenon
 
@JohannesSchaub-litb You type answers fast. I'm impressed
 
No one cares, just close as dupe.
 
4:35 PM
lulz
 
I even got a comment off on it.
 
@sbi mine is at work
and now I am home :)
cppreference.com for me
 
sbi
@Nils Then find some tutorial on the Internet. Really, std::map is at a level where even most of the bad ones get it right.
Anyway, I'm outta here. You can now continue the party, and start to reclaim the starboard.
 
@sbi You mean "cancel stars" here I come?
 
hmmm
#llvm in a flamewar about OGL vs DX
:P
 
4:41 PM
Sounds familiar.
 
nice.
 
and it's all my fault
 
@DeadMG who wins?
 
@DeadMG, what have you done?
 
started talking about headers and extensions, and then some guy mentioned that he was working on the DX headers :P
 
4:41 PM
@Abyx I do.
:P
 
I'm on the OGL side...
 
I'm on the winning side.
 
@ShotgunNinja OGL sucks.
 
I'm definitely a DX man myself
 
Xeo
TIL Dietmar Kühl didn't know about forced left-to-right evaluation of list-initialization. :)
 
4:43 PM
dx is irrelevant since it does not work on Apple products
:P
 
Xeo
Apple is irrelevant, since fuck Apple.
20
 
Too strong on the starbait?
 
Xeo
lol
14
Q: how to avoid undefined execution order for the constructors when using std::make_tuple

Erik SjölundHow can I use std::make_tuple if the execution order of the constructors is important? For example I guess the execution order of the constructor of class A and the constructor of class B is undefined for: std::tuple<A, B> t(std::make_tuple(A(std::cin), B(std::cin))); I came to that con...

So much boilerplate in the answers, ahahaha.
 
@R.MartinhoFernandes to taste :)
Room killed
 

« first day (803 days earlier)      last day (4146 days later) »