Re: Container access in std.container

2011-03-29 Thread Daniel Green
On 3/29/2011 4:45 AM, Ishan Thilina wrote: now all that is left is the problem with GDC. Why can't I do "import std.container" in Linux :( std.container is a D2 module. Based on your include path you have a D1 version of GDC. GDC uses include/d for D1 and include/d2 for D2.

Re: Container access in std.container

2011-03-29 Thread Steven Schveighoffer
On Tue, 29 Mar 2011 04:49:41 -0400, Jonathan M Davis wrote: On 2011-03-29 01:38, Ishan Thilina wrote: So how can I declare a redBlackTree..? I believe that you'd just do auto rb = RedBlackTree(4, 1, 2, 3); I think: auto rb = RedBlackTree!(int)(4, 1, 2, 3); But the version in git will

Re: Container access in std.container

2011-03-29 Thread spir
On 03/29/2011 12:43 PM, Ishan Thilina wrote: I'm using GDC because I can't use DMD in linux. I have started a seperate thread for that. I'm using dmd on Linux without any issue. But only stable releases (several versions have passed). May I suggest you take some time to uninstall everything p

Re: Container access in std.container

2011-03-29 Thread Ishan Thilina
>Unless you really need gdc, I'd just suggest using dmd. It's quite easy to get >working. You just unzip it wherever you want it and add >/path/to/unzipped/dmd2/linux/bin to your path, and it works. I have no clue >what it takes to get gdc to work. And the only advantage to gdc I'm aware of >is tha

Re: Container access in std.container

2011-03-29 Thread Jonathan M Davis
On 2011-03-29 01:45, Ishan Thilina wrote: > >So how can I declare a redBlackTree...? > > I'm so sorry for being this much foolish. I found the way to do it( make a > redBlackTree). Again I'm really sorry :-/. > > now all that is left is the problem with GDC. Why can't I do "import > std.container

Re: Container access in std.container

2011-03-29 Thread Jonathan M Davis
On 2011-03-29 01:38, Ishan Thilina wrote: > == Quote from Steven Wawryk (stev...@acres.com.au)'s article > > > Your environment looks wrong. Note that > > /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5 > > is equivalent to > > /usr/include/d/4.3.5 > > so I expect it can't find co

Re: Container access in std.container

2011-03-29 Thread Ishan Thilina
>So how can I declare a redBlackTree...? I'm so sorry for being this much foolish. I found the way to do it( make a redBlackTree). Again I'm really sorry :-/. now all that is left is the problem with GDC. Why can't I do "import std.container" in Linux :(

Re: Container access in std.container

2011-03-29 Thread Ishan Thilina
== Quote from Steven Wawryk (stev...@acres.com.au)'s article > Your environment looks wrong. Note that > /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5 > is equivalent to > /usr/include/d/4.3.5 > so I expect it can't find container.d > On 29/03/11 04:54, Ishan Thilina wrote: > > I

Re: Container access in std.container

2011-03-28 Thread Ishan Thilina
>Your environment looks wrong. Note that > >/usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5 > >is equivalent to > >/usr/include/d/4.3.5 I copied container.d to /usr/include/d/4.3.5/std . But the problem is still there :s

Re: Container access in std.container

2011-03-28 Thread Ishan Thilina
Steven wrote: >Your environment looks wrong. Note that > >/usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5 > >is equivalent to > >/usr/include/d/4.3.5 > >so I expect it can't find container.d Really sorry for being a burden, I'm new to D. How can I fix this Environment?

Re: Container access in std.container

2011-03-28 Thread Steven Wawryk
Your environment looks wrong. Note that /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5 is equivalent to /usr/include/d/4.3.5 so I expect it can't find container.d On 29/03/11 04:54, Ishan Thilina wrote: I am using DGC due to the problems I'm witnessing with DMD. I tried a

Re: Container access in std.container

2011-03-28 Thread Ishan Thilina
>I am using GDC due to the problems I'm witnessing with DMD. I tried a similar >approach. But the following error comes. > >" > >structures.d:4: Error: module container cannot read file 'std/container.d' >import path[0] = >/usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5/x86_64-linux

Re: Container access in std.container

2011-03-28 Thread Ishan Thilina
I am using DGC due to the problems I'm witnessing with DMD. I tried a similar approach. But the following error comes. " structures.d:4: Error: module container cannot read file 'std/container.d' import path[0] = /usr/lib/gcc/x86_64-linux-gnu/4.3.5/../../../../include/d/4.3.5/x86_64-linux-gnu imp

Re: Container access in std.container

2011-03-28 Thread Jonathan M Davis
On 2011-03-28 07:48, David Nadlinger wrote: > --- > import std.container; > import std.stdio; > > void main() { > auto rb = redBlackTree(4, 1, 2, 3); > foreach (e; rb) { > writeln(e); > } > } > --- I believe that the redBlackTree function is only in the git repository at

Re: Container access in std.container

2011-03-28 Thread David Nadlinger
On 3/28/11 4:17 PM, Ishan Thilina wrote: I know that D has some Containers implemented by default( such as a a List, Red-black tree, Array). In C++ these data structures can be used as follows. #include int main(){ std::vector myVector; std::vector::iterator myIterator; } Th