www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Polishing D - suggestions and comments

reply Dan <murpsoft hotmail.com> writes:
Kris Wrote:

 
 "Jarrod" <qwerty ytre.wq> wrote in message 
 news:fnfa1t$1o1g$2 digitalmars.com...
 
 What bugs me overall is not the rift between features on either side, but
 rather the incompatibility issues. Unless there is a merge, there will be
 two standards..

Jarrod: In what manner does Tangobos not provide the "merge" you describe? It permits you to import, compile and link both phobos and Tango modules without fuss (which is what people had asked for). If you have a different idea of what that "merge" should instead be, would you please clarify?

The thing they're asking for is a single semantically coherent library. Essentially, take tangobos, make it "the" library, and then mix and match redundant parts to get the best of each. I'm a purist, so I dread the day that D's entire library infrastructure is based on classes. You can't tell me that the performance hit from classes is trivial. I see the best case being: 1) Establish a central repository of algorithms, such that anyone can submit algorithms to the repository. - Committed algorithms would need to solve some problem domain, and would not be trivially implemented with one-liners or other items in the library. - Each algorithm could be versioned separately, and require review and approval before being committed. - People ought to be able to sync their library to the standard repository. Perhaps by offering them read-only SVN access. This would let people revert to some old version of the standard library used to compile a program 5 years, 3 months and a day ago.
Jan 26 2008
next sibling parent reply "Kris" <foo bar.com> writes:
"Dan" <murpsoft hotmail.com> wrote in message 
news:fngu5g$2oi3$1 digitalmars.com...
 Kris Wrote:

 "Jarrod" <qwerty ytre.wq> wrote in message
 news:fnfa1t$1o1g$2 digitalmars.com...

 What bugs me overall is not the rift between features on either side, 
 but
 rather the incompatibility issues. Unless there is a merge, there will 
 be
 two standards..

Jarrod: In what manner does Tangobos not provide the "merge" you describe? It permits you to import, compile and link both phobos and Tango modules without fuss (which is what people had asked for). If you have a different idea of what that "merge" should instead be, would you please clarify?

The thing they're asking for is a single semantically coherent library.

Many would say that is exactly the role of Tango ;)
 Essentially, take tangobos, make it "the" library, and then mix and match 
 redundant parts to get the best of each.

That's a nice proposition, though probably very hard to satisfy more than one person in reality?
 I'm a purist, so I dread the day that D's entire library infrastructure is 
 based on classes.  You can't tell me that the performance hit from classes 
 is trivial.

I'm somewhat of a purist also, and a strong proponent of efficient code (you'd know that if the conference videos had ever been released). Others involved with Tango are of a similar mind so, given that, permit me to point out some things you (and/or others) may not be aware of: - You said "entire library infrastructure is based on classes", with perhaps a vague implication that's what Tango is about. This would be entirely false information, with the potential to mislead others. Phobos also has a number of classes, apparently in about the same ratio as Tango - When it comes to performance there are always tradeoffs. For the most part (with one or two exceptions) we feel that Tango gets it right, though some disagree on the finer points. For example: there is one specific Tango class that gets some flack, yet in usage it often saves a significant amount of heap activity. One problem is that many people often see "new" and immediately go "aha!", while not bothering to profile anything in real usage. - D has the scope keyword, which places classes on the stack (like a struct) - When D finally gets struct ctors, Tango /may/ change one or two things. I could go on, but the point is an old and boring one - don't judge a book by the cover. Tango is known to be significantly more efficient than phobos in all the ways we've tried in practice, and makes a concerted effort to design in a manner whereby heap-activity is minimized ... and to do so where it actually counts. Honestly, it really wouldn't be worth all the effort otherwise ;)
 I see the best case being:

 1) Establish a central repository of algorithms, such that anyone can 
 submit algorithms to the repository.

 - Committed algorithms would need to solve some problem domain, and would 
 not be trivially implemented with one-liners or other items in the 
 library.

 - Each algorithm could be versioned separately, and require review and 
 approval before being committed.

 - People ought to be able to sync their library to the standard 
 repository.  Perhaps by offering them read-only SVN access.  This would 
 let people revert to some old version of the standard library used to 
 compile a program 5 years, 3 months and a day ago.

What you describe is pretty much how Tango operates, and has done for the last year ;) Cheers;
Jan 26 2008
next sibling parent reply Jarrod <qwerty ytre.wq> writes:
On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:

 "Dan" <murpsoft hotmail.com> wrote in message
 news:fngu5g$2oi3$1 digitalmars.com...
 Kris Wrote:


 "Jarrod" <qwerty ytre.wq> wrote in message
 news:fnfa1t$1o1g$2 digitalmars.com...

 What bugs me overall is not the rift between features on either
 side, but
 rather the incompatibility issues. Unless there is a merge, there
 will be
 two standards..

Jarrod: In what manner does Tangobos not provide the "merge" you describe? It permits you to import, compile and link both phobos and Tango modules without fuss (which is what people had asked for). If you have a different idea of what that "merge" should instead be, would you please clarify?

The thing they're asking for is a single semantically coherent library.


^That.
 Many would say that is exactly the role of Tango ;)

Then why is it not the standard library?
 Essentially, take tangobos, make it "the" library, and then mix and
 match redundant parts to get the best of each.

That's a nice proposition, though probably very hard to satisfy more than one person in reality?

And the current API does? As for the rest of your reply, I'm not really trying to debate core differences or implementation details and philosophies. I'm trying to find any possible compromise but from what I've seen you seem to be very strongly against any form of it. Oh, and I read your other reply regarding the creation of Tango, too. (Damn these branching threads.) If Tango was made because Phobos was in tatters in the past, then what is the motivation now? Phobos is once again moving along nicely. Why can't the Tango team help it advance?
Jan 26 2008
parent reply "Kris" <foo bar.com> writes:
"Jarrod" <qwerty ytre.wq> wrote in message 
news:fnh54c$2utd$1 digitalmars.com...
[snip]
 from what I've seen you seem to be very
 strongly against any form of it.

That's just not the case. Anyone at the D conference would probably verify that <g>
 If Tango was made because Phobos was in tatters in the past, then what is
 the motivation now?

Forgive me, but I have to ask if you know much about the Tango library? I mean, how long have you used it for? It's really not my goal to simply contradict your points (which are all good questions, btw), but there is rather a lot of supposition being expressed about Tango today <g>
 Phobos is once again moving along nicely. Why can't
 the Tango team help it advance?

Given that phobos is currently adopting code from Tango, how did you arrive at this supposition about the Tango team?
Jan 26 2008
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Jarrod wrote:

 On Sat, 26 Jan 2008 22:34:43 -0800, Kris wrote:
 
 "Jarrod" <qwerty ytre.wq> wrote in message
 news:fnh54c$2utd$1 digitalmars.com... [snip]
 from what I've seen you seem to be very strongly against any form of
 it.

That's just not the case. Anyone at the D conference would probably verify that <g>
 If Tango was made because Phobos was in tatters in the past, then what
 is the motivation now?

Forgive me, but I have to ask if you know much about the Tango library? I mean, how long have you used it for? It's really not my goal to simply contradict your points (which are all good questions, btw), but there is rather a lot of supposition being expressed about Tango today <g>

I don't read up on the history of a library, I'm merely an end user. I find it odd you think using the library for longer would change my knowledge of Tango's design goals particularly in relation to Phobos. I just see the situation for how it currently is: Two completely different core libraries. Bad.

Not completely different, but Tango's runtime has fixes that necessiated breaking changes. AFAIK, the only compatibility issue still unresolved is the thread API and that really has to be handled in the Phobos end (that's were many of the fixes have been applied).
 Pretty simple issue. Apparently, not simple to solve though.

Phobos has its own obligations towards its users in terms of backwards compatibility, plus that even if we believe the Tango runtime is of good quality, Walter et al probably wish to confirm this by themselves. Maybe they won't use the runtime wholesale, but just make sure it is compatible. In any case isn't this an instant fix (we're talking a full library), although it seems pretty easy from a birds eye perspective. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jan 31 2008
prev sibling next sibling parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:

 - You said "entire library infrastructure is based on classes", with
 perhaps a vague implication that's what Tango is about. This would be
 entirely false information, with the potential to mislead others. Phobos
 also has a number of classes, apparently in about the same ratio as
 Tango

I would have to say that I have had the same perception as Dan here. From a general glance, Tango looks like it is solely class based. My choice not to use Tango was made back in its initial release dates. I have fallowed general discussion regarding Tango, but never felt the need/ desire to switch. This has been changing though, there have been times I wish I was coding in Tango because of something it provided. As such I will be happy to be switching over once my book arrives. I would like to also state my opinion on the Standard Library matter (coming from someone that hasn't used Tango). Tango should be standard. I don't think Phobos should die, but in general it looks like Tango has taken the lead. This is not to say that the one with the most features wins, but the one that is getting the most project support. Dsource is being filled with Tango based code; even ports from Phobos code bases. In my view the D language contributors have spoken, Tango is the library to use in development. Maybe, Phobos can be the dmd test bed library. You know for all the rapid changes that happen during alpha/beta.
Jan 27 2008
next sibling parent reply "Kris" <foo bar.com> writes:
"Jesse Phillips" <jessekphillips gmail.com> wrote in message 
news:fnhfnc$g0q$1 digitalmars.com...
 On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:

 - You said "entire library infrastructure is based on classes", with
 perhaps a vague implication that's what Tango is about. This would be
 entirely false information, with the potential to mislead others. Phobos
 also has a number of classes, apparently in about the same ratio as
 Tango

I would have to say that I have had the same perception as Dan here. From a general glance, Tango looks like it is solely class based. My choice

Thanks, that's useful to know, and which Tango will take steps to remedy. Do you have any suggestions as to how the perception might be rectified or adjusted?
 not to use Tango was made back in its initial release dates. I have
 fallowed general discussion regarding Tango, but never felt the need/
 desire to switch. This has been changing though, there have been times I
 wish I was coding in Tango because of something it provided. As such I
 will be happy to be switching over once my book arrives.

 I would like to also state my opinion on the Standard Library matter
 (coming from someone that hasn't used Tango). Tango should be standard. I
 don't think Phobos should die, but in general it looks like Tango has
 taken the lead. This is not to say that the one with the most features
 wins, but the one that is getting the most project support. Dsource is
 being filled with Tango based code; even ports from Phobos code bases. In
 my view the D language contributors have spoken, Tango is the library to
 use in development.

 Maybe, Phobos can be the dmd test bed library. You know for all the rapid
 changes that happen during alpha/beta.

In the past, that was a fairly common view of the phobos role. If it were still to hold true, that would be just as important today as back then. Tango played a companion role in that respect, since it tended to push the compiler to the limits -- new releases would often break when presented with Tango code - Kris
Jan 27 2008
next sibling parent reply Dan <murpsoft hotmail.com> writes:
Kris Wrote:
 
 "Jesse Phillips" <jessekphillips gmail.com> wrote in message 
 news:fnhfnc$g0q$1 digitalmars.com...
 On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:

 I would have to say that I have had the same perception as Dan here. From
 a general glance, Tango looks like it is solely class based. My choice

Thanks, that's useful to know, and which Tango will take steps to remedy. Do you have any suggestions as to how the perception might be rectified or adjusted?

Perhaps if a few of us (me) got of our collective asses and looked at the code again since the first release; we might have more appreciation for it and stop spreading FUD. : )
Jan 27 2008
parent "Kris" <foo bar.com> writes:
"Dan" <murpsoft hotmail.com> wrote in message 
news:fnhhae$pqf$1 digitalmars.com...
 Kris Wrote:
 "Jesse Phillips" <jessekphillips gmail.com> wrote in message
 news:fnhfnc$g0q$1 digitalmars.com...
 On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:

 I would have to say that I have had the same perception as Dan here. 
 From
 a general glance, Tango looks like it is solely class based. My choice

Thanks, that's useful to know, and which Tango will take steps to remedy. Do you have any suggestions as to how the perception might be rectified or adjusted?

Perhaps if a few of us (me) got of our collective asses and looked at the code again since the first release; we might have more appreciation for it and stop spreading FUD. : )

lol :-D Seriously though, it sounds like we need to do a much better job here
Jan 27 2008
prev sibling parent "Kris" <foo bar.com> writes:
"Jesse Phillips" <jessekphillips gmail.com> wrote in message 
news:fnim87$2s2d$1 digitalmars.com...
 On Sun, 27 Jan 2008 00:51:20 -0800, Kris wrote:

 "Jesse Phillips" <jessekphillips gmail.com> wrote in message
 news:fnhfnc$g0q$1 digitalmars.com...

 I would have to say that I have had the same perception as Dan here.
 From a general glance, Tango looks like it is solely class based. My
 choice

Thanks, that's useful to know, and which Tango will take steps to remedy. Do you have any suggestions as to how the perception might be rectified or adjusted?

I supposed it is related to what Christopher observed. "The only thing I've really noticed, browsing through the source, is formatting and console IO being provided by classes." One of the first things people/ myself see is IO, and as such probably the formatting second. I see no reason to wrap them in functions. I suppose it would be best to acknowledge this concern somewhere and state its falsehood.

Thanks. Larsivi recently started a FAQ on the Wiki ... perhaps that could act as a home for this ? - Kris
Jan 27 2008
prev sibling next sibling parent reply Christopher Wright <dhasenan gmail.com> writes:
Jesse Phillips wrote:
 On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:
 
 - You said "entire library infrastructure is based on classes", with
 perhaps a vague implication that's what Tango is about. This would be
 entirely false information, with the potential to mislead others. Phobos
 also has a number of classes, apparently in about the same ratio as
 Tango

I would have to say that I have had the same perception as Dan here. From a general glance, Tango looks like it is solely class based.

Tango has a lot more things that hold data than Phobos. Collections and datetimes, for instance. Some things it keeps as static struct methods, like WallClock.Now, for namespaces. The only thing I've really noticed, browsing through the source, is formatting and console IO being provided by classes. That's about three classes, total, that I've seen that could be done away with. But the result of replacing the formatting class with free-floating functions would be more verbose code, due to template arguments. Solving this perception is a matter of advertising, not of changing code. That is unfortunate; changing code is much easier and faster.
Jan 27 2008
parent reply Sean Kelly <sean f4.ca> writes:
Christopher Wright wrote:
 Jesse Phillips wrote:
 On Sat, 26 Jan 2008 20:33:23 -0800, Kris wrote:

 - You said "entire library infrastructure is based on classes", with
 perhaps a vague implication that's what Tango is about. This would be
 entirely false information, with the potential to mislead others. Phobos
 also has a number of classes, apparently in about the same ratio as
 Tango

I would have to say that I have had the same perception as Dan here. From a general glance, Tango looks like it is solely class based.

Tango has a lot more things that hold data than Phobos. Collections and datetimes, for instance. Some things it keeps as static struct methods, like WallClock.Now, for namespaces. The only thing I've really noticed, browsing through the source, is formatting and console IO being provided by classes. That's about three classes, total, that I've seen that could be done away with.

They could be wrapped in functions perhaps, but not done away with entirely. The formatting code lives in a class because it integrates with the i8n features in Tango. However, I think one could argue that there should be a pre-existing, global formatter instance.
 But the result of replacing the formatting class with
 free-floating functions would be more verbose code, due to template
 arguments.

Yup.
 Solving this perception is a matter of advertising, not of changing
 code. That is unfortunate; changing code is much easier and faster.

I agree. From what people have said, it seems like the greatest obstacle Tango has to overcome is the first-glance or second-hand perception of it. Which is fare more difficult an obstacle than code problems. Sean
Jan 27 2008
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Sean Kelly wrote:
 Christopher Wright wrote:
 Jesse Phillips wrote:

I agree. From what people have said, it seems like the greatest obstacle Tango has to overcome is the first-glance or second-hand perception of it. Which is fare more difficult an obstacle than code problems.

I think it would help if there were a global function-based interface for printing, so I didn't have to keep praying to St. Dout every time I want to get some output. Call me sloppy but I like being able to just use a simple function like "printf/writefln" when writing my crappy code. --bb
Jan 27 2008
prev sibling parent reply "Kris" <foo bar.com> writes:
"Sean Kelly" <sean f4.ca> wrote in message 
news:fnih3r$2vvp$2 digitalmars.com...
 Christopher Wright wrote:
 Tango has a lot more things that hold data than Phobos. Collections and
 datetimes, for instance. Some things it keeps as static struct methods,
 like WallClock.Now, for namespaces. The only thing I've really noticed,
 browsing through the source, is formatting and console IO being provided
 by classes. That's about three classes, total, that I've seen that could
 be done away with.

They could be wrapped in functions perhaps, but not done away with entirely. The formatting code lives in a class because it integrates with the i8n features in Tango. However, I think one could argue that there should be a pre-existing, global formatter instance.

(which there is, for utf8)
Jan 27 2008
parent reply Don Clugston <dac nospam.com.au> writes:
Kris wrote:
 "Sean Kelly" <sean f4.ca> wrote in message 
 news:fnih3r$2vvp$2 digitalmars.com...
 Christopher Wright wrote:
 Tango has a lot more things that hold data than Phobos. Collections and
 datetimes, for instance. Some things it keeps as static struct methods,
 like WallClock.Now, for namespaces. The only thing I've really noticed,
 browsing through the source, is formatting and console IO being provided
 by classes. That's about three classes, total, that I've seen that could
 be done away with.

entirely. The formatting code lives in a class because it integrates with the i8n features in Tango. However, I think one could argue that there should be a pre-existing, global formatter instance.

(which there is, for utf8)

If even Sean doesn't know that, then there's *really* an advertising problem <g>.
Jan 30 2008
parent Sean Kelly <sean f4.ca> writes:
Don Clugston wrote:
 Kris wrote:
 "Sean Kelly" <sean f4.ca> wrote in message
 news:fnih3r$2vvp$2 digitalmars.com...
 Christopher Wright wrote:
 Tango has a lot more things that hold data than Phobos. Collections and
 datetimes, for instance. Some things it keeps as static struct methods,
 like WallClock.Now, for namespaces. The only thing I've really noticed,
 browsing through the source, is formatting and console IO being
 provided
 by classes. That's about three classes, total, that I've seen that
 could
 be done away with.

entirely. The formatting code lives in a class because it integrates with the i8n features in Tango. However, I think one could argue that there should be a pre-existing, global formatter instance.

(which there is, for utf8)

If even Sean doesn't know that, then there's *really* an advertising problem <g>.

It was a mistake on my part. Some of the globals were removed a while back, and I thought that was one of them. Just goes to show how often I've needed to do any string formatting recently. I really should have checked before posting. :-) Sean
Jan 30 2008
prev sibling next sibling parent reply Jason House <jason.james.house gmail.com> writes:
Jesse Phillips wrote:
 I would like to also state my opinion on the Standard Library matter
 (coming from someone that hasn't used Tango). Tango should be standard. I
 don't think Phobos should die, but in general it looks like Tango has
 taken the lead. This is not to say that the one with the most features
 wins, but the one that is getting the most project support. Dsource is
 being filled with Tango based code; even ports from Phobos code bases. In
 my view the D language contributors have spoken, Tango is the library to
 use in development.

I agree that Tango should be considered standard, or at least put on equal footing with Phobos, such as releasing dmd with both Phobos and Tango. Of course, Tangobos really makes things simple... Releasing dmd with a combo of Tango and Tangobos is probably more consistent. The only problem I see with that is that tango has not been on the D 2.x train. Maybe just 1.x releases should do this? In my ideal world, as changes to the D compiler occur, some motivated Tango maintainer would get advance warning and ensure compatibility prior to official release. I don't know if this simply means branding some Phobos maintainers to have a dual role. Personally, I switched from Phobos to Tango when I stumbled upon GC issues in Phobos (that were well documented for a very long time) that had been fixed in Tango long before I discovered them. At the time, it looked like Tango had better developer support than Phobos. As an additional side-effect, items that I had banged my head against with Phobos were solved rather simply with Tango. These included platform-independent timing control and threading. My only problem with Tango was trying to get line-buffered console/file I/O to work. At the time, the docs in that area did not exist. It wasn't very easy to figure out from API docs.
Jan 27 2008
parent reply Sean Kelly <sean f4.ca> writes:
Jason House wrote:
 Jesse Phillips wrote:
 I would like to also state my opinion on the Standard Library matter
 (coming from someone that hasn't used Tango). Tango should be standard. I
 don't think Phobos should die, but in general it looks like Tango has
 taken the lead. This is not to say that the one with the most features
 wins, but the one that is getting the most project support. Dsource is
 being filled with Tango based code; even ports from Phobos code bases. In
 my view the D language contributors have spoken, Tango is the library to
 use in development.

I agree that Tango should be considered standard, or at least put on equal footing with Phobos, such as releasing dmd with both Phobos and Tango. Of course, Tangobos really makes things simple... Releasing dmd with a combo of Tango and Tangobos is probably more consistent. The only problem I see with that is that tango has not been on the D 2.x train. Maybe just 1.x releases should do this?

What's been holding us back thus far there has been the indeterminate state of 'const'. However, it seems that the design has been finalized at this point and the syntax appears unlikely to change as well, so it may be time to look into making Tango 2.0-compatible. I'll admit to be dreading dealing with 'const' changing to 'invariant' however. For now, we'll likely avoid the use of 'invariant' completely, simply for maintenance reasons.
 In my ideal world, as changes to the D compiler occur, some motivated Tango
 maintainer would get advance warning and ensure compatibility prior to
 official release.  I don't know if this simply means branding some Phobos
 maintainers to have a dual role.

For what it's worth, any necessary changes are typically made to the Tango trunk within 24 hours of a new DMD release. And now that Phobos is in SVN I think we are in even better shape, as we are aware of changes as soon as they are committed to the Phobos project. But I agree that having an idea about the timing of new compiler releases as well as any unannounced changes would improve our responsiveness.
 Personally, I switched from Phobos to Tango when I stumbled upon GC issues
 in Phobos (that were well documented for a very long time) that had been
 fixed in Tango long before I discovered them.  At the time, it looked like
 Tango had better developer support than Phobos.  As an additional
 side-effect, items that I had banged my head against with Phobos were
 solved rather simply with Tango.  These included platform-independent
 timing control and threading.  My only problem with Tango was trying to get
 line-buffered console/file I/O to work.  At the time, the docs in that area
 did not exist.  It wasn't very easy to figure out from API docs.

I agree with this. Fortunately, the documentation is improving, aided partially by work done on the book. However, if you or anyone else has suggestions on how it might be further improved or are interested in writing tutorials/examples/whatever, please let us know. This is one area where it's easy for people to contribute without worrying about coding standards, etc. Sean
Jan 27 2008
next sibling parent reply "Guillaume B." <guillaume.b.spam sympatico.ca> writes:
Sean Kelly wrote:

 
 I agree with this.  Fortunately, the documentation is improving, aided
 partially by work done on the book.  However, if you or anyone else has
 suggestions on how it might be further improved or are interested in
 writing tutorials/examples/whatever, please let us know.  This is one
 area where it's easy for people to contribute without worrying about
 coding standards, etc.
 

Hi, I've started using Tango recently and I like most of it. What's really confusing for me is all the IO stuff: I'm never really sure of the relationship between Conduit, Stream, ... I thought about one thing that could help: in the API documentation, it would help a lot if there where more links. For example, in tango.sys.Process, Process.stdout returns a PipeConduit. But there is no link on PipeConduit that would bring me to the page describing this class... So, I have to guess where it could be from the API index... Once I found that it's within tango.sys.Pipe, I see "class PipeConduit : tango.io.DeviceConduit.DeviceConduit"... Again, there is no link so I have to return to the API index to find where DeviceConduit is defined (it's easy in this case)... With all this back and forward, it's hard to find what your looking for. It would also help if the API could be searched... The search on the site searches the whole wiki... And it doesn't seem really good: I know there must be a "trim" function somewhere but searching the wiki doesn't show that it's within tango.text.Util... Searching "site:http://dsource.org/projects/tango/docs/current/ trim" with Google does a much bether job... But the best would be an API search a little bit like http://www.gotapi.com/ : you type function names or classes and it shows the result in real time... So those where my suggestions... Guillaume
Jan 27 2008
parent reply "Kris" <foo bar.com> writes:
"Guillaume B." <guillaume.b.spam sympatico.ca> wrote...
 Hi,

 I've started using Tango recently and I like most of it. What's really
 confusing for me is all the IO stuff: I'm never really sure of the
 relationship between Conduit, Stream, ... I thought about one thing that
 could help: in the API documentation, it would help a lot if there where
 more links. For example, in tango.sys.Process, Process.stdout returns a
 PipeConduit. But there is no link on PipeConduit that would bring me to 
 the
 page describing this class... So, I have to guess where it could be from
 the API index... Once I found that it's within tango.sys.Pipe, I see 
 "class
 PipeConduit : tango.io.DeviceConduit.DeviceConduit"... Again, there is no
 link so I have to return to the API index to find where DeviceConduit is
 defined (it's easy in this case)... With all this back and forward, it's
 hard to find what your looking for.

Yeah, this is frustrating, and a step backwards from when dOxygen was used in the past. Documentation production is currently based upon what the DMD compiler can produce, and unfortunately that does not generate cross-module references at this time. We'd quietly hoped that someone in the community would write a cross-linking utility, to operate with DMD doc output, but it hasn't yet happened (that I'm aware of). Obviously, such a utility would benefit D as a whole. But you're right ... something needs to be done about this. Perhaps Walter has some ideas about this also?
 It would also help if the API could be searched... The search on the site
 searches the whole wiki... And it doesn't seem really good: I know there
 must be a "trim" function somewhere but searching the wiki doesn't show
 that it's within tango.text.Util...

Try this page: http://dsource.org/projects/tango/docs/current/ If you have your browser set to search as soon as you start typing, then it is surprisiing efficient to locate a module of interest. With FireFox I type a few letters and hit return. That gives me the doc generated via DMD and CandyDoc (with function links on the left), and if I want to see the current source code I can click on the big blue title at the top of the page. Perhaps the links from that page should open another tab, so the index page remains visible?
 Searching "site:http://dsource.org/projects/tango/docs/current/ trim" with
 Google does a much bether job... But the best would be an API search a
 little bit like http://www.gotapi.com/ : you type function names or 
 classes
 and it shows the result in real time...

That would be great, and we really should at least have a traditional cross-reference generated.
 So those where my suggestions...

 Guillaume

Thank you!
Jan 27 2008
parent reply "Guillaume B." <guillaume.b.spam sympatico.ca> writes:
Kris wrote:

 
 Try this page:  http://dsource.org/projects/tango/docs/current/
 
 If you have your browser set to search as soon as you start typing, then
 it is surprisiing efficient to locate a module of interest. With FireFox I
 type a few letters and hit return. That gives me the doc generated via DMD
 and CandyDoc (with function links on the left), and if I want to see the
 current source code I can click on the big blue title at the top of the
 page. Perhaps the links from that page should open another tab, so the
 index page remains visible?
 
 

Hi, That's exactly what I do: type for a module name from that page and open it in a new tab. It gets more complicated when the class I'm looking for isn't obvious from the module name. For example, tango.io.Conduit returns "OutputStream"... without a search (with google), it's hard to tell that it's within tango.io.model.IConduit. Maybe the Tango API could be added to gotapi: it doesn't seem hard to add new API (see http://www.gotapi.com/contribute/ ... The trick is to generate the XML... no idea if it could be easily done with dmd doc... I'm not affiliated in any way with gotapi by the way) but I have no idea if they will accept it. If they do add it, it could help with D and Tango visibility (Phobos could also be added!). There might be other API search site like that too but I know only this one. Guillaume
Jan 27 2008
parent "Kris" <foo bar.com> writes:
"Guillaume B." <guillaume.b.spam sympatico.ca> wrote in message 
news:fninp6$fma$1 digitalmars.com...
 Kris wrote:

 Try this page:  http://dsource.org/projects/tango/docs/current/

 If you have your browser set to search as soon as you start typing, then
 it is surprisiing efficient to locate a module of interest. With FireFox 
 I
 type a few letters and hit return. That gives me the doc generated via 
 DMD
 and CandyDoc (with function links on the left), and if I want to see the
 current source code I can click on the big blue title at the top of the
 page. Perhaps the links from that page should open another tab, so the
 index page remains visible?

Hi, That's exactly what I do: type for a module name from that page and open it in a new tab. It gets more complicated when the class I'm looking for isn't obvious from the module name. For example, tango.io.Conduit returns "OutputStream"... without a search (with google), it's hard to tell that it's within tango.io.model.IConduit. Maybe the Tango API could be added to gotapi: it doesn't seem hard to add new API (see http://www.gotapi.com/contribute/ ... The trick is to generate the XML... no idea if it could be easily done with dmd doc... I'm not affiliated in any way with gotapi by the way) but I have no idea if they will accept it. If they do add it, it could help with D and Tango visibility (Phobos could also be added!). There might be other API search site like that too but I know only this one. Guillaume

I'm not familiar with gotoapi, but it sounds like a great tool! Now I need to ask Robert Fraser (and co) if Descent could perhaps generate the appropriate XML doc for this ... Thanks again ... this is a great suggestion.
Jan 27 2008
prev sibling parent Jason House <jason.james.house gmail.com> writes:
Sean Kelly Wrote:
 I agree with this.  Fortunately, the documentation is improving, aided
 partially by work done on the book.  However, if you or anyone else has
 suggestions on how it might be further improved or are interested in
 writing tutorials/examples/whatever, please let us know.  This is one
 area where it's easy for people to contribute without worrying about
 coding standards, etc.

It'd be helpful for both contributors and potential users of tango if there was comprehensive list of short-comings in the docs/examples, and some kind of help-wanted page that listed needed contributions and anticipated difficulty level. I'll also admit to not having read tango docs in detail for a long time. I mostly use the API reference to find stuff. Having links in the API docs to chapters in the howto would be nice
Jan 28 2008
prev sibling parent Sean Kelly <sean f4.ca> writes:
Jesse Phillips wrote:
 
 Maybe, Phobos can be the dmd test bed library. You know for all the rapid 
 changes that happen during alpha/beta.

This has always been the true purpose of Phobos, in my opinion. It certainly fits the development process. Sean
Jan 27 2008
prev sibling next sibling parent Jesse Phillips <jessekphillips gmail.com> writes:
On Sun, 27 Jan 2008 00:51:20 -0800, Kris wrote:

 "Jesse Phillips" <jessekphillips gmail.com> wrote in message
 news:fnhfnc$g0q$1 digitalmars.com...

 I would have to say that I have had the same perception as Dan here.
 From a general glance, Tango looks like it is solely class based. My
 choice

Thanks, that's useful to know, and which Tango will take steps to remedy. Do you have any suggestions as to how the perception might be rectified or adjusted?

I supposed it is related to what Christopher observed. "The only thing I've really noticed, browsing through the source, is formatting and console IO being provided by classes." One of the first things people/ myself see is IO, and as such probably the formatting second. I see no reason to wrap them in functions. I suppose it would be best to acknowledge this concern somewhere and state its falsehood.
Jan 27 2008
prev sibling parent Jarrod <qwerty ytre.wq> writes:
On Sat, 26 Jan 2008 22:34:43 -0800, Kris wrote:

 "Jarrod" <qwerty ytre.wq> wrote in message
 news:fnh54c$2utd$1 digitalmars.com... [snip]
 from what I've seen you seem to be very strongly against any form of
 it.

That's just not the case. Anyone at the D conference would probably verify that <g>
 If Tango was made because Phobos was in tatters in the past, then what
 is the motivation now?

Forgive me, but I have to ask if you know much about the Tango library? I mean, how long have you used it for? It's really not my goal to simply contradict your points (which are all good questions, btw), but there is rather a lot of supposition being expressed about Tango today <g>

I don't read up on the history of a library, I'm merely an end user. I find it odd you think using the library for longer would change my knowledge of Tango's design goals particularly in relation to Phobos. I just see the situation for how it currently is: Two completely different core libraries. Bad. Pretty simple issue. Apparently, not simple to solve though.
 Phobos is once again moving along nicely. Why can't the Tango team help
 it advance?

Given that phobos is currently adopting code from Tango, how did you arrive at this supposition about the Tango team?

Many people claim that windows originally stole its GUI ideas from mac. Are you saying mac helped develop windows? To answer your question more directly, I arrived at this supposition by simply noting Tango and Phobos are of course still separate, and both are in active development with different teams backing them. As a side note, and probably a closing note since this horse has been thoroughly beaten with no real resolve; I have to agree with others who have posted in this thread. At a glance, the IO routines of Tango give me horrible Java flashbacks. After rubbing my eyes and taking a closer look, I guess they liken a bit more to C++ streams. They don't really have easy to remember names (Conduits. Lolwut?) and I find it's hard to remember (or even understand) their relationship with one another. There also seems to be a lot of different stream types and this makes it more confusing to follow and remember. Overall, the IO Stream (uh I mean Conduit.. or do I?) usage isn't exactly difficult, but I can't say it's a pleasure either.
Jan 31 2008
prev sibling parent Christopher Wright <dhasenan gmail.com> writes:
Dan wrote:
 - Committed algorithms would need to solve some problem domain, and would not
be trivially implemented with one-liners or other items in the library.

There's some value in having a standard way of solving something, even trivial, if the problem appears often enough. Things like some array operations, indexof for instance. And partitioning an array: a foreach loop is the best you'll get, and efficient, but Tango still has a partition function. The criteria should be: Does it save people time? Does it make their code clearer? Does it reduce the number of bugs in client code? Maybe a few more things.
Jan 27 2008