Re: A little idiom I like

method named \
Mostly.

The reality of the matter is that with the APIs that Ruby is
currently using – which are problematic for certain cases
(Unicode) – the \ and / are interchangeable internally.

The advanced APIs – the Unicode ones and the ones that make
it possible to have very long path names – requires .

-austin

Indeed. This is why all paths generated using the pathname2 package
convert all forward slashes to backslashes. Also, the various PathXXX
functions do NOT work with forward slashes.

To wit:

irb(main):001:0> require ‘Win32API’
=> true
irb(main):002:0> PathIsRoot = Win32API.new(‘shlwapi’, ‘PathIsRoot’, ‘P’,
‘I’)
=> #Win32API:0x2c17be8
irb(main):003:0> PathIsRoot.call(“C:\”)
=> 1
irb(main):004:0> PathIsRoot.call(“C:/”)
=> 0

Regards,

Dan

This communication is the property of Qwest and may contain confidential
or
privileged information. Unauthorized use of this communication is
strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and
destroy
all copies of the communication and any attachments.

On 9/6/06, Berger, Daniel [email protected] wrote:

Indeed. This is why all paths generated using the pathname2 package
convert all forward slashes to backslashes. Also, the various PathXXX
functions do NOT work with forward slashes.

If only Gary Kildall had not decided to use / instead of - for
parameter markers in CP/M, so that it wasn’t taken when directories
were added. I’m pretty sure that he’s the one to blame, or did it come
from one of the DEC operating systems he used as a model for the
‘shell?’


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Rick DeNatale wrote:

were added. I’m pretty sure that he’s the one to blame, or did it come
from one of the DEC operating systems he used as a model for the
‘shell?’

Interesting question. I always assumed the /x notation
came to DOS by way of CP/M, but now I recall that it
was also in TOPS10.

And yes, that was a looong time ago. My keychain has
2000 times as much memory as the college mainframe
had then.

Hal

Hal F. wrote:

parameter markers in CP/M, so that it wasn’t taken when directories
had then.

Hal

And VMS and RSX-11. My recollection is that CP-M command line syntax in
fact descends from RSX-11 and/or RT-11, so it’s not surprising.

On 9/6/06, Berger, Daniel [email protected] wrote:

Indeed. This is why all paths generated using the pathname2 package
convert all forward slashes to backslashes. Also, the various PathXXX
functions do NOT work with forward slashes.

Inasmuch as is possible, where Ruby provides these, it should hide
this distinction. I would hate to have to enter \ every time I wanted
to put two files together. (It would also increase the mismatch
between Ruby Windows and everywhere else, so the more we can hide that
the more portable we make Ruby.)

-austin

Don’t think it was DEC. On PDP-11/RSX and VAX/VMS directories were
enclosed in square brackets, something like SY:[0,1] or DUA0:[SYS
$ROOT.DIR.SUBDIR], always with unique [ ] delimiters.

Best,
Mike D.
http://www.rubywizards.com

Ahh, yes, it’s pure DCL thingie carried all they way to cmd.exe. They
called it command qualifiers back then :-).

Best,
Mike D.
http://www.rubywizards.com

I recollect an old OS called COS (Cobol Operating System?) That
actually used dot notation to separate directories. Now if only that
would have caught on and our object systems and file system could have
become seemless entiites. He he. I’m dreaming…

Mike D. wrote:

Don’t think it was DEC. On PDP-11/RSX and VAX/VMS directories were
enclosed in square brackets, something like SY:[0,1] or DUA0:[SYS
$ROOT.DIR.SUBDIR], always with unique [ ] delimiters.

Yes, the brackets were used that way… but Rick was talking
about the use of slashes for switches (the way Unix uses the
hyphen). That’s a DECism, though it may have come from
elsewhere – as in KJOB /F or simply K/F

Hal

On 9/7/06, Trans [email protected] wrote:

I recollect an old OS called COS (Cobol Operating System?) That
actually used dot notation to separate directories. Now if only that
would have caught on and our object systems and file system could have
become seemless entiites. He he. I’m dreaming…

Then of course there was a family of operating systems which started
in the 1960s from a little known computer company named with three
letters like HAL, or JCN, or something like that that used /'s
extensively in it’s “shell” language, something like

//STEP1 EXEC PGM=IEBCOPY
//SYSIN DD *
THIS IS SOME DATA
/*
//SYSOUT DD DSN=“FRED”

Which was sort of like the equivalent of $cat >FRED

T’was something like that, the memory fades away.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On 9/7/06, M. Edward (Ed) Borasky [email protected] wrote:

Hmmm … so that’s where the C++ comment convention came from – they
had to do that to comment out the JCL!

HAL?, JCN?, JCL?

Oh now I remember IBM!


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Rick DeNatale wrote:

//STEP1 EXEC PGM=IEBCOPY
//SYSIN DD *
THIS IS SOME DATA
/*
//SYSOUT DD DSN=“FRED”

Which was sort of like the equivalent of $cat >FRED

T’was something like that, the memory fades away.

Hmmm … so that’s where the C++ comment convention came from – they
had to do that to comment out the JCL!

True story – I was once working on a Sigma Nine at Goddard Space Flight
Center. We had a bunch of VIPs touring the lab, and at one point they
came by my terminal. One of them asked me, “What are you doing?” I told
her I was editing a JCL file. She said, “That’s JCL? I can actually
read it!”