Re: dmd 2.049 bug with take and SList?

2010-10-13 Thread Lars T. Kyllingstad
On Wed, 13 Oct 2010 18:06:15 +, Lars T. Kyllingstad wrote: > On Wed, 13 Oct 2010 16:46:09 +, Nick Treleaven wrote: > >> Hi, >> I'm new to D2 ranges but have been following D for some time. I'm >> posting here because I want to check if I'm doing anything wrong before >> filing a bug. >>

Re: What sorts of things cause cyclic dependencies?

2010-10-13 Thread Jonathan M Davis
On Wednesday 13 October 2010 23:03:05 Lars T. Kyllingstad wrote: > On Thu, 14 Oct 2010 05:53:51 +, Lars T. Kyllingstad wrote: > > On Wed, 13 Oct 2010 21:25:15 -0700, Jonathan M Davis wrote: > >> Okay. in the code that I'm working on at the moment, I get an exception > >> saying that a cyclic de

Re: lvalue method

2010-10-13 Thread Benjamin Thaut
Am 13.10.2010 15:50, schrieb BCS: Hello Benjamin, Am 08.10.2010 11:13, schrieb Lars T. Kyllingstad: On Fri, 08 Oct 2010 09:33:22 +0200, Benjamin Thaut wrote: Hi, I'm writing a vec4 math struct and I have a method of which the return value has to be a lvalue so I wonder which is the correct

Re: What sorts of things cause cyclic dependencies?

2010-10-13 Thread Lars T. Kyllingstad
On Thu, 14 Oct 2010 05:53:51 +, Lars T. Kyllingstad wrote: > On Wed, 13 Oct 2010 21:25:15 -0700, Jonathan M Davis wrote: > >> Okay. in the code that I'm working on at the moment, I get an exception >> saying that a cyclic dependency was detected but no information >> whatsoever as to where it

Re: What sorts of things cause cyclic dependencies?

2010-10-13 Thread Lars T. Kyllingstad
On Wed, 13 Oct 2010 21:25:15 -0700, Jonathan M Davis wrote: > Okay. in the code that I'm working on at the moment, I get an exception > saying that a cyclic dependency was detected but no information > whatsoever as to where it is or what it means. I haven't been able to > find much information on

What sorts of things cause cyclic dependencies?

2010-10-13 Thread Jonathan M Davis
Okay. in the code that I'm working on at the moment, I get an exception saying that a cyclic dependency was detected but no information whatsoever as to where it is or what it means. I haven't been able to find much information on them other than some discussions of making it so that the compile

Re: OO syntax

2010-10-13 Thread bearophile
spir: > Does this OO-like syntax also work with other parameter types? No, it currently doesn't. > Else, why not? I mean, also, why allow it for arrays? It was originally a compiler bug relative to just arrays. Some people have appreciated it, and it became a feature. Some people have asked t

OO syntax

2010-10-13 Thread spir
Hello, (completely new to D and to the list) I just read the following in the doc about arrays at http://www.digitalmars.com/d/2.0/arrays.html: = If the first parameter to a function is an array, the function can be called as if it were a property of the array: int[] a

Re: dmd 2.049 bug with take and SList?

2010-10-13 Thread Lars T. Kyllingstad
On Wed, 13 Oct 2010 16:46:09 +, Nick Treleaven wrote: > Hi, > I'm new to D2 ranges but have been following D for some time. I'm > posting here because I want to check if I'm doing anything wrong before > filing a bug. > > The code below is a test case I made after hitting the problem in real

Re: [D1] gc safety

2010-10-13 Thread Simen kjaeraas
%u wrote: Perhaps. Is there a way to explain it to me? Do you mean the first x elements will be objects, and the rest will be size_ts that are not pointers? Exactly that. No. The GC only cares about whole blocks, not singular locations within each. That said, there is a bug report with a GC

dmd 2.049 bug with take and SList?

2010-10-13 Thread Nick Treleaven
Hi, I'm new to D2 ranges but have been following D for some time. I'm posting here because I want to check if I'm doing anything wrong before filing a bug. The code below is a test case I made after hitting the problem in real code. Basically the pyramid recursive function should print out: [1,

Re: lvalue method

2010-10-13 Thread BCS
Hello Benjamin, Am 08.10.2010 11:13, schrieb Lars T. Kyllingstad: On Fri, 08 Oct 2010 09:33:22 +0200, Benjamin Thaut wrote: Hi, I'm writing a vec4 math struct and I have a method of which the return value has to be a lvalue so I wonder which is the correct way to do this: vec4 Normalize() c

Re: [D1] gc safety

2010-10-13 Thread %u
== Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article > %u wrote: > > == Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article > >> %u wrote: > >> > How gc unfriendly is an union of objects and sizet_t? > >> > > >> > union{ > >> > size_t arr[10]; > >> > Class obj[10]; > >> >