Re: Array slice length confusion

2009-07-09 Thread Tim Matthews
BCS wrote: Hello Tim, Anyway I like how you can get a slice of array that is just a view into the original. If I modify the slice, it modifies the full original array which can be very useful. If however I modify the length of the slice which I was doing in an attempt to extend the view, it

Re: Array slice length confusion

2009-07-09 Thread Kagamin
Tim Matthews Wrote: I thought a slice would behave slighty different due to some sort of meta data that is a separate area of memory so it doesn't effect D's abi. Current plan is to introduce new type - array - into the language.

Re: D2 using std.proccess.shell

2009-07-09 Thread Lars T. Kyllingstad
Jesse Phillips wrote: On Tue, 07 Jul 2009 12:04:43 +0200, Lars T. Kyllingstad wrote: Jesse Phillips wrote: I don't know if I'm misunderstanding the use of shell() or if this is a bug. Trying to run some programs with shell error with a could not close file. Sadly it I can come to any

Re: Array slice length confusion

2009-07-09 Thread Tim Matthews
Kagamin wrote: Tim Matthews Wrote: I thought a slice would behave slighty different due to some sort of meta data that is a separate area of memory so it doesn't effect D's abi. Current plan is to introduce new type - array - into the language. Do you know the ng posts or where ever that

Re: Array slice length confusion

2009-07-09 Thread Daniel Keep
Tim Matthews wrote: Kagamin wrote: Tim Matthews Wrote: I thought a slice would behave slighty different due to some sort of meta data that is a separate area of memory so it doesn't effect D's abi. Current plan is to introduce new type - array - into the language. Do you know the ng

Regex

2009-07-09 Thread Vladimir Voinkov
std.regex can't be used in compile time function call. It's quite frustrating...

Re: Regex

2009-07-09 Thread BLS
Vladimir Voinkov wrote: std.regex can't be used in compile time function call. It's quite frustrating... see dsource.org .. afaik there is a compile time regex project. hth

Re: D2 using std.proccess.shell

2009-07-09 Thread Jesse Phillips
On Thu, 09 Jul 2009 11:20:54 +0200, Lars T. Kyllingstad wrote: Jesse Phillips wrote: On Tue, 07 Jul 2009 12:04:43 +0200, Lars T. Kyllingstad wrote: Jesse Phillips wrote: I don't know if I'm misunderstanding the use of shell() or if this is a bug. Trying to run some programs with shell

Re: Array slice length confusion

2009-07-09 Thread BCS
Hello Tim, Sorry I misread (lacking sleep). Been there, done that. :oz

Re: Regex

2009-07-09 Thread Robert Fraser
BLS wrote: Vladimir Voinkov wrote: std.regex can't be used in compile time function call. It's quite frustrating... see dsource.org .. afaik there is a compile time regex project. hth http://www.dsource.org/projects/scregexp But the generated functions aren't CTFE-compatible AFAIK. A CTFE

mixins

2009-07-09 Thread Ellery Newcomer
From the specs: It is not an error to have const module variable declarations without initializers if there is no constructor. This is to support the practice of having modules serve only as declarations that are not linked in, the implementation of it will be in another module that is linked in.

pass variable names

2009-07-09 Thread Saaa
Is it possible to get the passed variable name à la: -- void functio(A...)(ref A a) { writefln(typeof(a[0])); } int i; functio(i); // prints i -- Also how do I fix this: -- functio(`i`); // Error: i is not an lvalue --

Re: pass variable names

2009-07-09 Thread Saaa
No. You should be able to get the name using an alias: void func(alias var)() { writefln(var.stringof); } Can this be combined with the tuple parameter? But you can't do it at runtime. Also how do I fix this: -- functio(`i`); // Error: i is not an lvalue You have to store the