« first day (507 days earlier)      last day (4433 days later) » 

11:00 PM
Also made messages wider a bit.
 
@JohannesSchaublitb I suppose. Although I'd call it 'the problem of specifying how decltype should behave', not an ambiguity.
 
@CatPlusPlus That's been like that forever.
 
perhaps the intent is that in the case of a "a.a" (class member access expression), the entity kind inspected is "class member". in that case the type is of course "int" and can be determined at compile time.
 
@RMartinhoFernandes The background is too light.
 
Get your cat vision working.
 
11:01 PM
@RMartinhoFernandes in fact I think that is quite probable! i always thought that "class member" and "object" describes the same when the object is a member subobject
but now I think that the entity kind "class member" describes the declarative dimension only
@RMartinhoFernandes i think it is unfortunate that the entity model is so underspecified
 
I've always separated members from subobjects. Kinda maps wells to the difference between &A::member and &a.member.
 
members are a kind of subobject (except for reference, function, statics, enumerator or nested type/classes members).
but wait
i'm falling into the pitfall again lol
dammit. but the spec calls it "member subobject" oO
 
I just noticed some non-normative text that uses 'member' to speak of a subobject.
 
Do we have a moderator present?
 
@JohannesSchaublitb Doesn't strike me as odd.
 
11:05 PM
@jalf Getting used to it?
You can use the Assembly room.
 
@LucDanton yeah the c++03 spec defined the whole class member name lookup in terms of declarations belonging to subobjects. disgusting xD
good that c++11 fixed that.
 
@jalf now we have (or not quite, but almost)
 
@Alf is a moderator
 
@JohannesSchaublitb Uh, I'm noticing a distinct lack of blue text. I do not believe he is a moderator.
 
11:08 PM
@JohannesSchaublitb yeah, but i was referring to @shog9, who just dropped in. :-)
 
@Cheers is not a mod.
 
he's a mod on usenet
 
@CheersandhthAlf not a mod... ;-P
 
I highly doubt that is what jalf was referring to
 
First Linux from USB stick boot successful.
The keyboard is set to English, and the time is 6 hours off, but apart from that, all seems to work.
 
11:09 PM
Woot, I fixed my install. Haskell works again. Frakking updates.
 
Also, @jalf - you could probably forestall arguments such as the Nicol thing currently underway by editing your answer a bit. It doesn't really reflect the sort of nuance that has come out in the comments.
 
@Shog9 i suspect you will kick me if i start trolling :(
 
i find it hard to concentrate on my lsp + c++ constrrrruct'n blog posting. i'll just have a cup of tea and re-read more of Sabin Willet's "The Betrayal". It's a weird book: good tempo, drive, but yet the text some places reads almost like lyrics.
 
@Shog9 Yeah, and I'd love to, but it's past midnight, and I have work tomorrow. It's not going to happen right now
 
@jalf That's fine. Just figured I'd say something 'cause that comment thread is getting loooong
 
11:15 PM
@JohannesSchaublitb Not sure I quite understood your msg at 22:49 - are you saying that the standard says decltype cannot be computed in those cases, but all implementations return the declared type instead?
 
@JohannesSchaublitb Oh, hell... Why should you miss out on all the fun?
 
@je4d i think the spec means that the entity kind "class member" is inspected. in that case it can indeed be computed
 
@Shog9 I'd love you forever if you could get rid of all his comments and my responses to them (I just removedmost of my responses)
they just clutter up the place, just when I thought we were getting somewhere
 
but at some cases the entity type "object" is inspected. so there is at least an ambiguity anyway
 
@jalf If you edit, I'll happily remove ALL the comments
 
11:17 PM
@Shog9 Yeah, but until I edit, the first part of the comment thread holds actual value. Valid points against my answer were made, and I clarified in the comments
but what's going on now is beyond worthless
anyway, I'm heading to bed
 
@jalf Right - I'm not terribly fond of deleting comments unless / until whatever has been discussed has been captured somewhere. Comments don't have any rev history to speak of.
But yeah - get some sleep!
I'll look through it once I'm done with support emails :-/
 
@JohannesSchaublitb ah, so the ambiguity is in the struct A { int a; }; const A a = {}; decltype(a.a); case?
 
@Shog9 sounds like fun. :)
 
like for "int a;" decltype(a) inspects the object's type. When doing "extern int a[];" then "decltype(a)" cannot be computed because we don't know the type of the object named by "a". we just know the declared type of it
 
11:18 PM
@JohannesSchaublitb sure, makes sense
 
is there any Standard constant for Pi?
 
@DeadMG I think it's M_PI
 
@Shog9 cleverly avoiding being loved by @jalf forever :)
 
@sehe This week's been rough enough as it is ;-P
 
ah, it's a smarter idea to just write the value in degrees
 
11:19 PM
lol
 
Regardless of how decltype is or should be specified, how useful is decltype(a.member) anyway? (I'm not speaking of decltype( (a.member) ).) Until I looked up decltype very recently I wasn't even aware of it -- never thought there'd be a need for it. I Can it be useful in pseudo-introspection?
 
@je4d perhaps in the end everyone knows what the spec means but IMO it is still ambiguous and wrong in the case of extern int a[]; but perhaps it is not worth fixing
 
Ugh, degrees.
 
@RMartinhoFernandes university degrees
 
@sehe No, angle measuring degrees. Those abominatons.
 
11:20 PM
i'm just doing silly pedantry anyway just for the lulz
 
360/60/60? WTF?
 
@JohannesSchaublitb And there was me thinking that decltype was abbrev-ed for declared type
 
@JohannesSchaublitb so you reckon the spec says it's not figure-outable?
 
@sehe but it is not the declared type. for example the declared type for a in void f(int a[]) { } is int[] but the type of the entity is really int*
 
11:22 PM
@RMartinhoFernandes sry, lame joke that
 
Btw, <ratio>-haters out there, here's fuel for your arguments: it can't properly handle the radians <-> degrees divide.
Hmm, or can it?
 
If <ratio> can power units of time for <chrono> it can power units of angle.
 
@LucDanton 1 radian/degree is not a rational value.
 
hm actually i think the phrase "declared type" isn't defined in the spec anyway, but I base my use of the phrase "declared type" on a use of that phrase in the library section when it says that when the declared type of a parameter just before the "..." is "an array or function type", and its name is used with "va_arg", then behavior is UB
so by that meaning of "declared type" that the spec uses there, in the above example the parameter does have the declared type of "int[]"
 
@LucDanton It can properly and awesomely and exactly power degrees+minutes+seconds, but degrees+radians :S
 
11:25 PM
@JohannesSchaublitb but there's a difference: when you write int* a as a formal argument, you get exactly the same as you get when you write int a[666]
 
@RMartinhoFernandes in practice that's shouldn't matter to much, real numbers are approximated anyways when stored?
 
I guess with something like ratio<314159265358979323846ULL, 18000000000000000000000ULL> it could work.
 
@CheersandhthAlf yes. in one case the declared type is "int*" and in the other case it is "int[666]", but both declare a pointer of type "int*"
 
brain overload
Are you sure you're not a compiler writer? I mean, come on, how _do_ you keep track of the concepts in stuff like this :)
 
11:26 PM
@CheersandhthAlf unfortunately I have to go to bed. but I think there is no definition of "declared type" (AFAIK) and no basis for discussion beyond that single use of "declared type" in the library (AFAIK). so i'm going to bed now
 
hmm... void g(int a[]) { static_assert(std::is_same<decltype(g), int[]>::value, "what does this mean?"); } fails the static_assert forme
 
Feedback?
 
@JohannesSchaublitb nn
 
13
Q: Last named parameter not function or array?

Johannes Schaub - litbThis question is about vararg functions, and the last named parameter of them, before the ellipsis: void f(Type paramN, ...) { va_list ap; va_start(ap, paramN); va_end(ap); } I was reading in the C Standard, and found the following restriction for the va_start macro: The parameter pa...

 
11:27 PM
@KonradRudolph I think it lacks one fucking modifier:
 
@KonradRudolph 'Don't fucking use fucking pointers' (FTFY)
 
@sehe I considered actually writing that.
 
@je4d the type of the parameter is "int*". it is different from its declared type
 
@KonradRudolph Erm, when you spoil the beginning, I don't think it really counts as a spoiler.
 
11:28 PM
@RMartinhoFernandes Can't think of workarounds that make the result 'proper'.
 
It's analogous to
 
@JohannesSchaublitb it fails with int* as well O_o
 
#define fucking const
fucking int* fucking x;
4
 
@RMartinhoFernandes Okay, real spoiler this time: “that’s it”
 
@LucDanton Yeah, you're right. It can't work anyway.
So it's not fuel for <ratio>-haters anyway.
 
11:30 PM
By the way, I fully intend to actually give this presentation if – nay, when! – the opportunity arrives. ;-)
 
@je4d void g(int a[]) { static_assert(std::is_same<decltype(a), int*>::value, "what does this mean?"); } should not fail.
If it does, your compiler is buggy.
 
@RMartinhoFernandes I'm still on 4.6.1, so quite possibly
 
@RMartinhoFernandes did you mean "a"?
 
@CheersandhthAlf Oh, right.
@je4d There's your problem.
decltype(g) is a function type...
@KonradRudolph You should name the powned member pwnd.
 
@RMartinhoFernandes well now i fell stupid :P
right, it passes with int*
 
11:34 PM
decltype is fairly sane except regarding that bit about members. Don't forget to make the distinction between decltype(foo) and decltype( (foo) ).
 
posted on March 06, 2012 by Herb Sutter

Thanks to Perceptive Software who are bringing me to Kansas City in two weeks to give a free talk on “Welcome to the Jungle.” The talk will be based on my recent essay of the same name (sequel to ”The Free Lunch Is Over”) concerning the turn to mainstream heterogeneous distributed computing and the end [...]

 
@KonradRudolph I like it. I don't think the mapping from int *i -> int i is a strong example. Without context, using the int* wouldn't make much sense at all, so you'd have to assume there was some extraneous reason (shared owner-ship, uncoupled lifetime) for it to be an int*
Also, I take it you will have a few words on the difference/why between unique_ptr and shared_ptr
Ok, following jalf, litb and RM-F - sleep well
 
@RMartinhoFernandes You did say you were off to bed.
 
Sure. But just to follow tradition.
 
11:44 PM
1 hour ago, by R. Martinho Fernandes
Speaking of which, I'm going to bed.
@RMartinhoFernandes Aha
I'm going to actually go to bed. Also for tradition
 
@sehe you of all people should know that "I'm going to bed" means "talk to me, I'll be around for a few hours yet"
 
@je4d True. But only IFF you talk to me. About something interesting.
More interesting than sleep, anyways
 
Yawn. That shit doesn't work on me. I'm immune, remember?
 
11:47 PM
> Genghiz Cohen. Doer of mighty deeds. Slayer of dragons. Ravager of cities. He once bought an apple.
Weird requirements.
1
Q: Knowing initial user input after getline cstring assignment

sundayHere's a C++ function of mine: void SetUserName(char username[]) { cout << "\nPlease enter a username.\n" << "Must not be longer than 12 characters.\n>> "; cin.getline(username, MAX) // MAX is globally defined while(strlen(username) > MAX) { ...

 
Great, I cannot run gparted, because it asks for the root password, which I do not know. All related search results say "sudo blah" or "su whatever" should not ask for a root password, but they do. God how I hate this security shit on live CDs.
 
@sehe I'm out of interesting.. litb's discussion of decltype has expunged everything else from my mind :-/
 
What broken distro are you using? (Just so I stay out of it)
@FredOverflow Did you try "password"?
What about "swordfish"?
 
@RMartinhoFernandes Linux Mint Debian Xfce
 
@sehe Yes. The actual slides even contain a small note to this effect (but during presentations I never end up using those notes). The int* => int case isn’t very strong, it’s just to start the whole thing off. And of course there are also legitimate uses of raw pointers (as weak pointers or low-level memory handles, e.g. when implementing smart pointers) and I intentionally omit this.
 
11:50 PM
@RMartinhoFernandes Are you mocking me?
 
@FredOverflow I'm half-serious.
 
@FredOverflow did you try the current users's pw?
 
@je4d What is the current users pw? It's not documented anywhere. I tried the empty string, as indicated on several search results, but that doesn't work.
 
If sudo asks for root password, then someone needs jail time.
 
@FredOverflow you could just make your own sandwich
 
11:54 PM
@KendallFrey Starting gparted from the start menu asks for root password, "sudo gparted" asks for the mint password. I know neither of them.
 
You can change the password of muggles without knowing the current one if you do sudo passwd username. Sadly you can't sudo.
 
I simply don't understand how one can design such a stupid live system.
 
@FredOverflow sudo passwd and done
 
mint@mint ~ $ sudo passwd
[sudo] password for mint:
Sorry, try again.
 
@FredOverflow probably gparted asks for a root password because it invokes gksu instead of gksudo
@FredOverflow it asks for the mint password, not root
 
11:57 PM
@sehe He knows neither, so there's little difference.
 
@sehe Again, I know neither the root password nor the mint password.
 
@FredOverflow try changing it with just passwd, and giving the empty string as current pw
 
@FredOverflow seems to be a known bug: forums.linuxmint.com/viewtopic.php?f=90&t=81582
 
sudo asks for current user password.
 
(as per what t'internet says)
 
11:58 PM
I had this problem too.

Result is here:
1) In Linux Mint press CTRL+ALT+F1 (you get in terminal)
2) write to console: su (now you are root)
3) write to console: passwd
4) set new root password now
5) press CTRL+ALT+F7

And now root user have your defined password until you reboot your system. It's working, i used it...
 
Lol clever distributions with fancy installers can't set root password properly.
 
Sounds a little bit like someone doesn't really know what he was talking about ^^ but at least someon was in the same spot and got out
 

« first day (507 days earlier)      last day (4433 days later) »