« first day (704 days earlier)      last day (4245 days later) » 

4:00 PM
"C with a C++ guise" is hardly harmful." Have you ever looked at the code people that learn this produce?? It's bad and you should feel bad. — Tony The Lion 13 secs ago
 
Your quotation marks are bad and you should feel bad.
 
@TonyTheLion Ow.
 
was I being too harsh?
 
@TonyTheLion: You should link to this: faculty.capitol-college.edu/~conner/230p1.doc as evidence of why "C with a guise of C++" is evil.
 
@TonyTheLion Not when you consider the following comment by the puppy.
 
4:02 PM
@TonyTheLion No, they're mismatched.
you have three quotation marks :P
besides
you guys didn't check out the chapter list, did you?
it's full of stuff like OLE automation and ActiveX controls
not one mention of the Standard library
 
@DeadMG You should mention that last fact in your answer.
Just in case you decide to get a different book, have a look at The Definitive C++ Book Guide and List. — R. Martinho Fernandes 17 secs ago
I'm really surprised that link was not on that page yet.
 
Add it!
 
Already did. Needs one tick to be visible.
 
By one tick I assume one upvote/like, which you now have.
 
@TonyTheLion lol, they spend half of the time talking about about (ab)use :)
 
4:10 PM
That and a snarky comment on another answer will be all my contribution to that thread. Now back to work.
I decided to RTFM more carefully and now I can chop off maybe about half of a 300-line class.
@Borgleader Thanks.
 
@Ell Is "being the bomb" a good or a bad thing? Because I seriously believe that restricting yourself to a single paradigm, whatever paradigm, is extremely stupid.
 
why the fuck did I eat those brownies
@FredOverflow "being the X" is usually implied to be a very good thing, regardless of what X actually is.
 
@daknøk Pick Scala or Haskell. Oh wait, you already know Haskell. Pick Scala.
 
@R.MartinhoFernandes: which manual did you read the f**** of
 
@DeadMG let X be "suck". Does your assertion still stand?
 
4:13 PM
@FredOverflow I’m actually programming in Haskell at the moment. :)
 
@R.MartinhoFernandes No, I guess. But I don't know of any others.
 
@Ell I was always under the impression that "if it were" is somehow more hypothetical than "if it was" :) Am I wrong?
 
It's the somethingtive tense.
 
@daknøk As far as I know, Scala is the only language besides Haskell that has type classes. Well, it doesn't really have type classes, but it can simulate them quite nicely with implicit parameters (not to be confused with default parameters).
 
4:16 PM
Oh I see
 
@FredOverflow C++ will-maybe-not-who-knows-let-us-pretend-it-will have concepts, which strikes me as quite similar.
 
@sbi I need more than 4 GB of memory so I don't feel stupid for running a 64 bit operating system.
@R.MartinhoFernandes I don't know enough about Concepts to make a smart comment about that. So I'll just say "cool".
 
@R.MartinhoFernandes haha
 
@Borgleader Rep-whoring. It's addictive, but it passes with time.
 
Go interfaces also remind me of typeclasses.
 
4:18 PM
@R.MartinhoFernandes I think the real comparison (with the real differences) should be C++ + concepts + modules pit against Haskell.
 
@thecoshman Don't work there. vOv
 
@TonyTheLion Pointer masturbation is a good thing. (Mentally preparing for my upcoming C course here.)
 
@R.MartinhoFernandes They're bit like typeclasses with implicit instances.
 
Pointers are dogs. (I am not sure why I remembered this tidbit of trivia, and I'm not sure I want to probe why)
 
@R.MartinhoFernandes Mmh. I forgot how the syntax goes when adapting a preexisting type to an interface. Via the receiver parameter?
 
4:20 PM
@FredOverflow: Me? Rep whoring? Never ;)
 
@FredOverflow it's get awfully confusing with double pointers.
 
Talk like a pirate day? How the fuck does a pirate day sound like?
 
@LucDanton It just needs to have required methods/functions/whatever they call them.
 
@TonyTheLion You better not look to closely at mains parameters then.
 
@CatPlusPlus 'Preexisting' being the key word here.
 
4:21 PM
@LucDanton Yes.
 
@FredOverflow I have looked at them closely.
 
Rust also has something similar.
 
I know that Go is following structural typing, but what are typeclasses resting on? Or is 'typeclasses' simply the thing?
I feel like I've asked that before.
 
@R.MartinhoFernandes wewf
 
@FredOverflow Like a pirate night, but not as dark (of course)! What a silly question.
 
4:26 PM
Night of the Talking Pirates sounds like a good horror movie title. No, it doesn't.
 
No, it doesn't.
 
@FredOverflow main's parameter is a pointer to array. No double pointer to worry about
 
It's a pointer to char*.
 
I remember @CatPlusPlus said something along the lines of "Pointers point."
best explanation for pointers ever.
:P
 
XKCD's big-ass world is 81 blocks wide and 32 blocks high, each block being 2048x2048. I've so far created 32 165888 x 2048 fragments. I'm going to see if Python's Image Library won't choke on the 165888 x 65536 PNG that's going to be made.
 
4:31 PM
char*[] and char** is the same thing.
 
@rubenvb int main(int argc, char** argv)
@CatPlusPlus In the case of parameters, yes.
 
int main()
 
Xeo
@rubenvb If anything, you'd interpret it as "array of pointers"
 
but char*[n]and char** aren't the same. Right?
 
@FredOverflow 3.6.1/2. But the @Cat says it's exactly the same.
 
4:32 PM
@TonyTheLion They are only the same when used as parameters (and then the n is ignored).
 
ah ok
 
@Xeo yeah, right. I'm still awakening from jetlag.
And I will be still for the coming weeks
 
So int main(int argc, char * argv[42]) is also fine.
 
who knows if allegro.h works on ubuntu?
 
nobody
 
4:33 PM
ko
 
Xeo
Who knows if such random questions are appropriate here?
Oh wait, the newbie hints do. :)
 
@FredOverflow If you're fine with being shot by your colleagues.
 
Nope, Python Image Library choked while creating a 165888 x 65536 PNG.
 
Xeo
@Insilico this
 
@user539484 What do you need Allegro for?
 
4:34 PM
@rubenvb Still no array involved (at least on the type level).
 
Xeo
@Insilico Well, it is a damn huge amount of memory.
 
to create popup message box
 
@Insilico You'd need 10Gb of memory
 
I don't like GUI programming, so I never became very proficient with it.
 
@Xeo Yeah, I figured as much. It was able to make the 165888 x 2048 PNG fragments.
 
4:35 PM
@user539484 Do you really need allegro for a popup message ?
 
@R.MartinhoFernandes Most of my colleagues don't know C++, so... :)
 
Xeo
Memory map the images maybe?
 
@kbok maybe. PNG is compressed, and the image is highly compressible. But most likely the lib will try to take 10GB
 
@Xeo Apparently Python's Image library isn't smart enough to do that
 
Xeo
@MooingDuck I think most blocks are actually empty
 
4:36 PM
@LucDanton maybe in C99 it could be classified as a VLA?
 
Xeo
and are simply rendered as black / white
 
i'm building a SDL program in ubuntu... and i need to make appear a popup when i press a button
 
@Xeo A huge majority of the blocks are empty (black or white)
 
@user539484 SDL has buttons? I always thought it was quite minimal.
 
The full image is 81 x 32 blocks, so that's 2592 blocks.
 
4:36 PM
and i dont know much about ubuntu
 
So the "non-blank" blocks make up only about 9%.
 
@user539484 Fair enough, yeah allegro is supported in ubuntu
 
Xeo
@user539484 Normally you use a cross-platform library to not have to worry about platform-specific stuff
 
what libs can i use to create popup message
 
@rubenvb No. It would still need a bound. There still isn't an exception to the rule that such a declaration in an function parameter list denotes a pointer, not an array.
 
4:38 PM
I might manually put together the 32 strips in Photoshop
 
@user539484 What do you want your program to do ?
 
@Insilico it's an absurdly large image, not sure photoshop can handle it either.
 
I don't exactly know the semantics of e.g. void foo(size_t n; bar a[n], size_t n); though.
 
Which is way easier to work with than 2592 individual PNGs.
@MooingDuck Let's see...
 
when i press a button or click with the mouse he open a popup message with some text
 
4:39 PM
@LucDanton Wait, what's a semicolon doing there?
 
Xeo
@Insilico, can't you memory map the thing?
 
VS 2012 has no = delete. Intel C++ 2013 it is then.
 
@R.MartinhoFernandes Forward-declare parameter or whatever the terminology is.
 
4:39 PM
Oh gawd.
 
@Xeo he's not writing a program, he's trying to get existing programs to edit the images
 
Xeo
wtf
 
@Xeo I have plently of RAM+hard disk space to do that. But let me see if Photoshop can deal with it.
 
Whaaaaaaat.
 
4:40 PM
@LucDanton what?
 
There's also void foo(int n[static 5]); or whatever.
 
Xeo
@MooingDuck Well, he did try to do it in Python before
 
@R.MartinhoFernandes I don't think the Jeopardy picture is appropriate. Shouldn't we post answers first and questions later for that to really fit? :)
 
@Xeo with an existing python image library
 
@user539484 I take it you're just learning stuff then. If you don't need great performances, you should just use a GUI toolkit instead. SDL is terrible for beginners.
 
4:40 PM
oh crap.
 
Haha performance for UI.
 
@LucDanton Stop that!
 
Hey look Photoshop did make a 165888 x 65536 1-bit PNG!
 
Good joke.
 
I'll be back.
 
4:41 PM
I can't insert a make_paired thing into an unordered_map.
 
And SDL is terrible period.
 
@R.MartinhoFernandes You say that like it's new. C99 is ooooooold.
 
Xeo
@rubenvb you should be able to
 
@user539484 I think allegro has a cross-platform dialog api of sorts.
 
but what they ask me to do is to create this program in SDL
 
4:41 PM
@CatPlusPlus But I want to wait as fast as possible for the user to click the button!
 
@Xeo VS2012 STL with Intel 2013 C++ gives me an error once I replaced the brace init with make_pair
 
@kbok SDL is terrible for everyone.
 
Xeo
@LucDanton > source.c:1:10: error: ISO C forbids forward parameter declarations [-pedantic]
 
@user539484 Well, "they" suck. Do you have to use allegro as well ?
 
Xeo
Maybe LWS uses C11, who knows
 
4:42 PM
@Xeo Is std::pair specialized with respect to hashing?
 
@Xeo I'm double-checking what is Standard in case I'm thinking of extensions.
 
no... but i dont know any lib that do popup
 
Xeo
@FredOverflow Remember, (unordered_)map::insert takes a pair
 
@user539484 SDL can do that without any library.
 
@Xeo Oh, I thought he was inserting a pair key :)
 
4:43 PM
how can i do that?
 
@LucDanton I can't find "forward declare" "forward-declare" or "declare parameter" in teh C11 spec
 
@user539484 Well, since SDL only allows you one window, it may be difficult to create a "popup" window. However you can create a kind of subrect in the main window, make it look like a dialog box and display text on it.
 
@user539484 Do you know how to display an image on the screen ?
 
Xeo
@MooingDuck Try "forward parameter"
 
@rubenvb So apparently void f(int a[*]); is the appropriate declaration for a VLA in the parameter list. The confusing part is that you can only declare f, not define it like so apparently.
 
4:44 PM
yes
 
Xeo
> source.c:1:1: error: ISO C90 forbids variable length array 'a' [-Wvla]
hmhm
 
@LucDanton I say that like my eyes are in pain.
 
Oh, it's not a pair, I changed that to a struct with two named members
 
@Xeo none
 
4:44 PM
so I don't need make_pair
 
@user539484 Then draw a popup using that.
 
@Xeo If you wanted to know that it's not conforming to C90, I would have told you lol.
 
90 < 99 btw
 
Xeo
Oh, LWS doesn't use C99 or C11?
 
4:45 PM
Right tool for the job, yadda, yadda.
 
Xeo
Wasn't aware of that
 
but there is another way to create a popup?
 
@user539484 what about this?
 
@user539484 use X, Cocoa and Win32 API calls directly. those'll get you a popup
 
"use X"?
Are you serious?
You don't recommend "use X" to anyone but your worst enemy.
 
4:47 PM
@rubenvb So apparently in something like void f(int n, int a[whatever-nobody-cares][n]); a is a pointer to VLA.
 
Lol X.
 
what is X?
 
You're mad.
 
7
Q: Technical name for a "peculiar" use of switch statement: contains an if and for statement

JonAs a disclaimer, this is a homework problem. But it's one where the answer can't be found from our lecture notes and we're encouraged to find the answer through research (on the internet I presume). We're given the following code fragment, and asked for the technical name for this particular "pec...

bwahaha
 
@user539484 if you're using SDL to make the program, use SDL to make the popup
 
4:47 PM
On windows I would have done something like #ifdef WIN32 ::MessageBox(...) #else std::cout << ...
 
Xlib?
 
And Cocoa and raw WinAPI isn't very much better.
 
Oh yeah, there's also void f(int a[restrict]);. How could I forget.
 
@CatPlusPlus I'll have to disagree. Raw WinAPI is very much better.
 
@CatPlusPlus WxWin, QT, GTK+ then?
 
4:48 PM
@LucDanton WAIHGWRIHGerkhe.
 
Raw WinAPI is possibly the most sensible one from those three.
 
@user539484 Xorg, X11, whatever you want to call the extremely unusable underlying graphics shiznit Linux uses.
 
@ApprenticeHacker Qt or GTK+. wxWindows is a failure.
 
Xeo
@LucDanton WTF
 
Dammit. Intel 2013 has no = delete either
basterdz
 
4:49 PM
@CatPlusPlus can't agree more.
 
Xeo
And you guys complain about C++ syntax quirks..
 
@R.MartinhoFernandes You have to give credit that it matches the declaration void f(int *restrict a);. The big question is why not allow e.g. cv-qualifiers as well for consistency?
 
can i use Qt with SDL?
 
yet it should
 
Xeo
@rubenvb Erm, don't you have MinGW GCC 4.7 builds?
 
4:49 PM
GTK+ developer assured me recently that Windows support is improving, and gtkmm has more idiomatic C++ API than Qt. So I might revisit GTK+ soon.
 
@user539484 nah. Fuck SDL, try SFML.
 
@LucDanton No. The big question is why do you keep torturing us.
 
There's still GObject but if I can't see it then I don't really care.
 
the program is for a vending machine so it have to use SDL
 
C is too often badmouthed here. I stay silent when it happens but it's still painful.
So there.
 
4:50 PM
@CatPlusPlus yeah. But it does sometimes show up though. Especially when extending stuff.
 
Selling machine
 
@Xeo Yeah, but I have VS2012. And I wanna use it too.
 
@LucDanton Wait, is that an admission of treason?
 
SDL is terrible and useless.
 
Xeo
@LucDanton How does that match? Shouldn't that rather be int (restrict a)[SOMETHING]?
 
4:51 PM
Are you not employing the doublethink techniques we taught you?
 
gtkmm feature list looks rather nice.
 
@LucDanton Because C is bad.
 
@R.MartinhoFernandes There's nothing to treason!
 
Heck, GCC has some shortcomings. I'm in a "use expensive tools because I can" mood.
 
4:51 PM
the program is for this bit.ly/NCoxHe
 
@rubenvb what "expensive tools" are we talking about?
 
@Xeo Not a bad idea either. They didn't settle on that though.
 
Xeo
Anyways, dinner
 
@Xeo me too.
 
4:52 PM
@ApprenticeHacker VS2012 Professional and Intel C++ Composer XE 2013 for Windows.
 
> Features: Use inheritance to derive custom widgets.
 
@rubenvb Those are too expensive for me. :'(
 
Do they have to start with something that puts me off?
 
I'm beginning to regret this, but I just rewrote all brace init stuff into a macro either doing the same thing or using boost.assignment.
 
Every GUI toolkit does that.
 
4:53 PM
@ApprenticeHacker I get VS2012 from Dreamspark and the other from... well... somewhere else
 
@CatPlusPlus So?
 
So, whatever.
 
And in that case, why bother advertising it?
 
In fact I am currently in a trial period, so I actually got it from Intel this time.
 
Because the underlying machinery is GObject.
And it's painful as fuck compared to C++ inheritance.
 
4:54 PM
I'm inclined to think that forward-declaring function parameters is an extension. (Then again I got tired of looking pretty quick.)
 
@rubenvb also, most torrent sites (and clients) are blocked in the damn country I live. :'(
 
can someone work with SDL?
 
@ApprenticeHacker even with bittorrent encryption? What country is this that you can't simple hack around?
 
@user539484 I once tried it (see section 3).
 
The Great Firewall of China doesn't block torrents does it?
 
4:55 PM
@ApprenticeHacker VPN?
 
@rubenvb I can (and do) pretty easily hack it around though. But it's still a pain.
Proxies for the win.
@rubenvb lol, out of habit I first read the 'Great Wall of China', I only saw the "fire" on a second read.
 
What country though? I had the impression none really succeeded in what you say.
You have set your router's DNS to 8.8.8.8 right?
 
@rubenvb Oman. Just look at my profile. It's banned in the UAE too.
 
Oh. That's one of those countries that hang you for illegal downloading.
Or something.
 
@rubenvb yup. Without a proxy I see this
 
4:59 PM
@ApprenticeHacker even with Google DNS?
 
@rubenvb well it's just a fine for now, so don't give them any new ideas. :D
 

« first day (704 days earlier)      last day (4245 days later) »