Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-21 Thread ilya-stromberg
On Friday, 20 December 2013 at 22:40:16 UTC, Timon Gehr wrote: http://wiki.dlang.org/DIP49 Improved points from version 1: - Swap meanings of 'this(this) inout' and 'this(this) const' - Inout postblit now covers all cheap (== not rebind indirections) copies between same qualifiers Kenji Hara

Re: phobos dependencies

2013-12-21 Thread Dmitry Olshansky
21-Dec-2013 00:43, Martin Nowak пишет: On 12/20/2013 06:27 PM, Andrei Alexandrescu wrote: I had this idea fot a while, and Walter is favorable of it as well - extend "import" for one-shot use. With that feature the example would become: void topN(alias less = "a < b", SwapStr

Re: phobos dependencies

2013-12-21 Thread Chris Cain
On Saturday, 21 December 2013 at 08:08:42 UTC, Dmitry Olshansky wrote: That has the disadvantage of importing the whole std.range. I seriously doubt that we'd get anything better then: > import std.range.traits; > > void foo(R)(R range) if (isForwardRange!R) > { import std.range; ... > }

Re: Nginx to D ?

2013-12-21 Thread Russel Winder
On Fri, 2013-12-20 at 22:44 +0100, Larry wrote: > Now, > > I assume that it is very fast. But there are no benchmarks under > heavy loads. > > It seems very good but not really commonly used. Well it is relatively new, and not many people know about D and fewer about Vibe.d. If you use it other

Re: Go compiler moving from C to Go

2013-12-21 Thread Russel Winder
On Fri, 2013-12-20 at 22:05 +0100, Jacob Carlborg wrote: […] > When developing an OS, for somethings these languages are not enough, > including C, Go and D. You need to use assembly. D has the advantage of > supporting inline assembly. C, C++, Go, D have the advantage of using separate files wi

Re: D archeology

2013-12-21 Thread yazd
There is something weird. How does UFCS compile since the earliest versions? http://www.luismarques.eu/d/archeology/56CDCBDBE4688E996548A3F39E63843ADEFBF570

Re: D archeology

2013-12-21 Thread Jakob Ovrum
On Saturday, 21 December 2013 at 10:20:58 UTC, yazd wrote: There is something weird. How does UFCS compile since the earliest versions? http://www.luismarques.eu/d/archeology/56CDCBDBE4688E996548A3F39E63843ADEFBF570 It has always worked for slices. The recent change expanded it to work with an

Re: D archeology

2013-12-21 Thread Daniel Murphy
""Luís Marques " <=?UTF-8?B?Ikx1w61z?= Marques > wrote in message news:lwzpootzzqxwbpcex...@forum.dlang.org... > Hi, > > My memory of the timeline of D features is quite fuzzy, so I created a > service to test snippets of D source code with *all* of the DMD versions > publicly available. > > Ri

Re: Go compiler moving from C to Go

2013-12-21 Thread Jacob Carlborg
On 2013-12-21 07:26, Paulo Pinto wrote: However you do touch a nice point, even ANSI/ISO C needs to rely on external assemblers to be useful at systems level. This is something developers forget when they equate language == what my compiler supports. You will most likely not be able to rely on

Re: Go compiler moving from C to Go

2013-12-21 Thread Jacob Carlborg
On 2013-12-21 11:14, Russel Winder wrote: Inline assembly language is a huge disadvantage in many (most?) case. I don't know. Would you like to move all the current inline assembly in druntime to their own files? I don't use assembly myself but it seems convenient to have support for inline

Re: D archeology

2013-12-21 Thread Jacob Carlborg
On 2013-12-21 01:22, "Luís Marques" " wrote: Hi, My memory of the timeline of D features is quite fuzzy, so I created a service to test snippets of D source code with *all* of the DMD versions publicly available. Right now the service is *very* in the rough and the UI is butt ugly (it just outp

Re: phobos dependencies

2013-12-21 Thread Dicebot
On Saturday, 21 December 2013 at 08:08:42 UTC, Dmitry Olshansky wrote: That has the disadvantage of importing the whole std.range. I seriously doubt that we'd get anything better then: > import std.range.traits; > > void foo(R)(R range) if (isForwardRange!R) > { import std.range; ... > }

Re: D archeology

2013-12-21 Thread yazd
On Saturday, 21 December 2013 at 10:34:20 UTC, Jakob Ovrum wrote: On Saturday, 21 December 2013 at 10:20:58 UTC, yazd wrote: There is something weird. How does UFCS compile since the earliest versions? http://www.luismarques.eu/d/archeology/56CDCBDBE4688E996548A3F39E63843ADEFBF570 It has alway

Re: Go compiler moving from C to Go

2013-12-21 Thread Russel Winder
On Sat, 2013-12-21 at 14:03 +0100, Jacob Carlborg wrote: > On 2013-12-21 11:14, Russel Winder wrote: > > > Inline assembly language is a huge disadvantage in many (most?) case. > > I don't know. Would you like to move all the current inline assembly in > druntime to their own files? I don't use

Re: Language Reference

2013-12-21 Thread ilya-stromberg
On Thursday, 19 December 2013 at 22:11:33 UTC, Martin Nowak wrote: And there is also a cmdline tool to do this, dman. I didn't know about it. How can I download it? Also, can we add a link to the `dman` at the http://dlang.org/download.html page (or at some similar place)?

Using std.container with std.allocator

2013-12-21 Thread Etienne
I'm trying to implement a caching container that cleans up after its items based on expiration of nodes. I'd like to use the new std.allocator to make sure it's restricted to a region in memory. The documentation of std.container states that Array uses malloc/free, but does it fallback on the

Re: phobos dependencies

2013-12-21 Thread Andrei Alexandrescu
On 12/21/13 12:08 AM, Dmitry Olshansky wrote: 21-Dec-2013 00:43, Martin Nowak пишет: On 12/20/2013 06:27 PM, Andrei Alexandrescu wrote: I had this idea fot a while, and Walter is favorable of it as well - extend "import" for one-shot use. With that feature the example would become: void

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Timon Gehr
On 12/20/2013 09:48 PM, Martin Nowak wrote: I updated DIP22 - Private symbol visibility with my findings from implementing the 'Hide module members' pull request. https://github.com/D-Programming-Language/dmd/pull/739 I don't have much time to cope with the topic but any feedback is welcome.

Re: Go compiler moving from C to Go

2013-12-21 Thread Paulo Pinto
On 21.12.2013 14:03, Jacob Carlborg wrote: On 2013-12-21 11:14, Russel Winder wrote: Inline assembly language is a huge disadvantage in many (most?) case. I don't know. Would you like to move all the current inline assembly in druntime to their own files? I don't use assembly myself but it se

Re: Go compiler moving from C to Go

2013-12-21 Thread Araq
Inline assembly means you have to have the assembly code for each supported platform in the code with all the conditionals to the compiler. Having separate files is often much easier to manage and to build from. No, that's a completely orthogonal issue: You can easily have architecture depe

Re: Go compiler moving from C to Go

2013-12-21 Thread Walter Bright
On 12/21/2013 6:44 AM, Russel Winder wrote: Inline assembly means you have to have the assembly code for each supported platform in the code with all the conditionals to the compiler. Having separate files is often much easier to manage and to build from. You can still put D inline assembly in

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On Saturday, 21 December 2013 at 17:41:32 UTC, Timon Gehr wrote: Adding a private symbol to an overload set can break 3rd party code with these rules. Yes, this is understood, but it seems like a good tradeoff when compared to the alternative where overload resolution depends on look-up origi

Re: DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

2013-12-21 Thread Timon Gehr
On 12/21/2013 03:57 AM, deadalnix wrote: Just watched this presentation : http://www.infoq.com/presentations/functional-pros-cons Skip to minute 28 to understand what we are discussing here about the magical unique. At minute 28 he starts discussing Monads using Dart-like syntax.

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Dicebot
On Saturday, 21 December 2013 at 19:29:28 UTC, Martin Nowak wrote: Yes, this is understood, but it seems like a good tradeoff when compared to the alternative where overload resolution depends on look-up origin. The latter could easily break generic code and simple refactorings could introduce

Re: Go compiler moving from C to Go

2013-12-21 Thread ponce
Personally I rather use powerful external macro assemblers like NASM/MASM than inline assemblers, as I mentioned a few times here. Specially since most inline assemblers I used tend to be rather limited in comparison. Actually DMD might be the most powerful macro assembler out there:

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Timon Gehr
On 12/21/2013 08:29 PM, Martin Nowak wrote: On Saturday, 21 December 2013 at 17:41:32 UTC, Timon Gehr wrote: Adding a private symbol to an overload set can break 3rd party code with these rules. Yes, this is understood, but it seems like a good tradeoff when compared to the alternative where o

forum.dlang.org moved to a new server

2013-12-21 Thread Vladimir Panteleev
Hi everyone, DFeed (the software running on forum.dlang.org) has been moved to a much faster server. My apologies to everyone who had to endure the slow page load times or failures during the old server's nightly maintenance. This move has been overdue for too long. The old server is now a

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On 12/21/2013 09:18 PM, Timon Gehr wrote: On 12/21/2013 08:29 PM, Martin Nowak wrote: On Saturday, 21 December 2013 at 17:41:32 UTC, Timon Gehr wrote: Adding a private symbol to an overload set can break 3rd party code with these rules. Yes, this is understood, but it seems like a good tradeo

Re: phobos dependencies

2013-12-21 Thread Dmitry Olshansky
21-Dec-2013 21:10, Andrei Alexandrescu пишет: On 12/21/13 12:08 AM, Dmitry Olshansky wrote: 21-Dec-2013 00:43, Martin Nowak пишет: Couldn't static imports be made lazy without breaking any code? The above example would read. static import std.range. void foo(R)(R range) if (std.range.isForw

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On 12/21/2013 08:54 PM, Dicebot wrote: On Saturday, 21 December 2013 at 19:29:28 UTC, Martin Nowak wrote: Still don't understand how intended and expected behavior can be called "bug". If I make a refactoring and move a function from module A to B, but the function calls an overload set in A it

Re: forum.dlang.org moved to a new server

2013-12-21 Thread Andrei Alexandrescu
On 12/21/13 12:30 PM, Vladimir Panteleev wrote: Hi everyone, DFeed (the software running on forum.dlang.org) has been moved to a much faster server. My apologies to everyone who had to endure the slow page load times or failures during the old server's nightly maintenance. This move has been ov

Re: phobos dependencies

2013-12-21 Thread Andrei Alexandrescu
On 12/21/13 1:06 PM, Dmitry Olshansky wrote: 21-Dec-2013 21:10, Andrei Alexandrescu пишет: On 12/21/13 12:08 AM, Dmitry Olshansky wrote: 21-Dec-2013 00:43, Martin Nowak пишет: Couldn't static imports be made lazy without breaking any code? The above example would read. static import std.ran

Re: Nginx to D ?

2013-12-21 Thread Larry
Being one of the pioneers won't make me cry. I had a look at it. This project seems like it deserves a bit more work : http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/7556/ This is particularly annoying and a show stopper for me. I will definitely look for its evolution

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread H. S. Teoh
On Sat, Dec 21, 2013 at 10:09:44PM +0100, Martin Nowak wrote: > On 12/21/2013 09:18 PM, Timon Gehr wrote: > >On 12/21/2013 08:29 PM, Martin Nowak wrote: > >>On Saturday, 21 December 2013 at 17:41:32 UTC, Timon Gehr wrote: > >>>Adding a private symbol to an overload set can break 3rd party code > >>

Re: phobos dependencies

2013-12-21 Thread Dicebot
On Saturday, 21 December 2013 at 21:16:23 UTC, Andrei Alexandrescu wrote: That's why I'm saying: make all imports lazy How? It has been already mentioned in this thread that this does not seem possible, at least withing existing language.

Re: forum.dlang.org moved to a new server

2013-12-21 Thread John Colvin
On Saturday, 21 December 2013 at 20:30:45 UTC, Vladimir Panteleev wrote: Hi everyone, DFeed (the software running on forum.dlang.org) has been moved to a much faster server. My apologies to everyone who had to endure the slow page load times or failures during the old server's nightly mainte

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Timon Gehr
On 12/21/2013 10:14 PM, Martin Nowak wrote: On 12/21/2013 08:54 PM, Dicebot wrote: On Saturday, 21 December 2013 at 19:29:28 UTC, Martin Nowak wrote: Still don't understand how intended and expected behavior can be called "bug". If I make a refactoring and move a function from module A to B, b

Re: Nginx to D ?

2013-12-21 Thread Dicebot
On Saturday, 21 December 2013 at 21:15:19 UTC, Larry wrote: But when I look at UWSGI, it is directly tied to nginx so no need to manage yet another server and so on. It just works as is, redirects to the app and boom, executes the script. There is no practical difference - uWSGI has own protoc

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Dicebot
On Saturday, 21 December 2013 at 21:14:43 UTC, Martin Nowak wrote: If I make a refactoring and move a function from module A to B, but the function calls an overload set in A it should not have a different overload resolution. If MUST have different overload resolution if B does not have acce

Re: phobos dependencies

2013-12-21 Thread Dmitry Olshansky
22-Dec-2013 01:16, Andrei Alexandrescu пишет: On 12/21/13 1:06 PM, Dmitry Olshansky wrote: 21-Dec-2013 21:10, Andrei Alexandrescu пишет: On 12/21/13 12:08 AM, Dmitry Olshansky wrote: 21-Dec-2013 00:43, Martin Nowak пишет: Couldn't static imports be made lazy without breaking any code? The a

Re: phobos dependencies

2013-12-21 Thread Andrej Mitrovic
On 12/21/13, Dicebot wrote: > On Saturday, 21 December 2013 at 21:16:23 UTC, Andrei > Alexandrescu wrote: >> That's why I'm saying: make all imports lazy > > How? It has been already mentioned in this thread that this does > not seem possible, at least withing existing language. The first ste

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Timon Gehr
On 12/21/2013 10:36 PM, Dicebot wrote: It is a major design issue with templates using declaration scope for access resolution instead of instantation scope. I think it was a mistake and is unrelated to general visibility rules. I think there is quite some overlap.

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On 12/21/2013 10:28 PM, Timon Gehr wrote: Well, you pass an alias. Are you saying that for alias template arguments, the scope of the template declaration applies for accessibility checking? I.e. we cannot pass private symbols as alias arguments? I think this is an unreasonably high price to pay.

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On 12/21/2013 10:22 PM, H. S. Teoh wrote: I was pretty upset when I encountered the following situation: ---std/regex.d--- ... private struct Stack { ... } ... ---mymodule.d--- ... /* public */ struct Stack { ... } ... ---

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On 12/21/2013 10:36 PM, Dicebot wrote: If MUST have different overload resolution if B does not have access to those A function. Anything else is damn broken module system. Why would anyone expect to move functions between modules and have accessibility rules magically persistent? It's important

Re: phobos dependencies

2013-12-21 Thread monarch_dodra
On Saturday, 21 December 2013 at 21:38:59 UTC, Dmitry Olshansky wrote: As it stands the only thing lazy buys us is "pay as you touch" contrary to "pay as you name the intent to touch". The problem is that the payment is for the whole stock of the said "shop". I see second problem (granularity o

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Timon Gehr
On 12/21/2013 11:03 PM, Martin Nowak wrote: On 12/21/2013 10:28 PM, Timon Gehr wrote: Well, you pass an alias. Are you saying that for alias template arguments, the scope of the template declaration applies for accessibility checking? I.e. we cannot pass private symbols as alias arguments? I thi

Re: Language Reference

2013-12-21 Thread Walter Bright
On 12/21/2013 7:33 AM, ilya-stromberg wrote: On Thursday, 19 December 2013 at 22:11:33 UTC, Martin Nowak wrote: And there is also a cmdline tool to do this, dman. I didn't know about it. How can I download it? Also, can we add a link to the `dman` at the http://dlang.org/download.html page (or

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Dicebot
On Saturday, 21 December 2013 at 22:14:51 UTC, Martin Nowak wrote: What? It's a major design win that we don't have to rerun semantic for every identical instantiation, in the same sense that we don't have to reinclude header files. I know that and completely agree with that. Or are you only

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Martin Nowak
On 12/21/2013 11:17 PM, Timon Gehr wrote: On 12/21/2013 11:03 PM, Martin Nowak wrote: On 12/21/2013 10:28 PM, Timon Gehr wrote: Well, you pass an alias. Are you saying that for alias template arguments, the scope of the template declaration applies for accessibility checking? I.e. we cannot pas

Re: phobos dependencies

2013-12-21 Thread Dmitry Olshansky
22-Dec-2013 02:16, monarch_dodra пишет: On Saturday, 21 December 2013 at 21:38:59 UTC, Dmitry Olshansky wrote: As it stands the only thing lazy buys us is "pay as you touch" contrary to "pay as you name the intent to touch". The problem is that the payment is for the whole stock of the said "sho

Re: Updated DIP22 - Private symbol visibility

2013-12-21 Thread Timon Gehr
On 12/21/2013 11:56 PM, Martin Nowak wrote: On 12/21/2013 11:17 PM, Timon Gehr wrote: ... I see. Then how are you going to handle the following: module a; private auto foo(int x){ } auto foo(double x){ } auto call(alias a){ a(0); } void x(){ call!foo(); // ok } This will work. modul

Re: forum.dlang.org moved to a new server

2013-12-21 Thread Vladimir Panteleev
On Saturday, 21 December 2013 at 21:15:38 UTC, Andrei Alexandrescu wrote: Thanks! This raises again the question whether we should consolidate hosting so you don't need to pay for that (bus factor etc). Would you want to transfer DFeed to digitalmars? Thanks for the offer, but hosting DFeed is

[RFC] ∅MQD, a ∅MQ wrapper for D

2013-12-21 Thread Lars T. Kyllingstad
I've been working on a D wrapper for the ∅MQ (aka. ZMQ/ZeroMQ) messaging library, and I think it's nearly ready for an "official release". However, I would immensely appreciate some feedback on the API first. Code: https://github.com/kyllingstad/zmqd Docs: http://kyllingstad.github.io/zmqd

Re: [RFC] ∅MQD, a ∅MQ wrapper for D

2013-12-21 Thread Kelet
On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad wrote: I've been working on a D wrapper for the ∅MQ (aka. ZMQ/ZeroMQ) messaging library, and I think it's nearly ready for an "official release". However, I would immensely appreciate some feedback on the API first. Code: http

Re: [RFC] ∅MQD, a ∅MQ wrapper for D

2013-12-21 Thread Kelet
On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad wrote: I've tried to stay as close as possible to the design of the C library, while adding a distinct D "feel". Details are in the documentation. After reviewing the API and comparing it to the C API, I think you did a fine job

Re: forum.dlang.org moved to a new server

2013-12-21 Thread John J
On 12/21/2013 03:30 PM, Vladimir Panteleev wrote: Hi everyone, DFeed (the software running on forum.dlang.org) has been moved to a much faster server. Thank you! It's pretty fast now!! :) Btw, I have been using Thunderbird and I frequently see the already read threads (mostly messages of th

Re: forum.dlang.org moved to a new server

2013-12-21 Thread John J
On 12/21/2013 03:30 PM, Vladimir Panteleev wrote: Hi everyone, DFeed (the software running on forum.dlang.org) has been moved to a much faster server. Searching these newsgroups in Thunderbird now works, and it works pretty fast too!

Re: forum.dlang.org moved to a new server

2013-12-21 Thread Daniel Murphy
"Vladimir Panteleev" wrote in message news:lyrnwjnqkdgalcwdx...@forum.dlang.org... > On Saturday, 21 December 2013 at 21:15:38 UTC, Andrei Alexandrescu wrote: >> Thanks! This raises again the question whether we should consolidate >> hosting so you don't need to pay for that (bus factor etc). Wo

Re: forum.dlang.org moved to a new server

2013-12-21 Thread Andrei Alexandrescu
On 12/21/13 3:45 PM, Vladimir Panteleev wrote: On Saturday, 21 December 2013 at 21:15:38 UTC, Andrei Alexandrescu wrote: Thanks! This raises again the question whether we should consolidate hosting so you don't need to pay for that (bus factor etc). Would you want to transfer DFeed to digitalmar

Re: phobos dependencies

2013-12-21 Thread Andrei Alexandrescu
On 12/21/13 1:38 PM, Dmitry Olshansky wrote: As it stands the only thing lazy buys us is "pay as you touch" contrary to "pay as you name the intent to touch". The problem is that the payment is for the whole stock of the said "shop". I see second problem (granularity of imports) as far more criti

Re: Go compiler moving from C to Go

2013-12-21 Thread Ola Fosheim Grøstad
On Saturday, 21 December 2013 at 10:14:32 UTC, Russel Winder wrote: C, C++, Go, D have the advantage of using separate files with the assembly code in. Inline assembly language is a huge disadvantage in many (most?) case. Depends, it allows you to add support for locking-mechanisms/SIMD ins

Re: Language Reference

2013-12-21 Thread ilya-stromberg
On Saturday, 21 December 2013 at 22:18:02 UTC, Walter Bright wrote: On 12/21/2013 7:33 AM, ilya-stromberg wrote: On Thursday, 19 December 2013 at 22:11:33 UTC, Martin Nowak wrote: And there is also a cmdline tool to do this, dman. I didn't know about it. How can I download it? Also, can we ad

Re: Go compiler moving from C to Go

2013-12-21 Thread Russel Winder
On Sat, 2013-12-21 at 20:18 +0100, Araq wrote: […] > The point of an inline assembler is that the compiler knows > things like field offsets and so can provide useful features no > external assembler can. It can also inline the assembler code > eliminating any function call overhead. Your ignora