Re: std.socket undefined UnixAddress?

2013-01-24 Thread Rob T
I solved the problem by creating my own version of UnixAddress. The existing implementation needs some work. I'll filed a bug report. http://d.puremagic.com/issues/show_bug.cgi?id=9384 --rt

Re: Coping files and folders

2013-01-24 Thread monarch_dodra
On Thursday, 24 January 2013 at 07:41:23 UTC, Jacob Carlborg wrote: On 2013-01-24 07:28, Joel wrote: How does one copy folders (with files in them) including sub folders, and creating any needed folders? Like: land\house\cat.d land\house\rat.exe land\house\bedroom\ants.txt to

Re: Passing opaque struct between functions/modules

2013-01-24 Thread Mike Parker
On Wednesday, 23 January 2013 at 16:33:08 UTC, Sarath Kumar wrote: DMD v2.61; openSUSE 12.1 Source: --- libA.d: module libA; extern (C) { struct Opaque; Opaque* getObject(); void doSomething(Opaque *); } -- libB.d: module libB; extern (C) {

Re: Passing opaque struct between functions/modules

2013-01-24 Thread Sarath Kumar
On Wednesday, 23 January 2013 at 17:14:31 UTC, Ali Çehreli wrote: On 01/23/2013 08:33 AM, Sarath Kumar wrote: Can someone please tell me the right way to pass an opaque object between module's functions. I am assuming that you are interfacing with a C library. That library must have a D

Segfault in _d_dynamic_cast ()

2013-01-24 Thread Minas Mina
I am trying to create a BVH tree structure to speed up raytracing. So far it has been fine. I have created the BVH tree. It works for 202 triangles/spheres. However, when the scene has more spheres/triangles, I get a segmentation fault when the rays are traces, not when the tree is being

Re: Passing opaque struct between functions/modules

2013-01-24 Thread Mike Parker
On Thursday, 24 January 2013 at 09:39:39 UTC, Sarath Kumar wrote: On Thursday, 24 January 2013 at 09:04:09 UTC, Mike Parker wrote: The error message here is deceiving. Declare the struct in one module only and then import it in every module that uses it. So, for example, keep the declaration

Re: Pull 1019

2013-01-24 Thread mist
yebblies: Can an auto-ref function pointer/deltegate implicitly convert to ref? 9rnsr: To @yebblies : I yet not implement it because this is a basic proposal. IMHO, what he says is that behavior proposed by yebblies is some more complicated special cases he is not going to do within this

Why is null lowercase?

2013-01-24 Thread Matthew Caron
This is probably a question for Walter, but maybe others know. Of all of the differences between C and D, the one which I have the most difficulty adapting to is null being lowercase. Does anyone know why this decision was made? -- Matthew Caron, Software Build Engineer Sixnet, a Red Lion

Re: Segfault in _d_dynamic_cast ()

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 10:14:29 UTC, Minas Mina wrote: I am trying to create a BVH tree structure to speed up raytracing. So far it has been fine. I have created the BVH tree. It works for 202 triangles/spheres. skipped Thanks. Requests for debugging help without source code are

Re: Why is null lowercase?

2013-01-24 Thread bearophile
Matthew Caron: Of all of the differences between C and D, the one which I have the most difficulty adapting to is null being lowercase. Does anyone know why this decision was made? Probably because writing all in uppercase ugly. null is a keyword like the others, and they are in lowercase.

Re: Why is null lowercase?

2013-01-24 Thread Mike Parker
On Thursday, 24 January 2013 at 12:56:03 UTC, Matthew Caron wrote: This is probably a question for Walter, but maybe others know. Of all of the differences between C and D, the one which I have the most difficulty adapting to is null being lowercase. Does anyone know why this decision was

Re: Why is null lowercase?

2013-01-24 Thread monarch_dodra
On Thursday, 24 January 2013 at 12:56:03 UTC, Matthew Caron wrote: This is probably a question for Walter, but maybe others know. Of all of the differences between C and D, the one which I have the most difficulty adapting to is null being lowercase. Does anyone know why this decision was

Re: Why is null lowercase?

2013-01-24 Thread Leandro Motta Barros
Hi, In C, NULL is a #define, and #defines are typically all-caps. In D, null is real keyword recognized by the compiler, and those are typically lowercase. I am just guessing here, but I'd say the choice for 'null' instead of 'NULL' is just to be coherent with this. Personally, I kinda like

Re: Pull 1019

2013-01-24 Thread Namespace
Thanks for your answer. That explains my question. I would love to see an official statement about this pull and this feature. But neither in the related threads or here in learn I get such statement. That is very sad because this feature is very important and long discussed.

Re: Pull 1019

2013-01-24 Thread Namespace
On Thursday, 24 January 2013 at 13:42:36 UTC, Namespace wrote: Thanks for your answer. That explains my question. I would love to see an official statement about this pull and this feature. But neither in the related threads or here in learn I get such statement. That is very sad because this

Re: Passing opaque struct between functions/modules

2013-01-24 Thread Maxim Fomin
On Wednesday, 23 January 2013 at 16:33:08 UTC, Sarath Kumar wrote: DMD v2.61; openSUSE 12.1 Source: --- libA.d: module libA; extern (C) { struct Opaque; Opaque* getObject(); void doSomething(Opaque *); } -- libB.d: module libB; extern (C) {

Re: Pull 1019

2013-01-24 Thread monarch_dodra
On Thursday, 24 January 2013 at 13:51:27 UTC, Namespace wrote: On Thursday, 24 January 2013 at 13:42:36 UTC, Namespace wrote: Thanks for your answer. That explains my question. I would love to see an official statement about this pull and this feature. But neither in the related threads or

Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
Hi, I am trying to figure out the singleton pattern with a struct instead of a class: [code] struct Singleton { private : this( int a = 0 ) {} ; static Singleton * s ; public : @disable this() ; static ref Singleton instance() { if ( s is

Re: Passing opaque struct between functions/modules

2013-01-24 Thread Sarath Kumar
On Thursday, 24 January 2013 at 11:52:57 UTC, Mike Parker wrote: The only potential bug I see here is in the error message. What you're seeing is a conflict that arises from D's name mangling. The doSomething in libA is expecting a parameter of type libA.Opaque* and getObject is returning

Re: Singleton Pattern with struct

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 14:11:10 UTC, ParticlePeter wrote: Hi, I am trying to figure out the singleton pattern with a struct instead of a class: [code] struct Singleton { private : this( int a = 0 ) {} ; static Singleton * s ; public : @disable this() ;

Re: Singleton Pattern with struct

2013-01-24 Thread Jacob Carlborg
On 2013-01-24 15:43, Maxim Fomin wrote: Even if Singleton.instance returns by ref, s object is still stack-allocated struct, which is not affected by further modification of private pointer. The struct is allocated using new. -- /Jacob Carlborg

Re: Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
Even if Singleton.instance returns by ref, s object is still stack-allocated struct, which is not affected by further modification of private pointer. But where and when is ( a second ? ) Singleton created or duplicated ? The only ctor is in the static instance ( it is called only once

Re: Singleton Pattern with struct

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 15:05:15 UTC, Jacob Carlborg wrote: On 2013-01-24 15:43, Maxim Fomin wrote: Even if Singleton.instance returns by ref, s object is still stack-allocated struct, which is not affected by further modification of private pointer. The struct is allocated using

Re: Pull 1019

2013-01-24 Thread Namespace
break *cough* valid *cough* existing code. This wasn't really a new/changed feature that broke your code. It was just something that worked that never should have worked. Ok, ok, it wasn't a valid solution but it was the only solution for handy programming with structs. We have still nothing

Re: Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
Got it, thanks, I changed the instance method to: [code] static Singleton * instance() { if ( s is null ) s = new Singleton( 0 ) ; return s ; } [\code] and everything works as expected. Cheers, PP !

Re: Singleton Pattern with struct

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 15:50:34 UTC, ParticlePeter wrote: Got it, thanks, I changed the instance method to: [code] static Singleton * instance() { if ( s is null ) s = new Singleton( 0 ) ; return s ; } [\code] and

Re: S-Expressions

2013-01-24 Thread qznc
On Wednesday, 23 January 2013 at 17:49:23 UTC, bearophile wrote: We are getting to the Mathematica again: http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity Bye, bearophile We're even now ;) http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity#D

Re: Singleton Pattern with struct

2013-01-24 Thread Era Scarecrow
On Thursday, 24 January 2013 at 16:07:36 UTC, Maxim Fomin wrote: Yes, but this can be broken by: void main() { Singleton s = * Singleton.instance; printf( %d\n, s.val ) ; // Singleton.instance.val = 2 ; printf( %d\n, s.val ) ; //0 } Here s is explicitly

Re: Singleton Pattern with struct

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 16:17:34 UTC, Era Scarecrow wrote: On Thursday, 24 January 2013 at 16:07:36 UTC, Maxim Fomin wrote: Yes, but this can be broken by: void main() { Singleton s = * Singleton.instance; printf( %d\n, s.val ) ; // Singleton.instance.val = 2 ;

Re: Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
Yes, but this can be broken by: import core.stdc.stdio : printf; struct Singleton { private : this( int a = 0 ) {} ; static Singleton * s ; public : @disable this() ; static Singleton* instance() { if ( s is null ) s =

Re: Singleton Pattern with struct

2013-01-24 Thread Ali Çehreli
On 01/24/2013 08:52 AM, ParticlePeter wrote: This method here ( my first approach ) does return a reference to an object on the heap, right ? Yes, but the caller does not get a reference. static ref Singleton instance() { if ( s is null ) s = new Singleton( 0 ) ; return * s ; } so

Re: Why is null lowercase?

2013-01-24 Thread Rob T
On Thursday, 24 January 2013 at 12:56:03 UTC, Matthew Caron wrote: This is probably a question for Walter, but maybe others know. Of all of the differences between C and D, the one which I have the most difficulty adapting to is null being lowercase. Does anyone know why this decision was

Getting the parameters of a struct/class constructor

2013-01-24 Thread Joseph Rushton Wakeling
Hello all, Is there a way to construct a tuple of the types that need to be passed to a struct or class's constructor? I tried using ParameterTypeTuple either on the class or its constructor: ParameterTypeTuple!A or ParameterTypeTuple!(A.this) ... but neither works: the former

Re: Singleton Pattern with struct

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 17:00:44 UTC, Ali Çehreli wrote: On 01/24/2013 08:52 AM, ParticlePeter wrote: This method here ( my first approach ) does return a reference to an object on the heap, right ? Yes, but the caller does not get a reference. Actually the caller gets the

Re: Singleton Pattern with struct

2013-01-24 Thread Artur Skawina
On 01/24/13 17:52, ParticlePeter wrote: Yes, but this can be broken by: import core.stdc.stdio : printf; struct Singleton { private : this( int a = 0 ) {} ; static Singleton * s ; public : @disable this() ; static Singleton* instance() {

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Andrej Mitrovic
On 1/24/13, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 1/24/13, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: ParameterTypeTuple!(A.this) Use ParameterTypeTuple!(A.__ctor) If you have multiple constructors you can pick the parameters with a helper template:

Re: Singleton Pattern with struct

2013-01-24 Thread Artur Skawina
On 01/24/13 18:14, Artur Skawina wrote: struct Singleton { private: this( int a = 0 ) {} ; static Singleton* s ; public: @disable this(); @disable this(this); static instance() @property { static struct Ref(T) { T* obj; ref g() @property { return *obj; }

Re: Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
On Thursday, 24 January 2013 at 17:00:44 UTC, Ali Çehreli wrote: On 01/24/2013 08:52 AM, ParticlePeter wrote: This method here ( my first approach ) does return a reference to an object on the heap, right ? Yes, but the caller does not get a reference. static ref Singleton instance() { if

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Joseph Rushton Wakeling
On 01/24/2013 06:14 PM, Andrej Mitrovic wrote: On 1/24/13, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: ParameterTypeTuple!(A.this) Use ParameterTypeTuple!(A.__ctor) Brilliant. Thanks very much. :-)

Re: Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
On Thursday, 24 January 2013 at 17:21:38 UTC, Artur Skawina wrote: On 01/24/13 17:52, ParticlePeter wrote: Yes, but this can be broken by: import core.stdc.stdio : printf; struct Singleton { private : this( int a = 0 ) {} ; static Singleton * s ; public : @disable

Re: Singleton Pattern with struct

2013-01-24 Thread Ali Çehreli
On 01/24/2013 09:26 AM, ParticlePeter wrote: Thanks, I re-read the purpose of ref type function() in the D programming language, and the sole purpose is that such a function call can be directly a parameter to another function expecting a ref ? As Maxim Fomin noted, I didn't word it

Re: Singleton Pattern with struct

2013-01-24 Thread Artur Skawina
On 01/24/13 18:35, ParticlePeter wrote: On Thursday, 24 January 2013 at 17:21:38 UTC, Artur Skawina wrote: On 01/24/13 17:52, ParticlePeter wrote: Why is the s inside the struct and another_s not identical ? Afaik that is the purpose of the ref keyword ? There currently are no reference

Re: Why is null lowercase?

2013-01-24 Thread Ali Çehreli
On 01/24/2013 04:56 AM, Matthew Caron wrote: This is probably a question for Walter, but maybe others know. Of all of the differences between C and D, the one which I have the most difficulty adapting to is null being lowercase. Does anyone know why this decision was made? Similarly, the

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Rob T
There may be more than one this, so you'll have to specify the args for each specific constructor manually. Disclaimer: Someone else may have a better solution as I'm not that much of an expert in this area. This sample may point you in the right direction ... import std.typetuple; struct

Re: Singleton Pattern with struct

2013-01-24 Thread ParticlePeter
On Thursday, 24 January 2013 at 17:35:58 UTC, Ali Çehreli wrote: On 01/24/2013 09:26 AM, ParticlePeter wrote: Thanks, I re-read the purpose of ref type function() in the D programming language, and the sole purpose is that such a function call can be directly a parameter to another function

Re: Singleton Pattern with struct

2013-01-24 Thread Era Scarecrow
On Thursday, 24 January 2013 at 16:49:53 UTC, Maxim Fomin wrote: On Thursday, 24 January 2013 at 16:17:34 UTC, Era Scarecrow wrote: Hmmm. You could separate the data and remove the pointer... then use alias this. [code] struct Singleton { static SingletonData single; alias single this;

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread mist
You can use magic functions __ctor and __dtor which actually serve as constructor and destructor implementations behind the scene. Example and proof-of-concept: http://dpaste.1azy.net/fd924332 Have no idea if it is explicitly defined by spec somewhere though.

Re: Assembly - 64-bit registers supported?

2013-01-24 Thread Mike Wey
On 01/24/2013 01:08 AM, dale wrote: I am following these helpful suggestions, but still having trouble linking properly. I have Visual Studio 10 and its 64-bit extension installed, and I believe the amd64\link.exe is getting called, but I must have something configured incorrectly, because it

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Jonathan M Davis
On Thursday, January 24, 2013 18:24:32 Namespace wrote: In relation to this post: http://forum.dlang.org/thread/hlyospppnjiziyokf...@forum.dlang.org?page=2#po st-qxqvreqpniftjnwxvqgt:40forum.dlang.org I dicided to test a bit with manual auto ref. This Code works as expected. [code]

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Ali Çehreli
On 01/24/2013 11:33 AM, Jonathan M Davis wrote: It's intended. constness matters more than refness when selecting a function overload. From the docs ( http://dlang.org/function.html#ufunction/u- overloading ): - Functions are overloaded based on how well the arguments to a function

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Era Scarecrow
On Thursday, 24 January 2013 at 20:06:34 UTC, Ali Çehreli wrote: On 01/24/2013 11:33 AM, Jonathan M Davis wrote: It's intended. constness matters more than refness when selecting a function overload. From the docs ( http://dlang.org/function.html#ufunction/u-overloading ): - Functions

Re: Why is null lowercase?

2013-01-24 Thread Matthew Caron
On 01/24/2013 12:50 PM, Ali Çehreli wrote: Similarly, the common macros TRUE and FALSE are replaced by the 'true' and 'false' keywords. Ironically, those don't bother me because I never used them. -- Matthew Caron, Software Build Engineer Sixnet, a Red Lion business | www.sixnet.com +1 (518)

Re: Why is null lowercase?

2013-01-24 Thread Matthew Caron
On 01/24/2013 12:04 PM, Rob T wrote: You'll get used to it, it's actually much better than typing in NULL, and it's a real type instead on an int, which never worked well in C. Just be warned that when checking for null *do not* use equality operator Yeah, the compiler helped me find that one

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Jonathan M Davis
On Thursday, January 24, 2013 12:06:33 Ali Çehreli wrote: On 01/24/2013 11:33 AM, Jonathan M Davis wrote: It's intended. constness matters more than refness when selecting a function overload. From the docs ( http://dlang.org/function.html#ufunction/u- overloading ): -

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Maxim Fomin
On Thursday, 24 January 2013 at 20:06:34 UTC, Ali Çehreli wrote: On 01/24/2013 11:33 AM, Jonathan M Davis wrote: It's intended. constness matters more than refness when selecting a function overload. From the docs ( http://dlang.org/function.html#ufunction/u- overloading ): -

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Rob T
On Thursday, 24 January 2013 at 18:41:31 UTC, mist wrote: You can use magic functions __ctor and __dtor which actually serve as constructor and destructor implementations behind the scene. Example and proof-of-concept: http://dpaste.1azy.net/fd924332 Have no idea if it is explicitly defined

Re: Segfault in _d_dynamic_cast ()

2013-01-24 Thread Minas Mina
On Thursday, 24 January 2013 at 13:22:20 UTC, Maxim Fomin wrote: On Thursday, 24 January 2013 at 10:14:29 UTC, Minas Mina wrote: I am trying to create a BVH tree structure to speed up raytracing. So far it has been fine. I have created the BVH tree. It works for 202 triangles/spheres.

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Philippe Sigaud
On Thu, Jan 24, 2013 at 10:34 PM, Rob T al...@ucora.com wrote: On Thursday, 24 January 2013 at 18:41:31 UTC, mist wrote: You can use magic functions __ctor and __dtor which actually serve as constructor and destructor implementations behind the scene. Example and proof-of-concept:

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Andrej Mitrovic
On 1/24/13, Philippe Sigaud philippe.sig...@gmail.com wrote: IIRC, you can use __traits(getOverloads, mytype.__ctor) to get all constructor overloads. See: http://dlang.org/traits.html#getOverloads I used this in conjunction with __traits(getMember, ...) to get the entire list of member,

Re: Coping files and folders

2013-01-24 Thread Joel
Brilliant! Thanks. I think the silent one has errors. But I've used the first function in my program now. With mine, strait after doing the copying is was supposed then update a file, but didn't. Your one seems to work though. On Thursday, 24 January 2013 at 08:58:06 UTC, monarch_dodra

Re: Getting the parameters of a struct/class constructor

2013-01-24 Thread Rob T
On Thursday, 24 January 2013 at 22:49:33 UTC, Andrej Mitrovic wrote: On 1/24/13, Philippe Sigaud philippe.sig...@gmail.com wrote: IIRC, you can use __traits(getOverloads, mytype.__ctor) to get all constructor overloads. See: http://dlang.org/traits.html#getOverloads I used this in conjunction

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Ali Çehreli
On 01/24/2013 12:25 PM, Era Scarecrow wrote: What is also considered in function selection is the rvalue-lvalue distinction, which shouldn't affect the outcome here either. In case David's explanation was too confusing, then let's look at it. If your variable is non-const, it will always

Re: Why is null lowercase?

2013-01-24 Thread Ali Çehreli
On 01/24/2013 12:42 PM, Matthew Caron wrote: for not null checks if ( ptr !is null) ... And too much perl has me wanting to write: if (ptr is not null) IIRC, the !is operator is thanks to bearophile. We would have to reverse the logic before he insisted on !is: :) if (!(ptr is

Re: S-Expressions

2013-01-24 Thread bearophile
qznc: We're even now ;) http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity#D I have cut some lines, and I have used a more functional style, that fits well for this entry. Compared to the C++ entry this D entry is nicer. I greatly prefer the verbose option of the

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Jonathan M Davis
On Thursday, January 24, 2013 17:13:36 Ali Çehreli wrote: On 01/24/2013 12:25 PM, Era Scarecrow wrote: What is also considered in function selection is the rvalue-lvalue distinction, which shouldn't affect the outcome here either. In case David's explanation was too confusing, then let's

From package import syntax

2013-01-24 Thread bearophile
This is the current syntax to import several modules from the std package: import std.stdio, std.algorithm, std.range, std.array; This is the syntax to import names from a module: import std.stdio: writeln, write; Currently this is not accepted, but do you like a syntax to import modules

Re: From package import syntax

2013-01-24 Thread Andrej Mitrovic
On 1/25/13, bearophile bearophileh...@lycos.com wrote: Currently this is not accepted, but do you like a syntax to import modules that is more consistent (the same as the one used to import names from a module)? import std: stdio, algorithm, range, array; FWIW this was filed as an

Re: From package import syntax

2013-01-24 Thread bearophile
Andrej Mitrovic: FWIW this was filed as an enhancement a few years ago: http://d.puremagic.com/issues/show_bug.cgi?id=3603 Thank you. Commented and voted. Bye, bearophile

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Era Scarecrow
On Friday, 25 January 2013 at 01:57:02 UTC, Jonathan M Davis wrote: The compiler _has_ to pick either const or ref as having higher precedence. ref was almost certainly chosen as having higher precedence because it avoids a conversion, but also by picking ref, you end up with fewer unnecessary

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Jonathan M Davis
On Friday, January 25, 2013 05:14:45 Era Scarecrow wrote: On Friday, 25 January 2013 at 01:57:02 UTC, Jonathan M Davis wrote: The compiler _has_ to pick either const or ref as having higher precedence. ref was almost certainly chosen as having higher precedence because it avoids a

Re: Coping files and folders

2013-01-24 Thread Jay Norwood
On Thursday, 24 January 2013 at 07:41:23 UTC, Jacob Carlborg wrote: Someone posted code in these newsgroups of a parallel implementation of copy and remove. I posted a parallel implementation a while back, and also put it on github. The parallel trick is to create the folder structure

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Era Scarecrow
On Friday, 25 January 2013 at 04:26:18 UTC, Jonathan M Davis wrote: With templated code, it can be important. But then again, if there's no point in having a non-const overload, you can simply not declare any overloads without const. You only run into problems when you mix const and non-const.

Re: endless loop with ref and non-ref parameter

2013-01-24 Thread Jonathan M Davis
On Thursday, January 24, 2013 21:38:42 Ali Çehreli wrote: If const really requires a conversion then we have a language design problem here. No. const T is _not_ the same type as T, therefore assigning a T to a const T _is_ a type conversion. _Any_ time that a variable of one type is assigned

Re: Coping files and folders

2013-01-24 Thread Joel
Sounds cool. I've bookmarked your github hub link. Just wondering with this: // parallel foreach for regular files foreach(fn ; taskPool.parallel(files,100)) { string dfn = destRoot ~ fn[srcLen..$]; copy(fn,dfn); } What is the 100 number for? On Friday, 25 January 2013 at 05:30:11

Re: S-Expressions

2013-01-24 Thread qznc
On Friday, 25 January 2013 at 01:52:27 UTC, bearophile wrote: qznc: We're even now ;) http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity#D I have cut some lines, and I have used a more functional style, that fits well for this entry. Compared to the C++ entry this D