Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Nick Sabalausky
"Chris NS" wrote in message news:ugopmohijjcnnrchu...@forum.dlang.org... > I'm pretty impressed with the idea, and look forward to its > implementation, but I do have one question. How does this affect (if at > all) the implicit "friend" relationship of declarations? Since package > "foo.bar

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Jonathan M Davis
On Saturday, March 31, 2012 06:23:32 Chris NS wrote: > I'm pretty impressed with the idea, and look forward to its > implementation, but I do have one question. How does this affect > (if at all) the implicit "friend" relationship of declarations? > Since package "foo.bar" is treated as a single m

Re: Poll of the week - How long have you been in the D world?

2012-03-30 Thread Chris NS
On Friday, 30 March 2012 at 22:28:40 UTC, H. S. Teoh wrote: On Fri, Mar 30, 2012 at 11:17:47PM +0100, Stewart Gordon wrote: On 26/03/2012 02:18, dnewbie wrote: >Just out of curiosity, is D attracting new users? Are the old >users running? Place your vote here >http://www.easypolls.net/poll.html?

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Chris NS
I'm pretty impressed with the idea, and look forward to its implementation, but I do have one question. How does this affect (if at all) the implicit "friend" relationship of declarations? Since package "foo.bar" is treated as a single module, do the classes in "foo/bar/alpha.d" and "foo/bar/

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Ary Manzana
On 3/30/12 10:46 PM, Andrei Alexandrescu wrote: Starting a new thread from one in announce: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 Please comment, after which Walter will approve. Walter's approval means that he would approve a pull request implementing DIP16 (subject to re

Re: Poll of the week - How long have you been in the D world?

2012-03-30 Thread H. S. Teoh
On Fri, Mar 30, 2012 at 11:17:47PM +0100, Stewart Gordon wrote: > On 26/03/2012 02:18, dnewbie wrote: > >Just out of curiosity, is D attracting new users? Are the old > >users running? Place your vote here > >http://www.easypolls.net/poll.html?p=4f6fb7e5e4b04f389e5eb66f > > I see that the numbers

Re: Poll of the week - How long have you been in the D world?

2012-03-30 Thread Stewart Gordon
On 26/03/2012 02:18, dnewbie wrote: Just out of curiosity, is D attracting new users? Are the old users running? Place your vote here http://www.easypolls.net/poll.html?p=4f6fb7e5e4b04f389e5eb66f I see that the numbers are almost evenly balanced between the four categories. But does this real

Re: rdmd

2012-03-30 Thread Andrei Alexandrescu
On 3/30/12 3:34 PM, zeljkog wrote: I suggest to add following line on top of rdmd main(): compiler = std.path.buildPath(std.path.dirName(args[0]), "dmd"); You may want to make it into a pull request. Thanks! Andrei

Re: Nested function bug?

2012-03-30 Thread Ed McCardell
On 03/30/2012 04:45 PM, Walter Bright wrote: On 3/30/2012 1:13 PM, Ed McCardell wrote: The code below demonstrates this (using DMD 2.058, no optimizations). Is this a bug? Looks like one. Please report this to http://d.puremagic.com/issues/enter_bug.cgi?product=D Done: http://d.puremagic.c

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Michel Fortin
On 2012-03-30 14:46:19 +, Andrei Alexandrescu said: Destroy! Since you're asking… One thing the current system avoids is unresolvable symbols. If two symbol name clashes, you just qualify them fully and it'll always be unambiguous. For instance: .std.algorithm.sort(…) Now,

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread H. S. Teoh
On Fri, Mar 30, 2012 at 05:35:25PM -0400, Jonathan M Davis wrote: [...] > But personally, I like the idea of making it so that publicly imported > symbols can be accessed as if they were in the module that publicly > imported them (with package.d being treated as if it had the same name > as the pa

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.1240.1333130858.4860.digitalmar...@puremagic.com... > > Still this is one of the few proposals I like. My only caveat is the > comment: "except the file is not allowed to use the "module" > declaration.". Wouldn't it be better if we explicitly decla

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Jonathan M Davis
On Friday, March 30, 2012 14:33:58 Andrei Alexandrescu wrote: > On 3/30/12 1:39 PM, Jonathan M Davis wrote: > > However, I'm very nervous about the second part. e.g. std.sort instead of > > std.algorithm.sort seems like a bad idea to me. It increases the odds of > > name conflicts for little benefi

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Nick Sabalausky
"Timon Gehr" wrote in message news:jl4jmg$2j1r$1...@digitalmars.com... > > I don't really like the second one. > > 1. It is an over-general solution, because it does not solve a general > problem. > > Maybe it would be better to just interpret foo.bar.baz as > foo.bar.package.baz if foo.bar is

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Nick Sabalausky
"Robert Clipsham" wrote in message news:jl4l5t$2m62$1...@digitalmars.com... > On 30/03/2012 15:46, Andrei Alexandrescu wrote: >> Starting a new thread from one in announce: >> >> http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 >> >> Please comment, after which Walter will approve. Wal

Re: Nested function bug?

2012-03-30 Thread Ed McCardell
On 03/30/2012 04:51 PM, Andrej Mitrovic wrote: You mean the result is 55 when you uncomment "return&nested;"? All asserts pass for me when I use that return. Otherwise when using "return&escaping;" I get: 1244764 1244764 4202631 2.058 win32. On 64-bit linux, the first two asserts always pass

Re: Nested function bug?

2012-03-30 Thread Andrej Mitrovic
On 3/30/12, Ed McCardell wrote: > The code below demonstrates this (using DMD 2.058, no optimizations). Is > this a bug? You mean the result is 55 when you uncomment "return &nested;"? All asserts pass for me when I use that return. Otherwise when using "return &escaping;" I get: 1244764 1244764

Re: Nested function bug?

2012-03-30 Thread Walter Bright
On 3/30/2012 1:13 PM, Ed McCardell wrote: I ran into a strange and hard-to-describe problem with nested functions closing over the argument to their enclosing function. When a nested function (A) returns the value of another nested function (B) that returns a parameter of the enclosing function

rdmd

2012-03-30 Thread zeljkog
I suggest to add following line on top of rdmd main(): compiler = std.path.buildPath(std.path.dirName(args[0]), "dmd");

Nested function bug?

2012-03-30 Thread Ed McCardell
I ran into a strange and hard-to-describe problem with nested functions closing over the argument to their enclosing function. When a nested function (A) returns the value of another nested function (B) that returns a parameter of the enclosing function (C), and when (A) is returned from (C)

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread F i L
On Friday, 30 March 2012 at 18:15:57 UTC, Brad Anderson wrote: On Fri, Mar 30, 2012 at 12:06 PM, Andrej Mitrovic < andrej.mitrov...@gmail.com> wrote: On 3/30/12, Andrei Alexandrescu wrote: > Destroy! "That means a program that imports std.algorithm may use "std.sort" for the symbol "std.al

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Nick Sabalausky
My comments: 1. My first impression was that using "foo/bar/package.d" instead of "foo/bar.d" seemed a bit odd and messy. But I realize now that cleverly solves the issue where "foo/bar.d" would be considered to be inside a different package from "foo/bar/*.d". So I like that. Personally, I thi

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Andrei Alexandrescu
On 3/30/12 1:39 PM, Jonathan M Davis wrote: However, I'm very nervous about the second part. e.g. std.sort instead of std.algorithm.sort seems like a bad idea to me. It increases the odds of name conflicts for little benefit. Example? Not to mention, it'll make it a lot more confusing to find

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Rene Zwanenburg
On Friday, 30 March 2012 at 18:39:44 UTC, Jonathan M Davis wrote: I'd propose that we make it so that if a module publicly imports another module, then you could treat it as if it were in that module. So, because std.datetime.package publicly imports std.datetime.systime, you could use std.dat

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Jonathan M Davis
On Friday, March 30, 2012 12:15:44 Brad Anderson wrote: > On Fri, Mar 30, 2012 at 12:06 PM, Andrej Mitrovic < > > andrej.mitrov...@gmail.com> wrote: > > On 3/30/12, Andrei Alexandrescu wrote: > > > Destroy! > > > > "That means a program that imports std.algorithm may use "std.sort" > > for the s

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Jonathan M Davis
On Friday, March 30, 2012 20:06:57 Andrej Mitrovic wrote: > On 3/30/12, Andrei Alexandrescu wrote: > > Destroy! > > "That means a program that imports std.algorithm may use "std.sort" > for the symbol "std.algorithm.sort"." > > That's quite interesting. Would that also mean that you could do: >

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Jonathan M Davis
On Friday, March 30, 2012 09:46:19 Andrei Alexandrescu wrote: > Starting a new thread from one in announce: > > http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 > > Please comment, after which Walter will approve. Walter's approval means > that he would approve a pull request implement

Re: git dmd broken for posix?

2012-03-30 Thread Walter Bright
On 3/28/2012 8:18 AM, Trass3r wrote: The autotester has been showing a broken dmd testsuite for a while: http://d.puremagic.com/test-results/ Any bugzilla entry/pull request I may have missed? My fault. It's all green now.

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Andrej Mitrovic
On 3/30/12, Andrei Alexandrescu wrote: > http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 Btw, I bet with the help of hackers like e.g. Kenji Hara we'll have this implemented in a matter of days (if it gets accepted). Compare that to having a C++ committee that would spend the next 5 y

Re: Having trouble setting up libcurl on Windows 7

2012-03-30 Thread Gleb
On Friday, 30 March 2012 at 17:19:30 UTC, Brad Anderson wrote: You can find a proper win32.mak here: https://gist.github.com/3816217ffd041d62d6bd It worked like a charm! Thanks a lot!

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Brad Anderson
On Fri, Mar 30, 2012 at 12:06 PM, Andrej Mitrovic < andrej.mitrov...@gmail.com> wrote: > On 3/30/12, Andrei Alexandrescu wrote: > > Destroy! > > "That means a program that imports std.algorithm may use "std.sort" > for the symbol "std.algorithm.sort"." > > That's quite interesting. Would that als

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Andrej Mitrovic
On 3/30/12, Andrei Alexandrescu wrote: > Destroy! "That means a program that imports std.algorithm may use "std.sort" for the symbol "std.algorithm.sort"." That's quite interesting. Would that also mean that you could do: import std.algorithm; // has indexOf import std.string; // has indexOf v

Re: Having trouble setting up libcurl on Windows 7

2012-03-30 Thread Brad Anderson
On Fri, Mar 30, 2012 at 1:52 AM, Gleb wrote: > Hi guys! > > Brad Anderson Wrote: > > On Thu, Mar 15, 2012 at 3:10 AM, Gavin wrote: > > 2.058 for Windows was released without std.net.curl built in. You'll have > > to rebuild phobos to get it working. It's not too hard though. > I tried to rebuild

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Steven Schveighoffer
On Fri, 30 Mar 2012 10:46:19 -0400, Andrei Alexandrescu wrote: Starting a new thread from one in announce: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 Please comment, after which Walter will approve. Walter's approval means that he would approve a pull request implementing

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Robert Clipsham
On 30/03/2012 15:46, Andrei Alexandrescu wrote: Starting a new thread from one in announce: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 Please comment, after which Walter will approve. Walter's approval means that he would approve a pull request implementing DIP16 (subject to re

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Timon Gehr
On second thought, issue 2 is probably not that much of a problem.

Re: Official deprecation dates, -property

2012-03-30 Thread Marco Leise
Am Wed, 21 Mar 2012 03:30:02 +0100 schrieb "bearophile" : > > Here I have used () on a property. Currently -property > > enforces the usage of () on non-properties. But my logic tells > > me that it should also do the opposite and show an error if you > > use () with a @property method. What d

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread Timon Gehr
On 03/30/2012 04:46 PM, Andrei Alexandrescu wrote: Starting a new thread from one in announce: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 Please comment, after which Walter will approve. Walter's approval means that he would approve a pull request implementing DIP16 (subject to

Re: How to use D for cross platform development?

2012-03-30 Thread Michel Fortin
On 2012-03-30 12:34:50 +, Jacob Carlborg said: On 2012-03-30 13:09, Michel Fortin wrote: Indeed. And the approach makes much more sense. Only I don't really have time for compiler hacking these days. I still hope I'll be able to continue it later this year. I don't know if you have seen

Re: DIP16: Transparently substitute module with package

2012-03-30 Thread deadalnix
Le 30/03/2012 16:46, Andrei Alexandrescu a écrit : Starting a new thread from one in announce: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP16 Please comment, after which Walter will approve. Walter's approval means that he would approve a pull request implementing DIP16 (subject to

Re: Documentation Layout

2012-03-30 Thread Andrej Mitrovic
On 3/30/12, Marco Leise wrote: > snip Here's another mind-bender: import std.typetuple; Tuple!(int, int) x; // bz It's in std.typecons of all places. I would assume a tuple would be in a module called typetuple, but no.

Re: Documentation Layout

2012-03-30 Thread Marco Leise
Am Wed, 28 Mar 2012 18:40:17 +0200 schrieb "Nathan M. Swan" : > That's pretty cool! I especially like the categories idea; it > reminds me of Apple's documentation for Cocoa. It really helps > you when you are thinking "I need a function which does...". > > NMS Unfortunately the function that

Re: How to use D for cross platform development?

2012-03-30 Thread Jacob Carlborg
On 2012-03-30 13:09, Michel Fortin wrote: Indeed. And the approach makes much more sense. Only I don't really have time for compiler hacking these days. I still hope I'll be able to continue it later this year. I don't know if you have seen this, but I took the liberty to add your project as a

Re: How to use D for cross platform development?

2012-03-30 Thread Michel Fortin
On 2012-03-29 16:36:55 +, Jacob Carlborg said: Both I and Michel have created an Objective-C/D bridge that uses this approach. It lets you call Objective-C methods, create instances of Objective-C classes, create subclasses in D that inherit from Objective-C classes and so on. It did this

Re: How to use D for cross platform development?

2012-03-30 Thread Chris W.
That's all great stuff. Thanks guys. I think in this respect D could really take off, i.e. as the natively compiled, portable "core language" that can easily interface to platform specific frameworks through C and C++. This, among other things, got me interested in D in the first place. I think

Re: structs, tids, and concurrency.

2012-03-30 Thread Timon Gehr
On 03/30/2012 10:18 AM, Nathan M. Swan wrote: Nesting a Tid in a struct is interpreted as having local aliasing, though a bare Tid is not. http://d.puremagic.com/issues/show_bug.cgi?id=4957

structs, tids, and concurrency.

2012-03-30 Thread Nathan M. Swan
Nesting a Tid in a struct is interpreted as having local aliasing, though a bare Tid is not. This doesn't work, though commenting out "receiveOnly!S()" and "tid.send(S(thisTid))" works: - import std.stdio; import std.concurrency; void main() { auto thread = spawn(function void(Tid tid

Re: Having trouble setting up libcurl on Windows 7

2012-03-30 Thread Gleb
Hi guys! Brad Anderson Wrote: > On Thu, Mar 15, 2012 at 3:10 AM, Gavin wrote: > 2.058 for Windows was released without std.net.curl built in. You'll have > to rebuild phobos to get it working. It's not too hard though. I tried to rebuild Phobos using the instructions from this thread, but I didn'