9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "roger peppe" <rogpeppe@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] Plan9ports under windows/cygwin?
Date: Thu, 25 Oct 2007 17:43:23 +0100	[thread overview]
Message-ID: <df49a7370710250943s42b5a171n2943a186e95288fc@mail.gmail.com> (raw)
In-Reply-To: <d553b5590710250926u37b8dbc6mf06e3cfd4ef0a00f@mail.gmail.com>

yeah, os(1) is your friend.

but you need to watch out for the fact that files have different names inside
inferno and out. i usually knock up a little script to translate the names
(there's no universally correct answer, so it varies somewhat each time,
depending on your conventional namespace)

for example, here's part of the script i'm using currently, running
inferno under macos, and using
the windows F# compiler running on a remote computer
(mounted on /n/remote, with /n/remote/cmd mounted on /cmd)

load regex std
assemblies=(...)

subfn ftrans {
	emuroot := ${unquote "{cat /n/remote/env/emuroot}}
	ifs := '
'
	f := $1
	if{! match '^[a-zA-Z]:[\\/]' $f} {
		if{! ~ $f '/*'}{
			f = `{pwd}^/$f
		}
		if{! ~ $f '/n/remote/*'}{
			echo $f is not in remote namespace
		}
		f = ${re s '^/n/remote' '' $f}
		f = ${re sg '/+' '\\' $emuroot/$f}
	}
	result = $f
}

fn osrun {
	os -d ${ftrans .} ${ftrans $1} ${tl $*}
}

fn fsc {
	opts := ()		# --fast-sublanguage-only
	for(i in $assemblies){
		opts = (-r $i) $opts
	}
	osrun 'C:\Program Files\FSharp-1.9.2.9\bin\fsc' $opts $* < /dev/null |
		(sed
			-e 's/
$//'
			-e '/^$/d'
			-e 's/^([a-zA-Z0-9.]+)\(([0-9]+),([0-9]+)\)/\1:\2-#0+#\3;+0/'
			-e 's/error: FS[[0-9]+: //')
}


  reply	other threads:[~2007-10-25 16:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 15:55 Paul Lalonde
2007-10-25 16:00 ` Iruata Souza
2007-10-25 16:08   ` Paul Lalonde
2007-10-25 16:23     ` Eric Van Hensbergen
2007-10-25 16:31       ` underspecified
2007-10-25 16:50         ` roger peppe
2007-10-25 16:26     ` Felipe Bichued
2007-10-25 16:43       ` roger peppe [this message]
2007-10-25 16:52         ` Charles Forsyth
2007-10-25 16:30 ` Skip Tavakkolian

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

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

  git send-email \
    --in-reply-to=df49a7370710250943s42b5a171n2943a186e95288fc@mail.gmail.com \
    --to=rogpeppe@gmail.com \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).