No map file?

2009-03-23 Thread Frank Benoit
How can i make DMD (link/optlink) not to generate a map file? -L/NOM or -LNOMAP both seem not work.

Re: How to reduce compile times?

2009-03-23 Thread Robert Fraser
Jarrett Billingsley wrote: On Sat, Mar 21, 2009 at 3:45 PM, grauzone wrote: Also, I noticed that "dsss build -full" seems to be the way to pass this flag on the command line. But the project is recompiled even when no file was modified at all. This is not good: it should only recompile if somet

Re: How to reduce compile times?

2009-03-23 Thread grauzone
Jarrett Billingsley wrote: On Sat, Mar 21, 2009 at 3:45 PM, grauzone wrote: Also, I noticed that "dsss build -full" seems to be the way to pass this flag on the command line. But the project is recompiled even when no file was modified at all. This is not good: it should only recompile if somet

I hate ".dup"

2009-03-23 Thread Qian Xu
I have spent one day to find out an error. - class MyTime { this(char[] timestring) { Time t; int p = tango.time.TimeStamp.iso8601(timestring, t); //... } // other methods } unittest { MyTime mt = new MyTime("

Re: No map file?

2009-03-23 Thread torhu
On 23.03.2009 10:02, Frank Benoit wrote: How can i make DMD (link/optlink) not to generate a map file? -L/NOM or -LNOMAP both seem not work. I don't know, but bud manages this somehow, so Derek Parnell might know.

Tango ftp module

2009-03-23 Thread Trass3r
Has anyone ever tried the tango ftp code? Nothing really works for me, even for simple cases. For example, when using ls() it gets stuck in parseMlstLine() cause the exception throw new FTPException("CLIENT: Bad syntax in MLSx response", "501"); doesn't get caught. Thus the else branch isn't ex

Re: I hate ".dup"

2009-03-23 Thread BCS
Hello Qian, Oh god. I have to add ".dup" at the end of every string to avoid potential program errors. This is so incredible Run it on linux and it will seg-v when you try to access a literal string. Oh, and that issue is in no way unique to D. Any language with mutable strings will hav

Re: No map file?

2009-03-23 Thread Jarrett Billingsley
On Mon, Mar 23, 2009 at 11:11 AM, torhu wrote: > On 23.03.2009 10:02, Frank Benoit wrote: >> >> How can i make DMD (link/optlink) not to generate a map file? >> >> -L/NOM or -LNOMAP >> >> both seem not work. > > I don't know, but bud manages this somehow, so Derek Parnell might know. > rm *.map

Re: I hate ".dup"

2009-03-23 Thread Jarrett Billingsley
On Mon, Mar 23, 2009 at 12:15 PM, BCS wrote: > Hello Qian, > >> Oh god. I have to add ".dup" at the end of every string to avoid >> potential program errors. This is so incredible >> > > Run it on linux and it will seg-v when you try to access a literal string. > > Oh, and that issue is in no

Re: I hate ".dup"

2009-03-23 Thread Steven Schveighoffer
On Mon, 23 Mar 2009 11:07:16 -0400, Qian Xu wrote: I have spent one day to find out an error. - class MyTime { this(char[] timestring) { Time t; int p = tango.time.TimeStamp.iso8601(timestring, t); //... } /

mixing array and string .find()

2009-03-23 Thread Brian
is it possible to write a generic .find function for arrays that ignores strings and so doesn't cause conflicts? I think in D2 its easy by putting an if() constraint on the template, but is it possible in D1? like: int find(T)(T[] array, T obj) { foreach (i, v; array) { i

Re: No map file?

2009-03-23 Thread Derek Parnell
On Mon, 23 Mar 2009 10:02:28 +0100, Frank Benoit wrote: > How can i make DMD (link/optlink) not to generate a map file? > > -L/NOM or -LNOMAP > > both seem not work. You can't using dmd. It doesn't generate the right linker options for you to avoid the map file. I do it in Bud by not having DMD

Re: mixing array and string .find()

2009-03-23 Thread Jarrett Billingsley
On Mon, Mar 23, 2009 at 8:11 PM, Brian wrote: > is it possible to write a generic .find function for arrays that ignores > strings and so doesn't cause conflicts? I think in D2 its easy by putting > an if() constraint on the template, but is it possible in D1? like: D2's overload sets would help

Re: mixing array and string .find()

2009-03-23 Thread Denis Koroskin
Try the following: int find(T)(T[] array, T obj) if (!is(T : char)) { foreach (i, v; array) { if (v == obj) return i; } return -1; }

Re: mixing array and string .find()

2009-03-23 Thread Jarrett Billingsley
On Mon, Mar 23, 2009 at 9:11 PM, Denis Koroskin <2kor...@gmail.com> wrote: > Try the following: > > int find(T)(T[] array, T obj) if (!is(T : char)) > { >        foreach (i, v; array) { >                if (v == obj) >                        return i; >        } >        return -1; > } > > in D1.

Re: mixing array and string .find()

2009-03-23 Thread BCS
Hello Brian, is it possible to write a generic .find function for arrays that ignores strings and so doesn't cause conflicts? I think in D2 its easy by putting an if() constraint on the template, but is it possible in D1? like: one solution is to dump the std.string.find (or alias it) and hav