Re: Opinion of February 2012

2012-02-05 Thread Gour
On Sat, 4 Feb 2012 17:17:28 -0500 "Nick Sabalausky" wrote: > I thought Git was supposed to be able to intelligently handle > moved/renamed files? So shouldn't fixing those pull requests amount > to "pull, possibly fix merge conflicts, push" just like with any > other upstream change? I thought t

Re: Opinion of February 2012

2012-02-05 Thread Walter Bright
On 2/3/2012 4:28 PM, H. S. Teoh wrote: I agree with this. Based on current documentation, I didn't even know the GC can be replaced at compile-time until someone mentioned it. And up to now I still don't know how exactly to do this, since I couldn't find any docs for it. The documentation for t

Re: Emacs D mode needs love

2012-02-05 Thread Russel Winder
On Sun, 2012-02-05 at 01:08 -0600, Caligo wrote: > I would like to kindly request for Emacs D mode to be updated. I've > been using 2.0.4, which I think was last released in 2007, but it > doesn't reflect the latest version of D. Its indentation also has > issues. 14 months ago I started a Baza

Re: std.simd module

2012-02-05 Thread Manu
On 5 February 2012 07:47, Sean Cavanaugh wrote: > > Looks good so far: > > it could use float[2] code wherever there is float[3] code (magnitude2 > etc) > Yep, I intended to do this. You'll see I added dot2, I just didin't add the others yet :P Note: this is FAR from complete, I just wanted to

Re: std.simd module

2012-02-05 Thread Manu
On 5 February 2012 09:22, F i L wrote: > Looks good to me so far ;-) > > First criticism I expect is for many to insist on a class-style vector >> library, which I personally think has no place as a low level, portable >> API. >> Everyone has a different idea of what the perfect vector lib shoul

Re: The Win32 HANDLE type under D2

2012-02-05 Thread Zachary Lund
On 02/04/2012 01:32 PM, Stewart Gordon wrote: Under D1, std.c.windows.windows has HANDLE it as a typedef of void*. While I forget whether they're actually pointers. I guess it fits given that the C headers define it as void* and that handles are fundamentally different from pointers from an app's

Damn C++ and damn D!

2012-02-05 Thread so
After some time with D, C++ is now a nightmare for me. (especially on generic coding) Think about replicating this simple code in C++. void fun(T)(T a) { static if(cond(T)) { auto var = make(a); } else { auto tmp = make(a); auto var = make_proxy(tmp);

Re: [OT] Anyone w/ svn->git experience and advice?

2012-02-05 Thread Nick Sabalausky
Now that I've gotten it worked out, I've put up an article with my complete notes on the whole process in case anyone's interested or needs help doing the same thing: https://www.semitwist.com/articles/article/view/the-better-svn-git-guide

Re: Damn C++ and damn D!

2012-02-05 Thread Timon Gehr
On 02/05/2012 02:49 PM, so wrote: After some time with D, C++ is now a nightmare for me. (especially on generic coding) Think about replicating this simple code in C++. void fun(T)(T a) { static if(cond(T)) { auto var = make(a); } else { auto tmp = make(a); auto var = make_proxy(tmp); } ... } A

Re: Damn C++ and damn D!

2012-02-05 Thread so
On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: This should work: #define DOTDOTDOT ... template void fun(T a){ if(cond::value) { auto var = make(a); DOTDOTDOT; }else{ auto tmp = make(a); auto var = make_proxy(tmp); DOTDOTDOT; } } It

Re: Damn C++ and damn D!

2012-02-05 Thread Timon Gehr
On 02/05/2012 03:53 PM, so wrote: On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: This should work: #define DOTDOTDOT ... template void fun(T a){ if(cond::value) { auto var = make(a); DOTDOTDOT; }else{ auto tmp = make(a); auto var = make_proxy(tmp); DOTDOTDOT; } } It won't wor

Re: Opinion of February 2012

2012-02-05 Thread H. S. Teoh
On Sun, Feb 05, 2012 at 12:10:33AM -0800, Walter Bright wrote: > On 2/3/2012 4:28 PM, H. S. Teoh wrote: > >I agree with this. Based on current documentation, I didn't even know > >the GC can be replaced at compile-time until someone mentioned it. > >And up to now I still don't know how exactly to d

Re: Damn C++ and damn D!

2012-02-05 Thread Jose Armando Garcia
On Sun, Feb 5, 2012 at 12:57 PM, Timon Gehr wrote: > On 02/05/2012 03:53 PM, so wrote: >> >> On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: >> >>> This should work: >>> >>> #define DOTDOTDOT ... >>> >>> template void fun(T a){ >>> if(cond::value) { >>> auto var = make(a); >>> DOTDOT

Re: Damn C++ and damn D!

2012-02-05 Thread so
On Sunday, 5 February 2012 at 14:57:58 UTC, Timon Gehr wrote: On 02/05/2012 03:53 PM, so wrote: You just maintain the macro. 1. When actual part of the work lies in the macro. #define DETAIL \ ... \ ... \ ... You now have an enigma and compiler won't help you. 2. And if you need another cond

Re: Damn C++ and damn D!

2012-02-05 Thread so
On Sunday, 5 February 2012 at 15:17:39 UTC, Jose Armando Garcia wrote: What I would really like to see in D is: immutable variable = if (boolean condition) { // initialize based on boolean condition being true } else { // initialize based on boolean condition being false } Scala has this and

Re: Opinion of February 2012

2012-02-05 Thread Don
On 04.02.2012 00:12, Zachary Lund wrote: Here are some things I'm unhappy with currently. 1. Documentation I find certain things, of which I will start writing down and writing patches for, in the documentation that are unsatisfactory. Two in particular is the current situation with memory mana

Re: Damn C++ and damn D!

2012-02-05 Thread Timon Gehr
On 02/05/2012 04:17 PM, Jose Armando Garcia wrote: On Sun, Feb 5, 2012 at 12:57 PM, Timon Gehr wrote: On 02/05/2012 03:53 PM, so wrote: On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: This should work: #define DOTDOTDOT ... template void fun(T a){ if(cond::value) { auto var

Re: killer App for D? (was: State of D on iOS/Android)

2012-02-05 Thread Steve Teale
On Sat, 28 Jan 2012 17:58:40 -0800, J Arrizza wrote: Isn't this the killer "app" for D (like ROR for Ruby, etc.) ? There was a thread a while ago where someone said the popularity of a language depends on an app that drives the use of that language. There's also the up-coming ARM based Blackberr

Re: Damn C++ and damn D!

2012-02-05 Thread Jose Armando Garcia
On Sun, Feb 5, 2012 at 1:24 PM, so wrote: > On Sunday, 5 February 2012 at 15:17:39 UTC, Jose Armando Garcia wrote: > >> What I would really like to see in D is: >> >> immutable variable = if (boolean condition) >> { >> // initialize based on boolean condition being true >> } >> else >> { >> // ini

Re: Damn C++ and damn D!

2012-02-05 Thread Jose Armando Garcia
On Sun, Feb 5, 2012 at 1:44 PM, Timon Gehr wrote: > On 02/05/2012 04:17 PM, Jose Armando Garcia wrote: >> >> On Sun, Feb 5, 2012 at 12:57 PM, Timon Gehr  wrote: >>> >>> On 02/05/2012 03:53 PM, so wrote: On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: > This sh

Re: The Win32 HANDLE type under D2

2012-02-05 Thread Stewart Gordon
On 04/02/2012 19:40, Yao Gomez wrote: Just use the Win32 API way when STRICT is defined: --- struct HANDLE__{ int unused; } alias HANDLE__* HANDLE; Looking through MinGW, this is the code: #ifdef STRICT typedef void *HANDLE; #define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n #else typ

Re: Damn C++ and damn D!

2012-02-05 Thread Andrei Alexandrescu
On 2/5/12 9:57 AM, Jose Armando Garcia wrote: On Sun, Feb 5, 2012 at 1:44 PM, Timon Gehr wrote: immutable variable = (boolean_condition) ? { // initialize based on boolean_condition being true }():{ // initialize based on boolean_condition being false }(); Cool, now I want some synt

Re: Damn C++ and damn D!

2012-02-05 Thread Jose Armando Garcia
On Sun, Feb 5, 2012 at 2:13 PM, Andrei Alexandrescu wrote: > On 2/5/12 9:57 AM, Jose Armando Garcia wrote: >> >> On Sun, Feb 5, 2012 at 1:44 PM, Timon Gehr  wrote: >>> >>> immutable variable = (boolean_condition) ? { >>>    // initialize based on boolean_condition being true >>> }():{ >>>    // in

Re: Opinion of February 2012

2012-02-05 Thread Zachary Lund
On 02/05/2012 09:27 AM, Don wrote: On 04.02.2012 00:12, Zachary Lund wrote: Here are some things I'm unhappy with currently. 1. Documentation I find certain things, of which I will start writing down and writing patches for, in the documentation that are unsatisfactory. Two in particular is th

Re: libphobos.so libdruntime.so

2012-02-05 Thread Jacob Carlborg
On 2012-02-05 00:42, H. S. Teoh wrote: On Sat, Feb 04, 2012 at 07:11:25PM +0100, Jacob Carlborg wrote: On 2012-02-03 20:55, H. S. Teoh wrote: On Fri, Feb 03, 2012 at 08:28:04PM +0100, Trass3r wrote: [...] I rather have a slightly bigger executable than having my system cluttered with hundreds

Re: Opinion of February 2012

2012-02-05 Thread Zachary Lund
On 02/05/2012 09:18 AM, H. S. Teoh wrote: On Sun, Feb 05, 2012 at 12:10:33AM -0800, Walter Bright wrote: On 2/3/2012 4:28 PM, H. S. Teoh wrote: I agree with this. Based on current documentation, I didn't even know the GC can be replaced at compile-time until someone mentioned it. And up to now

Re: Damn C++ and damn D!

2012-02-05 Thread Andrei Alexandrescu
On 2/5/12 10:25 AM, Jose Armando Garcia wrote: On Sun, Feb 5, 2012 at 2:13 PM, Andrei Alexandrescu wrote: On 2/5/12 9:57 AM, Jose Armando Garcia wrote: On Sun, Feb 5, 2012 at 1:44 PM, Timon Gehrwrote: immutable variable = (boolean_condition) ? { // initialize based on boolean_condi

Re: byKey and byValue: properties or methods?

2012-02-05 Thread Jose Armando Garcia
On Fri, Jan 20, 2012 at 7:47 AM, Johannes Pfau wrote: > Jose Armando Garcia wrote: > >> On Thu, Jan 19, 2012 at 9:41 PM, Andrei Alexandrescu >> wrote: >>> On 1/19/12 4:43 PM, Steven Schveighoffer wrote: On Thu, 19 Jan 2012 14:06:00 -0500, torhu wrote: > > If the type of byKeys

Re: byKey and byValue: properties or methods?

2012-02-05 Thread Andrei Alexandrescu
On 2/5/12 11:25 AM, Jose Armando Garcia wrote: std.log still works! hehe. std.log is ready for review but unfortunately it depends on some changes I have made to druntime. I have tried to get those changes into druntime but they are just sitting in there as pull requests. I have recently decided

Re: The Win32 HANDLE type under D2

2012-02-05 Thread Stewart Gordon
On 05/02/2012 16:13, Stewart Gordon wrote: but found that it allows implicit conversions between all handle types, not just up the hierarchy. Is this a bug? I was wrong - it doesn't allow an arbitrary handle to be passed to a function accepting a specific handle type, but it does allow arbit

Re: byKey and byValue: properties or methods?

2012-02-05 Thread Jose Armando Garcia
On Sun, Feb 5, 2012 at 3:26 PM, Andrei Alexandrescu wrote: > On 2/5/12 11:25 AM, Jose Armando Garcia wrote: >> >> std.log still works! hehe. std.log is ready for review but >> unfortunately it depends on some changes I have made to druntime. I >> have tried to get those changes into druntime but t

Re: Opinion of February 2012

2012-02-05 Thread Walter Bright
On 2/5/2012 9:13 AM, Zachary Lund wrote: On 02/05/2012 09:27 AM, Don wrote: Could you please explain what you mean about CTFE? I'm not aware of any problems with the documentation. (I gave the docs a complete rewrite a couple of releases ago). I didn't see this documentation (under the Functio

Re: byKey and byValue: properties or methods?

2012-02-05 Thread Alvaro
El 18/01/2012 21:37, Nick Sabalausky escribió: "Nick Sabalausky" wrote in message Plus I've spent time in other langauges where using a function name without parens is the way to refer to a function itself, rather than invoke the function. That's something I very much like: "foo" refers to the f

Re: Opinion of February 2012

2012-02-05 Thread H. S. Teoh
On Sun, Feb 05, 2012 at 10:44:37AM -0800, Walter Bright wrote: [...] > Perhaps CTFE should have its own page. That's an excellent idea. A centralized place where we can put all CTFE-related stuff, current limitations, CTFE-specific quirks, etc.. T -- Error: Keyboard not attached. Press F1 to c

Re: Damn C++ and damn D!

2012-02-05 Thread Jonathan M Davis
On Sunday, February 05, 2012 15:49:04 so wrote: > After some time with D, C++ is now a nightmare for me. (especially on > generic coding) > Think about replicating this simple code in C++. > > void fun(T)(T a) > { > static if(cond(T)) > { > auto var = make(a); > } > els

Re: Damn C++ and damn D!

2012-02-05 Thread Michel Fortin
On 2012-02-05 16:25:33 +, Jose Armando Garcia said: On Sun, Feb 5, 2012 at 2:13 PM, Andrei Alexandrescu wrote: Make it a function. I agree that in theory that you can do all this stuff in D but the reality is that developers are lazy and end up fighting the language. Make it a functio

[OT] I ported Empire to D2 and made it cross platform.

2012-02-05 Thread Bernard Helyer
I've tried multiple times to contact Walter through his websites, but apparently _that's_ a dead end so... http://i.imgur.com/DzrN6.png Look at it! The selection pulses! Empire's never looked so good! There are some rough edges; the save games fail to load, demo isn't working, the text log is

Re: std.uuid is ready for review

2012-02-05 Thread Piotr Szturmaj
Johannes Pfau wrote: Hi, Hi, SHA1 and MD5 should work in CTFE now.

Re: libphobos.so libdruntime.so

2012-02-05 Thread Bernard Helyer
On Sunday, 5 February 2012 at 03:58:03 UTC, Steven Schveighoffer wrote: Static linking has its advantages too, but as far as phobos and druntime are concerned, dynamic linking would be way way better. Bollocks. In the general case (which is silly to talk about, I'll admit) I'd take static lin

Re: [OT] I ported Empire to D2 and made it cross platform.

2012-02-05 Thread Walter Bright
On 2/5/2012 6:44 PM, Bernard Helyer wrote: I've tried multiple times to contact Walter through his websites, but apparently _that's_ a dead end so... http://i.imgur.com/DzrN6.png Look at it! The selection pulses! Empire's never looked so good! There are some rough edges; the save games fail to

Re: [OT] I ported Empire to D2 and made it cross platform.

2012-02-05 Thread Caligo
On Sun, Feb 5, 2012 at 8:44 PM, Bernard Helyer wrote: > I've tried multiple times to contact Walter through his websites, but > apparently _that's_ a dead end so... > > http://i.imgur.com/DzrN6.png > > Look at it! The selection pulses! Empire's never looked so good! > > There are some rough edges;

Re: [OT] I ported Empire to D2 and made it cross platform.

2012-02-05 Thread Bernard Helyer
On Monday, 6 February 2012 at 04:33:56 UTC, Caligo wrote: On Sun, Feb 5, 2012 at 8:44 PM, Bernard Helyer wrote: I've tried multiple times to contact Walter through his websites, but apparently _that's_ a dead end so... http://i.imgur.com/DzrN6.png Look at it! The selection pulses! Empire's n

Re: std.uuid is ready for review

2012-02-05 Thread Marco Leise
Am 06.02.2012, 03:44 Uhr, schrieb Piotr Szturmaj : Johannes Pfau wrote: Hi, Hi, SHA1 and MD5 should work in CTFE now. So I could in theory do import("important.binary") and calculate and store it's checksums in the executable. You never know when you need this feature!

Re: [your code here]

2012-02-05 Thread Era Scarecrow
The optional third parameter of `indexOf' can be called with `CaseSensitive.no'. But that parameter is left untouched. Instead a check with `toUpper( c)' is used, thereby risking a further visitation of the whole string . Using CaseSensitive.no is a lot slower Hmmm then perhaps a whole re-wr

Re: std.uuid is ready for review

2012-02-05 Thread Walter Bright
On 2/2/2012 1:26 PM, Johannes Pfau wrote: std.uuid is ready to be reviewed. As far as I know there's nothing being reviewed right now, so we could start the review as soon as a review manager has been found. I'd like to see a string constant that is a regex for a UUID in its canonical form. Th

Re: [your code here]

2012-02-05 Thread Era Scarecrow
mixin(T_isPangram("DE_isPangram", "abcdefghijklmnopqrstuvwxyz", "\\u00DF\\u00e4\\u00f6\\u00dc")); somehow this got mixed up with the earlier messed up one.. this is the correction for this line. mixin(T_isPangram("DE_isPangram", "abcdefghijklmnopqrstuvwxyz", "\\u00DF\\u00e4\\u00f6\\u00fc"));