digitalmars.D - Support alias this in module scope?
- Manu (20/20) May 22 2018 Okay, I'm still really angry about the stupid stupid decision to make
- Stefan Koch (6/27) May 22 2018 After thinking about it for a few minutes I do believe this is a
- Manu (4/35) May 22 2018 I know, but it shouldn't be... they should just be normal extern(C++)
- 12345swordy (2/10) May 22 2018 Knock it off with sex talk here.
- rikki cattermole (2/15) May 22 2018 This is Manu and he is highly annoyed, you don't need to tell him off.
- Manu (3/20) May 22 2018 Sure he does! It's a fair call.
- VectorThis (8/9) May 22 2018 Hey, it could be worse, you could have wrote this below instead..
- Manu (3/14) May 22 2018 Nar, I didn't mean to start a thing...
- Steven Schveighoffer (6/25) May 23 2018 I'm just going to warn everyone here that one person is posting as
- 12345swordy (4/30) May 23 2018 No kidding, as I did not write that statement. Can you please
- H. S. Teoh (7/8) May 23 2018 Unfortunately, "actual" web forums are just as prone to impersonation to
- 12345swordy (4/11) May 23 2018 You can make an argument against security using that logic.
- Manu (4/19) May 23 2018 One thing a web forum *can't* do, is enjoy my participation. ;)
- H. S. Teoh (7/15) May 23 2018 While I wouldn't say that I'd be out too, my participation will
- biocyberman (7/14) May 24 2018 That's rather an extreme, not the norm. If something take 3
- Bastiaan Veelo (16/21) May 23 2018 Auch! I presume you are able to conclude this from looking at
- Steven Schveighoffer (9/28) May 23 2018 The IP address is included in the headers of the newsgroup. All of them
- Dukc (7/11) May 23 2018 Then again, it's possible they're family members or neighbours
- rikki cattermole (2/9) May 23 2018 It's a dynamic IP, so it'll be invalid sooner rather than later.
- John Colvin (3/14) May 24 2018 There was a post impersonating Steven, but I can't see it now so
- Patrick Schluter (4/15) May 24 2018 It was quite obvious that KingJoffrey could be the sock puppeteer
- Dukc (4/6) May 23 2018 Sorry forgot that part in my last post. If that's true, it makes
- Jonathan M Davis (10/17) May 24 2018 It's true. There's at least one post where he posted as WalterBright (no...
- Dukc (2/3) May 24 2018 Should somebody of us make an Announce theard out of this?
- rikki cattermole (2/7) May 24 2018 No, they are not worth any more of anyone's time.
- 12345swordy (2/22) May 24 2018 That guy show so much salt by doing that.
- Nick Sabalausky (Abscissa) (4/13) May 24 2018 The fake posts are also pretty easy to spot by their writing...*ahem*
- Atila Neves (4/9) May 23 2018 +1
- Jonathan Marler (3/17) May 23 2018 Had the same idea about a year ago :)
- Dukc (4/5) May 23 2018 I think it could be
- Rubn (12/33) May 24 2018 Would there be any use for this other than working around this
Okay, I'm still really angry about the stupid stupid decision to make C++ namespaces into scopes rather than just a detail used for mangling, with absolutely no consultation of the community, in particular the target audience, who are unanimously annoyed as far as I can tell... I'm unsatisfied by the work-arounds to make the situation not-suck, but I think I have an idea that would pacify me... If we can use `alias this` to mirror an entire C++ namespace into the location we want (ie, the scope immediately outside the C++ namespace!!), then one sanitary line would make the problem quite more tolerable: extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all along (count the seconds until the reply that says to use reflection to scan the scope, and use a mixin to... blah blah)
May 22 2018
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:Okay, I'm still really angry about the stupid stupid decision to make C++ namespaces into scopes rather than just a detail used for mangling, with absolutely no consultation of the community, in particular the target audience, who are unanimously annoyed as far as I can tell... I'm unsatisfied by the work-arounds to make the situation not-suck, but I think I have an idea that would pacify me... If we can use `alias this` to mirror an entire C++ namespace into the location we want (ie, the scope immediately outside the C++ namespace!!), then one sanitary line would make the problem quite more tolerable: extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all along (count the seconds until the reply that says to use reflection to scan the scope, and use a mixin to... blah blah)After thinking about it for a few minutes I do believe this is a reasonable approach. I am in favor of module-level alias this. The reason name-spaces create a scope is because they are essentially implemented via structs.
May 22 2018
On 22 May 2018 at 20:53, Stefan Koch via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:I know, but it shouldn't be... they should just be normal extern(C++) functions with an extra detail in the attribute for mangling.Okay, I'm still really angry about the stupid stupid decision to make C++ namespaces into scopes rather than just a detail used for mangling, with absolutely no consultation of the community, in particular the target audience, who are unanimously annoyed as far as I can tell... I'm unsatisfied by the work-arounds to make the situation not-suck, but I think I have an idea that would pacify me... If we can use `alias this` to mirror an entire C++ namespace into the location we want (ie, the scope immediately outside the C++ namespace!!), then one sanitary line would make the problem quite more tolerable: extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all along (count the seconds until the reply that says to use reflection to scan the scope, and use a mixin to... blah blah)After thinking about it for a few minutes I do believe this is a reasonable approach. I am in favor of module-level alias this. The reason name-spaces create a scope is because they are essentially implemented via structs.
May 22 2018
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all alongKnock it off with sex talk here.
May 22 2018
On 23/05/2018 4:29 PM, 12345swordy wrote:On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:This is Manu and he is highly annoyed, you don't need to tell him off.extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all alongKnock it off with sex talk here.
May 22 2018
On 22 May 2018 at 21:31, rikki cattermole via Digitalmars-d <digitalmars-d puremagic.com> wrote:On 23/05/2018 4:29 PM, 12345swordy wrote:Sure he does! It's a fair call.On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:This is Manu and he is highly annoyed, you don't need to tell him off.extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all alongKnock it off with sex talk here.
May 22 2018
On Wednesday, 23 May 2018 at 04:38:48 UTC, Manu wrote:Sure he does! It's a fair call.Hey, it could be worse, you could have wrote this below instead.. (then imagine the chaos that would unfold on the D forums) extern(C++, SomethingHere) { void penetration(); void private(); }
May 22 2018
On 22 May 2018 at 22:06, VectorThis via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Wednesday, 23 May 2018 at 04:38:48 UTC, Manu wrote:Nar, I didn't mean to start a thing...Sure he does! It's a fair call.Hey, it could be worse, you could have wrote this below instead.. (then imagine the chaos that would unfold on the D forums) extern(C++, SomethingHere) { void penetration(); void private(); }
May 22 2018
On 5/23/18 1:49 AM, Manu wrote:On 22 May 2018 at 22:06, VectorThis via Digitalmars-d <digitalmars-d puremagic.com> wrote:I'm just going to warn everyone here that one person is posting as KingJoffrey, VectorThis, Grady Booch, FuckYou, and in this thread he is impersonating 12345swordy, and in others he has impersonated WalterBright as well. -SteveOn Wednesday, 23 May 2018 at 04:38:48 UTC, Manu wrote:Nar, I didn't mean to start a thing...Sure he does! It's a fair call.Hey, it could be worse, you could have wrote this below instead.. (then imagine the chaos that would unfold on the D forums) extern(C++, SomethingHere) { void penetration(); void private(); }
May 23 2018
On Wednesday, 23 May 2018 at 12:32:50 UTC, Steven Schveighoffer wrote:On 5/23/18 1:49 AM, Manu wrote:No kidding, as I did not write that statement. Can you please support actual web forms to prevent this impersonation?On 22 May 2018 at 22:06, VectorThis via Digitalmars-d <digitalmars-d puremagic.com> wrote:I'm just going to warn everyone here that one person is posting as KingJoffrey, VectorThis, Grady Booch, FuckYou, and in this thread he is impersonating 12345swordy, and in others he has impersonated WalterBright as well. -SteveOn Wednesday, 23 May 2018 at 04:38:48 UTC, Manu wrote:Nar, I didn't mean to start a thing...Sure he does! It's a fair call.Hey, it could be worse, you could have wrote this below instead.. (then imagine the chaos that would unfold on the D forums) extern(C++, SomethingHere) { void penetration(); void private(); }
May 23 2018
On Wed, May 23, 2018 at 02:34:07PM +0000, 12345swordy via Digitalmars-d wrote: [...]Can you please support actual web forms to prevent this impersonation?Unfortunately, "actual" web forums are just as prone to impersonation to someone determined enough. T -- Error: Keyboard not attached. Press F1 to continue. -- Yoon Ha Lee, CONLANG
May 23 2018
On Wednesday, 23 May 2018 at 16:28:22 UTC, H. S. Teoh wrote:On Wed, May 23, 2018 at 02:34:07PM +0000, 12345swordy via Digitalmars-d wrote: [...]You can make an argument against security using that logic. Regardless there are many things that a web forum can do that a mailing list can't do.Can you please support actual web forms to prevent this impersonation?Unfortunately, "actual" web forums are just as prone to impersonation to someone determined enough. T
May 23 2018
On 23 May 2018 at 10:12, 12345swordy via Digitalmars-d <digitalmars-d puremagic.com> wrote:On Wednesday, 23 May 2018 at 16:28:22 UTC, H. S. Teoh wrote:One thing a web forum *can't* do, is enjoy my participation. ;) If I have to load a webpage and sign in... I'm out!On Wed, May 23, 2018 at 02:34:07PM +0000, 12345swordy via Digitalmars-d wrote: [...]You can make an argument against security using that logic. Regardless there are many things that a web forum can do that a mailing list can't do.Can you please support actual web forms to prevent this impersonation?Unfortunately, "actual" web forums are just as prone to impersonation to someone determined enough. T
May 23 2018
On Wed, May 23, 2018 at 10:28:33AM -0700, Manu via Digitalmars-d wrote:On 23 May 2018 at 10:12, 12345swordy via Digitalmars-d <digitalmars-d puremagic.com> wrote:[...]While I wouldn't say that I'd be out too, my participation will certainly be much less. But it seems we're in the minority here... T -- The right half of the brain controls the left half of the body. This means that only left-handed people are in their right mind. -- Manoj SrivastavaYou can make an argument against security using that logic. Regardless there are many things that a web forum can do that a mailing list can't do.One thing a web forum *can't* do, is enjoy my participation. ;) If I have to load a webpage and sign in... I'm out!
May 23 2018
On Wednesday, 23 May 2018 at 16:28:22 UTC, H. S. Teoh wrote:On Wed, May 23, 2018 at 02:34:07PM +0000, 12345swordy via Digitalmars-d wrote: [...]That's rather an extreme, not the norm. If something take 3 seconds to do, they may do it; something take more than a minute they may not do it. And it is really easy to impersonate on the current "forum" platform. Anyway, discourse support both worlds of forum and mailing list: https://github.com/discourse/discourseCan you please support actual web forms to prevent this impersonation?Unfortunately, "actual" web forums are just as prone to impersonation to someone determined enough. T
May 24 2018
On Wednesday, 23 May 2018 at 12:32:50 UTC, Steven Schveighoffer wrote:I'm just going to warn everyone here that one person is posting as KingJoffrey, VectorThis, Grady Booch, FuckYou, and in this thread he is impersonating 12345swordy, and in others he has impersonated WalterBright as well. -SteveAuch! I presume you are able to conclude this from looking at logs etc, thanks for letting us know. I wonder if the post in the name of BjarneStroustrup is from the same person. Impersonation is a criminal offense [1] and should not be joked with. It is also difficult to prevent in general. Impersonation of another forum member is possibly easier to detect. Maybe some sort of message signing could be implemented? Even without impersonation, individuals posting under multiple identities can only have unfair intents (especially in the same thread) and it would be nice if the forum could expose this automatically. It is a shame that this would require someone's time that could well be invested elsewhere, but maybe it's just part of growing pains. [1] https://sharpcriminalattorney.com/internet-crimes/4971/online-impersonation-the-little-brother-of-identity-theft/
May 23 2018
On 5/23/18 1:19 PM, Bastiaan Veelo wrote:On Wednesday, 23 May 2018 at 12:32:50 UTC, Steven Schveighoffer wrote:The IP address is included in the headers of the newsgroup. All of them came from the same IP. I have a filter on my thunderbird client to flag certain IPs, and his was added to the list recently.I'm just going to warn everyone here that one person is posting as KingJoffrey, VectorThis, Grady Booch, FuckYou, and in this thread he is impersonating 12345swordy, and in others he has impersonated WalterBright as well.Auch! I presume you are able to conclude this from looking at logs etc,thanks for letting us know. I wonder if the post in the name of BjarneStroustrup is from the same person.It was.Impersonation is a criminal offense [1] and should not be joked with. It is also difficult to prevent in general. Impersonation of another forum member is possibly easier to detect. Maybe some sort of message signing could be implemented? Even without impersonation, individuals posting under multiple identities can only have unfair intents (especially in the same thread) and it would be nice if the forum could expose this automatically. It is a shame that this would require someone's time that could well be invested elsewhere, but maybe it's just part of growing pains.I would like to see at least an inability to post with the same exact handle/name as someone who has an account with that name. Or at least put such posts through moderation first. -Steve
May 23 2018
On Wednesday, 23 May 2018 at 17:31:40 UTC, Steven Schveighoffer wrote:The IP address is included in the headers of the newsgroup. All of them came from the same IP. I have a filter on my thunderbird client to flag certain IPs, and his was added to the list recently.Then again, it's possible they're family members or neighbours using the same IP. How likely this is, I won't comment. I don't this is a case of inpersonation if you're right, since the aliases have not been trying to inpersonate any real, exact person. But dishonourable action nonetheless.
May 23 2018
On 24/05/2018 6:32 PM, Dukc wrote:On Wednesday, 23 May 2018 at 17:31:40 UTC, Steven Schveighoffer wrote:It's a dynamic IP, so it'll be invalid sooner rather than later.The IP address is included in the headers of the newsgroup. All of them came from the same IP. I have a filter on my thunderbird client to flag certain IPs, and his was added to the list recently.Then again, it's possible they're family members or neighbours using the same IP. How likely this is, I won't comment.
May 23 2018
On Thursday, 24 May 2018 at 06:32:23 UTC, Dukc wrote:On Wednesday, 23 May 2018 at 17:31:40 UTC, Steven Schveighoffer wrote:There was a post impersonating Steven, but I can't see it now so I guess it was removed.The IP address is included in the headers of the newsgroup. All of them came from the same IP. I have a filter on my thunderbird client to flag certain IPs, and his was added to the list recently.Then again, it's possible they're family members or neighbours using the same IP. How likely this is, I won't comment. I don't this is a case of inpersonation if you're right, since the aliases have not been trying to inpersonate any real, exact person. But dishonourable action nonetheless.
May 24 2018
On Thursday, 24 May 2018 at 06:32:23 UTC, Dukc wrote:On Wednesday, 23 May 2018 at 17:31:40 UTC, Steven Schveighoffer wrote:It was quite obvious that KingJoffrey could be the sock puppeteer as he was childish and unreasonable all along the thread about private class members.The IP address is included in the headers of the newsgroup. All of them came from the same IP. I have a filter on my thunderbird client to flag certain IPs, and his was added to the list recently.Then again, it's possible they're family members or neighbours using the same IP. How likely this is, I won't comment. I don't this is a case of inpersonation if you're right, since the aliases have not been trying to inpersonate any real, exact person. But dishonourable action nonetheless.
May 24 2018
On Wednesday, 23 May 2018 at 12:32:50 UTC, Steven Schveighoffer wrote:and in others he has impersonated WalterBright as well. -SteveSorry forgot that part in my last post. If that's true, it makes it VERY serious.
May 23 2018
On Thursday, May 24, 2018 06:42:21 Dukc via Digitalmars-d wrote:On Wednesday, 23 May 2018 at 12:32:50 UTC, Steven Schveighoffer wrote:It's true. There's at least one post where he posted as WalterBright (note the complete lack of spaces) and tried to make it look like Walter had decided that having private be restricted to the module rather than the class was a mistake. And if the lack of space in the name and the content weren't enough to figure out that it wasn't Walter, the headers made it clear that the post had come from the web forum, and AFAIK, Walter always posts using NNTP. This fellow has impersonated at least half a dozen people in the last couple of days. - Jonathan M Davisand in others he has impersonated WalterBright as well. -SteveSorry forgot that part in my last post. If that's true, it makes it VERY serious.
May 24 2018
On Thursday, 24 May 2018 at 07:07:48 UTC, Jonathan M Davis wrote:It's true.Should somebody of us make an Announce theard out of this?
May 24 2018
On 24/05/2018 7:12 PM, Dukc wrote:On Thursday, 24 May 2018 at 07:07:48 UTC, Jonathan M Davis wrote:No, they are not worth any more of anyone's time.It's true.Should somebody of us make an Announce theard out of this?
May 24 2018
On Thursday, 24 May 2018 at 07:07:48 UTC, Jonathan M Davis wrote:On Thursday, May 24, 2018 06:42:21 Dukc via Digitalmars-d wrote:That guy show so much salt by doing that.On Wednesday, 23 May 2018 at 12:32:50 UTC, Steven Schveighoffer wrote:It's true. There's at least one post where he posted as WalterBright (note the complete lack of spaces) and tried to make it look like Walter had decided that having private be restricted to the module rather than the class was a mistake. And if the lack of space in the name and the content weren't enough to figure out that it wasn't Walter, the headers made it clear that the post had come from the web forum, and AFAIK, Walter always posts using NNTP. This fellow has impersonated at least half a dozen people in the last couple of days. - Jonathan M Davisand in others he has impersonated WalterBright as well. -SteveSorry forgot that part in my last post. If that's true, it makes it VERY serious.
May 24 2018
On 05/24/2018 03:07 AM, Jonathan M Davis wrote:It's true. There's at least one post where he posted as WalterBright (note the complete lack of spaces) and tried to make it look like Walter had decided that having private be restricted to the module rather than the class was a mistake. And if the lack of space in the name and the content weren't enough to figure out that it wasn't Walter, the headers made it clear that the post had come from the web forum, and AFAIK, Walter always posts using NNTP. This fellow has impersonated at least half a dozen people in the last couple of days.The fake posts are also pretty easy to spot by their writing...*ahem* "style". The people being impersonated don't normally write in a way that sounds like barely-coherent trolling.
May 24 2018
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:Okay, I'm still really angry about the stupid stupid decision to make C++ namespaces into scopes rather than just a detail used for mangling, with absolutely no consultation of the community, in particular the target audience, who are unanimously annoyed as far as I can tell...+1 I see no reason for it. It's just mangling after all. Atila
May 23 2018
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:If we can use `alias this` to mirror an entire C++ namespace into the location we want (ie, the scope immediately outside the C++ namespace!!), then one sanitary line would make the problem quite more tolerable: extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all along (count the seconds until the reply that says to use reflection to scan the scope, and use a mixin to... blah blah)Had the same idea about a year ago :) https://forum.dlang.org/post/bmawbtdaqdngoiqfoswo forum.dlang.org
May 23 2018
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:alias this ¤%[&Off; // <-- symbols are now aliased where theyI think it could be with (¤%[&Off): also.
May 23 2018
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote:Okay, I'm still really angry about the stupid stupid decision to make C++ namespaces into scopes rather than just a detail used for mangling, with absolutely no consultation of the community, in particular the target audience, who are unanimously annoyed as far as I can tell... I'm unsatisfied by the work-arounds to make the situation not-suck, but I think I have an idea that would pacify me... If we can use `alias this` to mirror an entire C++ namespace into the location we want (ie, the scope immediately outside the C++ namespace!!), then one sanitary line would make the problem quite more tolerable: extern(C++, FuckOff) { void bah(); void humbug(); } alias this FuckOff; // <-- symbols are now aliased where they should have been all along (count the seconds until the reply that says to use reflection to scan the scope, and use a mixin to... blah blah)Would there be any use for this other than working around this problem with extern(C++) ? If not then perhaps changing the behavior to be what is desired would be better. If we change extern(C++, Namespace) to work only for mangling and not as a struct, then existing code would only need to create a new module with "Namespace" and statically import it to work with existing code. I'd rather the actual problem be fixed than having some work around for it. We don't even have multiple "alias this" in structs. If a new feature were to be added I'd rather it'd be that, which was "approved" but has yet to be included.
May 24 2018