Robert Fraser Wrote:
> D. Reeds wrote:
> > can anybody help me translate this c code into d, im using D1+tango combo.
> > i'm new to D and got stucked on multi-dimension array part.
> >
> > int levenshtein_distance(char *s,char*t)
> > //Compute levenshtein distance between s and t
> > {
> > /
Robert Fraser Wrote:
> D. Reeds wrote:
> > can anybody help me translate this c code into d, im using D1+tango combo.
> > i'm new to D and got stucked on multi-dimension array part.
> >
> > int levenshtein_distance(char *s,char*t)
> > //Compute levenshtein distance between s and t
> > {
> > /
D. Reeds wrote:
can anybody help me translate this c code into d, im using D1+tango combo. i'm new to D and got stucked on multi-dimension array part.
int levenshtein_distance(char *s,char*t)
//Compute levenshtein distance between s and t
{
//Step 1
int k,i,j,n,m,cost,*d,distance;
n=strle
can anybody help me translate this c code into d, im using D1+tango combo. i'm
new to D and got stucked on multi-dimension array part.
int levenshtein_distance(char *s,char*t)
//Compute levenshtein distance between s and t
{
//Step 1
int k,i,j,n,m,cost,*d,distance;
n=strlen(s);
m=strlen
Trass3r wrote:
Robert Fraser schrieb:
Windows or Unix?
Currently I only need Windoze, but knowing the linux situation wouldn't
be bad either.
There's no Windows stack trace that works with the newest Phobos AFAIK,
however if you're using D2, you could probably copy Tango's stacktrace
pret
On Thu, Jul 16, 2009 at 9:47 PM, Sam Hu wrote:
> Hi,
>
> With below code:
> class A
> {
> }
> class B
> {
> public:
> ref A createA() // q2:without type name A is also OK?
> {
> return new A;//q1
> }
>
> }
> My questions are:
> q1.why this can't work?
Because 'new A' is not an lvalue. Why do
Hi,
With below code:
class A
{
}
class B
{
public:
ref A createA() // q2:without type name A is also OK?
{
return new A;//q1
}
}
My questions are:
q1.why this can't work?
q2.I can understand below code works:
A createA(){return new A;}
but why this one also works?
ref createA(){return new
Robert Fraser schrieb:
Windows or Unix?
Currently I only need Windoze, but knowing the linux situation wouldn't
be bad either.
Trass3r wrote:
Is there a way to get a stacktrace when an exception occurs in recent
Phobos versions?
Windows or Unix?
On Thu, 16 Jul 2009 14:56:28 -0400, Jarrett Billingsley
wrote:
On Thu, Jul 16, 2009 at 2:22 PM, Steven
Schveighoffer wrote:
What about syntax to force closure behavior (on or off)? Not that I
have
any to suggest, but if the compiler is going to remain ignorant about
escape
analysis, th
On Thu, Jul 16, 2009 at 2:33 PM, bearophile wrote:
> Jens:
>> // On dmd v2.029, linux build, this...
>> call(makedelegate1()); // ...works: 27
>> call(makedelegate2()); // ...works: 7
>> call(makedelegate3()); // ...doesn't work: 134518855
>> call(makedelegate4()); // ...doesn't work: 1345
On Thu, Jul 16, 2009 at 2:22 PM, Steven
Schveighoffer wrote:
>
> What about syntax to force closure behavior (on or off)? Not that I have
> any to suggest, but if the compiler is going to remain ignorant about escape
> analysis, then we should be able to supply the intelligence, and hacking an
> e
Jens:
> // On dmd v2.029, linux build, this...
> call(makedelegate1()); // ...works: 27
> call(makedelegate2()); // ...works: 7
> call(makedelegate3()); // ...doesn't work: 134518855
> call(makedelegate4()); // ...doesn't work: 134518947
> Foo f;
> call(&f.bar); // ...works: 7
I have
On Thu, 16 Jul 2009 13:34:27 -0400, Jarrett Billingsley
wrote:
On Thu, Jul 16, 2009 at 1:24 PM, BCS wrote:
Reply to Jarrett,
I think what's going on here is that the compiler will *only* allocate
closures for nested functions. However allocating a closure for a
delegate of a value object w
On Thu, Jul 16, 2009 at 1:24 PM, BCS wrote:
> Reply to Jarrett,
>
>> I think what's going on here is that the compiler will *only* allocate
>> closures for nested functions. However allocating a closure for a
>> delegate of a value object would be a nice addition.
>>
>
> This will quickly devolve i
Reply to Jarrett,
I think what's going on here is that the compiler will *only* allocate
closures for nested functions. However allocating a closure for a
delegate of a value object would be a nice addition.
This will quickly devolve into the general escape analysts problem and here
there be
Is there a way to get a stacktrace when an exception occurs in recent
Phobos versions?
On Thu, Jul 16, 2009 at 8:02 AM, Jens wrote:
> Hello there,
>
> I'm new to D and experimenting with closures. I know the basics of how
> compilers translate things, especially in C++. So I appreciate the difficulty
> of implementing closures correctly and been wondering if it really works. I
> f
Hello there,
I'm new to D and experimenting with closures. I know the basics of how
compilers translate things, especially in C++. So I appreciate the difficulty
of implementing closures correctly and been wondering if it really works. I
found a place where dmd 2 appears to fail, but I don't kn
19 matches
Mail list logo