Re: std.path.getName(): Screwy by design?

2011-03-08 Thread Bruno Medeiros
On 02/03/2011 11:34, Kagamin wrote: Bekenn Wrote: On 3/1/11 3:27 PM, Walter Bright wrote: I've always hated the Windows "Documents and Settings" subdirectory. Arggh. Always a pain to use on the command line. No kidding. Thank goodness that's gone post-XP. Now if only they'd do the same for

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Jonathan M Davis Wrote: > > I suppose, the flag on a script is checked "manually" by the shell, and on > > a binary - by the OS. > > The "OS" means next to nothing in unix land. What's the OS? The kernel? The > set > of common utilities? Oh, looking at execve(2), I see, shebang is processed by

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 02:02:45 Kagamin wrote: > Daniel Gibson Wrote: > > >> The only way _anything_ is executable in *nix is if its executable > > >> flag is set. Extensions mean _nothing_ as far as executability goes. > > > > > > As you can see, there's an ambiguity here: script is not executed

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Daniel Gibson Wrote: > >> The only way _anything_ is executable in *nix is if its executable flag is > >> set. > >> Extensions mean _nothing_ as far as executability goes. > > > > As you can see, there's an ambiguity here: script is not executed directly > > in the same sense as machine code,

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread spir
On 03/04/2011 09:56 AM, Kagamin wrote: Jonathan M Davis Wrote: On Friday 04 March 2011 00:08:25 Kagamin wrote: Jérôme M. Berger Wrote: ?? It ALWAYS makes a difference. For example, only .exe and .com files are executable. On unix, the filename is just a name. Nothing more. By contrast, th

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Daniel Gibson
Am 04.03.2011 09:56, schrieb Kagamin: > Jonathan M Davis Wrote: > >> On Friday 04 March 2011 00:08:25 Kagamin wrote: >>> JérÎme M. Berger Wrote: >> ?? >> It ALWAYS makes a difference. For example, only .exe and .com files >> are executable. >> On unix, the filename is just a

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Jonathan M Davis Wrote: > On Friday 04 March 2011 00:08:25 Kagamin wrote: > > Jérôme M. Berger Wrote: > > > >> ?? > > > >> It ALWAYS makes a difference. For example, only .exe and .com files > > > >> are executable. > > > >> On unix, the filename is just a name. Nothing more. By contrast, th

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Jonathan M Davis
On Friday 04 March 2011 00:08:25 Kagamin wrote: > JérÎme M. Berger Wrote: > > >> ?? > > >> It ALWAYS makes a difference. For example, only .exe and .com files > > >> are executable. > > >> On unix, the filename is just a name. Nothing more. By contrast, the > > >> Windows extension actually m

Re: std.path.getName(): Screwy by design?

2011-03-04 Thread Kagamin
Jérôme M. Berger Wrote: > > > >> ?? > >> It ALWAYS makes a difference. For example, only .exe and .com files are > >> executable. > >> On unix, the filename is just a name. Nothing more. By contrast, the > >> Windows extension actually matters. They're completely different. > > > > What

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Jesse Phillips
Denis Koroskin Wrote: > On Fri, 04 Mar 2011 00:10:28 +0300, Jesse Phillips > wrote: > > > Denis Koroskin Wrote: > >> Double-click? Yes. Running from console? No. > >> > >> Didn't believe it until I tried it myself, too. > > > > Hmm, I get an error from the MS Javascript interpreter. > > Check

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Nick Sabalausky
"Kagamin" wrote in message news:ikohfp$8go$1...@digitalmars.com... > Kagamin Wrote: > >> Nick Sabalausky Wrote: >> >> > > Whether that's a crap is debatable. Sometimes you would want to >> > > backup or >> > > manage that crap, say, game saves. >> > >> > I didn't say it shouldn't exist, I just s

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Denis Koroskin
On Fri, 04 Mar 2011 00:10:28 +0300, Jesse Phillips wrote: Denis Koroskin Wrote: >No you cannot. What happens is that you *open* them with the > default application, which just happens to be an interpreter whose > default action is to run the script. Try renaming a .exe into .js > and it

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Nick Sabalausky
On Thu, 03 Mar 2011 21:47:54 +0300, Jérôme M. Berger wrote: > Kagamin wrote: >> Don Wrote: >> >>> ?? >>> It ALWAYS makes a difference. For example, only .exe and .com files are >>> executable. >>> On unix, the filename is just a name. Nothing more. By contrast, the >>> Windows extension actua

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Jesse Phillips
Denis Koroskin Wrote: > > No you cannot. What happens is that you *open* them with the > > default application, which just happens to be an interpreter whose > > default action is to run the script. Try renaming a .exe into .js > > and it will not run, whereas on Unix it would. > > > >

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Denis Koroskin
On Thu, 03 Mar 2011 21:47:54 +0300, Jérôme M. Berger wrote: Kagamin wrote: Don Wrote: ?? It ALWAYS makes a difference. For example, only .exe and .com files are executable. On unix, the filename is just a name. Nothing more. By contrast, the Windows extension actually matters. They're

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Jérôme M. Berger
Kagamin wrote: > Don Wrote: > >> ?? >> It ALWAYS makes a difference. For example, only .exe and .com files are >> executable. >> On unix, the filename is just a name. Nothing more. By contrast, the >> Windows extension actually matters. They're completely different. > > What do you mean? Yo

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Kagamin
Nick Sabalausky Wrote: > "Kagamin" wrote in message > news:iklanl$1qg$1...@digitalmars.com... > > Nick Sabalausky Wrote: > > > >> Name one case in windows where some sort of distinction between filename > >> and > >> extension actually makes a real tangible difference versus unix, that > >> doe

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Kagamin
Kagamin Wrote: > Nick Sabalausky Wrote: > > > > Whether that's a crap is debatable. Sometimes you would want to backup or > > > manage that crap, say, game saves. > > > > I didn't say it shouldn't exist, I just said it shouldn't be in the user's > > documents directory. > > If they're in "My

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Kagamin
Nick Sabalausky Wrote: > > Whether that's a crap is debatable. Sometimes you would want to backup or > > manage that crap, say, game saves. > > I didn't say it shouldn't exist, I just said it shouldn't be in the user's > documents directory. If they're in "My Documents/Local Settings" you can

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Kagamin
Don Wrote: > ?? > It ALWAYS makes a difference. For example, only .exe and .com files are > executable. > On unix, the filename is just a name. Nothing more. By contrast, the > Windows extension actually matters. They're completely different. What do you mean? You can run .js and .vbs files

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Steven Schveighoffer
On Wed, 02 Mar 2011 16:27:59 -0500, Nick Sabalausky wrote: "Kagamin" wrote in message news:ikl9vq$b0$1...@digitalmars.com... Bekenn Wrote: On 3/1/11 3:27 PM, Walter Bright wrote: > I've always hated the Windows "Documents and Settings" subdirectory. > Arggh. Always a pain to use on the comm

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Nick Sabalausky
"Kagamin" wrote in message news:ikntvs$23rr$1...@digitalmars.com... > Nick Sabalausky Wrote: > >> Now if only I could get programs to quit cluttering "My Documents" with >> their misc junk, instead of "My Documents/.." where all that crap >> belongs, >> *that* would make me happy... > > Whether

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Nick Sabalausky
"Don" wrote in message news:iknnq3$1neu$1...@digitalmars.com... > Nick Sabalausky wrote: >> "Don" wrote in message >> news:ikj7n9$1sg2$1...@digitalmars.com... >>> Steven Schveighoffer wrote: On Tue, 01 Mar 2011 09:01:49 -0500, Nick Sabalausky wrote: > People don't always realize it, b

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Kagamin
Nick Sabalausky Wrote: > Now if only I could get programs to quit cluttering "My Documents" with > their misc junk, instead of "My Documents/.." where all that crap belongs, > *that* would make me happy... Whether that's a crap is debatable. Sometimes you would want to backup or manage that cr

Re: std.path.getName(): Screwy by design?

2011-03-03 Thread Don
Nick Sabalausky wrote: "Don" wrote in message news:ikj7n9$1sg2$1...@digitalmars.com... Steven Schveighoffer wrote: On Tue, 01 Mar 2011 09:01:49 -0500, Nick Sabalausky wrote: People don't always realize it, but Windows really is the same way. It's really only the user-level applications like

Re: std.path.getName(): Screwy by design?

2011-03-02 Thread Nick Sabalausky
"Kagamin" wrote in message news:iklanl$1qg$1...@digitalmars.com... > Nick Sabalausky Wrote: > >> Name one case in windows where some sort of distinction between filename >> and >> extension actually makes a real tangible difference versus unix, that >> doesn't merely amount to convention > > You

Re: std.path.getName(): Screwy by design?

2011-03-02 Thread Nick Sabalausky
"Kagamin" wrote in message news:ikl9vq$b0$1...@digitalmars.com... > Bekenn Wrote: > >> On 3/1/11 3:27 PM, Walter Bright wrote: >> > I've always hated the Windows "Documents and Settings" subdirectory. >> > Arggh. Always a pain to use on the command line. >> >> No kidding. Thank goodness that's g

Re: std.path.getName(): Screwy by design?

2011-03-02 Thread Kagamin
Nick Sabalausky Wrote: > Name one case in windows where some sort of distinction between filename and > extension actually makes a real tangible difference versus unix, that > doesn't merely amount to convention You can pass program path to CreateProcess without extension, .exe is assumed.

Re: std.path.getName(): Screwy by design?

2011-03-02 Thread Kagamin
Bekenn Wrote: > On 3/1/11 3:27 PM, Walter Bright wrote: > > I've always hated the Windows "Documents and Settings" subdirectory. > > Arggh. Always a pain to use on the command line. > > No kidding. Thank goodness that's gone post-XP. Now if only they'd do > the same for Program Files... Did b

Re: std.path.getName(): Screwy by design?

2011-03-02 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikl3m2$2i6s$1...@digitalmars.com... > On Tue, 01 Mar 2011 20:45:15 -0500, Nick Sabalausky wrote: > >> "Lars T. Kyllingstad" wrote in message >> news:ikiht0$2vba$2...@digitalmars.com... >>> >>> I've also found a few cases like that. In general, I think

Re: std.path.getName(): Screwy by design?

2011-03-02 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 20:45:15 -0500, Nick Sabalausky wrote: > "Lars T. Kyllingstad" wrote in message > news:ikiht0$2vba$2...@digitalmars.com... >> >> I've also found a few cases like that. In general, I think std.path >> takes the KISS approach, probably because it's the most efficient and >> wor

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Bekenn
On 3/1/2011 7:32 PM, Walter Bright wrote: I didn't know that. Thanks for the link! No problem.

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Walter Bright
Bekenn wrote: Ah, this one (folders) I actually have a response for. Or, rather, Raymond Chen does: http://blogs.msdn.com/b/oldnewthing/archive/2011/02/16/10129908.aspx I didn't know that. Thanks for the link!

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikiht0$2vba$2...@digitalmars.com... > > I've also found a few cases like that. In general, I think std.path > takes the KISS approach, probably because it's the most efficient and > works in most cases, but I'd rather it did the Right Thing (TM) that >

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Bekenn
On 3/1/11 5:26 PM, Walter Bright wrote: Yeah, one wonders what's wrong with the word "Programs". And why directories had to be renamed "folders". Ah, this one (folders) I actually have a response for. Or, rather, Raymond Chen does: http://blogs.msdn.com/b/oldnewthing/archive/2011/02/16/1

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Walter Bright
Bekenn wrote: On 3/1/11 3:40 PM, Daniel Gibson wrote: Or "My Documents", "My Pictures" and whatnot (or is that gone post-XP?) Yes, those are gone. "My Documents" is just "Documents", "My Pictures" is just "Pictures", etc. Windows 7 (sadly) still displays the "My" prefix (Vista doesn't), bu

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Walter Bright
Bekenn wrote: On 3/1/11 3:27 PM, Walter Bright wrote: I've always hated the Windows "Documents and Settings" subdirectory. Arggh. Always a pain to use on the command line. No kidding. Thank goodness that's gone post-XP. Now if only they'd do the same for Program Files... Yeah, one wonde

Re: Sci-Fi TV Shows (Was: std.path.getName(): Screwy by design?)

2011-03-01 Thread Nick Sabalausky
"Bekenn" wrote in message news:ikk0ko$a2u$1...@digitalmars.com... > On 3/1/11 2:56 PM, Nick Sabalausky wrote: >> "Jonathan M Davis" wrote in message >>> No. It's a cat. :) >>> >>> - Jonathan M Davis >>> >>> >>> P.S. At least it is if you've seen B5... >> >> OMG, I completely forgot about the who

Re: Sci-Fi TV Shows (Was: std.path.getName(): Screwy by design?)

2011-03-01 Thread Jonathan M Davis
On Tuesday, March 01, 2011 14:56:20 Nick Sabalausky wrote: > "Jonathan M Davis" wrote in message > news:mailman.2104.1299019810.4748.digitalmar...@puremagic.com... > > > On Tuesday, March 01, 2011 14:27:38 Nick Sabalausky wrote: > >> "Jesse Phillips" wrote in message > >> news:ikj3nf$1l0v$1...@d

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Bekenn
On 3/1/11 3:40 PM, Daniel Gibson wrote: Or "My Documents", "My Pictures" and whatnot (or is that gone post-XP?) Yes, those are gone. "My Documents" is just "Documents", "My Pictures" is just "Pictures", etc. Windows 7 (sadly) still displays the "My" prefix (Vista doesn't), but the directory

Re: Sci-Fi TV Shows (Was: std.path.getName(): Screwy by design?)

2011-03-01 Thread Bekenn
On 3/1/11 2:56 PM, Nick Sabalausky wrote: "Jonathan M Davis" wrote in message No. It's a cat. :) - Jonathan M Davis P.S. At least it is if you've seen B5... OMG, I completely forgot about the whole cat thing in Babylon 5 (I assume you mean Babylon 5). It's been far too long. Actually, I st

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Daniel Gibson
Am 02.03.2011 00:37, schrieb Bekenn: > On 3/1/11 3:27 PM, Walter Bright wrote: >> I've always hated the Windows "Documents and Settings" subdirectory. >> Arggh. Always a pain to use on the command line. > > No kidding. Thank goodness that's gone post-XP. Now if only they'd do the > same > for P

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Bekenn
On 3/1/11 3:27 PM, Walter Bright wrote: I've always hated the Windows "Documents and Settings" subdirectory. Arggh. Always a pain to use on the command line. No kidding. Thank goodness that's gone post-XP. Now if only they'd do the same for Program Files...

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Walter Bright
Andrei Alexandrescu wrote: On 3/1/11 3:42 PM, Nick Sabalausky wrote: There's a long, seemingly-unending history of unix programs choking on paths with spaces in them *even* when you give them the paths properly escaped. Not all unix apps, but enough. make and latex are prime examples. I have

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Daniel Gibson
Am 01.03.2011 23:45, schrieb Nick Sabalausky: > "Daniel Gibson" wrote in message > news:ikjqaf$2e9r$2...@digitalmars.com... >> Am 01.03.2011 22:42, schrieb Nick Sabalausky: >>> >>> There's a long, seemingly-unending history of unix programs choking on >>> paths >>> with spaces in them *even* whe

Sci-Fi TV Shows (Was: std.path.getName(): Screwy by design?)

2011-03-01 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.2104.1299019810.4748.digitalmar...@puremagic.com... > On Tuesday, March 01, 2011 14:27:38 Nick Sabalausky wrote: >> "Jesse Phillips" wrote in message >> news:ikj3nf$1l0v$1...@digitalmars.com... >> >> > Daniel Gibson Wrote: >> >> .bashrc doesn't ha

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jonathan M Davis
On Tuesday, March 01, 2011 14:27:38 Nick Sabalausky wrote: > "Jesse Phillips" wrote in message > news:ikj3nf$1l0v$1...@digitalmars.com... > > > Daniel Gibson Wrote: > >> .bashrc doesn't have an extension and is not an extionsion either. > >> The "." at the start is Unix convention to say "this is

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:ikjqaf$2e9r$2...@digitalmars.com... > Am 01.03.2011 22:42, schrieb Nick Sabalausky: >> >> There's a long, seemingly-unending history of unix programs choking on >> paths >> with spaces in them *even* when you give them the paths properly escaped. >> Not all

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikj54r$14ci$7...@digitalmars.com... > Since we're on the topic of std.path, does anyone have an opinion as to > how it should handle the various string types? Currently, it only deals > with string, i.e. immutable(char)[], but should it also be able to

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:ikj45k$mbh$3...@digitalmars.com... > Am 01.03.2011 16:38, schrieb Kagamin: >> Nick Sabalausky Wrote: >> >>> or just an extentionless file named ".bashrc"? (I know unix doesn't >>> typically have a concept of file extension, it's all just part of the >>> name

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Jesse Phillips" wrote in message news:ikj3nf$1l0v$1...@digitalmars.com... > Daniel Gibson Wrote: > >> .bashrc doesn't have an extension and is not an extionsion either. >> The "." at the start is Unix convention to say "this is a hidden >> file/folder", this means "ls" (the unix equivalent to "d

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Andrei Alexandrescu
On 3/1/11 3:42 PM, Nick Sabalausky wrote: There's a long, seemingly-unending history of unix programs choking on paths with spaces in them *even* when you give them the paths properly escaped. Not all unix apps, but enough. make and latex are prime examples. I have made an executive decision to

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Don" wrote in message news:ikj7n9$1sg2$1...@digitalmars.com... > Steven Schveighoffer wrote: >> On Tue, 01 Mar 2011 09:01:49 -0500, Nick Sabalausky wrote: >>> >>> People don't always realize it, but Windows really is the same way. It's >>> really only the user-level applications like Explorer t

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Daniel Gibson
Am 01.03.2011 22:42, schrieb Nick Sabalausky: > "Daniel Gibson" wrote in message > news:ikivql$mbh$1...@digitalmars.com... >> Am 01.03.2011 14:50, schrieb Nick Sabalausky: >>> "Steven Schveighoffer" wrote in message >>> news:op.vrn2pooteav7ka@steve-laptop... On Tue, 01 Mar 2011 08:13:33 -05

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:ikivql$mbh$1...@digitalmars.com... > Am 01.03.2011 14:50, schrieb Nick Sabalausky: >> "Steven Schveighoffer" wrote in message >> news:op.vrn2pooteav7ka@steve-laptop... >>> On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad >>> wrote: >>> On Tue,

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:ikj0cb$mbh$2...@digitalmars.com... > Am 01.03.2011 15:31, schrieb Lars T. Kyllingstad: >> On Tue, 01 Mar 2011 08:50:29 -0500, Nick Sabalausky wrote: >> >>> "Steven Schveighoffer" wrote in message >>> news:op.vrn2pooteav7ka@steve-laptop... On Tue, 01 Mar

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread retard
Tue, 01 Mar 2011 11:04:53 -0800, Jonathan M Davis wrote: > On Tuesday, March 01, 2011 06:54:27 Andrei Alexandrescu wrote: >> On 3/1/11 4:54 AM, Jonathan M Davis wrote: >> > On Tuesday 01 March 2011 02:49:31 Daniel Gibson wrote: >> >> Am 01.03.2011 09:58, schrieb Nick Sabalausky: >> >>> According t

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread retard
Tue, 01 Mar 2011 19:25:57 +, retard wrote: > .pds.gz, Sorry about the typo, .pdf.gz

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jonathan M Davis
On Tuesday, March 01, 2011 06:54:27 Andrei Alexandrescu wrote: > On 3/1/11 4:54 AM, Jonathan M Davis wrote: > > On Tuesday 01 March 2011 02:49:31 Daniel Gibson wrote: > >> Am 01.03.2011 09:58, schrieb Nick Sabalausky: > >>> According to the docs, std.path.getName() "Returns the extensionless > >>>

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jérôme M. Berger
Kagamin wrote: > Nick Sabalausky Wrote: > >> or just an extentionless file named ".bashrc"? (I know unix doesn't >> typically have a concept of file extension, it's all just part of the name, >> but unix programs will often care about the extension portion of a >> filename.) > > .Net treats it

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jérôme M. Berger
Adam Ruppe wrote: > The best part is taking the file name issue and combining it with the > shell expansion design unix has. > > mkdir something > touch something/test > touch -- -R > touch test > rm * > > Every file will be destroyed, including subdirectoriesexcept the > murderous -R file!

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jonathan M Davis
On Tuesday 01 March 2011 08:15:35 Lars T. Kyllingstad wrote: > On Tue, 01 Mar 2011 11:07:15 -0500, Steven Schveighoffer wrote: > > On Tue, 01 Mar 2011 11:04:52 -0500, Lars T. Kyllingstad > > > > wrote: > >> On Tue, 01 Mar 2011 10:55:57 -0500, Steven Schveighoffer wrote: > >>> The point of this wh

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Don
Steven Schveighoffer wrote: On Tue, 01 Mar 2011 09:01:49 -0500, Nick Sabalausky wrote: "Lars T. Kyllingstad" wrote in message news:ikis59$14ci$3...@digitalmars.com... On Tue, 01 Mar 2011 14:10:58 +0100, Jens Mueller wrote: I don't know whether this is useful but why not look at what is alr

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jonathan M Davis
On Tuesday 01 March 2011 05:35:38 Steven Schveighoffer wrote: > On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad > > wrote: > > On Tue, 01 Mar 2011 08:02:44 -0500, Steven Schveighoffer wrote: > >> On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis > >> > >> wrote: > >>> I can understan

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 11:07:15 -0500, Steven Schveighoffer wrote: > On Tue, 01 Mar 2011 11:04:52 -0500, Lars T. Kyllingstad > wrote: > >> On Tue, 01 Mar 2011 10:55:57 -0500, Steven Schveighoffer wrote: >> >>> The point of this whole discussion is how should phobos' std.path deal >>> with filenames

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 11:04:52 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 10:55:57 -0500, Steven Schveighoffer wrote: On Tue, 01 Mar 2011 10:52:43 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 10:27:49 -0500, Steven Schveighoffer wrote: very very smart, experienced pe

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 10:55:57 -0500, Steven Schveighoffer wrote: > On Tue, 01 Mar 2011 10:52:43 -0500, Lars T. Kyllingstad > wrote: > >> On Tue, 01 Mar 2011 10:27:49 -0500, Steven Schveighoffer wrote: > >>> very very smart, experienced people sometimes do things without >>> thinking. If we can d

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 10:39:35 -0500, Adam Ruppe wrote: The best part is taking the file name issue and combining it with the shell expansion design unix has. mkdir something touch something/test touch -- -R touch test rm * Every file will be destroyed, including subdirectoriesexcept the

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 10:52:43 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 10:27:49 -0500, Steven Schveighoffer wrote: very very smart, experienced people sometimes do things without thinking. If we can do something really small to prevent catastrophic errors, I think it's worth it

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
Since we're on the topic of std.path, does anyone have an opinion as to how it should handle the various string types? Currently, it only deals with string, i.e. immutable(char)[], but should it also be able to handle the other permutations of mutable/const/immutable and char/wchar/dchar? -Lar

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 10:27:49 -0500, Steven Schveighoffer wrote: > On Tue, 01 Mar 2011 10:08:14 -0500, Lars T. Kyllingstad > wrote: > >> On Tue, 01 Mar 2011 09:52:50 -0500, Steven Schveighoffer wrote: >> >>> On Tue, 01 Mar 2011 09:31:18 -0500, Lars T. Kyllingstad >>> wrote: >>> On Tue, 01 M

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Adam Ruppe
The best part is taking the file name issue and combining it with the shell expansion design unix has. mkdir something touch something/test touch -- -R touch test rm * Every file will be destroyed, including subdirectoriesexcept the murderous -R file!

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Daniel Gibson
Am 01.03.2011 16:38, schrieb Kagamin: Nick Sabalausky Wrote: or just an extentionless file named ".bashrc"? (I know unix doesn't typically have a concept of file extension, it's all just part of the name, but unix programs will often care about the extension portion of a filename.) .Net treat

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Kagamin
Nick Sabalausky Wrote: > or just an extentionless file named ".bashrc"? (I know unix doesn't > typically have a concept of file extension, it's all just part of the name, > but unix programs will often care about the extension portion of a > filename.) .Net treats it as a nameless file with ex

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jesse Phillips
Daniel Gibson Wrote: > .bashrc doesn't have an extension and is not an extionsion either. > The "." at the start is Unix convention to say "this is a hidden > file/folder", this means "ls" (the unix equivalent to "dir") doesn't I don't like this description, it is a configuration file which jus

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 10:08:14 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 09:52:50 -0500, Steven Schveighoffer wrote: On Tue, 01 Mar 2011 09:31:18 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 08:50:29 -0500, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in mess

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 09:52:50 -0500, Steven Schveighoffer wrote: > On Tue, 01 Mar 2011 09:31:18 -0500, Lars T. Kyllingstad > wrote: > >> On Tue, 01 Mar 2011 08:50:29 -0500, Nick Sabalausky wrote: >> >>> "Steven Schveighoffer" wrote in message > From this page: http://en.wikipedia.org/wiki/

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 09:31:18 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 08:50:29 -0500, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message From this page: http://en.wikipedia.org/wiki/Filename, it appears that really, the only disallowed character in unix filename

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Andrei Alexandrescu
On 3/1/11 4:54 AM, Jonathan M Davis wrote: On Tuesday 01 March 2011 02:49:31 Daniel Gibson wrote: Am 01.03.2011 09:58, schrieb Nick Sabalausky: According to the docs, std.path.getName() "Returns the extensionless version of a filename or path." But the doc also says that if the filename doesn'

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Daniel Gibson
Am 01.03.2011 15:31, schrieb Lars T. Kyllingstad: On Tue, 01 Mar 2011 08:50:29 -0500, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message news:op.vrn2pooteav7ka@steve-laptop... On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 08:02:44 -0500, St

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Daniel Gibson
Am 01.03.2011 14:50, schrieb Nick Sabalausky: "Steven Schveighoffer" wrote in message news:op.vrn2pooteav7ka@steve-laptop... On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 08:02:44 -0500, Steven Schveighoffer wrote: On Tue, 01 Mar 2011 04:16:36 -0500, J

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 08:50:29 -0500, Nick Sabalausky wrote: > "Steven Schveighoffer" wrote in message > news:op.vrn2pooteav7ka@steve-laptop... >> On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad >> wrote: >> >>> On Tue, 01 Mar 2011 08:02:44 -0500, Steven Schveighoffer wrote: >>> On Tu

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 09:01:49 -0500, Nick Sabalausky wrote: "Lars T. Kyllingstad" wrote in message news:ikis59$14ci$3...@digitalmars.com... On Tue, 01 Mar 2011 14:10:58 +0100, Jens Mueller wrote: I don't know whether this is useful but why not look at what is already there. Linux has a comma

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikis59$14ci$3...@digitalmars.com... > On Tue, 01 Mar 2011 14:10:58 +0100, Jens Mueller wrote: >> >> I don't know whether this is useful but why not look at what is already >> there. Linux has a command called basename. For removing the extension >> it i

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vrn2pooteav7ka@steve-laptop... > On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad > wrote: > >> On Tue, 01 Mar 2011 08:02:44 -0500, Steven Schveighoffer wrote: >> >>> On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis >>> wrote: >>>

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vrn0zlu4eav7ka@steve-laptop... > On Tue, 01 Mar 2011 07:50:53 -0500, Nick Sabalausky wrote: > >> "Daniel Gibson" wrote in message >> news:ikij1r$e1i$1...@digitalmars.com... >>> >>> The "." at the start is Unix convention to say "this is a hidden >

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 08:13:33 -0500, Lars T. Kyllingstad wrote: On Tue, 01 Mar 2011 08:02:44 -0500, Steven Schveighoffer wrote: On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis wrote: I can understand if the path stuff can't deal with / or \ in file names (that's probably not worth tr

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikir9v$14ci$1...@digitalmars.com... > On Tue, 01 Mar 2011 07:48:56 -0500, Nick Sabalausky wrote: > >> "Lars T. Kyllingstad" wrote in message >> news:ikiktf$2vba$3...@digitalmars.com... >>> >>> I would like to say, however, that I think 'sep' is almost

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 14:10:58 +0100, Jens Mueller wrote: > Lars T. Kyllingstad wrote: >> On Tue, 01 Mar 2011 11:49:31 +0100, Daniel Gibson wrote: >> >> > Am 01.03.2011 09:58, schrieb Nick Sabalausky: >> >> According to the docs, std.path.getName() "Returns the extensionless >> >> version of a file

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Steven Schveighoffer" wrote in message news:op.vrn06uqneav7ka@steve-laptop... > On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis > wrote: > >> I can understand if the path stuff >> can't deal with / or \ in file names (that's probably not worth trying >> to get to >> work right), but it _

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Johannes Pfau
Steven Schveighoffer wrote: >On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis > wrote: > >> I can understand if the path stuff >> can't deal with / or \ in file names (that's probably not worth >> trying to get to >> work right), but it _should_ be able to handle directories with dots >> in the

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 08:02:44 -0500, Steven Schveighoffer wrote: > On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis > wrote: > >> I can understand if the path stuff >> can't deal with / or \ in file names (that's probably not worth trying >> to get to >> work right), but it _should_ be able t

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Jens Mueller
Lars T. Kyllingstad wrote: > On Tue, 01 Mar 2011 11:49:31 +0100, Daniel Gibson wrote: > > > Am 01.03.2011 09:58, schrieb Nick Sabalausky: > >> According to the docs, std.path.getName() "Returns the extensionless > >> version of a filename or path." > >> > >> But the doc also says that if the filen

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 07:48:56 -0500, Nick Sabalausky wrote: > "Lars T. Kyllingstad" wrote in message > news:ikiktf$2vba$3...@digitalmars.com... >> >> I would like to say, however, that I think 'sep' is almost up there >> with rel2abs in terms of bad naming. If you just see 'sep' in a piece >> of

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikilpg$2vba$4...@digitalmars.com... > On Tue, 01 Mar 2011 11:49:31 +0100, Daniel Gibson wrote: > >> Am 01.03.2011 09:58, schrieb Nick Sabalausky: >>> According to the docs, std.path.getName() "Returns the extensionless >>> version of a filename or path.

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 04:16:36 -0500, Jonathan M Davis wrote: I can understand if the path stuff can't deal with / or \ in file names (that's probably not worth trying to get to work right), but it _should_ be able to handle directories with dots in them and files with no extension. / an

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Steven Schveighoffer
On Tue, 01 Mar 2011 07:50:53 -0500, Nick Sabalausky wrote: "Daniel Gibson" wrote in message news:ikij1r$e1i$1...@digitalmars.com... The "." at the start is Unix convention to say "this is a hidden file/folder", this means "ls" (the unix equivalent to "dir") doesn't list them (ls -a does,

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Daniel Gibson" wrote in message news:ikij1r$e1i$1...@digitalmars.com... > > The "." at the start is Unix convention to say "this is a hidden > file/folder", this means "ls" (the unix equivalent to "dir") doesn't list > them (ls -a does, though) and most file browsers only list them when you >

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Nick Sabalausky
"Lars T. Kyllingstad" wrote in message news:ikiktf$2vba$3...@digitalmars.com... > > I would like to say, however, that I think 'sep' is almost up there with > rel2abs in terms of bad naming. If you just see 'sep' in a piece of > code, maybe you understand it is a separator, but I don't think eve

Re: std.path.getName(): Screwy by design?

2011-03-01 Thread Lars T. Kyllingstad
On Tue, 01 Mar 2011 11:49:31 +0100, Daniel Gibson wrote: > Am 01.03.2011 09:58, schrieb Nick Sabalausky: >> According to the docs, std.path.getName() "Returns the extensionless >> version of a filename or path." >> >> But the doc also says that if the filename doesn't have a dot, then it >> return

  1   2   >