« first day (572 days earlier)      last day (4394 days later) » 

sbi
12:01 PM
@sehe Actually I knew this feature. I think it's even used somewhere in this project.
Those methods will be called mostly from derived classes (plus from helpers in derived classes). I don't see a way to make it possible for such derived classes to call either of the method kinds without casting to a specific interface first.
 
@sbi Another idea seems to be optional parameters, IFF you are using recent C# versions
    public class Test2
    {
        public bool  MyMethod(ref string p, string dummy = "")
        { return true; }

        public bool MyMethod(out string p)
        { p = null; return true; }
    }
 
sbi
@sehe VS2010. That recent enough?
 
C# 4, yeah.
 
sbi
@sehe Hold the phone!
 
@sbi I think so. Not sure if it depens on target framework version
@sbi Is it that bad?
 
12:02 PM
I think those are IL-compatible with previous versions: VB.NET has had them before.
 
sbi
@sehe .NET 4.0
 
The only thing that was added was compiler support for them in C#.
 
@RMartinhoFernandes Ok. Even better though irrelevant :)
@RMartinhoFernandes I bet microsoft realized that people wanted usable COM interop in C# (amazingly) a.o.t. VB.Net only
 
@sehe Yeah, that was exactly it.
Most C# 4 features were driven by the desire to have sane COM interop.
 
@RMartinhoFernandes I remember a Hejlsberg presentation saying that in more PC terms
 
12:05 PM
This thing was complete madness.
 
sbi
@sehe Well, there's seven public overloads of that method (plus the four obsolete ones). Introducing a totally superfluous optional parameter to all of those seems to increase the complexity considerably.
But, hey, it definitely seems better than renaming those methods.
 
(ha I got the spelling correct :))
@sbi My thinking too. Well, I'm back to work, catch you later
 
sbi
@sehe Thanks for the idea!
 
Cheers
 
C# got default arguments?
 
12:06 PM
yup
 
Incredible.
What happened to "you can just write overloads"?
 
donno
 
@CatPlusPlus What happened was "that sucks when doing COM interop".
object optional = Missing.Value;

doc1.CheckSpelling(
    ref optional, ref optional, ref optional, ref optional, ref optional, ref optional,
    ref optional, ref optional, ref optional, ref optional, ref optional, ref optional);
That's how you would do it before.
Now it's doc1.CheckSpelling()
 
lol
 
Because I want virtual piracy as a gameplay element, the EULA for 0x10c will say you surrender all claims to code you upload to the game.
 
12:11 PM
back
 
Woot, just got a raise. Wait, it's a tax raise.
2
 
Lounge<C#>? that's literally impossible by the rules of the language. it's a hack like the rest of .net
 
You're new here, right?
 
I could really use some expert help with Qt.
 
@RMartinhoFernandes is that good news?
 
12:13 PM
But people here seem more familiar with .net :D
 
@Nils It's the future! accompany with spooky music
 
@thecoshman I'm not sure yet.
 
Actually, it isn't, but I wanted an excuse to do that.
 
Free?
 
sbi
12:15 PM
Naked Lunch.
 
Nah I don't know, did some project with it and it worked well. However I would probably rather use js for the gui stuff today. Or Cocoa / Cocoa touch if possible.
 
@sbi are you secretly tony?
 
sbi
@thecoshman It's a book. I think this proves I'm not Tony.
 
@sbi ok then :S
 
@Nils If you want silly Cocoa, then why are you using Qt?
 
yeah I would rather have asked on so
Cocoa is not exactly supported on Windows ;)
 
And everyone is really happy because of that.
 
You are just ignorant about it, just like Linus about C++.
 
I want to buy a couple of books. Any recent books worth purchasing besides "C++ Concurrency In Action"?
2
 
12:23 PM
And we're really happy because of that, just like Linus
 
@Nils Lol.
 
yes "The C++ Standard Library" by Nicolai M. Josuttis seems to be quite good
 
Oh right, the new edition is available. But 57 € is a bit much, isn't it? :(
 
$56.98 on amazon.com
I think I got it from .com not .de
 
@Nils Yay, 44.01 EUR
 
12:38 PM
My impression of Cocoa was that it was quite nicely designed, but crippled by objective-c
 
sbi
> Ditch work, and discover! This is a moral we can all get behind! — The Atlantic
 
Ha. 3 lines out of 4 are down in the Montreal metro because someone decided to throw smoke bombs somewhere in it.
 
Why "Ha."?
 
Because I think it's an overkill reaction.
 
12:53 PM
@MatthieuM. - do you happen to know if that's a concious design decision not to make using have that meaning here, or just that nobody ever proposed it? — awoodland 24 mins ago
 
@EtiennedeMartel If the smoke had been coming from a bomb, it wouldn't have been overkill.
 
If the smoke had been coming from a bomb, the bomb would have already asploded.
 
@CatPlusPlus asploded?
 
herp derp.
 
@EtiennedeMartel Time to bring out the Guillotine again :D
If you find that guy.
 
> If people's heads start blowing up, it's usually a bad sign.
usually?
 
He's Canadian. They apologise, not cut off heads.
 
hi, what is your favourite compiler?
 
1:07 PM
clang
 
@user1387019: GumboCompile. It only allows you to compile this line:

return;

But does so very well.
 
lol
 
;)
 
@ereOn What's not to like? Code is always clean too.
 
@CatPlusPlus Québécois, please.
 
1:08 PM
@Neil: Indeed. And everybody can copy-paste safely.
 
user784668
@user1387019 tac
 
@Fanael tac | rev
 
@user1387019 csc.exe
 
user784668
@sehe Oh yeah, it's even better.
 
1:11 PM
@user1387019 V8.
 
@EtiennedeMartel gmcs[.exe]
 
gcc
 
LMAO, GCC!
 
@Neil I tried to install 4.7 in ubuntu, but got lots of errors and finally gave up, is there some easy way to install it?
 
@user1387019 Unless you are a magician, no, there is no easy way to install GCC.
 
1:15 PM
@user1387019 doesn't ubuntu have a gcc-snapshot package?
 
My code insistently keeps crushing 4.6
 
@sehe Bleh.
 
@user1387019 you mean internal compiler error? Or just bugs in your code? because upgrading to a newer GCC won't fix bugs in your code!
 
yes internal compiler error
 
GCC is an internal compiler error.
 
1:16 PM
@user1387019 Never said I knew how to install it.
 
mawnin
 
@user1387019 give gcc-snapshot a try then. It install in /usr/lib/gcc-snapshot/ so you'll need to type the full path out or modify your path variable
 
Hi DeadMG.
 
@awoodland thx I will try the snapshot
 
user784668
I've once written some code that crashed GNU ld.
 
1:18 PM
lol
 
@Nils Have a look at GNUstep. Though I'm not sure about the menu bars; they suck.
 
user784668
OUTPUT_FORMAT(elf32-i386); OUTPUT_ARCH(i386:x86-64); and lo! ld crashes.
 
can someone with gcc 4.7 test the regex example here? en.cppreference.com/w/cpp/regex/regex_match
 
No support for regexps in libstdc++ currently. Some of the types are present, none of the functionality is.
 
@LucDanton yeah ok thanks, feared that
boos gotta help then
 
1:30 PM
Anyone got a nice clean way to convert from a ImageSource to a BitmapImage in WPF?
 
IBM: It may be slow, but it's hard to use.
@EtiennedeMartel Doesn't ImageSource have a way to stream?
@EtiennedeMartel Have you tried instantiating BitmapImage from its stream?
 
@Neil BitmapSource does. But not ImageSource, I think.
 
@EtiennedeMartel That strikes me as odd.
 
@classdaknokt I doubt that I have time for something like that :)
 
:( FTFY
Does the standard allow me to throw std::bad_alloc manually?
if (!(foo = malloc(bar))) throw std::bad_alloc();
 
1:39 PM
Yes.
 
That's nice. I'm using __cxa_demangle which can return -1 indicating memory allocation failure.
 
1:57 PM
I like GitHub's (partial) redesign.
 
pretty happy with bitbucket personally
2
 
Hi guys, I just attended an interesting talk by Bjarne Stroustrup last week. Here are the slides: klid.dk/arrangementer/C++11-style-bjarne.pdf
 
I've never used BitBucket. Does it support Git?
@martinhans those are the same as the ones from GoingNative…
But without his talk.
Though the slides you gave do include the graphs.
 
@classdaknok_t :)
 
> Imagine this to be a graph.
 
2:10 PM
@classdaknok_t Just recently, yeah
 
I'll never forget that sentence.
 
yes, that seems to be the same talk
 
@sehe mcs, dude. They unified the compilers now. Yay.
@awoodland 4.7 was released already. I suppose you don't need a snapshot.
 
Who invented the stupid (type)expression cast syntax?
 
2:12 PM
How does D's syntax for casts look like?
 
@FredOverflow The Devil.
 
user784668
@FredOverflow cast(type)expr
 
@RMartinhoFernandes it's pretty recent in the latest ubuntu. May even be that they're using the released version but calling it a snapshot since it's ahead of the version they used to build the system
 
@awoodland Yeah. It's a snapshot from before the release of 4.7.
 
2:14 PM
(foo) - p   // cast or subtraction? lol
 
user784668
foo * p; // multiplication or variable declaration? lol
 
user784668
a < b, c > d; // two comparisons or variable declaration? lol
 
depends on whether foo is a type or not in both cases, I would guess :)
 
foo.cpp:1:3: this is madness.
2
 
@Fanael It cannot be a variable declaration without a semicolon ;) Oh, and my example works without the semicolon.
 
2:16 PM
He's stolen your semicolon and cloned it!
 
user784668
@FredOverflow Fixed.
 
aaargh
why people edit posts because they prefer thing--thing hyphenation instead of thing- thing
 
Because they're insufferable fools.
 
@DeadMG em dash. It's a thing.
 
There's no 'I' in 'team'. But there IS a 'U' in 'fucker'.
 
user784668
2:26 PM
@DeadMG Screw hyphens, use dashes: thing—thing
 
@SamDeHaan I don't care.
it's my post and I grammatize it how I want
perfectly readable in the original form
 
@Fanael But dashes are not hyphens. So?
Don't use dashes where you need hyphens.
 
I'm never going to edit your post to replace a hyphen with an em dash. However, I'm also not going to QQ about it if someone edits my post to replace a hyphen with an em dash. It's correct, so why does it make you nerdraeg?
 
-, –, —.
 
@SamDeHaan How do you know it's correct without knowing the actual text in question?
 
2:29 PM
@SamDeHaan Because it's my post. It reflects on me. And I don't give a flying monkey about someone else's idea of grammatical correctness.
 
user784668
…
 
"My em-dash is the longest."
6
 
@DeadMG It's (wrong-headed) typography, not grammar.
 
@LucDanton Same principle.
 
@SamDeHaan "You have a 5000-ton mother" <- a dash here is incorrect.
 
2:32 PM
@RMartinhoFernandes Because I checked? stackoverflow.com/posts/10535711/revisions
 
I never said anything.
 
@DeadMG It reflects on you, and you're madbro that they improved it?
 
@SamDeHaan Improved in their opinion. Not mine.
 
@DeadMG Improved in the opinion of every style guide you could find for use of the english language.
 
@SamDeHaan About which I also don't care.
 
2:39 PM
Something really magical has to happen before @DeadMG will improve his opinion of anyone or anything
so don't even try
 
...or anything
 
that's not true
 
Rules in my English? Unacceptable.
 
now he's denying it
 
I used to think that Haskell was a pointless pile of shit, and now I simply believe it's not my style.
 
2:41 PM
oh wow
 
But Haskell is something magical.
:P
 
Enough pitchforks and you can change anyone's opinion on anything.
 
heh
 
Bashing Haskell in this room is quite a daring deed
 
to me, it's just the same as Java
 
2:41 PM
@CatPlusPlus Don't forget the torches
 
well, except less stupid
 
@TonyTheLion I've noticed this trend in my time in Lounge<>. But that doesn't mean I'm not going to try to /poke.
 
but I dislike it on the same principle
 
And tar. And feathers.
 
2:42 PM
@TonyTheLion I believe there are just as many lovers as non-lovers here.
 
@RMartinhoFernandes good news. and thanks
 
@DeadMG What principle?
 
It's not Wide!
 
@RMartinhoFernandes Besides @DeadMG I've only met lovers
 
@FredOverflow As far as I can tell, it only permits programming in one paradigm- functional.
 
2:42 PM
"My way or the highway."
 
@TonyTheLion sbi isn't a Haskellian.
 
Not really.
 
@DeadMG oh, forgot about the baboon :P
 
You can write imperative code in Haskell. You can even have truly mutable variables.
 
@TonyTheLion jalf isn't a Haskellian.
 
2:43 PM
@TonyTheLion I might have done some Haskell bashing before. I think there's a quote from me in the Golden Words about that.
 
he's gonna hate me for sayin that
 
@DeadMG Haskell allows you to "override the semicolon", so you can invent your own paradigms. Seriously, how cool is that? ;)
 
You can even do sort-of OOP in Haskell.
 
@DeadMG that surprises me
 
sort-of isn't really good enough for me.
 
2:43 PM
@Tony Etienne, sehe, daknok, thecosh, so many. Just look at the frequent user list.
 
And row polymorphism for concatenative programming.
 
damn :(
 
I like functional, but I depend on OOP/imperative for my primary program structures.
 
I'm wrong yet again
 
Typeclasses are floating vtables, really.
 
2:44 PM
Feb 2 at 19:00, by Etienne de Martel
There are two kinds of people: those who solve practical problems, and those who use Haskell.
 
how wrong can you be? As wrong as Tony The Lion.
 
Found it.
 
in any case
 
Haskell is certainly nowhere near as bad as Java
 
Xeo
2:44 PM
I'm not a Haskellian either
 
although they're on the same scale of "Things I perceive to be insufficiently flexible to meet my needs."
at least Haskell succeeds in actually doing it's singular paradigm well
 
@CatPlusPlus Wait, how does that work with regards to dynamic dispatch?
 
@Xeo I think, if I had to classify you in C++ geekdom, you're on the order of @Johannes :P
 
@TonyTheLion Nobody is on the order of Johannes.
 
Xeo
2:45 PM
@FredOverflow I just thought about that
Blame it on me waking up 5mins ago
 
@DeadMG but that's what it looks like to me, I'm a mere noob, remember
 
Like I said, there isn't a uniform opinion on Haskell here.
But it is undeniably awesome.
 
@RMartinhoFernandes yea I get your point
@RMartinhoFernandes I agree
 
user784668
@CatPlusPlus This thing runs everything inside IO?
 
it doesn't meet my needs, and I dislike the syntax, but it's not bad, it's just not for me
 
2:46 PM
@DeadMG If you like OOP and Functional, what about Scala?
 
@FredOverflow Isn't that dynamically typed? And runs in an "OH-MY-GOD-THE-SLOWNESS" VM?
 
@LucDanton Every typeclass-constrained function gets an invisible argument for the vtable for that class.
 
the JVM, no less?
 
It's described somewhere.
 
@DeadMG It's statically typed.
It just looks dynamic because of pervasive type inference.
 
2:47 PM
@DeadMG Scala is statically typed, and yes, it runs on the JVM, and no, the JVM is not inherently slow.
 
@CatPlusPlus So, nothing like vtables for dynamic dispatch then? Related to generic programming with modularity?
 
I haven't heard of "OH-MY-GOD-THE-SLOWNESS" VM. I assume it runs only on windows?
 
from the perspective of a guy who's currently pushing his C++ to the limit simulating 50k moving units at once using hand-rolled SSE intrinsics
 
then I'm feeling that the JVM would definitely be a significant problem
 
2:48 PM
@LucDanton Well, they're not attached to objects, if that's what you mean.
 
plus, the only graphics modules you can get are terrible JOGL thingies and I'm coding w/ DirectX
oh, on a related note
 
@Neil The Java VM runs anywhere, even toasters and elevators ;)
 
DirectX, y ur errors SO GODDAMN TERRIBLE
use feature not supported by driver -> silent failure
 
@DeadMG Put terrible on that. You need to extra stupid to wrap a bad API with an even worse one.
 
y u no throw exception or at least return failure code
 
2:50 PM
Microsoft <------------------
that's your answer
 
eh
 
@DeadMG I think I liked LWJGL better than JOGL, but it's been too long since I last dabbled with Java 3D graphics.
 
D3D10 and D3D11 are better, mostly because they don't expose features not supported by the hardware/driver
 
user784668
This sounds like an issue with the drivers to me, not with DirectX itself.
 
@DeadMG Isn't DirectX based on C or something?
 
2:50 PM
DirectX is COM.
 
@FredOverflow COM.
 
@LucDanton There's some GHC extension that allows something closer to what C++ does with vtables.
 
it's not that bad at all, actually
 
I don't like COM at all
 
2:51 PM
No, OMG does UML.
 
afaik, regular COM code is way worse than DirectX code
 
user784668
@RMartinhoFernandes Oh? Which one?
 
HRESULT is scary.
 
@CatPlusPlus OMG, that's actually true.
 
2:51 PM
you never have to make your own COM classes or anything like that, and a little custom deleter does fine to enable RAII on the top.
 
@RMartinhoFernandes I know.
 
in fact, there's very little COM about it
 
CoCreateInstance makes my brain freeze
 
@TonyTheLion Don't have to use that with DX.
 
@Fanael I'm supposed to be working, not digging the Internets for Haskell features! (Which means I will do the digging, not the working...)
 
2:53 PM
they offer their own creation functions
which are, whilst still C-style, hardly CoCreateInstance.
 
@RMartinhoFernandes you work?
 
Factories that create factories that create factories.
 
plus, I wrote a quick forwarder function that makes unique_ptr work really well with COM functions.
 
user784668
@CatPlusPlus You forgot a few more layers of factories.
 
If you guys had a job offer that was really good, but you didn't like the language in which you had to code, would you reject the offer?
 
2:55 PM
depends on A), how desperate you are for employment, and B), how bad you dislike it
 
@TonyTheLion Depends on the language
 
Depends on the work environment and the pay.
 
user784668
@TonyTheLion I wouldn't claim to know the language in the first place, so I wouldn't get the offer.
 
Java's not as bad as PHP
 
2:55 PM
true
 
if you're desperate for employment then take it and look for a C++ job whilst you work there
 
@TonyTheLion Psh.. I program in Java. It's not that bad. You come to think of it as C++'s cute baby sister.
 
@Neil oh, hmmm
 
@Neil Yeah, but I'm really looking for a woman, not a girl, in programming languages.
 
You can always write in Scala and then decompile result into Java.
 
2:56 PM
I don't have such an offer, but it was just a theoretical question
 
@TonyTheLion depends on how much money I had left. But I wouldn't have a problem with coding Java, have done that for the last 10 years, and I've simply grown accustomed to it. That doesn't mean I like the language, but who cares really? I can program in Haskell and C++ in my spare time.
 
so I should learn Java, if want to get easy employment?
or Android
or ObjC?
 
You can learn on the job.
 
I'm NEVER gonna commit to PHP though
 
@TonyTheLion Java doesn't really have much to learn.
 
2:57 PM
Especially Java.
Android can be picked up in an hour if you know Java.
 
@TonyTheLion Sure, learn Java. Why not? In the worst case, you have "lost" 1 week.
 
if you know the simples of interfaces, then all you have to do is know the gimped generic syntax and keep an API reference open
 
ObjC sucks.
 
But it sucks less than Java.
 
Java isn't that easy to learn. Learning the syntax is like 10%.
 
2:58 PM
I know C#, that will probably help learning Java
 
@classdaknok_t Oh, I disagree there.
 
@classdaknok_t Really? I was always horrified when I superficially glanced at Objective-C code.
 
@Neil Java has nothing you actually have to learn.
the only interesting thing about Java is reflection
 
I probably wouldn't accept offer in either ObjC and PHP. I can live with Java if I get paid.
 
The rest of it is learning the frameworks, the platforms, the technologies which work with Java.
 
2:59 PM
@DeadMG Not entirely true, you can learn the Foo<? extends Bar> syntax ;)
 
@Neil that's with all languages.
 
@FredOverflow lol
 
user784668
@Neil The rest of it is learning workarounds for language issues.
 
Java is primitive. Syntax and semantics take few hours to learn, tops.
 
I hate that extends keyword
 
2:59 PM
@classdaknok_t Yeah, well, I consider that part of "learning a language."
 
it's fugly as fack
 
I know I learned it while doing first Java assignment ever.
And I still finished in few hours.
 

« first day (572 days earlier)      last day (4394 days later) »