Re: video games (was Re: UFCS for D)

2012-03-30 Thread Nick Sabalausky
"Adam D. Ruppe" wrote in message news:vcadggwxsbxhdkjhr...@forum.dlang.org... > On Friday, 30 March 2012 at 22:43:00 UTC, Nick Sabalausky wrote: >> But that would *never* happen under US-style IP law. > > You know what's funny: I used to use an Atari ac adapter > for my Sega. (still do, when I ac

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/30/2012 5:25 PM, Walter Bright wrote: Ah, I know how to fix it. Mark such instantiations as "local" ones, so they are mangled with the module name of where they were instantiated from. http://d.puremagic.com/issues/show_bug.cgi?id=7802

Re: video games (was Re: UFCS for D)

2012-03-30 Thread Nick Sabalausky
"Bernard Helyer" wrote in message news:jiioyfihtaqhpjafg...@forum.dlang.org... >> Eeewww, I hate playing games on a PC: >> >> - Too many other processes to screw up the experience. > > Maybe if you were basing your experiences off of Windows 95. > Actually, it was pretty good back then, I'm thin

Re: video games (was Re: UFCS for D)

2012-03-30 Thread Adam D. Ruppe
On Friday, 30 March 2012 at 22:43:00 UTC, Nick Sabalausky wrote: Oh *definitely*. BTW, Wii homebrew is *fantastic* for that. I don't have one of those thingys though. But that would *never* happen under US-style IP law. You know what's funny: I used to use an Atari ac adapter for my Sega. (

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/30/2012 12:36 PM, Walter Bright wrote: On 3/30/2012 12:11 PM, Steven Schveighoffer wrote: On Fri, 30 Mar 2012 14:27:43 -0400, Walter Bright wrote: I would argue that: 3. An extension method for an argument of type template parameter T will be looked up only in the instantiation scope.

Re: video games (was Re: UFCS for D)

2012-03-30 Thread Bernard Helyer
Eeewww, I hate playing games on a PC: - Too many other processes to screw up the experience. Maybe if you were basing your experiences off of Windows 95. - I spent sooo many hours every day *working* at the computer desk, I *don't* want to be be glued to it for my entertainment, too. - Ev

Re: video games (was Re: UFCS for D)

2012-03-30 Thread Nick Sabalausky
"Adam D. Ruppe" wrote in message news:ftnddrqdfbrtxiiwe...@forum.dlang.org... > On Friday, 30 March 2012 at 21:03:21 UTC, Nick Sabalausky wrote: >> Problem is, it also corrodes the connectors. > > Yea. But oh well, it can't be too bad... my old games > all still work! > > Though, nowadays I tend

Re: UFCS for D

2012-03-30 Thread Piotr Szturmaj
Walter Bright wrote: On 3/30/2012 4:24 AM, Piotr Szturmaj wrote: Walter Bright wrote: I think it's far superior to the explicit friend thing in C++. Just curious. Did you take it from Delphi? :-) No. I've never looked at Delphi in detail. But in any case, for any language feature, there's a

OT: video games (was Re: UFCS for D)

2012-03-30 Thread Adam D. Ruppe
On Friday, 30 March 2012 at 21:03:21 UTC, Nick Sabalausky wrote: Problem is, it also corrodes the connectors. Yea. But oh well, it can't be too bad... my old games all still work! Though, nowadays I tend to prefer the emulators. I have a playstation controller on usb, which works for all the o

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Adam D. Ruppe" wrote in message news:udpabjwyzxlollbiz...@forum.dlang.org... > On Friday, 30 March 2012 at 11:21:02 UTC, Steven Schveighoffer wrote: >> 4. Blow in bottom of cartridge, even though the pins are clean and free >> of dust (did this actually ever do anything?) > > My hypothesis is i

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.wbzdtbo0eav7ka@localhost.localdomain... > On Fri, 30 Mar 2012 04:21:12 -0400, Nick Sabalausky wrote: > >> "Nick Sabalausky" wrote in message >> news:jl3n59$qf7$1...@digitalmars.com... >>> >>> Of course, I don't expect software to be as super-fine-

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"deadalnix" wrote in message news:jl47vt$1old$5...@digitalmars.com... > Le 30/03/2012 07:29, Nick Sabalausky a écrit : >> "Steven Schveighoffer" wrote in message >> news:kgwyziwlndczqtafb...@forum.dlang.org... >>> On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: Yea, th

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Adam D. Ruppe" wrote in message news:idxacwhjfymfbmezl...@forum.dlang.org... > On Friday, 30 March 2012 at 12:10:32 UTC, deadalnix wrote: >> For the ease of distribution, you can use a module with public import in >> it. > > There's still a few things I don't like though, about > downloading an

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/30/2012 12:11 PM, Steven Schveighoffer wrote: On Fri, 30 Mar 2012 14:27:43 -0400, Walter Bright wrote: I would argue that: 3. An extension method for an argument of type template parameter T will be looked up only in the instantiation scope. I don't think you looked at my counter case

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"deadalnix" wrote in message news:jl47k0$1old$2...@digitalmars.com... > Le 30/03/2012 12:57, foobar a écrit : >> On Friday, 30 March 2012 at 10:22:18 UTC, Walter Bright wrote: >>> On 3/30/2012 2:15 AM, Nick Sabalausky wrote: > Andrei and I have talked about it, and we think it is because of >

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:jl4d2e$24i1$1...@digitalmars.com... > On 2012-03-30 14:07, deadalnix wrote: >> all.d this the de facto standard here. I think it should become an >> official guideline. > > Why can't we get "import foo.*;", then we don't have to relay on > guidelines. > Th

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 14:27:43 -0400, Walter Bright wrote: I would argue that: 3. An extension method for an argument of type template parameter T will be looked up only in the instantiation scope. I don't think you looked at my counter case in detail. Your idea leads to two different

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/29/2012 4:34 PM, Steven Schveighoffer wrote: But I realized after typing about 2 messages in response to this (and deleting them), you are right, there is a fundamental problem here. Because the template instantiation is based solely on the type. It does *not* include the type and whatever o

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/30/2012 4:24 AM, Piotr Szturmaj wrote: Walter Bright wrote: I think it's far superior to the explicit friend thing in C++. Just curious. Did you take it from Delphi? :-) No. I've never looked at Delphi in detail. But in any case, for any language feature, there's always another language

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 10:48:04 -0400, deadalnix wrote: Le 30/03/2012 14:52, Steven Schveighoffer a écrit : On Fri, 30 Mar 2012 08:22:12 -0400, deadalnix wrote: Immagine you want to define your own to!xxx() for your type xxx. (It is dumb case because you have toString, but an interesting exerc

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 10:39:09 -0400, Jacob Carlborg wrote: On 2012-03-30 14:52, Steven Schveighoffer wrote: Why would there be ambiguities? Unlike C include files, D modules are consistently compiled, unaffected by importing other modules. What about static-if and string mixins? This C co

Re: UFCS for D

2012-03-30 Thread Andrei Alexandrescu
On 3/30/12 9:32 AM, deadalnix wrote: Le 30/03/2012 16:24, Andrei Alexandrescu a écrit : On 3/30/12 3:20 AM, Walter Bright wrote: There has been a trend in Phobos of having some truly gigantic modules. I believe this is indicative of a problem in the language. Andrei and I have talked about it,

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 14:52, Steven Schveighoffer a écrit : On Fri, 30 Mar 2012 08:22:12 -0400, deadalnix wrote: Le 30/03/2012 14:13, Steven Schveighoffer a écrit : On Fri, 30 Mar 2012 08:10:14 -0400, deadalnix wrote: I would expect this not to work, because bar isn't defined in module1 and templa

Re: UFCS for D

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 16:17, Adam D. Ruppe wrote: On Friday, 30 March 2012 at 12:10:32 UTC, deadalnix wrote: For the ease of distribution, you can use a module with public import in it. There's still a few things I don't like though, about downloading and compiling several modules. When it is just on

Re: UFCS for D

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 14:52, Steven Schveighoffer wrote: Why would there be ambiguities? Unlike C include files, D modules are consistently compiled, unaffected by importing other modules. What about static-if and string mixins? -- /Jacob Carlborg

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 16:24, Andrei Alexandrescu a écrit : On 3/30/12 3:20 AM, Walter Bright wrote: There has been a trend in Phobos of having some truly gigantic modules. I believe this is indicative of a problem in the language. Andrei and I have talked about it, and we think it is because of difficul

Re: UFCS for D

2012-03-30 Thread Andrei Alexandrescu
On 3/30/12 3:20 AM, Walter Bright wrote: There has been a trend in Phobos of having some truly gigantic modules. I believe this is indicative of a problem in the language. Andrei and I have talked about it, and we think it is because of difficulties in breaking a module up into submodules of a pa

Re: UFCS for D

2012-03-30 Thread Adam D. Ruppe
On Friday, 30 March 2012 at 12:10:32 UTC, deadalnix wrote: For the ease of distribution, you can use a module with public import in it. There's still a few things I don't like though, about downloading and compiling several modules. When it is just one, you can download the single file and add

Re: UFCS for D

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 14:07, deadalnix wrote: all.d this the de facto standard here. I think it should become an official guideline. Why can't we get "import foo.*;", then we don't have to relay on guidelines. -- /Jacob Carlborg

Re: UFCS for D

2012-03-30 Thread Adam D. Ruppe
On Friday, 30 March 2012 at 11:21:02 UTC, Steven Schveighoffer wrote: 4. Blow in bottom of cartridge, even though the pins are clean and free of dust (did this actually ever do anything?) My hypothesis is it was actually the moisture that made a better connection. I'd like to test this now...

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 08:22:12 -0400, deadalnix wrote: Le 30/03/2012 14:13, Steven Schveighoffer a écrit : On Fri, 30 Mar 2012 08:10:14 -0400, deadalnix wrote: I would expect this not to work, because bar isn't defined in module1 and template are supposed to use declaration scope, not insta

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 02:10, Steven Schveighoffer a écrit : On Wed, 28 Mar 2012 20:21:41 -0400, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/ Andrei Is anyone else's computer complaining about drdobbs having an invalid certifi

Re: UFCS for D

2012-03-30 Thread bls
On 03/30/2012 05:06 AM, deadalnix wrote: Le 30/03/2012 11:40, bls a écrit : On 03/30/2012 02:15 AM, Nick Sabalausky wrote: Eh? Other people have voiced concerns over that since waaay back in even pre-D1 times. In particular, many people have argued for allowing modules with the same name as a p

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 14:13, Steven Schveighoffer a écrit : On Fri, 30 Mar 2012 08:10:14 -0400, deadalnix wrote: I would expect this not to work, because bar isn't defined in module1 and template are supposed to use declaration scope, not instantiation scope (unless it is mixin template). Right, I t

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 08:10:14 -0400, deadalnix wrote: I would expect this not to work, because bar isn't defined in module1 and template are supposed to use declaration scope, not instantiation scope (unless it is mixin template). Right, I think it's the way it works now. But consider that

Re: UFCS for D

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 11:15, Nick Sabalausky wrote: I thought that was a deliberate Phobos style convention. I'm certain I remember you and/or Andrei talking here about a year or two ago about how you didn't want Phobos modules broken up into separate implemetation modules. I recognize that as well.

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 07:29, Nick Sabalausky a écrit : "Steven Schveighoffer" wrote in message news:kgwyziwlndczqtafb...@forum.dlang.org... On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: Yea, that occurred to me, too.I've been starting to think more and more that the "everything in

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 04:13, Adam D. Ruppe a écrit : On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: I've been starting to think more and more that the "everything in a module is a friend" was a mistake,and that we should have instead just had a "module" access specifier like we have "p

Re: UFCS for D

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 10:36, Andrej Mitrovic wrote: On 3/30/12, Walter Bright wrote: There has been a trend in Phobos of having some truly gigantic modules. I believe this is indicative of a problem in the language. Ignoring that there are still a few import bugs, you can split functionality into mul

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 01:34, Steven Schveighoffer a écrit : On Wed, 28 Mar 2012 21:53:57 -0400, Jesse Phillips wrote: I won't be going out of my way to check this, but there is a mention of adding the range primatives. This works, but it doesn't make the class a range for any other module, so std.algo

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 12:57, foobar a écrit : On Friday, 30 March 2012 at 10:22:18 UTC, Walter Bright wrote: On 3/30/2012 2:15 AM, Nick Sabalausky wrote: Andrei and I have talked about it, and we think it is because of difficulties in breaking a module up into submodules of a package. We think it's som

Re: UFCS for D

2012-03-30 Thread deadalnix
Le 30/03/2012 11:40, bls a écrit : On 03/30/2012 02:15 AM, Nick Sabalausky wrote: Eh? Other people have voiced concerns over that since waaay back in even pre-D1 times. In particular, many people have argued for allowing modules with the same name as a package. Ie: you could have both module "fo

Re: UFCS for D

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 10:20, Walter Bright wrote: There has been a trend in Phobos of having some truly gigantic modules. I believe this is indicative of a problem in the language. Andrei and I have talked about it, and we think it is because of difficulties in breaking a module up into submodules of a

Re: UFCS for D

2012-03-30 Thread Piotr Szturmaj
Walter Bright wrote: On 3/29/2012 5:09 PM, Steven Schveighoffer wrote: The reason being, if you change anything in class A, you do not have to worry about the implementation of getXSquared, because it simply has no access to the private implementation. You only have to worry about internal metho

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 04:21:12 -0400, Nick Sabalausky wrote: "Nick Sabalausky" wrote in message news:jl3n59$qf7$1...@digitalmars.com... Yea, I've seen that. It's a very good article, though. Although I've been saying this since before that article, and even before multi-cores. Contrary to

Re: UFCS for D

2012-03-30 Thread foobar
On Friday, 30 March 2012 at 10:22:18 UTC, Walter Bright wrote: On 3/30/2012 2:15 AM, Nick Sabalausky wrote: Andrei and I have talked about it, and we think it is because of difficulties in breaking a module up into submodules of a package. We think it's something we need to address. Eh? Oth

Re: UFCS for D

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 02:42:03 -0400, Walter Bright wrote: On 3/29/2012 6:57 PM, Nick Sabalausky wrote: How the heck does that improve encapsualtion? With D's implicit friends, it *doesn't*, it's just shifting things around. There is NO encapsualtion benefit there. Like Steven said, to *get*

Re: UFCS for D

2012-03-30 Thread foobar
On Friday, 30 March 2012 at 01:55:23 UTC, Nick Sabalausky wrote: Yea, that occurred to me, too. I've been starting to think more and more that the "everything in a module is a friend" was a mistake, and that we should have instead just had a "module" access specifier like we have "package".

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/30/2012 2:15 AM, Nick Sabalausky wrote: Andrei and I have talked about it, and we think it is because of difficulties in breaking a module up into submodules of a package. We think it's something we need to address. Eh? Other people have voiced concerns over that since waaay back in even

Re: UFCS for D

2012-03-30 Thread bls
On 03/30/2012 02:15 AM, Nick Sabalausky wrote: Eh? Other people have voiced concerns over that since waaay back in even pre-D1 times. In particular, many people have argued for allowing modules with the same name as a package. Ie: you could have both module "foo" and module "foo.bar". This is a

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Walter Bright" wrote in message news:jl3qds$10ga$1...@digitalmars.com... > On 3/30/2012 12:18 AM, Nick Sabalausky wrote: >> While there are definitely times I need to access private state across >> separate components within a module, I find such cases are fairly >> uncommon, >> so I question t

Re: UFCS for D

2012-03-30 Thread Andrej Mitrovic
On 3/30/12, Walter Bright wrote: > There has been a trend in Phobos of having some truly gigantic modules. I > believe this is indicative of a problem in the language. Ignoring that there are still a few import bugs, you can split functionality into multiple modules and use one module per package

Re: UFCS for D

2012-03-30 Thread dennis luehring
or just use http://cdburnerxp.se/ Am 30.03.2012 10:30, schrieb Nick Sabalausky: "Walter Bright" wrote in message news:jl3l0c$jn2$1...@digitalmars.com... On 3/29/2012 7:05 PM, Nick Sabalausky wrote: I don't understand why people think it's ok for basic, basic shit that would have ran fine

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Walter Bright" wrote in message news:jl3l0c$jn2$1...@digitalmars.com... > On 3/29/2012 7:05 PM, Nick Sabalausky wrote: >> I don't understand why people think it's ok for basic, basic shit that >> would >> have ran fine on a Pentium 1 (and less) to now require what quite >> literally >> is a su

Re: UFCS for D

2012-03-30 Thread Walter Bright
On 3/30/2012 12:18 AM, Nick Sabalausky wrote: While there are definitely times I need to access private state across separate components within a module, I find such cases are fairly uncommon, so I question the wisdom of making it the default behavior. If your module has grown so large that you

Re: UFCS for D

2012-03-30 Thread Timon Gehr
On 03/30/2012 01:45 AM, bearophile wrote: Timon Gehr: I think the article does not mention that it also works for primitive types. But there is a small problem with primitive properties: http://d.puremagic.com/issues/show_bug.cgi?id=7773 Bye, bearophile Yes, I have never understood why bui

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:jl3n59$qf7$1...@digitalmars.com... > "Jacob Carlborg" wrote in message > news:jl3kar$ie4$1...@digitalmars.com... >> On 2012-03-30 04:05, Nick Sabalausky wrote: >>> "Walter Bright" wrote in message True, but I upgraded recently to 64 bit Win 7,

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Jacob Carlborg" wrote in message news:jl3kar$ie4$1...@digitalmars.com... > On 2012-03-30 04:05, Nick Sabalausky wrote: >> "Walter Bright" wrote in message >>> >>> True, but I upgraded recently to 64 bit Win 7, with a 6 core processor >>> and >>> SSD drive. Reddit seems a lot zippier :-) >> >>

Re: UFCS for D

2012-03-30 Thread Nick Sabalausky
"Walter Bright" wrote in message news:jl3kkf$j4b$1...@digitalmars.com... > On 3/29/2012 6:57 PM, Nick Sabalausky wrote: >> How the heck does that improve encapsualtion? With D's implicit friends, >> it >> *doesn't*, it's just shifting things around. There is NO encapsualtion >> benefit there. Li