digitalmars.D.announce - DMD 0.128 release
- Walter (2/2) Jul 10 2005 Bugs fixed.
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (12/19) Jul 11 2005 Is there any chance of getting this "vreadf" implementation into a
- Ben Hinkle (7/15) Jul 11 2005 Sounds reasonable. The changes I made to std.stream to make vreadf were
- Stewart Gordon (30/33) Jul 11 2005 http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368
- Walter (6/23) Jul 12 2005 My only reservation for inserting the patch (to write uncaught exception
- jicman (3/32) Jul 12 2005 One of the very few times that I agree with Walter. :-) Just kidding Wa...
- Charles (8/37) Jul 12 2005 I agree, it gets worse when they send output to both. And when you do
- Charles Hixson (4/36) Jul 12 2005 On Linux/Unix stderr makes a lot of sense, and it's easy to
-
Stewart Gordon
(23/26)
Jul 13 2005
- Deewiant (13/17) Jul 13 2005 On Windows 9x and ME, it's AFAIK impossible since the command shell
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/11) Jul 13 2005 This is the same that I use under the various* Mac OS X shells, as well.
-
Stewart Gordon
(22/29)
Jul 13 2005
- Deewiant (5/21) Jul 13 2005 Right, my wording was confusing. I was talking about redirecting only
- Andrew Fedoniouk (3/6) Jul 17 2005 Use 4DOS command shell, it works on all win32.
- Niko Korhonen (12/14) Jul 17 2005 Just remember that it's commercial software.
- Andrew Fedoniouk (3/17) Jul 18 2005 4DOS is free afaik.
- Niko Korhonen (6/7) Jul 18 2005 Yes, right you are. I just thought that people will probably want to use...
- Stewart Gordon (16/24) Jul 18 2005 It used something similar to some Unix shells in my days. Something lik...
- Stewart Gordon (26/36) Jul 13 2005 Moreover, I can see people using this not-so-elegant workaround
- qwerty (7/11) Jul 13 2005 Where did you get that idea from. Try this ...
- Stewart Gordon (12/20) Jul 14 2005 That's half our point - the hack is specific to 2000/XP.
- qwerty (4/15) Jul 14 2005 The 'hack'? I would have thought that any 'hack' would apply to the uns...
- Stewart Gordon (17/27) Jul 14 2005 Moreover, if some program uses stdout and stderr as appropriate, then
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (8/12) Jul 13 2005 That is at the same time scary, and explanatory...
Bugs fixed. http://www.digitalmars.com/d/changelog.html
Jul 10 2005
Walter wrote:Bugs fixed. http://www.digitalmars.com/d/changelog.html(http://www.digitalmars.com/d/changelog.html#new0128, which says:)Ben Hinkle's update for stream.d and std_stream.html: As discussed in http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/26073 scanf and vscanf have been modified and renamed to readf and vreadf (with doc updates, too).Is there any chance of getting this "vreadf" implementation into a stand-alone unformat implementation instead ? Or wasn't the addition of std.string.unformat a good addition to the old std.string.format ? i.e. the std.unformat.unFormat function: void unFormat( dchar delegate() getc, dchar delegate(dchar) ungetc, TypeInfo[] arguments, va_list argptr); That would make the new functions possible to add to std.stdio as well, as in http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/21692 or will that module (stdio) be deprecated now with the new std.stream ? --anders
Jul 11 2005
Is there any chance of getting this "vreadf" implementation into a stand-alone unformat implementation instead ? Or wasn't the addition of std.string.unformat a good addition to the old std.string.format ? i.e. the std.unformat.unFormat function: void unFormat( dchar delegate() getc, dchar delegate(dchar) ungetc, TypeInfo[] arguments, va_list argptr); That would make the new functions possible to add to std.stdio as well, as in http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/21692Sounds reasonable. The changes I made to std.stream to make vreadf were actually pretty small. I didn't go as far as Sean did with supporting infs, nans, bits and scansets. Also I tried to make sure vreadf didn't allocate memory unless it really needed to. I kindof figured that since Walter wrote doFormat/writef that he'd do undoFormat/readf if he thought it was needed - but maybe the thing to do is to send him a few implementations and let him take it from there.
Jul 11 2005
Walter wrote:Bugs fixed. http://www.digitalmars.com/d/changelog.htmlhttp://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368 If urgency is really your only doubt, then here's why I feel it should be just put in right now: 1. Once a fix is written, checking it in is quick and straightforward, not really something worth the time and effort of questioning the urgency of. 2. Putting in fixes as and when they're written is a positive sign for the public image. Nobody likes to see a programming language, library or application having poor standards of maintenance. 3. Gratuitously holding back accepting contributions defeats half the point of a project being open source. 4. Such a trivial action takes little more time to do straight away than to add to a todo list, only to be finally done some time in the indefinite future. 5. If a fix isn't checked in on a good timescale, it can become out of date. Consequently it will take a bit of work to update the patch to work with the newer version, which may have changed divergently. 6. As such, it's getting even sillier than the points that were raised here a while back: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/7199 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jul 11 2005
"Stewart Gordon" <smjg_1998 yahoo.com> wrote in message news:datjmu$11ou$1 digitaldaemon.com...http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368 If urgency is really your only doubt, then here's why I feel it should be just put in right now: 1. Once a fix is written, checking it in is quick and straightforward, not really something worth the time and effort of questioning the urgency of. 2. Putting in fixes as and when they're written is a positive sign for the public image. Nobody likes to see a programming language, library or application having poor standards of maintenance. 3. Gratuitously holding back accepting contributions defeats half the point of a project being open source. 4. Such a trivial action takes little more time to do straight away than to add to a todo list, only to be finally done some time in the indefinite future. 5. If a fix isn't checked in on a good timescale, it can become out of date. Consequently it will take a bit of work to update the patch to work with the newer version, which may have changed divergently.My only reservation for inserting the patch (to write uncaught exception error messages to stderr) is that I've never liked stderr. I just prefer to redirect the output to a file, and using stderr always seems to just confuse the issue rather than be helpful.
Jul 12 2005
In article <db10hp$16a0$1 digitaldaemon.com>, Walter says..."Stewart Gordon" <smjg_1998 yahoo.com> wrote in message news:datjmu$11ou$1 digitaldaemon.com...One of the very few times that I agree with Walter. :-) Just kidding Walter. joséhttp://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368 If urgency is really your only doubt, then here's why I feel it should be just put in right now: 1. Once a fix is written, checking it in is quick and straightforward, not really something worth the time and effort of questioning the urgency of. 2. Putting in fixes as and when they're written is a positive sign for the public image. Nobody likes to see a programming language, library or application having poor standards of maintenance. 3. Gratuitously holding back accepting contributions defeats half the point of a project being open source. 4. Such a trivial action takes little more time to do straight away than to add to a todo list, only to be finally done some time in the indefinite future. 5. If a fix isn't checked in on a good timescale, it can become out of date. Consequently it will take a bit of work to update the patch to work with the newer version, which may have changed divergently.My only reservation for inserting the patch (to write uncaught exception error messages to stderr) is that I've never liked stderr. I just prefer to redirect the output to a file, and using stderr always seems to just confuse the issue rather than be helpful.
Jul 12 2005
I agree, it gets worse when they send output to both. And when you do programming on both win32 & linux, its always a pain to lookup the proper redirect syntax too. Charlie "Walter" <newshound digitalmars.com> wrote in message news:db10hp$16a0$1 digitaldaemon.com..."Stewart Gordon" <smjg_1998 yahoo.com> wrote in message news:datjmu$11ou$1 digitaldaemon.com...tohttp://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368 If urgency is really your only doubt, then here's why I feel it should be just put in right now: 1. Once a fix is written, checking it in is quick and straightforward, not really something worth the time and effort of questioning the urgency of. 2. Putting in fixes as and when they're written is a positive sign for the public image. Nobody likes to see a programming language, library or application having poor standards of maintenance. 3. Gratuitously holding back accepting contributions defeats half the point of a project being open source. 4. Such a trivial action takes little more time to do straight away than to add to a todo list, only to be finally done some time in the indefinite future. 5. If a fix isn't checked in on a good timescale, it can become out of date. Consequently it will take a bit of work to update the patch to work with the newer version, which may have changed divergently.My only reservation for inserting the patch (to write uncaught exception error messages to stderr) is that I've never liked stderr. I just preferredirect the output to a file, and using stderr always seems to justconfusethe issue rather than be helpful.
Jul 12 2005
On Linux/Unix stderr makes a lot of sense, and it's easy to redirect it to a file if you wish. On MSWind, this may be a different matter. Walter wrote:"Stewart Gordon" <smjg_1998 yahoo.com> wrote in message news:datjmu$11ou$1 digitaldaemon.com...http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/4368 If urgency is really your only doubt, then here's why I feel it should be just put in right now: 1. Once a fix is written, checking it in is quick and straightforward, not really something worth the time and effort of questioning the urgency of. 2. Putting in fixes as and when they're written is a positive sign for the public image. Nobody likes to see a programming language, library or application having poor standards of maintenance. 3. Gratuitously holding back accepting contributions defeats half the point of a project being open source. 4. Such a trivial action takes little more time to do straight away than to add to a todo list, only to be finally done some time in the indefinite future. 5. If a fix isn't checked in on a good timescale, it can become out of date. Consequently it will take a bit of work to update the patch to work with the newer version, which may have changed divergently.My only reservation for inserting the patch (to write uncaught exception error messages to stderr) is that I've never liked stderr. I just prefer to redirect the output to a file, and using stderr always seems to just confuse the issue rather than be helpful.
Jul 12 2005
Charles Hixson wrote:On Linux/Unix stderr makes a lot of sense, and it's easy to redirect it to a file if you wish.<snip top of upside-down reply> Is there a means of redirecting stderr that works across all Unix shells? Or are you just supposed to be using a shell that supports it if you're going to do it?On MSWind, this may be a different matter.True, there isn't an easy way of redirecting stderr on Windows, short of using a home-made or third-party utility. We are thus faced with two options: (a) being forced to redirect errors to the same place as normal output (b) not being able to redirect errors at all To me, (b) is the lesser of two evils. (a) not only tends to be undesirable, but can be useless e.g. when using the program as a filter for Doxygen. I refer you back here: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/2001 Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jul 13 2005
Stewart Gordon wrote:True, there isn't an easy way of redirecting stderr on Windows, short of using a home-made or third-party utility. We are thus faced with two options:On Windows 9x and ME, it's AFAIK impossible since the command shell doesn't distinguish between stderr and stdout. On the NT-based Windowses, just use 2> instead of >. This basically means to redirect the second handle (which happens to be stderr) instead of the default (which is stdout). E.g. if your program looks like this: import std.stdio; void main(char[][] args) { fwritef(stderr, "asdf"); } You can redirect the output to asdf.txt by running simply: asdf 2> asdf.txt Further information: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx
Jul 13 2005
Deewiant wrote:On Windows 9x and ME, it's AFAIK impossible since the command shell doesn't distinguish between stderr and stdout.Does D still support these? I thought they had massive UTF problems too?On the NT-based Windowses, just use 2> instead of >. This basically means to redirect the second handle (which happens to be stderr) instead of the default (which is stdout).This is the same that I use under the various* Mac OS X shells, as well. --anders PS. Except for csh and tcsh, of course, as they are horribly broken. (http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/)
Jul 13 2005
Deewiant wrote:Stewart Gordon wrote:<snip> Doesn't follow. If the command shell didn't distinguish, it would be impossible _not_ to redirect stderr if you're redirecting stdout. As it happens, the Win9x command shell redirects stdout while leaving stderr going to the console. But see http://authors.phptr.com/corejava/faq.html which provides a simple program to redirect stderr to stdout, which can then be redirected as desired. The real solution, however, is for one of us to write or find a utility to launch a program, redirecting its stderr to a file. I'm guessing it would be simple to do.... Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.True, there isn't an easy way of redirecting stderr on Windows, short of using a home-made or third-party utility. We are thus faced with two options:On Windows 9x and ME, it's AFAIK impossible since the command shell doesn't distinguish between stderr and stdout.
Jul 13 2005
Stewart Gordon wrote:Deewiant wrote:Right, my wording was confusing. I was talking about redirecting only stderr whilst leaving stdout at the default. What I thought was that you could redirect stderr along with stdout, but not each separately. And you're right - on Win9x stderr is unredirectable without tools.Stewart Gordon wrote:<snip> Doesn't follow. If the command shell didn't distinguish, it would be impossible _not_ to redirect stderr if you're redirecting stdout. As it > happens, the Win9x command shell redirects stdout while leaving stderr going to the console.True, there isn't an easy way of redirecting stderr on Windows, short of using a home-made or third-party utility. We are thus faced with two options:On Windows 9x and ME, it's AFAIK impossible since the command shell doesn't distinguish between stderr and stdout.
Jul 13 2005
The real solution, however, is for one of us to write or find a utility to launch a program, redirecting its stderr to a file. I'm guessing it would be simple to do....Use 4DOS command shell, it works on all win32. It uses 2> syntax too. http://www.jpsoft.com/download.htm
Jul 17 2005
Andrew Fedoniouk wrote:Use 4DOS command shell, it works on all win32. It uses 2> syntax too.Just remember that it's commercial software. Anyway, everyone who is *serious* about using Windows with a console should already be familiar with 4NT and knows how to redirect the error stream. If hackin' away with console is one's cup of tea, one should seriously consider purchasing 4NT. The license cost is low compared to a lifetime of happy console hacking :) IMO 4NT has some features that make it a worthwile competitor to *nix shells! (gasp!) -- Niko Korhonen SW Developer
Jul 17 2005
"Niko Korhonen" <niktheblak hotmail.com> wrote in message news:dbfish$29o3$1 digitaldaemon.com...Andrew Fedoniouk wrote:4DOS is free afaik.Use 4DOS command shell, it works on all win32. It uses 2> syntax too.Just remember that it's commercial software.Anyway, everyone who is *serious* about using Windows with a console should already be familiar with 4NT and knows how to redirect the error stream. If hackin' away with console is one's cup of tea, one should seriously consider purchasing 4NT. The license cost is low compared to a lifetime of happy console hacking :) IMO 4NT has some features that make it a worthwile competitor to *nix shells! (gasp!) -- Niko Korhonen SW Developer
Jul 18 2005
Andrew Fedoniouk wrote:4DOS is free afaik.Yes, right you are. I just thought that people will probably want to use 4NT (which is not free) with W2k/XP. -- Niko Korhonen SW Developer
Jul 18 2005
Andrew Fedoniouk wrote:"Niko Korhonen" <niktheblak hotmail.com> wrote in message news:dbfish$29o3$1 digitaldaemon.com...It used something similar to some Unix shells in my days. Something like >& redirect stdout and stderr >&> redirect stderr onlyAndrew Fedoniouk wrote:Use 4DOS command shell, it works on all win32. It uses 2> syntax too.<snip> 4DOS was shareware in its day. They're simply releasing it as freeware now that it's no longer supported. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.Just remember that it's commercial software.4DOS is free afaik.
Jul 18 2005
Stewart Gordon wrote: <snip>We are thus faced with two options: (a) being forced to redirect errors to the same place as normal output (b) not being able to redirect errors at all To me, (b) is the lesser of two evils. (a) not only tends to be undesirable, but can be useless e.g. when using the program as a filter for Doxygen. I refer you back here: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/2001Moreover, I can see people using this not-so-elegant workaround int main() { try { ... } catch (Object o) { fwritefln(stderr, "Error: %s", o.toString); return 1; } } to get their programs behaving sanely by the standards of many of us. OTOH if this were made the built-in behaviour, I can't see the reverse idiom as being quite as common, but it is still available if somebody really does want it. I don't see inflicting non-standard behaviour as the default as a Good Idea.... Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jul 13 2005
In article <db2nso$309v$1 digitaldaemon.com>, Stewart Gordon says... [snip]Where did you get that idea from. Try this ... dir 2>err.txt >dir.txt x:\*.* and you will find that "err.txt" contains output from stderr and "dir.txt" contains output from stdout. This works on Win2000 and WinXP. Don't know about the older (unsupported?) ones.On MSWind, this may be a different matter.True, there isn't an easy way of redirecting stderr on Windows, short of using a home-made or third-party utility. We are thus faced with two options:
Jul 13 2005
qwerty wrote: <snip>Where did you get that idea from. Try this ... dir 2>err.txt >dir.txt x:\*.* and you will find that "err.txt" contains output from stderr and "dir.txt" contains output from stdout. This works on Win2000 and WinXP. Don't know about the older (unsupported?) ones.That's half our point - the hack is specific to 2000/XP. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jul 14 2005
In article <db5a83$2a9q$1 digitaldaemon.com>, Stewart Gordon says...qwerty wrote: <snip>The 'hack'? I would have thought that any 'hack' would apply to the unsupported older Windows versions as the current Windows system support this without resorting to any 'hacks'.Where did you get that idea from. Try this ... dir 2>err.txt >dir.txt x:\*.* and you will find that "err.txt" contains output from stderr and "dir.txt" contains output from stdout. This works on Win2000 and WinXP. Don't know about the older (unsupported?) ones.That's half our point - the hack is specific to 2000/XP.
Jul 14 2005
Stewart Gordon wrote: <snip>True, there isn't an easy way of redirecting stderr on Windows, short of using a home-made or third-party utility. We are thus faced with two options: (a) being forced to redirect errors to the same place as normal output (b) not being able to redirect errors at all To me, (b) is the lesser of two evils. (a) not only tends to be undesirable, but can be useless e.g. when using the program as a filter for Doxygen. I refer you back here:Moreover, if some program uses stdout and stderr as appropriate, then even if the shell doesn't provide a means of redirecting stderr, one can use a tool to do this redirection. OTOH given an arbitrary program that just writes everything to stdout, no tool can be relied upon to sift the errors from the regular output. So preserving the distinction really is useful. Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Jul 14 2005
Walter wrote:My only reservation for inserting the patch (to write uncaught exception error messages to stderr) is that I've never liked stderr. I just prefer to redirect the output to a file, and using stderr always seems to just confuse the issue rather than be helpful.That is at the same time scary, and explanatory... (explains why this patch hasn't gotten any priority) I use stdout and stderr all the time, and would prefer if D's treatment of them could be fixed ? --anders PS. Given any thoughts to the return code, as well ? (i.e. _define_ the return value of "void main()")
Jul 13 2005