« first day (462 days earlier)      last day (4485 days later) » 

12:00 AM
Forwarding is so cool.
 
Xeo
@RMartinhoFernandes It's not just you. Wtf.
That paper should rather propose to deprecate using directives...
 
Ah good.
That proposal sounds like it comes from someone that abuses namespaces all the time.
I mean...
> When developer wants to use a single class from either namespace, without need to use the class with exactly the same name from another namespace, “ignore namespace” directive will solve the problem completely.
 
Xeo
like, wtf.
 
What about just qualifying the damn things?
 
Xeo
But, typing
 
12:02 AM
It's for the blooper shelf.
 
Plus, if you ignore namespace how do you plan on using the classes from it?
 
Xeo
I have to admit that the reflection and introspection proposal looks sexy, tho
Although I see many complications with it actually being implemented
like
unspecified callable; in the function_descriptor_t.
 
What about it?
 
Xeo
well, you'd need a different type for callable for every function signature?
 
Templates?
 
Xeo
12:05 AM
Okay, for every return type?
 
auto_cast?
 
gman_cast
 
std::any :P
 
Xeo
riiiight..
 
Am I crazy or is there really a operator""?
 
12:09 AM
You're dealing with reflection anyway. Get ready to have lots of unknown types around.
 
Xeo
user-defined literals
 
@EtiennedeMartel That's a user-defined literal.
 
Is that new in C++11?
 
yes
 
Freaking sweet.
 
12:10 AM
and supported by hardly any compilers at all, as far as I know
 
@DeadMG Clang and GCC.
 
I thought GCC didn't support them in an actual release build yet
 
Yeah, but...
That.
 
"Yes. I humbly apologize, my Lord DeadMG, for as usual, you have bested me in a battle of wits."
 
Humble.
 
12:12 AM
lol
 
Xeo
lol
I heard catnip's bad for puppies
 
who said anything about catnip?
 
Xeo
Dunno, your last message sounded like you were on a catnip trip or something. :)
 
a catrip?
 
Unfortunately the cat got ripped when it attempted to leap over the barbed wire fence.
Hence, catrip.
 
12:19 AM
That must be painful
 
unfortunately, your fevered hopes that my brilliance is the result of a repeatable mind alteration are in vain, I know of no means by which you might imitate my excellence
 
Are you using a generator or something for this kind of speech?
 
merely the sheer force of my own mind
 
Xeo
@StackedCrooked Yes, the generator is called catnip
 
Whaah! The puppy is high on catnip!
 
12:21 AM
I have absorbed not one mind-altering substance
 
Not even coffee?
 
no
 
Xeo
You sure don't sound like that's true.
 
Don't make the puppy drool now.
 
12:23 AM
@Xeo You are merely jealous of my inherent superiority.
 
Xeo
Okay, that's it, get the vet.
The puppy needs to be reminded of its place. Call the castrator.
Anyways, I'm off to sleep for now
 
Good idea.
Good night everyone.
 
Studio Brussel. (Belgian government-funded radio station.)
 
Xeo
G'night
 
night
@StackedCrooked Belgian government? rofl, oxymoron
 
12:28 AM
Lol.
Update: we have a government.
 
So I heard.
 
^ This is our prime minister.
A gay Wallon.
 
Elio Di Rupo (; b. 18 July 1951) is a Belgian social-democratic politician of Italian heritage. He is the Prime Minister of Belgium, and leader of the Socialist Party (PS). He became leader on 6 December 2011 and heads the Di Rupo I Government. Elio Di Rupo is the first francophone to hold the office since Paul Vanden Boeynants in 1979, as well as the country's first socialist Prime Minister since Edmond Leburton left office in 1974. Background and early life Di Rupo is the son of two Italian immigrants. His father was born in San Valentino in Abruzzo Citeriore in the region of Abruzzo...
 
Ours is a christian fundamentalist.
 
12:30 AM
What?
 
This guy.
 
hey, really quick question. what's the keyword for keeping a variable constant in a function so when C++ is done with the function, the variable doesn't get removed?
 
@dukevin static
 
thanks
 
@EtiennedeMartel He looks unpleasant to look at.
 
12:32 AM
His head is a cube.
Thanks to this prick, Canada withdrew from Kyoto.
 
I thought Cananda was rather progressive. At least compare to the US.
Does Canada have many conservative voters?
 
Yes. Most of them are in Alberta, Saskatchewan and Manitoba (three provinces in the prairies). That's where most of the conservatives get their support.
However, during the last elections, Ontario, normally a liberal stronghold, almost entirely passed to the conservatives. That can be attributed to the fact that the Liberal Party seemed quite weak.
Canada as a whole is quite progressive, but the conservatives follow a rather populist approach.
And they get elected. I have the feeling that our government does not represent the people.
 
1:08 AM
That sucks.
 
2:00 AM
!(http://punditkitchen.files.wordpress.com/2009/03/political-pictures-harper-obama-levels-fame.jpg)
That guy.
 
 
4 hours later…
5:47 AM
Not very funny, but still wtf
 
6:27 AM
hi :) , can somebody gine some c++ tests? i mean C++ tests from university, school etc. any help will be greatly appreciated :)
 
7:09 AM
I wonder when google will change "I'm feeling lucky" to "I'm feeling paranoid".
 
xD xD xD lool :D
everything is possible :D))
 
8:20 AM
@Pubby rofl - >that's hilarious<
 
9:01 AM
It's also true.
 
 
2 hours later…
10:36 AM
@StackedCrooked I'd take a gay wallon over a christian conservative any day :)
hey, my $ rich comment is still starred
Things are slow in here
 
10:49 AM
Boost doesn't allow fractional besselj functions to be calculated.
tsss
 
> As you can see, the bridge pattern makes “Stupidity” more flexible, different implementations of “Idiot” can literally be plugged into it. Which makes it more generic and improves design.
This is a great pearl!
 
Oh hello there.
Speaking of pearls, any great insights from the recent papers?
 
is std::is_array<T*> supposed to return true?
 
No.
@LucDanton There's a lot of great stuff, but I doubt many will make it.
 
11:46 AM
yeah, forgot a ! in the static_assert.
figured as much :)
 
@IntermediateHacker How much time passes between the lower left and the upper left picture?
@rubenvb Why would it? An array is not a pointer.
 
@RMartinhoFernandes Think some are too ambitious? Rich pointer, TSM...?
 
I didn't get the point of rich pointers at first glance. Can anybody explain in once sentence?
 
It's reflection.
 
@FredOverflow The time it takes for my mom to realize I need a haircut.
 
11:47 AM
@FredOverflow idd, I confumbled myself.
 
Do we have to call naked pointers "poor pointers" from now on?
 
@FredOverflow The question is whether the parameter is an array or not though.
 
@IntermediateHacker Why doesn't she simply cut your hair herself?
 
@FredOverflow she used to do that when I was in Kindergarten. :(
 
@LucDanton The template parameter is T*, as you can see.
 
11:48 AM
@LucDanton HAve you seen "Resumable functions"?
@FredOverflow So, the question was if a pointer is an array.
Not the other way around :P
 
A pointer is never an array.
 
2 mins ago, by FredOverflow
@rubenvb Why would it? An array is not a pointer.
 
@IntermediateHacker So did my mum, and I didn't care too much. I thought it looked just fine.
 
is-a relation not symmetric.
 
Well, in that sense, an array indeed is-a pointer ;)
 
11:50 AM
@FredOverflow well, my mum is an arab. She doesn't just cut my hair. She starts a holy war against them.
 
@RMartinhoFernandes I glanced over it. "Crippled coroutines" is all I got from that.
 
@FredOverflow Wait, what?
 
@RMartinhoFernandes You know, in the OO sense. Base foo = some_derived.
An array is not a pointer, but an array is-a pointer. The - is significant.
 
Oh, right, silliness OO.
 
So to the (implied and related) question "Does is_array<T*>::value hold?", you first answer "No, since an array is not a pointer", then "Well, let's not forget an array is convertible to a pointer". First you miss the target, then you flip-flop?
Swing and a miss and a miss :p
 
11:53 AM
@LucDanton Is the is in is_array an is as in is a or in is-a?
 
There are too many "is" in that sentence.
 
I like how the second attempt wants to salvage the first, but doesn't want to be incorrect regarding the initial premise.
 
Anyway, arrays do not inherit from pointers, so the whole OO crap doesn't really apply. Relax, folks :)
 
lol
 
@IntermediateHacker How old are you? How many years until you can decide for yourself what hair style you want?
 
11:56 AM
@RMartinhoFernandes Do you think such a feature would be worth it? I'd like to see the performance of a library solution first tbh.
 
By the way, obligatory hair picture in this room:
 
@LucDanton I don't really think it will make it.
 
@FredOverflow I'm 16. as long as my mom's alive perhaps. :(
 
@RMartinhoFernandes Expecting compiler makers to shuffle on their feet awkwardly while staring at the ceiling?
 
:)
But I wouldn't mind having it.
 
11:57 AM
damn. I miss my hair.
 
lol, didn't know Scott Meyers wrote a book about downloading
 
Sometimes it feels like export has left a precedent in how lazy C++ implementers are allowed to be. And that's not lazy in the virtue meaning of the term.
 
I think the rich pointers proposal is not very hard on implementers.
 
@IntermediateHacker Then you know what you have to do ;-)
@RMartinhoFernandes Rich pointers = enforced RTTI or more?
 
It requires some syntax, and using machinery that already exists to generate some code.
@FredOverflow Only if you use rich pointer syntax (%).
Everything else remains the same.
 
12:00 PM
Are rich pointers a design decision of the class author? Or can I use rich pointers to any type?
 
T* t = new T; has no overhead whatsoever, and T% t = new(std::rich) T; has all the goodies.
 
What goodies?
 
@FredOverflow AFAICT, you can use them on any type.
@FredOverflow The ability to query type properties at runtime.
void% t = new(std::rich) T; // notice the "lost" type information
std::cout << type_descriptor(t).bases[0].name(); // not sure about the syntax here
 
So you can write an API taking void% and then inspect the pointee. (Oh wait, I'm slow.)
 
A T% can be efficiently implemented with two pointers, one to the data, and one to the type descriptor.
 
12:04 PM
It's like packaging a pointer and an std::type_info&, except it's an extended type_info with more information.
(I need to eat to catch up on the robot apparently.)
Feeling so weak!
 
@LucDanton Exactly!
In fact, the T% can be std::rich_ptr<T>, i.e., a library solution, so long as the compiler is willing to generate the type descriptors.
 
Great minds etc. (Unless that was in the paper already, I didn't read much.)
 
@LucDanton What additional information does the type descriptor have in comparison with classic RTTI?
 
hmm, should is_pointer<decltype(nullptr)> be true?
 
@rubenvb No.
@FredOverflow Classic RTTI has virtually nothing: (implementation-defined) name and identity.
 
12:06 PM
@RMartinhoFernandes ok, why?
 
@rubenvb Because it's not a pointer type :P
 
How is nullptr_t not a pointer type?
 
well, semantically it should be, no?
 
It models the NullablePointer concept and is convertible to all pointer types, but it's not a pointer.
 
You can use is everywhere you can use a pointer (or so I heard)?
 
12:07 PM
Is it because I cannot dereference it?
 
For example.
 
Is it forbidden by syntax, or does it yield UB?
 
*nullptr doesn't compile.
And neither does nullptr_t x; *x;.
 
Okay then it makes sense I guess.
 
I assume std::nullptr_t has no operations available to it other than the aforementioned conversion. If you can't dereference it, index it, do arithmetic on it, in what way is it a pointer?
 
12:09 PM
@FredOverflow But you can't do that on a void* either, but a void* is a pointer :P
 
but in templates, aren't those substitution failures ala SFINAE?
 
@RMartinhoFernandes oh :)
 
is_pointer tells you if the argument is in the pointer types category.
 
@rubenvb What is being substituted?
 
And that includes only the types with splats.
 
12:10 PM
@LucDanton Well, it is-a pointer in the sense that you can assign it to any real pointer ;)
 
@LucDanton a T or T* for a nullptr in some enable_if stuff.
@RMartinhoFernandes is that the most useful definition? I also have a is_nullptr trait
 
What is a splat?
 
@rubenvb Yes, it is the most useful. nullptr doesn't point. It's just... a tag.
 
@FredOverflow *
 
@FredOverflow INTERCAL name for *.
 
12:12 PM
ok, I won't mess with it then.
 
@rubenvb When substituting a template parameter with std::nullptr_t (since nullptr isn't a type) would result in an error, then yes you'd get SFINAE. But for instance just using nullptr in an invalid manner will not.
 
decltype(*nullptr) is always a hard error.
 
Yes! This time I'm first!
 
lol
the plastic robot is getting rusty
 
And I just starting eating my noodles. I don't think that's a coincidence. Flesh over metal (and/or plastic, also classic wood paneling)!
 
12:13 PM
lol
 
Anyone have any instructions on how to install GCC 4.7 on Ubuntu?
 
Ask @Luc. I think he does that.
 
sudo apt-get install -t unstable gcc-snapshot
This assumes the Debian unstable repo is in your sources.
Also, this solution won't automatically update the compiler.
 
@TonyTheLion find a ppa
I linked one some time ago
let me refind it
 
Beware, from what I've seen, that thing is really unstable.
 
12:15 PM
Oh, I just realized.
 
@LucDanton ah right, so what about a stable version?
like maybe 4.6
 
Are you sure that's not installed already?
 
@TonyTheLion Then it's not GCC 4.7! I think 4.6 is available under gcc4.6 though.
 
What's the output of $ gcc --version?
 
well, when I do gcc --version I get 4.4.3 as an answer
 
that's the one you'd want I guess
 
So my latest GCC complaining spat out the infamous "tree check: expected tree_list, have H‰ ß è MÕ þÿƒ ø txƒ ø tsƒ ø „ º in eq_local_specializations, at cp/pt.c:1687" error yesterday.
Today, my PSU failed.
 
Coincidence? Or a sign of that the enemies of the Old Ones are coming?
 
12:17 PM
@LucDanton so do I do the same apt-get command to get 4.6 installed then?
 
@TonyTheLion No. Let me check.
Try gcc -v.
 
1 min ago, by Tony The Lion
well, when I do gcc --version I get 4.4.3 as an answer
Doesn't Ubuntu have some fancy pants package manager that works with mice?
 
What Ubuntu release are you using?
 
Should string literals have the type constexpr?
 
gcc --version output : "4.4 , You Dinosaur!"
 
12:18 PM
@rubenvb What?
 
Backward compatibility aside, constexpr is what they really are.
 
constexpr is a not part of types.
 
I'm using Ubuntu 10.04 LTS
 
er, not type, but you know qualifier thing
 
@rubenvb They could be, but they're underspecified to allow implementations to place them at link-time. Remember, they're references to array. Not prvalues :(
 
12:18 PM
@rubenvb That's const.
 
won't a const char[] f() { return "bla"; } fail to be usable in a constexpr context? Or is this evil code to begin with?
just thinking out loud here
 
Why not return a reference to the array?
 
@TonyTheLion You could attempt sudo apt-get install gcc-4.6.
 
@rubenvb const char[] f() is illegal syntax.
 
You may run into conflicts though.
 
12:21 PM
@LucDanton it says "Couldn't find gcc-4.6":(
 
shouldn't just apt-get install gcc get the newest available version?
 
@bamboon it doesn't
might not have the right things in my sources file
I'm guessing
 
template <size_t N>
using string_literal = char const[N];
string_literal<4>& f() { return "bla"; }
 
@TonyTheLion Let's try something obvious first (no offense meant): have you regularly updated your install over its lifetime?
 
@TonyTheLion ok strange, I am not that of an linux expert
 
12:22 PM
@FredOverflow ok, evil code it is. It was a bad example anyways.
 
@bamboon It gets the newest version available in the repos, but sometimes repos lag behind for reasons of stability.
@rubenvb It's not evil.
You just have to return a reference.
It's safe, because string literals are not "local".
 
@LucDanton I have kept it somewhat up to date, been a while since I last checked for updates though
perhaps I should do that first?
 
Although newer versions are sometimes backported; but then the 'regular' aliases (here, gcc) will remain bound to the stable version.
 
@RMartinhoFernandes yeah, thats for sure but I am just testing it with ubuntu 11 and they got 4.6 in the repos
 
@TonyTheLion Yes, that way we can check if they did in fact backport GCC 4.6 to 10.04.
 
12:24 PM
maybe I should just get Ubuntu 11?
it's on a VM, so I don't care
 
@RMartinhoFernandes You mean string literals have static storage duration.
 
Your system, your call.
 
can install as many Ubuntu's as I wish
 
@FredOverflow Something like that. They exist forever magically.
 
well if it is on virt i would just update
 
12:25 PM
what's the version of GCC with Ubuntu 11?
 
gcc 4.6 i think
 
aye - 11.10 has 4.6.1
 
11.10 is definitively 4.6. Dunno about 11.04, I'm expecting it to be available there if not the default.
 
11.10 has gcc 4.6
 
12:26 PM
hmm old beta page
basterd google
 
If I define global operator new and friends, shouldn't std::string use it? It's not working.
 
what's a good git client to view versions of a single file over time (including diffs)?
 
@RMartinhoFernandes Maybe std::string uses operator new[] or malloc? :)
@RMartinhoFernandes Also, how long are the strings that you test? Your implementation may have short string optimizations. Try strings longer than 16 characters.
 
@FredOverflow I defined all of new, new[], delete and delete[].
 
hmm... ...looks like kernel update in 11.10
 
12:29 PM
AFAIK std::string uses the std::allocator, no? Shouldn't that be new instead of malloc?
@FredOverflow I tried with one 80-chars long :S
 
@kfmfe04 I updated today.
 
@LucDanton clean? no probs?
 
@RMartinhoFernandes Then you need to peek at the implementation of std::string, I guess.
Does std::vector use your overloads?
 
if it uses std::allocator, can't that be hidden from headers and a direct library call to the one using library new?
 
sudo apt-get install gcc-4.7
 
12:30 PM
@kfmfe04 No restart yet so I'm still on the old image actually.
 
@LucDanton kk - I will jump in and attempt an update/restart then
 
@RMartinhoFernandes Cannot reproduce, works fine on my end.
 
one of these days, I'd like to do a kernel build so I can play with tarpits
 
Dang, let me build a small testcase.
 
I get one call of operator new (single form) per std::string object I create. With or without operator delete overriden.
 
12:37 PM
The vector throws: ideone.com/QQxNm
 
@LucDanton fwiw, I had to do a VBOXLinuxAddition as I'm running inside vbox, but so far so good after a reboot...
 
Time to dig into the strings implementation.
 
./test
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
 
That's with 4.7?
 
@RMartinhoFernandes Maybe you have some super lazy string implementation? :)
 
12:39 PM
I'm running 4.6.2 here. Let me test on 4.7.
 
Make it a question on SO, you'll get 10 upvotes in 3 minutes ;-)
 
@RMartinhoFernandes Yes. Also, C++11 mode (which meant removing some throw-specs).
@FredOverflow Answer it with a link to the relevant discussion on a GCC mailing list/bug report on Bugzilla and you can get upvotes, too!
 
Confirmed, works on 4.7. I wonder what crazy shenanigans is the 4.6. implementation doing.
Oh, 4.6 fights like a cow.
 
You mean copy on write? But still, wouldn't it require one string instantiation?
 
I don't understand :( It seems to use the allocator. Makes no sense. I think it's time for that question.
 
12:54 PM
Did you put a break point in the allocator?
 
Ah, no, I was just source diving. Good idea though.
 

« first day (462 days earlier)      last day (4485 days later) »