Array slice length confusion

2009-07-07 Thread Tim Matthews
First off if this has been asked so many times please just ignore this. You should be able to collapse this whole subject in most good new readers plus it is in d.learn out of the way so I expect no "ahh here we go again" sort of replies. Anyway I like how you can get a slice of array that is

Re: D2 using std.proccess.shell

2009-07-07 Thread Jesse Phillips
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 reasonable conclusion as

D2 phobos std.date question

2009-07-07 Thread Sam Hu
Which method/ how can I produce proper result of local datetime? getUTCtime,UTCtoLocalTime,localTimeToUTC all can not produce the proper result. Could any body help?Thanks. Regards, Sam

Re: How to release memory? (D2.0.30)

2009-07-07 Thread BCS
Reply to Steven, On Sat, 04 Jul 2009 05:11:39 -0400, Daniel Keep wrote: BCS wrote: ... The good news is that with virtual memory, all of that has almost zero cost. What matters is how much ram you are actively using. You've obviously never used a netbook with no swap file. :) Swap file

Re: Cross-references in ddoc

2009-07-07 Thread Steven Schveighoffer
On Sat, 04 Jul 2009 12:35:38 -0400, Ary Borenszweig wrote: 1. (minor problem) Why isn't this appearing in the documentation? Probably not documented (ddoc and dil only document when it sees the document tag, e.g. /*** or ///) 2. (major problem) How do you expect users to use your code i

Re: Compiler doesn't see the inherited opApply in this example

2009-07-07 Thread Steven Schveighoffer
On Fri, 03 Jul 2009 17:42:45 -0400, Mike L. wrote: module test; import std.stdio; abstract class Parent { int opApply(int delegate(ref int) dg) { int fakeDelegate(ref uint fake, ref int content) { return dg(content); }

Re: How to release memory? (D2.0.30)

2009-07-07 Thread Steven Schveighoffer
On Sat, 04 Jul 2009 05:11:39 -0400, Daniel Keep wrote: BCS wrote: ... The good news is that with virtual memory, all of that has almost zero cost. What matters is how much ram you are actively using. You've obviously never used a netbook with no swap file. :) Swap files are needed for

Re: Specify the type but not number of function arguments in an interface?

2009-07-07 Thread Jarrett Billingsley
On Tue, Jul 7, 2009 at 8:29 AM, downs wrote: > > But then isn't what he asks for kinda impossible by design? I mean, > interfaces are bound at runtime. That's what they _do_. > Now read *my* post, downs. ;)

Re: Specify the type but not number of function arguments in an interface?

2009-07-07 Thread downs
downs wrote: > Jarrett Billingsley wrote: >> On Sun, Jul 5, 2009 at 5:44 AM, downs wrote: >>> Doctor J wrote: I want to write an interface that expresses the following idea: "classes implementing this interface must have a void function named update, with a fixed but indeterminate

Re: Specify the type but not number of function arguments in an interface?

2009-07-07 Thread downs
Jarrett Billingsley wrote: > On Sun, Jul 5, 2009 at 5:44 AM, downs wrote: >> Doctor J wrote: >>> I want to write an interface that expresses the following idea: "classes >>> implementing this interface must have a void function named update, with a >>> fixed but indeterminate number of parameters

Re: D2 using std.proccess.shell

2009-07-07 Thread Lars T. Kyllingstad
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 reasonable conclusion as to why. Example output from running writeln(shell("gcc")) gcc: no inp