« first day (837 days earlier)      last day (4336 days later) » 

14:00
This whole static thing is so stupid. Scala did away with static in favor of... Singletons :)
user142019
I really dislike that. Never thought it was possible lol.
user784668
@FredOverflow lol
But hey, if you think about it, that static members of a class in some sense describe a Singleton object.
Xeo
Xeo
Sure
14:01
@FredOverflow Real improvement there
Xeo
Xeo
And not just "in a way". They're effectively a singleton.
@Xeo Not. There is no object.
They're namespaced globals
@CatPlusPlus I was skeptical at first, but now I prefer Scala's Singletons to static.
They're both terrible
14:02
7
Q: If Singletons are so bad, why does Scala have language support for them?

FredOverflow Possible Duplicate: Why are singleton objects more object orientated? Why does Scala have language support for the Singleton anti-pattern? If Scala had inherited the static keyword from Java, what legitimate use cases of the object keyword would be left?

user142019
Globals gonna be global.
user784668
@FredOverflow I prefer Haskell's singletons to static.
user142019
@Fanael they are not related in any way.
const std::vector<int> singleton { 42 };
user784668
@Zoidberg DING DING DING! That's the point.
user142019
14:04
I prefer postfix const.
user142019
It's more consistent with const pointers. :P
user784668
@Zoidberg You're also Dutch.
I prefer add_const<T>.
user142019
@Fanael I agree.
user142019
@DeadMG lol
14:04
Mmh, am I wrong in thinking that the Bitbucket dashboard used to show more activity before?
@DeadMG Fail! That's an empty type :P
@Zoidberg I used postfix const for some time, but everybody else who was looking at my code was utterly confused, so I changed it back to prefix const.
@LucDanton I don't think so.
user142019
@FredOverflow ohlol.
user142019
C++ code ought to be confusing!
14:05
@R.MartinhoFernandes That would be std::add_const. I, obviously, using add_const = typename std::add_const<T>::type.
user784668
@Zoidberg NO.
@R.MartinhoFernandes How about Const<T>? :)
> Why is there no obfuscated C++ contest? Well, there'd be no challenge!
@DeadMG Ok, then. Well saved.
@R.MartinhoFernandes I feel out of touch with wheels, even though you haven't made changes for a while AFAICT. Hopefully following the repo will help.
user142019
14:06
@FredOverflow const int const * const Const = 1;
@LucDanton I have lots of stuff in the backburner to fix/change/improve/kill. But time.
user142019
@melak47 error.
I have been dedicating all the free time I get in a coding mood to ogonek.
@Zoidberg you're no fun :p
@R.MartinhoFernandes It wasn't a dig at you or anything, I was genuinely wondering about the dashboard thingy. You choose how to make the most of your time!
14:08
@LucDanton I am just warning you because I know of one or two nasties in there :P
user142019
I'm so insane.
What's that site with loads of programming challenges?
@Zoidberg I like Douglas Crockford. Does Yahoo still exist? Somehow I always think of the 90s when I see "Yahoo" :)
@Kian stack overflow
@Kian project euler?
No Stack Overflow is loads of programming challenged
6
14:09
lol
user142019
@FredOverflow Yahoo! still exists. Its search function is mostly used by Asians IIRC.
@melak47 Yeah, thanks :)
user142019
user142019
@FredOverflow Yahoo! still exists. Its search function is mostly used by Asians IIRC.
@Zoidberg 404?
user142019
14:10
@Kian There should be a redirect!
Haha
still funny
> this website says my question doesnt meet some quality standard thing. i am going to keep adding stuff into this question until it works. somebody remove that from the website it is annoying.
LOL
user142019
> why is there a 5 next to my question
user142019
LOL
It's deleted -.-
user142019
14:12
> now it is a 8 what does that mean
Dude, my face hurts from laughing.
user142019
What a damn noob. Doesn't even understand downvoting.
user142019
Good his questions get deleted.
@Zoidberg It's clearly a troll.
user1182183
@LightnessRacesinOrbit just wanted a program on which I could do some tests, but ok I did some other small experiments, which count as one big.
user784668
14:13
@R.MartinhoFernandes Never attribute to malice...
user142019
I was the first of the class done with the test, by the way. :P
As usual.
@FredOverflow Obvious bait
user784668
Oh no, my vim is out of date.
14:15
@R.MartinhoFernandes I didn't notice you had an invoke. Do you make use of it?
user142019
@Fanael Update it before it's too late! Stock's limited!
@LucDanton I wrote it for is_callable, IIRC. That one I used.
user142019
brb
Well, if you do write a function template that uses is_callable, how do you call the functor? What if someone passes in a member pointer?
@LucDanton Hmm, yeah, then that means I used it. I hope. :)
I also planned to write something about that.
14:19
I don't know what to advocate. All of my stuff is sprinkled with invoke(foo, bar...) and it looks dumb. std::result_of is not worth repairing I think.
On the other hand, void returns :|
decltype(sizeof(0)) Len -> don't like to include <cstddef>?
user784668
@Zoidberg Done.
@LucDanton I had a phase like that. It's over now.
Xeo
Xeo
heh
When I had that phase, I just used unsigned since fuck it.
You may find decltype(nullptr) too.
user784668
@LucDanton Too much typing.
14:22
@R.MartinhoFernandes Interesting, I don't know where that one is defined.
I can understand the feeling of frustration though. Those are really, really fundamental types.
@R.MartinhoFernandes Oh, I thought nullptr was built-in.
@FredOverflow It is. But std::nullptr_t isn't.
sure
By the way, Java also has a "Null Type", but it has no name.
14:25
@R.MartinhoFernandes Interestingly, it's a circular definition.
@FredOverflow Yahoo Messenger (and the e-mail service) are in widespread use in Romania. Virtually everyone uses it (at least the IM). It's one of those regional things.
why does cstddef start with c anyway?
Because it comes from C.
can't we steal size_t from them and call it a day?
@BartekBanachewicz Why does cctype start with cc? ;)
14:29
ptrdiff_t and some others too, IIRC.
1
Q: Explanation of Prolog recursive procedure

JustinI'd like someone to explain this procedure if possible (from the book 'learn prolog now'). It takes two numerals and adds them together. add(0,Y,Y). add(s(X),Y,s(Z)) :- add(X,Y,Z). In principle I understand, but I have a few issues. Lets say I issue the query ?- add(s(s(0)), s(0), R). Whi...

Xeo
Xeo
Fun fact: ptrdiff_t isn't large enough to hold all possible differences between pointers.
You always need 1 bit more. :(
^ the question asks about adding two numbers together. The answers are over one page each. ~prolog~
@Xeo why?
Xeo
Xeo
@BartekBanachewicz Think about it, ptrdiff_t is the same size as size_t, but signed.
The difference between two signed n bit numbers requires n+1 bits.
14:31
Or maybe not. I'm not paying attention, anyway.
@Xeo It's not necessary that pointer values cover all the range of size_t though.
@Neal hacker news. Ahm.
@Neal I can't find the downvote button.
4
Well you also might want to read the blog post 1st to see if you like it :-)
@DeadMG :-P
@Neal It's javascript.
14:34
It is not my post. I only wrote one post so far.
@BartekBanachewicz yes. yes it is. thanks captain :-)
@Xeo I can't find that.
@BartekBanachewicz :-P
tis the end of that.
:7451982 Are you guys as much of a failure at joint room projects as we are?
@DeadMG Y U SO MEAN TO ME? :-P
14:35
@Neal Because javascript is a shitty language and you came here posting a blog about it
@R.MartinhoFernandes nope. there are currently 150 ppl reading that blog post :-)
i am looking at live analytics
@Neal Probably because it would appear that you came here for the exclusive purpose of spamming.
Oh, somebody put my question on reddit. And it scared somebody off C++:
@Neal 150 retards. now
> I've been thinking about learning C++ just for the heck of it, after this I don't think that's gonna happen.
14:35
@BartekBanachewicz haha you cannot do any webdev without js.
@Neal that's completely untrue. All of my webpages work perfectly without javascript.
@Neal No, I mean, we never finish what we start.
> C and C++ are so different it's quite weird how they are so often grouped together as if they were almost a single language.
bravo
@BartekBanachewicz o rly? I want to see you make a fully function nice looking site without js
user784668
@FredOverflow lol@your question. C++ is obviously undecidable.
14:36
@BartekBanachewicz oy...
@Fanael Is not! I made up my mind PRO C++!
@Neal actually, if you use javascript, you already admitted failure. CSS3 and HTML5 are enough for everything
@Neal Flash! :P
@BartekBanachewicz lolol
And, contrary to JS, these technologies are actually good.
guys, stop feeding the spammer.
14:38
I want to see his butthurt
@BartekBanachewicz "HTML" and "good" in the same sentence? Seriously?
@Griwes HTML 5 sucks... less
@BartekBanachewicz Which doesn't make it "good"... yet.
user784668
@BartekBanachewicz Actually, if you use CSS3 and HTML5, you already admitted failure. HTML 3.2 is enough.
user784668
@Griwes There's no HTML in that sentence.
14:39
@Fanael haha
@DeadMG Was this Neal ever in the Lounge before?
Well I don't usually use CSS at all.
@FredOverflow Not so far as I can tell.
@FredOverflow I have been here many atimes before :-)
Why do we tolerate his link dropping then?
@Neal Your avatar doesn't ring any bells here. Changed recently?
14:40
@FredOverflow yea, during the hat rampage... sorry
Why is it giving me an error on this class on line 10?
Zomg. I can't believe he has 48k rep. Oh wait, .
Xeo
Xeo
@FredOverflow I think I remember him.
@Jeffrey Read compiler error and guess.
Error: error: expected ‘;’ before ‘*’ token
14:41
Here you go.
@Jeffrey forgot a semicolon after class body
Now grab your C++ book and read chapter about class declarations.
@BartekBanachewicz Hey, that's too easy for him :(
and a few times before and after that :-P
14:42
@BartekBanachewicz, thanks man
@Neal asking Qt questions <oh my effing god>
user784668
@Jeffrey Upgrade your compiler to one that emits helpful diagnostics.
@Jeffrey now go read your book, Griwes was right
@Griwes, there are moments when you make trivial mistake and still don't see them
user784668
14:42
@Jeffrey That's a syntax error. The compiler should tell you what the problem is.
@Jeffrey There are cases when even such rubbish diagnostics tell you exactly what you did wrong.
@BartekBanachewicz, I know that I need a semicolon, I just forgot it and didn't see it there.
@Jeffrey the compiler was pretty helpful, actually. Anyway, don't worry, noticing these errors comes with experience
user784668
@Jeffrey GCC 4.8 says "error: expected ';' after class definition" and even shows you the exact place where it expected that semicolon.
Yeah, but GCC error messages suck.
Xeo
Xeo
14:43
1
Q: std::tuple memory alignment

NtscCobaltIs there any formal specification for the layout and memory alignment for the pseudo members of a tuple? Is there anyway to modify the memory alignment of types in a tuple? Is it effected by a #pragma pack() directive? For example: typedef std::tuple<uint8_t, uint32_t> myTuple; Is ther...

@Jeffrey Then that diagnostic has told you everything you wanted to know, anyway.
Xeo
Xeo
Something for you, robot?
Anyway thanks guys, It took me 15 minutes to figure out I missed a semicolon... I love programming...
user784668
@R.MartinhoFernandes Why?
Xeo
Xeo
@Fanael < 4.8 they sucked in general, >= 4.8 the carets
14:44
@Xeo well, it seems the answers quite nailed it - implementation defined (or undefined at all)
My current snapshot tends to eat up some SFINAE tracebacks though.
Xeo
Xeo
@LucDanton It eats recursive "calls".
If that's what you have
@Fanael I am being sarcastic and not being sarcastic at the same time.
@Jeffrey Classic
@Xeo I don't think so. I've never tried to reproduce though.
14:46
@R.MartinhoFernandes They do suck.
@R.MartinhoFernandes Just as I thought!
SCREW YOU IE
SCREW YOU FLASH
Xeo
Xeo
> Assume that move operations are not present, not cheap, and not used.
Wut. (From Scott's summary.)
user784668
@AndreiTita 4.8 is pretty decent as far as C++ compilers go, actually.
@LucDanton Woot, someone understood it!
14:47
@Fanael I actually develop on MSVC, and only really use gcc via online compilers but I've found its error messages even worse than MSVCs. It was mostly 4.7.x though.
@Xeo Perhaps that is advice for code that mingles with C++03?
Xeo
Xeo
As soon as MSVC gets decent C++11 support, I'll pretend C++03 never existed.
@AndreiTita Hahaha, you must be dreaming.
@R.MartinhoFernandes That tends to happen. Pinch me.
@Xeo Ah, so you're planning on rewriting half of Boost then?
14:48
Prefer lambdas to std::bind. ?
Xeo
Xeo
@LucDanton PLEASE MAKE THEM USE MOVE SEMANTICS! T_T
@R.MartinhoFernandes huh? GCC's error messages aren't exactly stellar. Pre-4.7 I have no problem saying they're worse than MSVC's
Xeo
Xeo
@BartekBanachewicz As soon as we get polymorphic lambdas.
user784668
@Xeo As soon as the hell freezes over, I'll pretend C++03 never existed. FTFY
@Xeo polymorphic?
14:49
@Xeo I'm not that kind of wizard. Supposedly Boost.Variant has that in the upcoming release. Have yet to try.
Xeo
Xeo
@BartekBanachewicz Non-fixed parameter types.
@jalf They don't need to for this purpose.
@Xeo template lambdas?
user784668
@BartekBanachewicz Basically.
They just need to be better than MSVC's.
14:50
My implementation can still visit an arbitrary number of variants though, so it's sexier regardless.
@jalf "It was mostly 4.7.x though."
Like you couldn't've said it the first time -.-
@R.MartinhoFernandes yes... Which I don't think they were
Ah, thought he said pre 4.7
Xeo
Xeo
std::bind(a, b, c, _1, _2) could be done with [=](auto&& d, auto&& e) return a(b, c, d, e);
Anyway, on the whole I don't think MSVC's error messages are bad at all. I know you like to bash everything about it, but... well
Xeo
Xeo
14:51
Though the bind version does look a bit sexier, I admit.
And in 4.8 they not only are better, but they also have the inflated appearance of better borrowed from clang.
@R.MartinhoFernandes but he was talking about 4.7 :)
user784668
@jalf No carets therefore they suck.
@jalf And now I am off in a sarcastic tangent. Sue me :P
Xeo
Xeo
@Fanael Robot thinks carets suck. ;)
14:52
So you're mocking him for making a statement about GCC 4.7 which is not true about the unreleased 4.8? What are you smoking, again?
@jalf No. I mocked the statement about 4.7 and now I am bashing 4.8. (if it's not clear, I don't like 4.8 error messages)
Xeo
Xeo
@ScottW ...
@R.MartinhoFernandes well, remind me, were error messages changed significantly in 4.7, compared to 4.6 or earlier?
or is it only in 4.8 they made the big push
which you may or may not like :)
For things like SFINAE you want 4.8.
user142019
Guys.
14:54
because the "traditional" GCC errors certainly aren't impressive. I'd prefer MSVC's errors 90% of the time
I know it might hurt your fanboy heart to hear that, but eh... Tough luck. :)
@jalf They have been improving gradually. 4.5 was really horrible, yes. 4.6 was slightly better. 4.7 was a big change, and 4.8 brought some more stuffs and those ugly carets.
user142019
Time to mine and craft.
@jalf I find them fine except when it comes to templates (overly verbose and sometimes outright useless).
user784668
@R.MartinhoFernandes They created -fno-diagnostics-show-caret just for you.
@Fanael Try that with 4.7.
user784668
14:56
@R.MartinhoFernandes No problem in 4.7 since no carets in the first place?
@Fanael No flag either.
user784668
@R.MartinhoFernandes So don't pass it. There, problem solved.
@Zoidberg sup?
Jan 25 at 10:59, by R. Martinho Fernandes
I don't want to fuck around with my build script because of aesthetic reasons.
user142019
@BartekBanachewicz MC
14:57
@jalf well let's don't also forget that MSVC error are tried to be presented on Error List (so they are clickable)
user784668
@BartekBanachewicz I can click on errors in vim. Not that I'd want to click in vim.
@BartekBanachewicz People really use the Error List? I thought everyone serious about it used the Output window (it's clickable too)
user784668
@BartekBanachewicz Also ^
@R.MartinhoFernandes ... yes they do
@R.MartinhoFernandes I know it's clickable. But jump to next/prev error works basing on errors from error list IIRC
14:58
At least in VS10 the error list hides stuff.
@R.MartinhoFernandes Yup, which is why it is useful :)
@R.MartinhoFernandes Aliases? :p
So you can see the 10 errors you got, rather than the 800 lines of output it generates if the errors were template-related
I use both windows regularly
I go to output only if Error list isn't enough, and it's enough in 87.63% cases.

« first day (837 days earlier)      last day (4336 days later) »