unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Eli Barzilay <eli@barzilay.org>
To: Andy Wingo <wingo@pobox.com>
Cc: ludo@gnu.org, guile-devel@gnu.org
Subject: Re: [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names.
Date: Mon, 2 May 2011 19:16:11 -0400	[thread overview]
Message-ID: <19903.15163.681435.910306@winooski.ccs.neu.edu> (raw)
In-Reply-To: <m34o5cu5mj.fsf@unquote.localdomain>

[Second attempt, my Emacs has unfortunate issues with Ludovic's
name...]


An hour ago, Andy Wingo wrote:
> On Mon 02 May 2011 22:58, ludo@gnu.org (Ludovic Courtès) writes:
> 
> > Andy Wingo <wingo@pobox.com> writes:
> >
> >> Basically I think the plan should be to add scm_from_locale_path,
> >> scm_from_raw_path, etc to filesys.[ch], and change any
> >> pathname-accepting procedure in Guile to accept path objects,
> >> producing them from strings when given strings, and pass the
> >> bytevector representation to the raw o/s procedures like `open'
> >> et al.
> >
> > Seems to like a disjoint type “just for Windows” would be
> > overkill, no?
> 
> Maybe you're right; hummm!  I have added a kind racketeer on Cc; perhaps
> if he has time, he might have some thoughts in this regard.  :-)

I don't think that I can contribute much -- I'm mostly looking at
these things from a user's point of view...  Roughly speaking (mostly
because I don't know what the issues that you're up against), our path
values have "just paths" for whatever the OS wants -- so on Windows
they might have either backslashes or slashes (since Racket accepts
both).

To write portable code we don't have a `file-separator' thing,
instead, we have `build-path' that combines two paths with the right
separator.  Similarly, we have `split-path' to split up a path to the
directory part and the last part.  I think that it's generally better
this way, since it represents the higher level operation rather than
fiddling with the semantics of where and how to put separators
directly (but this is not some religious issue, just seems to me like
it would be more convenient).

Also, we have cases where we want something that looks like a portable
path (for example, naming relative file names in `require') -- for
those we use /-separated strings that are limited to "safe"
characters.  And related, in cases where we want to encode path in
code (for example, some macro that wants to generate a path), we'll
use strings or byte strings, with the latter more common for lower
level things.

(But I'm just rambling now, I haven't slept in N days -- so feel free
to ignore me...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!



  parent reply	other threads:[~2011-05-02 23:16 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15 15:34 mingw runtime patches Jan Nieuwenhuizen
2011-02-15 15:34 ` [PATCH 1/5] [mingw]: Add implementation of canonicalize_file_name Jan Nieuwenhuizen
2011-04-29 16:33   ` Andy Wingo
2011-05-20 13:56     ` Jan Nieuwenhuizen
2011-05-20 14:54       ` Andy Wingo
2011-02-15 15:35 ` [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names Jan Nieuwenhuizen
2011-04-29 17:16   ` Andy Wingo
2011-04-29 17:30     ` Noah Lavine
2011-05-01 11:30       ` Andy Wingo
2011-05-01 19:23         ` Noah Lavine
2011-05-01 21:12           ` Andy Wingo
2011-05-01 21:48         ` Mark H Weaver
2011-05-02  7:45           ` Andy Wingo
2011-05-02 20:58         ` Ludovic Courtès
2011-05-02 21:58           ` Andy Wingo
2011-05-02 22:18             ` Ludovic Courtès
2011-05-03  7:44               ` Andy Wingo
2011-05-03  8:38                 ` Ludovic Courtès
2011-05-04  3:59                 ` Mark H Weaver
2011-05-04  4:13                   ` Noah Lavine
2011-05-04  9:24                     ` Ludovic Courtès
2011-05-17 16:59                       ` Noah Lavine
2011-05-17 19:26                         ` Mark H Weaver
2011-05-17 20:03                         ` Mark H Weaver
2011-05-23 19:42                         ` Filenames and other POSIX byte strings as SCM strings without loss Mark H Weaver
2011-07-01 10:51                           ` Andy Wingo
2011-05-23 20:14                         ` Paths as sequences of path components Mark H Weaver
2011-05-24 10:51                           ` Hans Aberg
2011-11-23 22:15                           ` Andy Wingo
2011-11-25  2:51                             ` Mark H Weaver
2011-06-16 22:29                 ` [PATCH 2/5] [mingw]: Have compiled-file-name produce valid names Andy Wingo
2011-05-02 23:16             ` Eli Barzilay [this message]
2011-05-20 13:47     ` Jan Nieuwenhuizen
2011-05-20 14:01       ` Andy Wingo
2011-06-30 14:11       ` Andy Wingo
2011-02-15 15:35 ` [PATCH 3/5] [mingw]: Do not export opendir, readdir etc., as dirents differ Jan Nieuwenhuizen
2011-05-01 11:37   ` Andy Wingo
2011-05-20 13:57     ` Jan Nieuwenhuizen
2011-06-16 22:22       ` Andy Wingo
2011-02-15 15:35 ` [PATCH 4/5] [mingw]: Delete existing target file before attempting rename Jan Nieuwenhuizen
2011-05-01 11:40   ` Andy Wingo
2011-05-20 14:05     ` Jan Nieuwenhuizen
2011-06-16 21:45     ` Andy Wingo
2011-02-15 15:35 ` [PATCH 5/5] [mingw]: Use $LOCALAPPDATA as a possible root for cachedir Jan Nieuwenhuizen
2011-05-01 11:42   ` Andy Wingo
2011-05-20 14:03     ` Jan Nieuwenhuizen
2011-06-16 22:02       ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19903.15163.681435.910306@winooski.ccs.neu.edu \
    --to=eli@barzilay.org \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).