www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - "Phango" container classes

reply Bill Baxter <dnewsgroup billbaxter.com> writes:
I just decided to do a little experiment to see how hard it would be to 
make Tango's containers work with Phobos.

Answer: less than an hour's work.

Here's all it takes:
- Copy tango/util/collections/* to phango/util/collections/*.
- Copy tango/core/Exception.di to phango/core/Exception.d
- Replace all instances of 'tango' with 'phango'.
- Replace all instances of 'toUtf8' with 'toString'
- Comment out the IReader,IWriter imports in LinkMap.d
- Comment out all function prototypes in Exception.d.
- Make TracedException a simple subclass of Exception in Exception.d.
- Comment out anything else in Exception.d that gives compiler errors.

Then voila!  You have a set of container classes for Phobos.

I did some rudimentary testing by copying all the unittests from the 
containers to one big containers.d test program.  After changing Cout's 
to writefln's, all seems to work like a charm.

So this is a possible option for anyone who would like a set of 
Java-esque container classes to use with Phobos.  Certainly a heck of a 
lot easier than trying to port any implementation of C++ std::map to D.  :-)

--bb
Sep 30 2007
next sibling parent reply Bruce Adams <tortoise_74 yahoo.co.uk> writes:
Bill Baxter Wrote:

 I just decided to do a little experiment to see how hard it would be to 
 make Tango's containers work with Phobos.
 
 Answer: less than an hour's work.
 
 Here's all it takes:
 - Copy tango/util/collections/* to phango/util/collections/*.
 - Copy tango/core/Exception.di to phango/core/Exception.d
 - Replace all instances of 'tango' with 'phango'.
 - Replace all instances of 'toUtf8' with 'toString'
 - Comment out the IReader,IWriter imports in LinkMap.d
 - Comment out all function prototypes in Exception.d.
 - Make TracedException a simple subclass of Exception in Exception.d.
 - Comment out anything else in Exception.d that gives compiler errors.
 
 Then voila!  You have a set of container classes for Phobos.
 
 I did some rudimentary testing by copying all the unittests from the 
 containers to one big containers.d test program.  After changing Cout's 
 to writefln's, all seems to work like a charm.
 
 So this is a possible option for anyone who would like a set of 
 Java-esque container classes to use with Phobos.  Certainly a heck of a 
 lot easier than trying to port any implementation of C++ std::map to D.  :-)
 
 --bb
Good stuff. Have you posted the source anywhere? I see tango uses Red-black trees in some places so in those its STL equivalent or better anyway. I guess we will get all this stuff as soon as the tango / phobos incompatability is resolved. Out of interest, if you just throw the all incompatibles out of tango what kind of phango are we left with? Does it look like a worthwhile job? I'm coming from the school of Phobos is standard, Tango is not (yet) perspective. Regards, Bruce.
Oct 01 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Bruce Adams wrote:
 Bill Baxter Wrote:
 
 I just decided to do a little experiment to see how hard it would be to 
 make Tango's containers work with Phobos.

 Answer: less than an hour's work.

 Here's all it takes:
 - Copy tango/util/collections/* to phango/util/collections/*.
 - Copy tango/core/Exception.di to phango/core/Exception.d
 - Replace all instances of 'tango' with 'phango'.
 - Replace all instances of 'toUtf8' with 'toString'
 - Comment out the IReader,IWriter imports in LinkMap.d
 - Comment out all function prototypes in Exception.d.
 - Make TracedException a simple subclass of Exception in Exception.d.
 - Comment out anything else in Exception.d that gives compiler errors.

 Then voila!  You have a set of container classes for Phobos.

 I did some rudimentary testing by copying all the unittests from the 
 containers to one big containers.d test program.  After changing Cout's 
 to writefln's, all seems to work like a charm.

 So this is a possible option for anyone who would like a set of 
 Java-esque container classes to use with Phobos.  Certainly a heck of a 
 lot easier than trying to port any implementation of C++ std::map to D.  :-)

 --bb
Good stuff. Have you posted the source anywhere?
No I mostly wanted to point out that the Tango containers are 95% independent of the Tango-specific runtime features, and easy to port to Phobos. And I wanted to suggest the cool name "Phango, evil twin brother of Tangobos". :-) Maybe "Phandango" would be a better name, though.
 I see tango uses Red-black trees in some places so in those its STL
 equivalent or better anyway. 
Yes, the TreeSet and TreeMap should have same asymptotic performance characteristics as STL std::set and std::map.
 I guess we will get all this stuff as
 soon as the tango / phobos incompatability is resolved. 
That's what I'm thinking too. But I wanted to point out that anyone who is desperate for containers today can extract them from Tango with less than an hour's work of mostly mindless search and replace.
 Out of
 interest, if you just throw the all incompatibles out of tango what
 kind of phango are we left with? Does it look like a worthwhile job? 
I suspect you'd still have most of it. Far easier than porting C++ code anyway. Maybe the threading stuff is too dependent on tango's Object to port easily. I'm not sure. --bb
Oct 01 2007
next sibling parent reply Bruce Adams <tortoise_74 yeah.who.co.uk> writes:
Bill Baxter Wrote:
 
 Good stuff. Have you posted the source anywhere?
No I mostly wanted to point out that the Tango containers are 95% independent of the Tango-specific runtime features, and easy to port to Phobos. And I wanted to suggest the cool name "Phango, evil twin brother of Tangobos". :-) Maybe "Phandango" would be a better name, though.
I dunno. Sounds a bit grim to me :).
Oct 01 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 10/1/07, Bruce Adams <tortoise_74 yeah.who.co.uk> wrote:
 Maybe "Phandango" would be a better name,
 though.
I dunno. Sounds a bit grim to me :).
Thunderbolt and lightning, very very frightning me! Yes - Phandango! (PHobos AND tANGO) - Absolutely superb name!
Oct 01 2007
parent reply Bruce Adams <tortoise_74 yeah.who.co.uk> writes:
Janice Caron Wrote:

 On 10/1/07, Bruce Adams <tortoise_74 yeah.who.co.uk> wrote:
 Maybe "Phandango" would be a better name,
 though.
I dunno. Sounds a bit grim to me :).
Thunderbolt and lightning, very very frightning me! Yes - Phandango! (PHobos AND tANGO) - Absolutely superb name!
Galileo?
Oct 01 2007
parent reply Clay Smith <clayasaurus gmail.com> writes:
Bruce Adams wrote:
 Janice Caron Wrote:
 
 On 10/1/07, Bruce Adams <tortoise_74 yeah.who.co.uk> wrote:
 Maybe "Phandango" would be a better name,
 though.
I dunno. Sounds a bit grim to me :).
Thunderbolt and lightning, very very frightning me! Yes - Phandango! (PHobos AND tANGO) - Absolutely superb name!
Galileo?
Photango?
Oct 01 2007
parent Daniel Keep <daniel.keep.lists gmail.com> writes:
Clay Smith wrote:
 Bruce Adams wrote:
 Janice Caron Wrote:

 On 10/1/07, Bruce Adams <tortoise_74 yeah.who.co.uk> wrote:
 Maybe "Phandango" would be a better name,
 though.
I dunno. Sounds a bit grim to me :).
Thunderbolt and lightning, very very frightning me! Yes - Phandango! (PHobos AND tANGO) - Absolutely superb name!
Galileo?
Photango?
We are now the knights who say: ecky, ecky, ecky, PHTANGO zoop-boing! Sorry; couldn't resist. -- Daniel
Oct 01 2007
prev sibling parent BLS <nanali nospam-wanadoo.fr> writes:
Bill Baxter schrieb:
 Bruce Adams wrote:
 Bill Baxter Wrote:

 I just decided to do a little experiment to see how hard it would be 
 to make Tango's containers work with Phobos.

 Answer: less than an hour's work.

 Here's all it takes:
 - Copy tango/util/collections/* to phango/util/collections/*.
 - Copy tango/core/Exception.di to phango/core/Exception.d
 - Replace all instances of 'tango' with 'phango'.
 - Replace all instances of 'toUtf8' with 'toString'
 - Comment out the IReader,IWriter imports in LinkMap.d
 - Comment out all function prototypes in Exception.d.
 - Make TracedException a simple subclass of Exception in Exception.d.
 - Comment out anything else in Exception.d that gives compiler errors.

 Then voila!  You have a set of container classes for Phobos.

 I did some rudimentary testing by copying all the unittests from the 
 containers to one big containers.d test program.  After changing 
 Cout's to writefln's, all seems to work like a charm.

 So this is a possible option for anyone who would like a set of 
 Java-esque container classes to use with Phobos.  Certainly a heck of 
 a lot easier than trying to port any implementation of C++ std::map 
 to D.  :-)

 --bb
Good stuff. Have you posted the source anywhere?
No I mostly wanted to point out that the Tango containers are 95% independent of the Tango-specific runtime features, and easy to port to Phobos. And I wanted to suggest the cool name "Phango, evil twin brother of Tangobos". :-) Maybe "Phandango" would be a better name, though.
Phandango is excellent reminds on a song from PROCUL HARUM - "A Brighter Shade Of Pale” :) We skipped the light Phandango Turned cartwheels 'cross the floor I was feeling kind of seasick But the crowd called out for more Just kidding, Bjoern
 I see tango uses Red-black trees in some places so in those its STL
 equivalent or better anyway. 
Yes, the TreeSet and TreeMap should have same asymptotic performance characteristics as STL std::set and std::map.
 I guess we will get all this stuff as
 soon as the tango / phobos incompatability is resolved. 
That's what I'm thinking too. But I wanted to point out that anyone who is desperate for containers today can extract them from Tango with less than an hour's work of mostly mindless search and replace.
 Out of
 interest, if you just throw the all incompatibles out of tango what
 kind of phango are we left with? Does it look like a worthwhile job? 
I suspect you'd still have most of it. Far easier than porting C++ code anyway. Maybe the threading stuff is too dependent on tango's Object to port easily. I'm not sure. --bb
Oct 02 2007
prev sibling parent reply 0ffh <spam frankhirsch.net> writes:
Bill Baxter wrote:
 I just decided to do a little experiment to see how hard it would be to 
 make Tango's containers work with Phobos. [...]
Cool devices! BTW I hope this is not too OT, but: I have not much idea of the Phobos and Tango internals, but as I read it it would mostly be the distinct object (and exception?) classes that make the most trouble in making those libs compatible, or am I mistaken? I suppose decoupling the gc's off the libs shouldn't be the main trouble? This is just out of curiosity... Rgeards, Frank
Oct 01 2007
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
0ffh wrote:
 Bill Baxter wrote:
 I just decided to do a little experiment to see how hard it would be 
 to make Tango's containers work with Phobos. [...]
Cool devices! BTW I hope this is not too OT, but: I have not much idea of the Phobos and Tango internals, but as I read it it would mostly be the distinct object (and exception?) classes that make the most trouble in making those libs compatible, or am I mistaken? I suppose decoupling the gc's off the libs shouldn't be the main trouble? This is just out of curiosity... Rgeards, Frank
My guess is that the porting trouble spots all center around the modules that are supplied as .di headers in the tango distribution: tango/core/exception.di, tango/core/memory.di, and tango/core/thread.di. --bb
Oct 01 2007
prev sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 10/2/07, 0ffh <spam frankhirsch.net> wrote:
 BTW I hope this is not too OT, but:
 I have not much idea of the Phobos and Tango internals, but as I read it
 it would mostly be the distinct object (and exception?) classes that
 make the most trouble in making those libs compatible, or am I mistaken?
I suspect there are a lot of people who are happy enough with Phobos's objects and exceptions, but who wouldn't say no to a few extra snazzy container and string classes.
Oct 02 2007
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Janice Caron wrote:

 On 10/2/07, 0ffh <spam frankhirsch.net> wrote:
 BTW I hope this is not too OT, but:
 I have not much idea of the Phobos and Tango internals, but as I read it
 it would mostly be the distinct object (and exception?) classes that
 make the most trouble in making those libs compatible, or am I mistaken?
I suspect there are a lot of people who are happy enough with Phobos's objects and exceptions, but who wouldn't say no to a few extra snazzy container and string classes.
The differences in the runtime aren't really about the API's of those (Phobos and Tango will become compatible in that respect). As it is, I would expect most (if not all) to want Tango's runtime ahead of Phobos' given compatible interfaces. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Oct 02 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 As it is, I
 would expect most (if not all) to want Tango's runtime ahead of Phobos'
 given compatible interfaces.
Well certainly not "all", because "all" includes me. You have to realise, a lot of people, myself included, adopt the philosophy "If an engine ain't broke, don't fix it". If there is /no need/ to replace the runtime (which there isn't), then I'm not going to do it, because what I have right now works just fine, so I'm not going to risk breaking anything by changing it. On the other hand, I'd have no problems with just importing a module to get me lots of cool new classes.
Oct 02 2007
next sibling parent reply Regan Heath <regan netmail.co.nz> writes:
Janice Caron wrote:
 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 As it is, I
 would expect most (if not all) to want Tango's runtime ahead of Phobos'
 given compatible interfaces.
Well certainly not "all", because "all" includes me. You have to realise, a lot of people, myself included, adopt the philosophy "If an engine ain't broke, don't fix it". If there is /no need/ to replace the runtime (which there isn't), then I'm not going to do it, because what I have right now works just fine, so I'm not going to risk breaking anything by changing it. On the other hand, I'd have no problems with just importing a module to get me lots of cool new classes.
Sometimes "broken" is difficult to define. I have the impression (perhaps mistaken) that the main point of difference between the phobos and tango runtime is that tango's is better organised, has less coupling, and allows for more advanced features to be built upon it (some of which are already present in Tango). Now, I could be wrong, and if so perhaps Sean or Kris can fill me (and I suspect some of the rest of us) in on what exactly the main differences are in the core runtime. If I'm not too far off the mark, and if you take the view that those things are important and/or requirements then in that sense phobos is broken. I'm not knocking phobos or Walter, heck I'm not even using tango at this point, but then, I'm not working on any projects in D of any significant size at the moment. Assuming I am not delusional then it is my hope that the tango runtime will either replace or be a model for change to the phobos one. I also have complete faith in both Walter and the tango guys, in that I simply assume they will both do whatever is best for D, and by extension me. Regan
Oct 02 2007
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Regan Heath wrote:

 Janice Caron wrote:
 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 As it is, I
 would expect most (if not all) to want Tango's runtime ahead of Phobos'
 given compatible interfaces.
Well certainly not "all", because "all" includes me. You have to realise, a lot of people, myself included, adopt the philosophy "If an engine ain't broke, don't fix it". If there is /no need/ to replace the runtime (which there isn't), then I'm not going to do it, because what I have right now works just fine, so I'm not going to risk breaking anything by changing it. On the other hand, I'd have no problems with just importing a module to get me lots of cool new classes.
Sometimes "broken" is difficult to define. I have the impression (perhaps mistaken) that the main point of difference between the phobos and tango runtime is that tango's is better organised, has less coupling, and allows for more advanced features to be built upon it (some of which are already present in Tango).
You are not directly mistaken, but the above point has resulted in a runtime that is easier to mantain, easier to fix bugs in and has thus become something of higher quality. There are also a few features not in the Phobos runtime. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Oct 02 2007
prev sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Janice Caron wrote:

 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 As it is, I
 would expect most (if not all) to want Tango's runtime ahead of Phobos'
 given compatible interfaces.
Well certainly not "all", because "all" includes me. You have to realise, a lot of people, myself included, adopt the philosophy "If an engine ain't broke, don't fix it". If there is /no need/ to replace the runtime (which there isn't), then I'm not going to do it, because what I have right now works just fine, so I'm not going to risk breaking anything by changing it.
You may not have experienced problems yet, but there are two main reasons cited when someone switch from Phobos to Tango, where one is issues with Phobos' runtime (typically threading and the GC). In the cases where the same issue is identified in Tango, it is usually fixed by the next release (and often within days in our repository). This may sound like bragging, but it is meant as a testament to what is our main focus, the library.
 
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Oct 02 2007
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
Oct 02 2007
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Janice Caron wrote:
 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
Well an hour for the containers. io and net would probably take significantly longer. math would probably take less (it still has 'writefln's commented out in the source :-)) --bb
Oct 02 2007
prev sibling next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Janice Caron wrote:

 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
And my original post could be translated into the following question; If the runtimes are compatible, why spend time on porting the utility classes when it would be much faster to install a different runtime (it is a question of replacing one file) that usually is considered to be better? -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Oct 02 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Lars Ivar Igesund wrote:
 Janice Caron wrote:
 
 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
And my original post could be translated into the following question; If the runtimes are compatible, why spend time on porting the utility classes when it would be much faster to install a different runtime (it is a question of replacing one file) that usually is considered to be better?
If they *were* compatible then there would be less of a point. But no one really knows when or if this compatibility is going to happen. --bb
Oct 02 2007
next sibling parent reply Alexander Panek <alexander.panek brainsware.org> writes:
Bill Baxter wrote:
 If they *were* compatible then there would be less of a point.  But no 
 one really knows when or if this compatibility is going to happen.
It's been a month and some days since the conference - I don't think everything is sorted out so fast. But I am certain it /will/ be sorted out. Just have patience.
Oct 02 2007
parent reply UB <me mymail.com> writes:
How about patching phobos source and build it locally?
Is it legal?
Then there will be only one standard lib.

ub
Oct 02 2007
parent reply Alexander Panek <alexander.panek brainsware.org> writes:
UB wrote:
 How about patching phobos source and build it locally?
 Is it legal?
 Then there will be only one standard lib.
 
 ub
It is legal, as you can see with Tango.
Oct 02 2007
parent reply UB <me mymail.com> writes:
So, in such way we can have one patched standard lib and
new/additional code can go in phobos_ext.lib
what do you think about it?

ub
Oct 02 2007
next sibling parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 10/2/07, UB <me mymail.com> wrote:
 So, in such way we can have one patched standard lib and
You can have a patched standard lib, but not a standard patched lib :-)
Oct 02 2007
parent UB <me mymail.com> writes:
Yes, that's what I am saying. :) I would like to see patched Phobos with Tango
extensions.

ub
Oct 02 2007
prev sibling parent reply Alexander Panek <alexander.panek brainsware.org> writes:
UB wrote:
 So, in such way we can have one patched standard lib and
 new/additional code can go in phobos_ext.lib
 what do you think about it?
 
 ub
..that's basically what Tango does, apart from the fact that it's not an extension, but rather a replacement. The problem of having two incompatible runtime libraries (the core runtime, that is) still persists - it is addressed, though........I think I just repeated it the 95734897th time now.
Oct 02 2007
parent reply Charles D Hixson <charleshixsn earthlink.net> writes:
Alexander Panek wrote:
 UB wrote:
 So, in such way we can have one patched standard lib and
 new/additional code can go in phobos_ext.lib
 what do you think about it?

 ub
...that's basically what Tango does, apart from the fact that it's not an extension, but rather a replacement. The problem of having two incompatible runtime libraries (the core runtime, that is) still persists - it is addressed, though........I think I just repeated it the 95734897th time now.
Except that installing Tango breaks Phobos. (I know, patience. While I'm being patient, I end up programming in a different language.)
Oct 03 2007
next sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Charles D Hixson Wrote:

 Alexander Panek wrote:
 UB wrote:
 So, in such way we can have one patched standard lib and
 new/additional code can go in phobos_ext.lib
 what do you think about it?

 ub
...that's basically what Tango does, apart from the fact that it's not an extension, but rather a replacement. The problem of having two incompatible runtime libraries (the core runtime, that is) still persists - it is addressed, though........I think I just repeated it the 95734897th time now.
Except that installing Tango breaks Phobos. (I know, patience. While I'm being patient, I end up programming in a different language.)
I feel your pain, but D is still a relatively new language, so you probably shouldn't be using it for production code, yet, anyway. By programming in D, you're accepting that the language, as powerful as it is, is definitely not "everything it will be."
Oct 03 2007
parent Derek Parnell <derek psych.ward> writes:
On Wed, 03 Oct 2007 18:42:17 -0400, Robert Fraser wrote:

 Charles D Hixson Wrote:
 
 Alexander Panek wrote:
 UB wrote:
 So, in such way we can have one patched standard lib and
 new/additional code can go in phobos_ext.lib
 what do you think about it?

 ub
...that's basically what Tango does, apart from the fact that it's not an extension, but rather a replacement. The problem of having two incompatible runtime libraries (the core runtime, that is) still persists - it is addressed, though........I think I just repeated it the 95734897th time now.
Except that installing Tango breaks Phobos. (I know, patience. While I'm being patient, I end up programming in a different language.)
I feel your pain, but D is still a relatively new language
It has nothing to do with D being "relatively" new. The problem is that there are far too few people who a working on D and its library on a full-time basis. Thus we get a dribble of output, which enforces the need for patience. I know there is a such a thing as balance between too many and too few, but I'm pretty sure we are still on the "too few" side of the see-saw. The bottleneck is Walter's ability to encorporate change, whether change comes from himself or others. This has a direct effect on GDC too as it can't "outstrip" Walter's output because it doesn't know where D is going until Walter implements stuff. From my uninformed position, it appears that Tango and Phobos can never co-exist until Walter agrees to replace Phobos' runtime paradigm with the superior Tango one. And that's is not going to be a simple thing for Walter to agree to. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell
Oct 03 2007
prev sibling parent reply Alexander Panek <a.panek brainsware.org> writes:
Charles D Hixson wrote:
 Except that installing Tango breaks Phobos.
There's a difference between breaking and replacing. Just back up your libphobos.a and there you go. Apart from that, there's soon to come support for the new compiler flags (-defaultlib, -debuglib) in Tango, which should render your statement obsolete.
Oct 03 2007
parent Charles D Hixson <charleshixsn earthlink.net> writes:
Alexander Panek wrote:
 Charles D Hixson wrote:
 Except that installing Tango breaks Phobos.
There's a difference between breaking and replacing. Just back up your libphobos.a and there you go. Apart from that, there's soon to come support for the new compiler flags (-defaultlib, -debuglib) in Tango, which should render your statement obsolete.
When the flags become available, then the statement may well be obsolete. At the moment...being able to restore phobos doesn't mean that it isn't currently broken. Having them both installed and neither broken implies that I can have programs that use a mix of phobos and tango calls...possibly in different object files. Until that's true, the D code base is fragmented and at least one of the libraries is either broken or not installed.
Oct 04 2007
prev sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Bill Baxter wrote:

 Lars Ivar Igesund wrote:
 Janice Caron wrote:
 
 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
And my original post could be translated into the following question; If the runtimes are compatible, why spend time on porting the utility classes when it would be much faster to install a different runtime (it is a question of replacing one file) that usually is considered to be better?
If they *were* compatible then there would be less of a point. But no one really knows when or if this compatibility is going to happen. --bb
It is not a "it it will happen", just a question of when as there are bandwidth restrictions :) We want to resolve this ASAP. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Oct 02 2007
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Lars Ivar Igesund wrote:
 Bill Baxter wrote:
 
 Lars Ivar Igesund wrote:
 Janice Caron wrote:

 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
And my original post could be translated into the following question; If the runtimes are compatible, why spend time on porting the utility classes when it would be much faster to install a different runtime (it is a question of replacing one file) that usually is considered to be better?
If they *were* compatible then there would be less of a point. But no one really knows when or if this compatibility is going to happen. --bb
It is not a "it it will happen", just a question of when as there are bandwidth restrictions :) We want to resolve this ASAP.
Yeh, that's fine. I understand that. But I'm writing code that needs container classes *today*. So I just thought I'd give porting to phobos a try. And hey! It wasn't that hard and now I have some container classes I can use until the schism is mended. That's all I'm saying. --bb
Oct 02 2007
prev sibling parent Alexander Panek <alexander.panek brainsware.org> writes:
Janice Caron wrote:
 On 10/2/07, Lars Ivar Igesund <larsivar igesund.net> wrote:
 On the other hand, I'd have no problems with just importing a module
 to get me lots of cool new classes.
This is the other reason for people switching.
Ah, but the whole point of this thread is that I don't /need/ to switch, because now we know that with about an hour's effort we can make those classes work with Phobos. That's what "Phango" (or "Phandango") means. I don't /want/ to have to rip out the innards of D just to make a string class work.
Well it's up to you what you want, and how much effort you are willing to put into /porting/ the parts you try to use - as opposed to just using them inside the complete Tango environment. ..but before you get started: don't. I have read enough to see your point: "Don't swim upstream, ffs! What are you doing! That's not standard!". No offense intended, but you seem to be ridiculously reluctant to changes made by other than the original author of an environment (which is Walter in case of D and Phobos). You also seem to forget, that we're talking all open source and partly even free software (F/OSS).
Oct 02 2007