From sebastian.probst.eide@gmail.com Fri Feb 10 16:49:13 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rvter-0006VE-PF (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Fri, 10 Feb 2012 16:49:13 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1242239 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.212.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wi0-f179.google.com ([209.85.212.179]:36718)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1Rvter-00054K-qg (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Fri, 10 Feb 2012 16:49:13 +0000
Received: by wibhj6 with SMTP id hj6so2256450wib.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 10 Feb 2012 08:49:13 -0800 (PST)
Received: by 10.216.144.93 with SMTP id m71mr1073288wej.35.1328892553205;
	Fri, 10 Feb 2012 08:49:13 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id p10sm4537943wic.0.2012.02.10.08.49.11
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 10 Feb 2012 08:49:12 -0800 (PST)
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Very general OCaml questions
Date: Fri, 10 Feb 2012 16:49:10 +0000
Message-Id: <E75E58DA-83EA-4781-A8AC-EECAE89426B6@gmail.com>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1257)
X-Mailer: Apple Mail (2.1257)
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 16:49:13 -0000
X-Keywords:                  
X-UID: 166
Status: O
Content-Length: 1395
Lines: 40

Dear miragers,

I have two OCaml questions. One is more philosophical, and the second =
more practical:

1) ----------------------
I want to define a signpost tactic as a package of functionality with a =
well defined and known signature.
Modules would be perfect, if it wasn't for the fact that I want to be =
able to pass around all the signpost tactics as a list, and since =
modules aren't first class data, like functions, I cannot do something =
like

let tactics =3D [iodine; OpenVPN; Tor; etc]

and then later call the functions defined in the modules...

I could define the tactics as classes since I could then easily pass =
them around, but I feel somewhat dirty using classes in a nice =
functional language.

An option could be to combine modules and records, where the standard =
set of functions are exposed in the record, and from there invoke the =
module functions, but that doesn't seem very natural or clean either.

What is the preferred approach?

2) ----------------------
If I want to define a set of high level types that should be shared =
between all my modules and functions, how do I go about doing that?
I tend to end up creating monolithic monsters of OCaml programs with =
everything defined in one file, just to avoid redefining the same types =
in all my files, and that clearly is the wrong approach :)

---------------------- (the end)

Thanks

~ Sebastian=


From raphlalou@gmail.com Fri Feb 10 17:00:13 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RvtpV-0006md-7r (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Fri, 10 Feb 2012 17:00:13 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1242239 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:53258)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1RvtpQ-00023q-EG (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Fri, 10 Feb 2012 17:00:13 +0000
Received: by iabz21 with SMTP id z21so4546204iab.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 10 Feb 2012 09:00:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.203.33 with SMTP id kn1mr6158411igc.1.1328893207667; Fri,
	10 Feb 2012 09:00:07 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Fri, 10 Feb 2012 09:00:07 -0800 (PST)
In-Reply-To: <E75E58DA-83EA-4781-A8AC-EECAE89426B6@gmail.com>
References: <E75E58DA-83EA-4781-A8AC-EECAE89426B6@gmail.com>
Date: Fri, 10 Feb 2012 17:00:07 +0000
Message-ID: <CAAmHUAn6bMUUUB828YjfQmavzd0eH1oE789tALA1NBgQ3xRPZg@mail.gmail.com>
Subject: Re: Very general OCaml questions
From: Raphael Proust <raphlalou@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=UTF-8
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 17:00:13 -0000
X-Keywords:                  
X-UID: 167
Status: O
Content-Length: 782
Lines: 32

On Fri, Feb 10, 2012 at 4:49 PM, Sebastian Probst Eide
<sebastian.probst.eide@gmail.com> wrote:
> 2) ----------------------
> If I want to define a set of high level types that should be shared between all my modules and functions, how do I go about doing that?
> I tend to end up creating monolithic monsters of OCaml programs with everything defined in one file, just to avoid redefining the same types in all my files, and that clearly is the wrong approach :)

You can define them once in a separate module (say M) and then acces
its constructors via M.<constructor>.

e.g. :

file toto.ml:
-------
type t = Foo | Bar of int | Baz
-------

file blah.ml
-------
let x = Toto.Foo
let y = Toto.Bar 42
-------

file coucou.ml
-------
let x = Toto.Baz
-------


-- 
_______
Raphael


From thomas.gazagnaire@gmail.com Fri Feb 10 18:02:55 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RvuoB-0000iL-JT (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 10 Feb 2012 18:02:55 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1242239 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.212.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (thomas.gazagnaire[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wi0-f179.google.com ([209.85.212.179]:40179)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1RvuoA-0007y0-So (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 10 Feb 2012 18:02:55 +0000
Received: by wibhj6 with SMTP id hj6so2312301wib.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 10 Feb 2012 10:02:54 -0800 (PST)
Received: by 10.180.24.7 with SMTP id q7mr10819770wif.14.1328896974636;
	Fri, 10 Feb 2012 10:02:54 -0800 (PST)
Received: from saorge.home (ANice-551-1-239-41.w90-28.abo.wanadoo.fr.
	[90.28.183.41])
	by mx.google.com with ESMTPS id q7sm4830728wix.5.2012.02.10.10.02.52
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 10 Feb 2012 10:02:53 -0800 (PST)
Subject: Re: Very general OCaml questions
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
In-Reply-To: <E75E58DA-83EA-4781-A8AC-EECAE89426B6@gmail.com>
Date: Fri, 10 Feb 2012 19:02:50 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <5D13B9D4-AE07-43E9-90D6-8055535AA853@gmail.com>
References: <E75E58DA-83EA-4781-A8AC-EECAE89426B6@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
X-Mailer: Apple Mail (2.1084)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 18:02:55 -0000
X-Keywords:                  
X-UID: 168
Status: O
Content-Length: 1309
Lines: 48

> 1) ----------------------
> I want to define a signpost tactic as a package of functionality with =
a well defined and known signature.
> Modules would be perfect, if it wasn't for the fact that I want to be =
able to pass around all the signpost tactics as a list, and since =
modules aren't first class data, like functions, I cannot do something =
like
>=20
> let tactics =3D [iodine; OpenVPN; Tor; etc]
>=20
> and then later call the functions defined in the modules...
>=20
> I could define the tactics as classes since I could then easily pass =
them around, but I feel somewhat dirty using classes in a nice =
functional language.
>=20
> An option could be to combine modules and records, where the standard =
set of functions are exposed in the record, and from there invoke the =
module functions, but that doesn't seem very natural or clean either.
>=20
> What is the preferred approach?

You can also use first-class modules:

module type S =3D sig
  val f : int -> int
end

module A =3D struct
  let f x =3D x
end

module B =3D struct
  let f x =3D x * x
end

let modules =3D [| (module A : S); (module B : S) |]
 =20
let f i =3D
  let module M =3D (val modules.(i) : S) in
  M.f

If you are defining an abstract type in S, it becomes a bit more =
complex, but otherwise it's fine.

--
Thomas=


From sebastian.probst.eide@gmail.com Fri Feb 10 18:09:42 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rvuuk-0000rk-RN (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Fri, 10 Feb 2012 18:09:42 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1242239 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:42354)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1Rvuuk-0000n4-DM (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Fri, 10 Feb 2012 18:09:42 +0000
Received: by wera1 with SMTP id a1so2325027wer.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 10 Feb 2012 10:09:42 -0800 (PST)
Received: by 10.216.131.234 with SMTP id m84mr3434172wei.24.1328897381940;
	Fri, 10 Feb 2012 10:09:41 -0800 (PST)
Received: from sjc187n36.joh.private.cam.ac.uk (global-1-92.nat.csx.cam.ac.uk.
	[131.111.184.92])
	by mx.google.com with ESMTPS id y6sm4850456wix.10.2012.02.10.10.09.40
	(version=SSLv3 cipher=OTHER); Fri, 10 Feb 2012 10:09:40 -0800 (PST)
Subject: Re: Very general OCaml questions
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <5D13B9D4-AE07-43E9-90D6-8055535AA853@gmail.com>
Date: Fri, 10 Feb 2012 18:09:39 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <2FE77421-E4AC-4BCE-B514-A006653CB1A7@gmail.com>
References: <E75E58DA-83EA-4781-A8AC-EECAE89426B6@gmail.com>
	<5D13B9D4-AE07-43E9-90D6-8055535AA853@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1257)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 18:09:42 -0000
X-Keywords:                  
X-UID: 169
Status: O
Content-Length: 558
Lines: 32

> You can also use first-class modules:
>=20
> module type S =3D sig
>  val f : int -> int
> end
>=20
> module A =3D struct
>  let f x =3D x
> end
>=20
> module B =3D struct
>  let f x =3D x * x
> end
>=20
> let modules =3D [| (module A : S); (module B : S) |]
>=20
> let f i =3D
>  let module M =3D (val modules.(i) : S) in
>  M.f
>=20
> If you are defining an abstract type in S, it becomes a bit more =
complex, but otherwise it's fine.
>=20
> --
> Thomas

Ah, this feels like what I was intuitively looking for.
Thanks Thomas!

All the best,
Sebastian=


From anil@recoil.org Tue Feb 14 23:00:42 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxRMX-0007Du-Vj (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 14 Feb 2012 23:00:41 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1243434 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:29392
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1RxRMX-0000d9-EX (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 14 Feb 2012 23:00:41 +0000
Received: (qmail 11813 invoked by uid 634); 14 Feb 2012 23:00:41 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-belf1-0-0-cust23.2-1.cable.virginmedia.com (HELO
	[10.0.1.14]) (82.29.224.24)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 14 Feb 2012 23:00:40 +0000
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: generalising oxenstored for unix nodes too
Date: Tue, 14 Feb 2012 23:00:39 +0000
Message-Id: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1251.1)
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 14 Feb 2012 23:00:42 -0000
X-Keywords:                  
X-UID: 170
Status: O
Content-Length: 1751
Lines: 37

Raphael has been hacking away at the Mirage control stack, which
will keep *bidirectional* dependencies for most data structures.
That is, rather than a cache serving up a result, it will keep track
of who is using that result, and push it an update when the cache
entry changes.  This is very useful for the I/O subsystem, since
every flow can be notified when some value it depends on changes
(e.g. an ARP entry changing due to a live migration).

As part of this, we need a name service that will register and
coordinate different threads' I/O. It turns out that oxenstored
from xen-unstable is actually pretty nice: it is purely functional,
but coalesces transactions smartly.  It also has the massive advantage
that it already implements the Xenbus protocol, needed for Mirage
in microkernel mode.

What I'd like is to be able to use oxenstored for non-Xenstore
related things and run it on UNIX systems without the Xen* libraries
installed. I had a quick look at the source, and it seems fairly
easy...

- the Logger has some access logging towards the end that is
  Xenbus-specific, so moved that into a Xb_logger module
- Perms and Quota depend on Xenctrl.domid (which is just an int,
  not abstract) - Transaction coalesces based on whether or not the
  operations are Xenbus 'reads or writes'.

So it seems like we can functorize the transaction logic pretty
easily, into a Xenbus one and a more UNIXy one for other nodes.

Thomas, Dave, any thoughts on this? I was thinking of hanging a
first-class module from a node, which could be unpacked and decide
how to deal with that part of the namespace.  This way, we could
mix-and-match Xen portions of the namespace, as well as other nodes
that have completely different side-effects.

-anil


From raphlalou@gmail.com Wed Feb 15 13:51:05 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxfGD-0007BQ-AM (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 15 Feb 2012 13:51:05 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1243828 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.213.51 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-yw0-f51.google.com ([209.85.213.51]:53827)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1RxfGB-0005dJ-RS (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 15 Feb 2012 13:51:05 +0000
Received: by yhr47 with SMTP id 47so605917yhr.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 15 Feb 2012 05:51:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.196.167 with SMTP id in7mr11561454igc.9.1329313862674; Wed,
	15 Feb 2012 05:51:02 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Wed, 15 Feb 2012 05:51:02 -0800 (PST)
In-Reply-To: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
Date: Wed, 15 Feb 2012 13:51:02 +0000
Message-ID: <CAAmHUA=NwckzttTvUG5zEEHZ+CEFC1QuKirU6_Vns-zYAyh4vw@mail.gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
From: Raphael Proust <raphlalou@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 13:51:05 -0000
X-Keywords:                  
X-UID: 171
Status: O
Content-Length: 2579
Lines: 71

On Tue, Feb 14, 2012 at 11:00 PM, Anil Madhavapeddy <anil@recoil.org> wrote=
:
> Raphael has been hacking away at the Mirage control stack, which
> will keep *bidirectional* dependencies for most data structures.
> That is, rather than a cache serving up a result, it will keep track
> of who is using that result, and push it an update when the cache
> entry changes. =C2=A0This is very useful for the I/O subsystem, since
> every flow can be notified when some value it depends on changes
> (e.g. an ARP entry changing due to a live migration).

Using FRP for configuration is quite nice. In a nutshell, FRP (Functional
Reactive Programming) is a declarative way of handling variations. In FRP,
values are time-varying (not always the same) but still bound in a declarat=
ive
way (the relation by which they are defined is always the same).

E.g. when defining a value (z) as the sum of two other values (x and y), th=
e
value carried by z will change whenever the values of either x or y does.

Hence, FRP guarantees consistency (which is nice for configuration) and all=
ow
one to monitor for changes.


>
> As part of this, we need a name service that will register and
> coordinate different threads' I/O. It turns out that oxenstored
> from xen-unstable is actually pretty nice: it is purely functional,
> but coalesces transactions smartly. =C2=A0It also has the massive advanta=
ge
> that it already implements the Xenbus protocol, needed for Mirage
> in microkernel mode.

The idea is to have each successful transaction in the key-value store trig=
ger
an FRP update cycle (so that all the values that depend on some configurati=
on is
updated).


>
> So it seems like we can functorize the transaction logic pretty
> easily, into a Xenbus one and a more UNIXy one for other nodes.

We could export the variables using the 9P protocol (thus giving remote
configuration access, the ability to use it as a procfs and a cool research=
y
stunt).


>
> Thomas, Dave, any thoughts on this? I was thinking of hanging a
> first-class module from a node, which could be unpacked and decide
> how to deal with that part of the namespace. =C2=A0This way, we could
> mix-and-match Xen portions of the namespace, as well as other nodes
> that have completely different side-effects.

Why not use a functor. I'm not sure there is a case for dynamically switchi=
ng
between the Unixy and the Xeny versions and thus the need for a first-class
module. Or better yet, use mirage as the application synthesis and speciali=
se
the module at compile time.


Cheers,
--=20
_______
Raphael


From Richard.Mortier@nottingham.ac.uk Wed Feb 15 13:53:06 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxfIA-0007GS-MZ (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Wed, 15 Feb 2012 13:53:06 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1243828 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from thb-mta-19-tx.emailfiltering.com ([194.116.199.150]:49272
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1RxfI5-0007i6-Dm (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Wed, 15 Feb 2012 13:53:06 +0000
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.5.86) by TLS
	id 2307344554 ;8ac8286da758ffff; Wed, 15 Feb 2012 13:52:41 +0000
Received: from uiwexhub01.ad.nottingham.ac.uk ([128.243.15.133])
	by smtp1.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1RxfHj-0006H7-Pa
	for cl-mirage@lists.cam.ac.uk; Wed, 15 Feb 2012 13:52:39 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Wed, 15 Feb 2012 13:52:40 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Wed, 15 Feb 2012 13:52:38 +0000
Subject: Re: generalising oxenstored for unix nodes too
Thread-Topic: generalising oxenstored for unix nodes too
Thread-Index: Aczr6RRi0fNs7QtWQA63Z8oJOpx7QA==
Message-ID: <94425A89-A46C-422E-AF30-681DCA84D966@nottingham.ac.uk>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
In-Reply-To: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 13:53:06 -0000
X-Keywords:                  
X-UID: 172
Status: O
Content-Length: 1181
Lines: 29


On 14 Feb 2012, at 23:00, Anil Madhavapeddy wrote:

> Raphael has been hacking away at the Mirage control stack, which
> will keep *bidirectional* dependencies for most data structures.

as this is something i think is (a) a very good thing and (b) a very intere=
sting thing, any more news on it?  how's it coming along, where's it live, =
what's the plan, etc? :)

--=20
Cheers,

R.


=
This message and any attachment are intended solely for the addressee a=
nd may contain confidential information. If you have received this mess=
age in error, please send it back to me, and immediately delete it.   P=
lease do not use, copy or disclose the information contained in this me=
ssage or in any attachment.  Any views or opinions expressed by the aut=
hor of this email do not necessarily reflect the views of the Universit=
y of Nottingham.=0D=0A=0D=0AThis message has been checked for viruses b=
ut the contents of an attachment=0D=0Amay still contain software viruse=
s which could damage your computer system:=0D=0Ayou are advised to perf=
orm your own checks. Email communications with the=0D=0AUniversity of N=
ottingham may be monitored as permitted by UK legislation.=


From raphlalou@gmail.com Wed Feb 15 14:19:56 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rxfi8-0001DF-1c (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 15 Feb 2012 14:19:56 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1243828 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:57046)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1Rxfi6-0005NC-rC (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 15 Feb 2012 14:19:56 +0000
Received: by iabz21 with SMTP id z21so1596621iab.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 15 Feb 2012 06:19:53 -0800 (PST)
MIME-Version: 1.0
Received: by 10.43.126.67 with SMTP id gv3mr1078471icc.50.1329315593620; Wed,
	15 Feb 2012 06:19:53 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Wed, 15 Feb 2012 06:19:53 -0800 (PST)
In-Reply-To: <94425A89-A46C-422E-AF30-681DCA84D966@nottingham.ac.uk>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<94425A89-A46C-422E-AF30-681DCA84D966@nottingham.ac.uk>
Date: Wed, 15 Feb 2012 14:19:53 +0000
Message-ID: <CAAmHUAkchKUdVHVSGPwz8WvwjyQ8THa1W0JKCFN_0LttpjzH1A@mail.gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
From: Raphael Proust <raphlalou@gmail.com>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>,
	Anil Madhavapeddy <anil@recoil.org>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 14:19:56 -0000
X-Keywords:                  
X-UID: 173
Status: O
Content-Length: 1291
Lines: 38

On Wed, Feb 15, 2012 at 1:52 PM, Richard Mortier
<Richard.Mortier@nottingham.ac.uk> wrote:
>
> On 14 Feb 2012, at 23:00, Anil Madhavapeddy wrote:
>
>> Raphael has been hacking away at the Mirage control stack, which
>> will keep *bidirectional* dependencies for most data structures.
>
> as this is something i think is (a) a very good thing and (b) a very inte=
resting thing, any more news on it? =C2=A0how's it coming along, where's it=
 live, what's the plan, etc? :)

There are some early experiments at https://github.com/avsm/ocaml-ld

In the ARP example
(https://github.com/avsm/ocaml-ld/blob/master/examples/arp-fast/arp.ml), th=
e
query function has type
val query: ?timeout:float -> ipv4_addr -> ethernet_mac option Froc_sa.t

It means that the result of a query is not a static mac address it's a
changeable (Froc_sa.t, sa stands for self-adjusting) one. Hence one can bui=
ld a
value that depends on this address. Such a value is guaranteed to be recomp=
uted
whenever the ARP entry associated with the queried IP address changes.

Thus you can open a TCP connection and be given a closure. The actual code
executed when calling is updated so has to fill the packet headers (and amo=
ng
them the MAC destination field of the ethernet frame) correctly.



--=20
_______
Raphael


From anil@recoil.org Wed Feb 15 14:58:43 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxgJf-0003OC-SB (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 15 Feb 2012 14:58:43 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1243828 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:28703
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1RxgJe-00067E-XM (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 15 Feb 2012 14:58:43 +0000
Received: (qmail 17535 invoked by uid 634); 15 Feb 2012 14:58:42 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-belf1-0-0-cust23.2-1.cable.virginmedia.com (HELO
	[10.0.1.14]) (82.29.224.24)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 15 Feb 2012 14:58:41 +0000
Subject: Re: generalising oxenstored for unix nodes too
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CAAmHUAkchKUdVHVSGPwz8WvwjyQ8THa1W0JKCFN_0LttpjzH1A@mail.gmail.com>
Date: Wed, 15 Feb 2012 14:58:38 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <4800362F-03A7-4237-96B8-F03723A90FC9@recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<94425A89-A46C-422E-AF30-681DCA84D966@nottingham.ac.uk>
	<CAAmHUAkchKUdVHVSGPwz8WvwjyQ8THa1W0JKCFN_0LttpjzH1A@mail.gmail.com>
To: Raphael Proust <raphlalou@gmail.com>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Richard Mortier <Richard.Mortier@nottingham.ac.uk>,
	"cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 14:58:44 -0000
X-Keywords:                  
X-UID: 174
Status: O
Content-Length: 1843
Lines: 54

On 15 Feb 2012, at 14:19, Raphael Proust wrote:
>=20
> There are some early experiments at https://github.com/avsm/ocaml-ld
>=20
> In the ARP example
> =
(https://github.com/avsm/ocaml-ld/blob/master/examples/arp-fast/arp.ml), =
the
> query function has type
> val query: ?timeout:float -> ipv4_addr -> ethernet_mac option =
Froc_sa.t
>=20
> It means that the result of a query is not a static mac address it's a
> changeable (Froc_sa.t, sa stands for self-adjusting) one. Hence one =
can build a
> value that depends on this address. Such a value is guaranteed to be =
recomputed
> whenever the ARP entry associated with the queried IP address changes.
>=20
> Thus you can open a TCP connection and be given a closure. The actual =
code
> executed when calling is updated so has to fill the packet headers =
(and among
> them the MAC destination field of the ethernet frame) correctly.

The missing API end-point here is what the application API looks like, =
which
is (coincidentally :) quite similar to the FABLE flows described in:
http://anil.recoil.org/papers/2012-resolve-fable.pdf

So the idea is that every I/O flow is established as a series of FRP =
variables
that record all the various stacks that it depends on, with the result =
being
a buffer pool that the application can write into.  This buffer pool can =
be
adjusted as a result of a change in the underlying channel (i.e. a live=20=

migration), which should be invisible to the application.

There are some details to work through, such as where all these I/O =
flows are
registered (hence my looking at oxenstored), and also precisely what the=20=

reconfiguration API provides (i.e. where is the policy for 'old' to =
'new'
transition, which might involve killing existing connections, or letting=20=

existing ones continue until they terminate, and so on).

-anil




From thomas.gazagnaire@gmail.com Wed Feb 15 17:08:21 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxiL7-00000a-Rh (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Wed, 15 Feb 2012 17:08:21 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1243828 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (thomas.gazagnaire[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:44333)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1RxiL7-0006GP-QZ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Wed, 15 Feb 2012 17:08:21 +0000
Received: by wera1 with SMTP id a1so847097wer.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 15 Feb 2012 09:08:21 -0800 (PST)
Received: by 10.216.140.15 with SMTP id d15mr2959448wej.16.1329325701026;
	Wed, 15 Feb 2012 09:08:21 -0800 (PST)
Received: from [192.168.30.114] (perens.inria.fr. [128.93.60.79])
	by mx.google.com with ESMTPS id ec3sm34710488wib.1.2012.02.15.09.08.19
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 15 Feb 2012 09:08:20 -0800 (PST)
Subject: Re: generalising oxenstored for unix nodes too
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
In-Reply-To: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
Date: Wed, 15 Feb 2012 18:08:18 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
To: Anil Madhavapeddy <anil@recoil.org>
X-Mailer: Apple Mail (2.1084)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 17:08:21 -0000
X-Keywords:                  
X-UID: 175
Status: O
Content-Length: 1067
Lines: 22

> Thomas, Dave, any thoughts on this? I was thinking of hanging a
> first-class module from a node, which could be unpacked and decide
> how to deal with that part of the namespace.  This way, we could
> mix-and-match Xen portions of the namespace, as well as other nodes
> that have completely different side-effects.

If I remind correctly, the only important thing in the xenbus protocol =
is to be able to give an identifier to transactions ie, every query has =
to be tagged with an ident which will identify the current transaction. =
If the ident is 0, then there is no active transaction, and there is an =
API call to start a new transaction which return a fresh ident. There =
are also some specific code to handle connections coming from  dom0 =
(using a socket) and from other domains (using ring buffers): we were =
needing both in xenserver so that should be quite easy to reuse.

If needed, I have some ideas to improve the transaction aborting =
mechanisms, but the current scheme is already quite good (at least for =
typical Xen uses).

--
Thomas=


From anil@recoil.org Wed Feb 15 17:12:21 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxiOz-0000AG-FC (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 15 Feb 2012 17:12:21 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1243828 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:6011
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1RxiOy-0007aD-ZJ (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 15 Feb 2012 17:12:21 +0000
Received: (qmail 2033 invoked by uid 634); 15 Feb 2012 17:12:20 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-belf1-0-0-cust23.2-1.cable.virginmedia.com (HELO
	[10.0.1.14]) (82.29.224.24)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 15 Feb 2012 17:12:20 +0000
Subject: Re: generalising oxenstored for unix nodes too
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
Date: Wed, 15 Feb 2012 17:12:18 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 17:12:21 -0000
X-Keywords:                  
X-UID: 176
Status: O
Content-Length: 1473
Lines: 31

On 15 Feb 2012, at 17:08, Thomas Gazagnaire wrote:

>> Thomas, Dave, any thoughts on this? I was thinking of hanging a
>> first-class module from a node, which could be unpacked and decide
>> how to deal with that part of the namespace.  This way, we could
>> mix-and-match Xen portions of the namespace, as well as other nodes
>> that have completely different side-effects.
>=20
> If I remind correctly, the only important thing in the xenbus protocol =
is to be able to give an identifier to transactions ie, every query has =
to be tagged with an ident which will identify the current transaction. =
If the ident is 0, then there is no active transaction, and there is an =
API call to start a new transaction which return a fresh ident. There =
are also some specific code to handle connections coming from  dom0 =
(using a socket) and from other domains (using ring buffers): we were =
needing both in xenserver so that should be quite easy to reuse.
>=20
> If needed, I have some ideas to improve the transaction aborting =
mechanisms, but the current scheme is already quite good (at least for =
typical Xen uses).

Ok, just going with making it Lwt+functor for now then, as is
the quickest. I had a vague idea that we might be able to hang
arbitrary continuations as the value for an entry, rather than just
strings, so they could be woken up by the scheduler.

However, thats step 2 :)  Just having it working in a stub domain
for now would be most useful.

-a=


From thomas.gazagnaire@gmail.com Wed Feb 15 17:38:53 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rxiof-0000ms-3B (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Wed, 15 Feb 2012 17:38:53 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1243828 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (thomas.gazagnaire[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:63547)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1Rxiod-0007CX-ZH (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Wed, 15 Feb 2012 17:38:52 +0000
Received: by wera1 with SMTP id a1so872301wer.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 15 Feb 2012 09:38:51 -0800 (PST)
Received: by 10.216.131.234 with SMTP id m84mr12263862wei.24.1329327531651;
	Wed, 15 Feb 2012 09:38:51 -0800 (PST)
Received: from [10.104.30.136] (37-8-191-28.romanichel.net. [37.8.191.28])
	by mx.google.com with ESMTPS id dr5sm13377619wib.0.2012.02.15.09.38.49
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 15 Feb 2012 09:38:50 -0800 (PST)
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
In-Reply-To: <37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
Mime-Version: 1.0 (1.0)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii
Message-Id: <BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
X-Mailer: iPhone Mail (9A405)
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
Date: Wed, 15 Feb 2012 18:37:14 +0100
To: Anil Madhavapeddy <anil@recoil.org>
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 17:38:53 -0000
X-Keywords:                  
X-UID: 177
Status: O
Content-Length: 554
Lines: 15

> Ok, just going with making it Lwt+functor for now then, as is
> the quickest. I had a vague idea that we might be able to hang
> arbitrary continuations as the value for an entry, rather than just
> strings, so they could be woken up by the scheduler.
> However, thats step 2 :)  Just having it working in a stub domain
> for now would be most useful.

You don't need lwt to make it work as stub donain, as the scheduler is hand-=
made and do not use threads. But indeed, that would be a nice improvement (b=
ut do you really need that?)


--
Thomas=


From anil@recoil.org Wed Feb 15 18:45:15 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rxjqt-0002UH-MZ (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 15 Feb 2012 18:45:15 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1243828 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:32667
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp id 1Rxjqt-0007sZ-WK (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 15 Feb 2012 18:45:15 +0000
Received: (qmail 3870 invoked by uid 634); 15 Feb 2012 18:45:13 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-belf1-0-0-cust23.2-1.cable.virginmedia.com (HELO
	[10.0.1.14]) (82.29.224.24)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Wed, 15 Feb 2012 18:45:13 +0000
Subject: Re: generalising oxenstored for unix nodes too
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
Date: Wed, 15 Feb 2012 18:45:07 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 18:45:15 -0000
X-Keywords:                  
X-UID: 178
Status: O
Content-Length: 952
Lines: 24

On 15 Feb 2012, at 17:37, Thomas Gazagnaire wrote:

>> Ok, just going with making it Lwt+functor for now then, as is
>> the quickest. I had a vague idea that we might be able to hang
>> arbitrary continuations as the value for an entry, rather than just
>> strings, so they could be woken up by the scheduler.
>> However, thats step 2 :)  Just having it working in a stub domain
>> for now would be most useful.
>=20
> You don't need lwt to make it work as stub donain, as the scheduler is =
hand-made and do not use threads. But indeed, that would be a nice =
improvement (but do you really need that?)
>=20

It's hard to compose two blocking events without it. So strictly
speaking you could do a single oxenstored without Lwt, but even a
blocking console ring would introduce problems then.

I suspect in production that an oxenstored will also need a management
netfront or a logging ring of some kind, and so Lwt will be needed for
that.

-anil=


From Dave.Scott@eu.citrix.com Wed Feb 15 20:25:17 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RxlPg-00042c-Vh (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk (return-path <Dave.Scott@eu.citrix.com>);
	Wed, 15 Feb 2012 20:25:16 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1243828 
	* -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
	*      domain
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:10271
	helo=SMTP.EU.CITRIX.COM)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1RxlPf-0002Cq-XL (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk (return-path <Dave.Scott@eu.citrix.com>);
	Wed, 15 Feb 2012 20:25:16 +0000
X-IronPort-AV: E=Sophos;i="4.73,424,1325462400"; d="scan'208";a="10726980"
Received: from lonpmailmx02.citrite.net ([10.30.203.163])
	by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5;
	15 Feb 2012 20:24:59 +0000
Received: from LONPMAILBOX01.citrite.net ([10.30.224.160]) by
	LONPMAILMX02.citrite.net ([10.30.203.163]) with mapi; Wed, 15 Feb 2012
	20:24:59 +0000
From: Dave Scott <Dave.Scott@eu.citrix.com>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Wed, 15 Feb 2012 20:24:59 +0000
Subject: Re: generalising oxenstored for unix nodes too
Thread-Topic: generalising oxenstored for unix nodes too
Thread-Index: AczsH+NUNj9PRRYkT+OZ3y5vA0Xq8w==
Message-ID: <80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
	<D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
In-Reply-To: <D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>,
	Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2012 20:25:17 -0000
X-Keywords:                  
X-UID: 179
Status: O
Content-Length: 1409
Lines: 37



On Feb 15, 2012, at 10:45 AM, "Anil Madhavapeddy" <anil@recoil.org> wrote:

> On 15 Feb 2012, at 17:37, Thomas Gazagnaire wrote:
>=20
>>> Ok, just going with making it Lwt+functor for now then, as is
>>> the quickest. I had a vague idea that we might be able to hang
>>> arbitrary continuations as the value for an entry, rather than just
>>> strings, so they could be woken up by the scheduler.
>>> However, thats step 2 :)  Just having it working in a stub domain
>>> for now would be most useful.
>>=20
>> You don't need lwt to make it work as stub donain, as the scheduler is h=
and-made and do not use threads. But indeed, that would be a nice improveme=
nt (but do you really need that?)
>>=20
>=20
> It's hard to compose two blocking events without it. So strictly
> speaking you could do a single oxenstored without Lwt, but even a
> blocking console ring would introduce problems then.
>=20
> I suspect in production that an oxenstored will also need a management
> netfront or a logging ring of some kind, and so Lwt will be needed for
> that.

I agree - logging to a console ring would be essential. We can then tell xe=
nconsoled to log the console output directly to syslog. We'd want that to b=
e non-blocking or the system might grind to a halt under load (it's probabl=
y better to drop some logs and report you've done so and to continue, if th=
e logging buffer fills up)

Cheers,
Dave




From raphlalou@gmail.com Fri Feb 17 09:47:44 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RyKPo-0004vW-Qc (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Fri, 17 Feb 2012 09:47:44 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1244890 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:55370)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1RyKPn-0008GO-qs (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Fri, 17 Feb 2012 09:47:44 +0000
Received: by iabz21 with SMTP id z21so4493189iab.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 17 Feb 2012 01:47:42 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.138.193 with SMTP id d1mr6138011icu.0.1329472062635; Fri,
	17 Feb 2012 01:47:42 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Fri, 17 Feb 2012 01:47:42 -0800 (PST)
In-Reply-To: <80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
	<D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
	<80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
Date: Fri, 17 Feb 2012 09:47:42 +0000
Message-ID: <CAAmHUAnTq_iYZHRF56bu_dgaeJaszZimj6MTu+T4Rb0baECHzA@mail.gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
From: Raphael Proust <raphlalou@gmail.com>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Fri, 17 Feb 2012 09:47:44 -0000
X-Keywords:                  
X-UID: 180
Status: O
Content-Length: 1695
Lines: 45

My internship is almost over and I won't have time to contribute code in the
immediate future. I'll keep an eye on this and contribute (in code and thought)
later though.

In the mean time, some thoughts:


#Interaction between FRP and xenstore

In FRP there is a strong separation between primitive values (those that can be
changed by the "user") and the others (those that are updated automatically to
reflect changes of the values it depends one). There is a choice one should make
as to how mixing FRP and a namespace: should non-primitive FRP values be allowed
in the tree?

Allowing such a use is nice as it makes it possible for one to export
non-primitive values directly in the tree. But allowing is complicated as it
requires the transaction mechanism to integrate FRP bits and FRP make
assumptions of atomic re-computation of the whole graph of values. Some values
might only be computable on the store client, which makes the sharing of the
name-space difficult.

There are several approaches to this problem, but some break FRP invariants or
induce blocking operations. Still need to think about that.


#bind(1)

Reading plan9-related stuff, I stumbled upon the bind
http://plan9.bell-labs.com/magic/man2html/1/bind operation on the namespace. In
plan 9 it is used to replace $PATH (and other $MANPATH, $CDPATH, etc.)
and also to share values.

The implementation would require modification to xenstore and its API, but it is
really a nice thing to have on a namespace. It might also be a way to loosen
the constraints induced by the FRP aspect. (Exposed FRP values could be bound to
the 'observer' sub-tree with a not-always-up-to-date semantic.)



Cheers,
-- 
_______
Raphael


From avsm@dark.recoil.org Sat Feb 18 14:58:55 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RylkV-00046K-HO (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Sat, 18 Feb 2012 14:58:55 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1245347 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:27005
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp id 1RylkU-0002C7-Rj (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Sat, 18 Feb 2012 14:58:55 +0000
Received: (qmail 4782 invoked by uid 10000); 18 Feb 2012 14:58:54 -0000
Date: Sat, 18 Feb 2012 14:58:54 +0000
From: Anil Madhavapeddy <anil@recoil.org>
To: Raphael Proust <raphlalou@gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
Message-ID: <20120218145853.GA31786@dark.recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
	<D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
	<80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
	<CAAmHUAnTq_iYZHRF56bu_dgaeJaszZimj6MTu+T4Rb0baECHzA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAAmHUAnTq_iYZHRF56bu_dgaeJaszZimj6MTu+T4Rb0baECHzA@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Sat, 18 Feb 2012 14:58:55 -0000
X-Keywords:                  
X-UID: 181
Status: O
Content-Length: 2719
Lines: 56

On Fri, Feb 17, 2012 at 09:47:42AM +0000, Raphael Proust wrote:
> 
> In FRP there is a strong separation between primitive values (those that
> can be changed by the "user") and the others (those that are updated
> automatically to reflect changes of the values it depends one). There is
> a choice one should make as to how mixing FRP and a namespace: should
> non-primitive FRP values be allowed in the tree?

This is a very useful insight.  In Xen right now, pretty much all
activities are initiated by the tools writing something into Xenstore, and
then something else that is watching a path reacting on it.  Once a user
action has been kicked off, many other tools write keys into the store and
use it as an RPC/select mechanism (e.g. for front and backend devices to
connect between VMs).

The interaction between these is very ad-hoc at the moment. Augmenting
Xenstore to specifically understand that a given key is user-supplied is
very useful.

> Allowing such a use is nice as it makes it possible for one to export
> non-primitive values directly in the tree. But allowing is complicated as it
> requires the transaction mechanism to integrate FRP bits and FRP make
> assumptions of atomic re-computation of the whole graph of values. Some values
> might only be computable on the store client, which makes the sharing of the
> name-space difficult.
> 
> There are several approaches to this problem, but some break FRP invariants or
> induce blocking operations. Still need to think about that.
> 
> 
> #bind(1)
> 
> Reading plan9-related stuff, I stumbled upon the bind
> http://plan9.bell-labs.com/magic/man2html/1/bind operation on the namespace. In
> plan 9 it is used to replace $PATH (and other $MANPATH, $CDPATH, etc.)
> and also to share values.
> 
> The implementation would require modification to xenstore and its API, but it is
> really a nice thing to have on a namespace. It might also be a way to loosen
> the constraints induced by the FRP aspect. (Exposed FRP values could be bound to
> the 'observer' sub-tree with a not-always-up-to-date semantic.)

The previous two points are tied together, I think. We need to figure out
how to meld multiple writers (different VMs, different hosts, doesnt
matter) and guarantee that we preserve the FRP equational invariants.
Given that we have transactional isolation already and a purely functional
tree that can be mutated non-destructively, this feels like it shouldn't
be too hard.

Incidentally, the original plan behind Xenstore was to make it a
cluster-wide distributed coordinator, but that was judged too complex for
various reasons. Better late than never :-)

-- 
Anil Madhavapeddy                                 http://anil.recoil.org


From raphlalou@gmail.com Mon Feb 20 09:22:52 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RzPSO-00061N-Bg (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Mon, 20 Feb 2012 09:22:52 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1290969 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:52262)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1RzPSM-0001wl-Qw (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Mon, 20 Feb 2012 09:22:52 +0000
Received: by iabz21 with SMTP id z21so7847391iab.38
	for <cl-mirage@lists.cam.ac.uk>; Mon, 20 Feb 2012 01:22:49 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.181.228 as permitted sender) client-ip=10.50.181.228; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.181.228 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.181.228])
	by 10.50.181.228 with SMTP id dz4mr11489165igc.9.1329729769645
	(num_hops = 1); Mon, 20 Feb 2012 01:22:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.181.228 with SMTP id dz4mr9279993igc.9.1329729769597; Mon,
	20 Feb 2012 01:22:49 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Mon, 20 Feb 2012 01:22:49 -0800 (PST)
In-Reply-To: <20120218145853.GA31786@dark.recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
	<D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
	<80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
	<CAAmHUAnTq_iYZHRF56bu_dgaeJaszZimj6MTu+T4Rb0baECHzA@mail.gmail.com>
	<20120218145853.GA31786@dark.recoil.org>
Date: Mon, 20 Feb 2012 10:22:49 +0100
Message-ID: <CAAmHUAkHXRbvPB6=sH3rdQ0jL19KZRU_937HfP+Hpf7_=GNuyA@mail.gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
From: Raphael Proust <raphlalou@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2012 09:22:52 -0000
X-Keywords:                  
X-UID: 182
Status: O
Content-Length: 2279
Lines: 62

On Sat, Feb 18, 2012 at 3:58 PM, Anil Madhavapeddy <anil@recoil.org> wrote:
> On Fri, Feb 17, 2012 at 09:47:42AM +0000, Raphael Proust wrote:
>>
>> In FRP there is a strong separation between primitive values (those that
>> can be changed by the "user") and the others (those that are updated
>> automatically to reflect changes of the values it depends one). There is
>> a choice one should make as to how mixing FRP and a namespace: should
>> non-primitive FRP values be allowed in the tree?
>
> This is a very useful insight. =C2=A0In Xen right now, pretty much all
> activities are initiated by the tools writing something into Xenstore, an=
d
> then something else that is watching a path reacting on it. =C2=A0Once a =
user
> action has been kicked off, many other tools write keys into the store an=
d
> use it as an RPC/select mechanism (e.g. for front and backend devices to
> connect between VMs).
>
> The interaction between these is very ad-hoc at the moment. Augmenting
> Xenstore to specifically understand that a given key is user-supplied is
> very useful.

Something else that might be useful (but may be overkill) is to have the st=
ore
aware of the dependencies. (E.g. this key is user supplied and may change
whenever this other key does.)

>
>> [=E2=80=A6]
>
> The previous two points are tied together, I think. We need to figure out
> how to meld multiple writers (different VMs, different hosts, doesnt
> matter) and guarantee that we preserve the FRP equational invariants.
> Given that we have transactional isolation already and a purely functiona=
l
> tree that can be mutated non-destructively, this feels like it shouldn't
> be too hard.

Not sure about the not being too hard part=E2=80=A6 There are tricky detail=
s.

I think there is a not too complicated approach that can work. Each partici=
pant
having a local copy is responsible for its coherency. The central store mak=
es
new values propagate from one place to the other. This is less powerfull th=
an
FRP in that some computation might be duplicated where they usually wouldn'=
t be
(E.g. A changes a key, B and C initiate some computations and then push som=
e new
values for some of theirs keys, C initiate some computations to take B chan=
ges
into account).



--=20
_______
Raphael


From raphlalou@gmail.com Mon Feb 20 09:25:58 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RzPVO-00069B-1V (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Mon, 20 Feb 2012 09:25:58 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1290969 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:57120)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1RzPVN-0005QM-Xg (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Mon, 20 Feb 2012 09:25:57 +0000
Received: by iabz21 with SMTP id z21so7850249iab.38
	for <cl-mirage@lists.cam.ac.uk>; Mon, 20 Feb 2012 01:25:56 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.222.135 as permitted sender) client-ip=10.50.222.135; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.222.135 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.222.135])
	by 10.50.222.135 with SMTP id qm7mr6217101igc.9.1329729956772 (num_hops
	= 1); Mon, 20 Feb 2012 01:25:56 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.222.135 with SMTP id qm7mr5030447igc.9.1329729956703; Mon,
	20 Feb 2012 01:25:56 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Mon, 20 Feb 2012 01:25:56 -0800 (PST)
In-Reply-To: <CAAmHUAkHXRbvPB6=sH3rdQ0jL19KZRU_937HfP+Hpf7_=GNuyA@mail.gmail.com>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
	<D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
	<80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
	<CAAmHUAnTq_iYZHRF56bu_dgaeJaszZimj6MTu+T4Rb0baECHzA@mail.gmail.com>
	<20120218145853.GA31786@dark.recoil.org>
	<CAAmHUAkHXRbvPB6=sH3rdQ0jL19KZRU_937HfP+Hpf7_=GNuyA@mail.gmail.com>
Date: Mon, 20 Feb 2012 10:25:56 +0100
Message-ID: <CAAmHUAkFgvD8pFk5Vf+Zgi2SeXfPw=RLZfAUm7JycFu9NNrP8g@mail.gmail.com>
Subject: Re: generalising oxenstored for unix nodes too
From: Raphael Proust <raphlalou@gmail.com>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2012 09:25:58 -0000
X-Keywords:                  
X-UID: 183
Status: O
Content-Length: 279
Lines: 11

Btw, I have a few patches that may be interesting to integrate into
xenstored (reading the code I spotted a few instances of 'if
List.length l > 0 then =E2=80=A6' and other useless list traversals).

What is the best way to 'send a pull request'?

Cheers,
--=20
_______
Raphael


From anil@recoil.org Mon Feb 20 09:34:06 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RzPdG-0006oJ-AG (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 20 Feb 2012 09:34:06 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1290969 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:40089
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp id 1RzPdE-0000m2-SV (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 20 Feb 2012 09:34:06 +0000
Received: (qmail 24541 invoked by uid 634); 20 Feb 2012 09:34:04 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.67]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Mon, 20 Feb 2012 09:34:04 +0000
Subject: Re: generalising oxenstored for unix nodes too
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=windows-1252
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CAAmHUAkFgvD8pFk5Vf+Zgi2SeXfPw=RLZfAUm7JycFu9NNrP8g@mail.gmail.com>
Date: Mon, 20 Feb 2012 09:34:01 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <E37FC8F1-4DEA-4161-98CA-CD2A601E90E8@recoil.org>
References: <174BD3EA-1179-4E66-98F0-ECE2358E0AAE@recoil.org>
	<1B4D589C-0CB3-4E7F-A132-8530F6E20E25@gmail.com>
	<37C1DD1E-807B-4A65-93B5-4FC99092AE8C@recoil.org>
	<BC9F2281-49B6-455E-8B03-F6DB000890D7@gmail.com>
	<D3893071-AD0D-407B-A465-E5D5E1EE07A7@recoil.org>
	<80D98971-2FA4-456B-BB40-645B45FF2CBC@eu.citrix.com>
	<CAAmHUAnTq_iYZHRF56bu_dgaeJaszZimj6MTu+T4Rb0baECHzA@mail.gmail.com>
	<20120218145853.GA31786@dark.recoil.org>
	<CAAmHUAkHXRbvPB6=sH3rdQ0jL19KZRU_937HfP+Hpf7_=GNuyA@mail.gmail.com>
	<CAAmHUAkFgvD8pFk5Vf+Zgi2SeXfPw=RLZfAUm7JycFu9NNrP8g@mail.gmail.com>
To: Raphael Proust <raphlalou@gmail.com>
X-Mailer: Apple Mail (2.1257)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Mon, 20 Feb 2012 09:34:06 -0000
X-Keywords:                  
X-UID: 184
Status: O
Content-Length: 522
Lines: 21

Generate them against hg://xenbits.xen.org/xen-unstable.hg:tools/ocaml =
(Dave or I can test it as you probably don't have a local Xen =
installation there yet?)

-anil

On 20 Feb 2012, at 09:25, Raphael Proust wrote:

> Btw, I have a few patches that may be interesting to integrate into
> xenstored (reading the code I spotted a few instances of 'if
> List.length l > 0 then =85' and other useless list traversals).
>=20
> What is the best way to 'send a pull request'?
>=20
> Cheers,
> --=20
> _______
> Raphael
>=20



From sebastian.probst.eide@gmail.com Tue Feb 21 16:56:14 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rzt0g-0005a2-3Q (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 21 Feb 2012 16:56:14 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291150 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:49470)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1Rzt0c-00011w-ZI (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 21 Feb 2012 16:56:13 +0000
Received: by wera1 with SMTP id a1so4337587wer.38
	for <cl-mirage@lists.cam.ac.uk>; Tue, 21 Feb 2012 08:56:10 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.83.97 as permitted sender)
	client-ip=10.180.83.97; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.83.97 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.83.97])
	by 10.180.83.97 with SMTP id p1mr27166521wiy.19.1329843370862 (num_hops
	= 1); Tue, 21 Feb 2012 08:56:10 -0800 (PST)
Received: by 10.180.83.97 with SMTP id p1mr22606810wiy.19.1329843370817;
	Tue, 21 Feb 2012 08:56:10 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id
	y6sm23650584wix.10.2012.02.21.08.56.09
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 21 Feb 2012 08:56:10 -0800 (PST)
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_A846DBED-41D5-4F15-8F90-A6BE10FB50E9"
Subject: Running OCaml scripts from the command line
Date: Tue, 21 Feb 2012 16:56:08 +0000
Message-Id: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1257)
X-Mailer: Apple Mail (2.1257)
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 16:56:14 -0000
X-Keywords:                  
X-UID: 185
Status: O
Content-Length: 2946
Lines: 72


--Apple-Mail=_A846DBED-41D5-4F15-8F90-A6BE10FB50E9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Dear OCamlers.
I am doing some quick and dirty OCamling, and while coding would like to =
execute my code in the toplevel, rather than first compiling it and then =
running my compiled binary.

if I have a file called test1.ml, for which the following works fine:

	ocaml test1.ml=20

But, now, if test1.ml uses the Test2 module (in test2.ml), I get a =
module missing exception. I get around this with:

	ocaml test2.ml test1.ml

but when supplying both test2 and test1 to the ocaml toplevel, =
absolutely no code is executed at all.
I have tried to use the -I flag to add the current directory to the =
search path (which it should be by default?), but without any luck.

I haven't had any luck with ocamlfind either, and ocamlfind seems to be =
for finding third party libraries, rather than other modules within the =
same project?

I hope I am missing something trivial here.

Thank you, and have a great afternoon!

All the best,
Sebastian



--Apple-Mail=_A846DBED-41D5-4F15-8F90-A6BE10FB50E9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear =
OCamlers.<div>I am doing some quick and dirty OCamling, and while coding =
would like to execute my code in the toplevel, rather than first =
compiling it and then running my compiled =
binary.</div><div><br></div><div>if I have a file called test1.ml, for =
which the following works fine:</div><div><br></div><div><font =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"4"><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>ocaml =
test1.ml&nbsp;</font></div><div><br></div><div>But, now, if test1.ml =
uses the Test2 module (in test2.ml), I get a module missing exception. I =
get around this with:</div><div><br></div><div><font =
class=3D"Apple-style-span" face=3D"Monaco" size=3D"4"><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>ocaml =
test2.ml test1.ml</font></div><div><br></div><div>but when supplying =
both test2 and test1 to the ocaml toplevel, absolutely no code is =
executed at all.</div><div>I have tried to use the -I flag to add the =
current directory to the search path (which it should be by default?), =
but without any luck.</div><div><br></div><div>I haven't had any luck =
with ocamlfind either, and ocamlfind seems to be for finding third party =
libraries, rather than other modules within the same =
project?</div><div><br></div><div>I hope I am missing something trivial =
here.</div><div><br></div><div>Thank you, and have a great =
afternoon!</div><div><br></div><div>All the =
best,</div><div>Sebastian</div><div><br></div><div><br></div></body></html=
>=

--Apple-Mail=_A846DBED-41D5-4F15-8F90-A6BE10FB50E9--


From raphlalou@gmail.com Tue Feb 21 17:12:02 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RztFy-0006DO-JE (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Tue, 21 Feb 2012 17:12:02 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291150 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:46684)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1RztFv-0005Bn-rg (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Tue, 21 Feb 2012 17:12:02 +0000
Received: by iabz21 with SMTP id z21so9966745iab.38
	for <cl-mirage@lists.cam.ac.uk>; Tue, 21 Feb 2012 09:11:58 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.95.195 as permitted sender) client-ip=10.50.95.195; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.95.195 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.95.195])
	by 10.50.95.195 with SMTP id dm3mr21260387igb.9.1329844318987 (num_hops
	= 1); Tue, 21 Feb 2012 09:11:58 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.95.195 with SMTP id dm3mr17145588igb.9.1329844318915; Tue,
	21 Feb 2012 09:11:58 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Tue, 21 Feb 2012 09:11:58 -0800 (PST)
In-Reply-To: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
Date: Tue, 21 Feb 2012 18:11:58 +0100
Message-ID: <CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
Subject: Re: Running OCaml scripts from the command line
From: Raphael Proust <raphlalou@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=UTF-8
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 17:12:02 -0000
X-Keywords:                  
X-UID: 186
Status: O
Content-Length: 2676
Lines: 113

On Tue, Feb 21, 2012 at 5:56 PM, Sebastian Probst Eide
<sebastian.probst.eide@gmail.com> wrote:
> Dear OCamlers.
> I am doing some quick and dirty OCamling, and while coding would like to
> execute my code in the toplevel, rather than first compiling it and then
> running my compiled binary.
>
> if I have a file called test1.ml, for which the following works fine:
>
> ocaml test1.ml

On my machine this does not execute in the top level. That merely runs the code
in the file(1) and exits.

Consider the sh session:
raphael ~ $ cat toto.ml
print_endline "blah"
raphael ~ $ ocaml toto.ml
blah
raphael ~ $ ocaml
        Objective Caml version 3.12.0

# #use "toto.ml" ;;
blah
- : unit = ()
#


Running "in the top level" is achieved by the #use primitive. (Also, toplevel
has two meaning in OCaml: a toplevel definition is a definition not nested under
any scope and *the* toplevel is the interactive read-compile-execute-print
loop.)

>
> But, now, if test1.ml uses the Test2 module (in test2.ml), I get a module
> missing exception. I get around this with:
>
> ocaml test2.ml test1.ml
>
> but when supplying both test2 and test1 to the ocaml toplevel, absolutely no
> code is executed at all.

That is not true. The code in test2.ml is executed (or at least it is on my
machine):

raphael ~ $ cat tata.ml
print_endline "fooooooooooo"
raphael ~ $ ocaml toto.ml tata.ml
blah

And also consider:

raphael ~ $ ocaml
        Objective Caml version 3.12.0

# #use "toto.ml" ;;
blah
- : unit = ()
# #use "tata.ml" ;;
fooooooooooo
- : unit = ()
#


> I have tried to use the -I flag to add the current directory to the search
> path (which it should be by default?), but without any luck.
>
> I haven't had any luck with ocamlfind either, and ocamlfind seems to be for
> finding third party libraries, rather than other modules within the same
> project?

You can try ocamlbuild. If your project is simple enough it will make a binary
out of anything.

To build a native executable out of the test1.ml, just type:

$ ocamlbuild test1.native

(replace by test1.byte for the slower but more portable bytecode version.)

It should figure out the dependencies if they are in the same directory and give
you a nice executable.

>
> I hope I am missing something trivial here.
>

$ echo "Module Test2 = struct" > one_file.ml
$ cat test2.ml >>one_file.ml
$ echo "end" >>one_file.ml
$ cat test1.ml >>one_file.ml
$ ocaml one_file.ml

This is quick and dirty. Don't use it.



(1) what it really does is compile the content to byte-code and runs it in the
ocaml VM. Code is not interpreted.

> Thank you, and have a great afternoon!
>
> All the best,
> Sebastian
>
>



-- 
_______
Raphael


From raphlalou@gmail.com Tue Feb 21 17:15:19 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RztJ9-0006Kp-Gg (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Tue, 21 Feb 2012 17:15:19 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291150 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:52499)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1RztJ7-0004J5-DR (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Tue, 21 Feb 2012 17:15:19 +0000
Received: by iabz21 with SMTP id z21so9970561iab.38
	for <cl-mirage@lists.cam.ac.uk>; Tue, 21 Feb 2012 09:15:16 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.222.135 as permitted sender) client-ip=10.50.222.135; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.222.135 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.222.135])
	by 10.50.222.135 with SMTP id qm7mr16031311igc.9.1329844516263
	(num_hops = 1); Tue, 21 Feb 2012 09:15:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.222.135 with SMTP id qm7mr12911606igc.9.1329844515756; Tue,
	21 Feb 2012 09:15:15 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Tue, 21 Feb 2012 09:15:15 -0800 (PST)
In-Reply-To: <CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
Date: Tue, 21 Feb 2012 18:15:15 +0100
Message-ID: <CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
Subject: Re: Running OCaml scripts from the command line
From: Raphael Proust <raphlalou@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 17:15:19 -0000
X-Keywords:                  
X-UID: 187
Status: O
Content-Length: 3243
Lines: 139

Also, if you consider using the toplevel. I'd recommend either rlwrap
or ledit so as to have edit-line capabilities (historic of typed
lines) or if you are on the emacs side of the war I hear the toplevel
integration is nice.

On Tue, Feb 21, 2012 at 6:11 PM, Raphael Proust <raphlalou@gmail.com> wrote=
:
> On Tue, Feb 21, 2012 at 5:56 PM, Sebastian Probst Eide
> <sebastian.probst.eide@gmail.com> wrote:
>> Dear OCamlers.
>> I am doing some quick and dirty OCamling, and while coding would like to
>> execute my code in the toplevel, rather than first compiling it and then
>> running my compiled binary.
>>
>> if I have a file called test1.ml, for which the following works fine:
>>
>> ocaml test1.ml
>
> On my machine this does not execute in the top level. That merely runs th=
e code
> in the file(1) and exits.
>
> Consider the sh session:
> raphael ~ $ cat toto.ml
> print_endline "blah"
> raphael ~ $ ocaml toto.ml
> blah
> raphael ~ $ ocaml
> =C2=A0 =C2=A0 =C2=A0 =C2=A0Objective Caml version 3.12.0
>
> # #use "toto.ml" ;;
> blah
> - : unit =3D ()
> #
>
>
> Running "in the top level" is achieved by the #use primitive. (Also, topl=
evel
> has two meaning in OCaml: a toplevel definition is a definition not neste=
d under
> any scope and *the* toplevel is the interactive read-compile-execute-prin=
t
> loop.)
>
>>
>> But, now, if test1.ml uses the Test2 module (in test2.ml), I get a modul=
e
>> missing exception. I get around this with:
>>
>> ocaml test2.ml test1.ml
>>
>> but when supplying both test2 and test1 to the ocaml toplevel, absolutel=
y no
>> code is executed at all.
>
> That is not true. The code in test2.ml is executed (or at least it is on =
my
> machine):
>
> raphael ~ $ cat tata.ml
> print_endline "fooooooooooo"
> raphael ~ $ ocaml toto.ml tata.ml
> blah
>
> And also consider:
>
> raphael ~ $ ocaml
> =C2=A0 =C2=A0 =C2=A0 =C2=A0Objective Caml version 3.12.0
>
> # #use "toto.ml" ;;
> blah
> - : unit =3D ()
> # #use "tata.ml" ;;
> fooooooooooo
> - : unit =3D ()
> #
>
>
>> I have tried to use the -I flag to add the current directory to the sear=
ch
>> path (which it should be by default?), but without any luck.
>>
>> I haven't had any luck with ocamlfind either, and ocamlfind seems to be =
for
>> finding third party libraries, rather than other modules within the same
>> project?
>
> You can try ocamlbuild. If your project is simple enough it will make a b=
inary
> out of anything.
>
> To build a native executable out of the test1.ml, just type:
>
> $ ocamlbuild test1.native
>
> (replace by test1.byte for the slower but more portable bytecode version.=
)
>
> It should figure out the dependencies if they are in the same directory a=
nd give
> you a nice executable.
>
>>
>> I hope I am missing something trivial here.
>>
>
> $ echo "Module Test2 =3D struct" > one_file.ml
> $ cat test2.ml >>one_file.ml
> $ echo "end" >>one_file.ml
> $ cat test1.ml >>one_file.ml
> $ ocaml one_file.ml
>
> This is quick and dirty. Don't use it.
>
>
>
> (1) what it really does is compile the content to byte-code and runs it i=
n the
> ocaml VM. Code is not interpreted.
>
>> Thank you, and have a great afternoon!
>>
>> All the best,
>> Sebastian
>>
>>
>
>
>
> --
> _______
> Raphael



--=20
_______
Raphael


From sebastian.probst.eide@gmail.com Tue Feb 21 21:16:58 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Rzx50-0003lw-AI (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 21 Feb 2012 21:16:58 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291150 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.212.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wi0-f179.google.com ([209.85.212.179]:53545)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1Rzx4y-0002re-D8 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 21 Feb 2012 21:16:58 +0000
Received: by wibhj6 with SMTP id hj6so4200274wib.38
	for <cl-mirage@lists.cam.ac.uk>; Tue, 21 Feb 2012 13:16:55 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.104.4 as permitted sender)
	client-ip=10.180.104.4; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.104.4 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.104.4])
	by 10.180.104.4 with SMTP id ga4mr30236011wib.17.1329859015943
	(num_hops = 1); Tue, 21 Feb 2012 13:16:55 -0800 (PST)
Received: by 10.180.104.4 with SMTP id ga4mr25295043wib.17.1329859015906;
	Tue, 21 Feb 2012 13:16:55 -0800 (PST)
Received: from sjc187n36.joh.private.cam.ac.uk (global-1-92.nat.csx.cam.ac.uk.
	[131.111.184.92])
	by mx.google.com with ESMTPS id by3sm25097300wib.3.2012.02.21.13.16.54
	(version=SSLv3 cipher=OTHER); Tue, 21 Feb 2012 13:16:55 -0800 (PST)
Subject: Re: Running OCaml scripts from the command line
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
Date: Tue, 21 Feb 2012 21:16:53 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <F7C50E5E-1BCC-4877-8015-817C0AF5C62D@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
To: Raphael Proust <raphlalou@gmail.com>
X-Mailer: Apple Mail (2.1257)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 21:16:58 -0000
X-Keywords:                  
X-UID: 188
Status: O
Content-Length: 2359
Lines: 76

Thanks for the reply Raphael.

> Also, if you consider using the toplevel. I'd recommend either rlwrap
> or ledit so as to have edit-line capabilities (historic of typed
> lines) or if you are on the emacs side of the war I hear the toplevel
> integration is nice.
Ah great tip! Thanks!

>> On my machine this does not execute in the top level. That merely =
runs the code
>> in the file(1) and exits.
Ah, I guess I was a bit confused. What I want is just the code to =
execute. What I am looking for is a quick way to execute my code, =
without having to compile it first.

>> Running "in the top level" is achieved by the #use primitive. (Also, =
toplevel
>> has two meaning in OCaml: a toplevel definition is a definition not =
nested under
>> any scope and *the* toplevel is the interactive =
read-compile-execute-print
>> loop.)
In that case, I don't really mean the toplevel at all :)

>> That is not true. The code in test2.ml is executed (or at least it is =
on my
>> machine):
>>=20
>> raphael ~ $ cat tata.ml
>> print_endline "fooooooooooo"
>> raphael ~ $ ocaml toto.ml tata.ml
>> blah
On my machine:

sjc187n36:test seb$ cat m1.ml=20
let hello () =3D Printf.printf "Hello from m1\n"

sjc187n36:test seb$ cat m2.ml=20
let _ =3D M1.hello ()
print_endline "Hello world\n"

sjc187n36:test seb$ ocaml m1.ml m2.ml=20
sjc187n36:test seb$=20

:(

>> You can try ocamlbuild. If your project is simple enough it will make =
a binary
>> out of anything.
>>=20
>> To build a native executable out of the test1.ml, just type:
>>=20
>> $ ocamlbuild test1.native
>>=20
>> (replace by test1.byte for the slower but more portable bytecode =
version.)
>>=20
>> It should figure out the dependencies if they are in the same =
directory and give
>> you a nice executable.
Yes. That is what I have been doing so far, but the builds, even for my =
small projects are rather slow, and really slow down my development =
process. I want to just quickly run my code to see if I have introduced =
errors, or done anything wrong.
Maybe my build is broken, or maybe I am just spoilt by how fast ruby =
launches. Hah, how ironic :D People complain about ruby being slow, but =
quickly running something in OCaml seems to take me way more time :D

Thanks for all the input Raphael!

Hope you are doing well back in France!
Enjoy the cheese and wine :)

All the best,
Sebastian=


From thomas.gazagnaire@gmail.com Tue Feb 21 21:24:41 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RzxCT-0003sV-Au (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Tue, 21 Feb 2012 21:24:41 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291150 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (thomas.gazagnaire[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:53834)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1RzxCR-0007NJ-EQ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Tue, 21 Feb 2012 21:24:41 +0000
Received: by wera1 with SMTP id a1so4514605wer.38
	for <cl-mirage@lists.cam.ac.uk>; Tue, 21 Feb 2012 13:24:39 -0800 (PST)
Received-SPF: pass (google.com: domain of thomas.gazagnaire@gmail.com
	designates 10.180.78.130 as permitted sender)
	client-ip=10.180.78.130; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	thomas.gazagnaire@gmail.com designates 10.180.78.130 as
	permitted sender) smtp.mail=thomas.gazagnaire@gmail.com;
	dkim=pass header.i=thomas.gazagnaire@gmail.com
Received: from mr.google.com ([10.180.78.130])
	by 10.180.78.130 with SMTP id b2mr30500390wix.1.1329859479353 (num_hops
	= 1); Tue, 21 Feb 2012 13:24:39 -0800 (PST)
Received: by 10.180.78.130 with SMTP id b2mr25473097wix.1.1329859479130;
	Tue, 21 Feb 2012 13:24:39 -0800 (PST)
Received: from [192.168.0.14] (gou06-3-88-170-165-56.fbx.proxad.net.
	[88.170.165.56])
	by mx.google.com with ESMTPS id dr5sm61103694wib.0.2012.02.21.13.24.36
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 21 Feb 2012 13:24:38 -0800 (PST)
Subject: Re: Running OCaml scripts from the command line
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
In-Reply-To: <F7C50E5E-1BCC-4877-8015-817C0AF5C62D@gmail.com>
Date: Tue, 21 Feb 2012 22:24:35 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <EF85207D-32DA-4B93-A14B-D79F4B2C0700@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<F7C50E5E-1BCC-4877-8015-817C0AF5C62D@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
X-Mailer: Apple Mail (2.1084)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>,
	Raphael Proust <raphlalou@gmail.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 21:24:41 -0000
X-Keywords:                  
X-UID: 189
Status: O
Content-Length: 1055
Lines: 34

> On my machine:
>=20
> sjc187n36:test seb$ cat m1.ml=20
> let hello () =3D Printf.printf "Hello from m1\n"
>=20
> sjc187n36:test seb$ cat m2.ml=20
> let _ =3D M1.hello ()
> print_endline "Hello world\n"
>=20
> sjc187n36:test seb$ ocaml m1.ml m2.ml=20
> sjc187n36:test seb$=20
>=20
> :(
>=20

don't know if it is related, but you may need to flush the buffers by =
either adding %! after \n in your strings.

> Yes. That is what I have been doing so far, but the builds, even for =
my small projects are rather slow, and really slow down my development =
process. I want to just quickly run my code to see if I have introduced =
errors, or done anything wrong.
> Maybe my build is broken, or maybe I am just spoilt by how fast ruby =
launches. Hah, how ironic :D People complain about ruby being slow, but =
quickly running something in OCaml seems to take me way more time :D

it's weird because usually bytecode compilation is quick, ie "ocamlbuild =
foo.byte --" should compile and run your program almost immediately on =
small projects.

--
Thomas



From sebastian.probst.eide@gmail.com Tue Feb 21 21:43:52 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1RzxV2-0004EA-JC (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 21 Feb 2012 21:43:52 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291150 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.51 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ww0-f51.google.com ([74.125.82.51]:42869)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1RzxV2-00075Y-Ps (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 21 Feb 2012 21:43:52 +0000
Received: by wgbdy1 with SMTP id dy1so4442370wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Tue, 21 Feb 2012 13:43:51 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.216.136.68 as permitted sender)
	client-ip=10.216.136.68; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.216.136.68 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.216.136.68])
	by 10.216.136.68 with SMTP id v46mr7525423wei.31.1329860631904
	(num_hops = 1); Tue, 21 Feb 2012 13:43:51 -0800 (PST)
Received: by 10.216.136.68 with SMTP id v46mr6269502wei.31.1329860631810;
	Tue, 21 Feb 2012 13:43:51 -0800 (PST)
Received: from sjc187n36.joh.private.cam.ac.uk (global-1-92.nat.csx.cam.ac.uk.
	[131.111.184.92])
	by mx.google.com with ESMTPS id h19sm25189613wiw.9.2012.02.21.13.43.50
	(version=SSLv3 cipher=OTHER); Tue, 21 Feb 2012 13:43:50 -0800 (PST)
Subject: Re: Running OCaml scripts from the command line
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <EF85207D-32DA-4B93-A14B-D79F4B2C0700@gmail.com>
Date: Tue, 21 Feb 2012 21:43:49 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <EDBCB5EE-5B35-4D67-AE2E-5734594BB07E@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<F7C50E5E-1BCC-4877-8015-817C0AF5C62D@gmail.com>
	<EF85207D-32DA-4B93-A14B-D79F4B2C0700@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1257)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>,
	Raphael Proust <raphlalou@gmail.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 21 Feb 2012 21:43:52 -0000
X-Keywords:                  
X-UID: 190
Status: O
Content-Length: 565
Lines: 17

> don't know if it is related, but you may need to flush the buffers by =
either adding %! after \n in your strings.
Flushing, unfortunately doesn't help. Strange. I'll let you know if I =
find the reason.
But for now, ocamlbuild will do.

> it's weird because usually bytecode compilation is quick, ie =
"ocamlbuild foo.byte --" should compile and run your program almost =
immediately on small projects.
"ocamlbuild foo.byte --" seems fast and nice! Thanks. Maybe the slowness =
was just an artifact of my _oasis build.

Thanks Thomas.

All the best,
Sebastian=


From raphlalou@gmail.com Wed Feb 22 08:51:05 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S07uj-0000tv-9U (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 22 Feb 2012 08:51:05 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291660 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:45924)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1S07ui-00084c-s3 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 22 Feb 2012 08:51:05 +0000
Received: by iabz21 with SMTP id z21so11017122iab.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 22 Feb 2012 00:51:04 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.236.5 as permitted sender) client-ip=10.50.236.5; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.236.5 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.236.5])
	by 10.50.236.5 with SMTP id uq5mr25123119igc.13.1329900664087 (num_hops
	= 1); Wed, 22 Feb 2012 00:51:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.236.5 with SMTP id uq5mr20283233igc.13.1329900663709; Wed,
	22 Feb 2012 00:51:03 -0800 (PST)
Received: by 10.43.48.196 with HTTP; Wed, 22 Feb 2012 00:51:03 -0800 (PST)
In-Reply-To: <F7C50E5E-1BCC-4877-8015-817C0AF5C62D@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<F7C50E5E-1BCC-4877-8015-817C0AF5C62D@gmail.com>
Date: Wed, 22 Feb 2012 09:51:03 +0100
Message-ID: <CAAmHUAkyMpg_WWt3XJK12x2r=xv8evduV2Ga7X3-3FiEDQZe8Q@mail.gmail.com>
Subject: Re: Running OCaml scripts from the command line
From: Raphael Proust <raphlalou@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=UTF-8
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 22 Feb 2012 08:51:05 -0000
X-Keywords:                  
X-UID: 191
Status: O
Content-Length: 1098
Lines: 40

On Tue, Feb 21, 2012 at 10:16 PM, Sebastian Probst Eide
<sebastian.probst.eide@gmail.com> wrote:
> On my machine:
>
> sjc187n36:test seb$ cat m1.ml
> let hello () = Printf.printf "Hello from m1\n"
>
> sjc187n36:test seb$ cat m2.ml
> let _ = M1.hello ()
> print_endline "Hello world\n"
>
> sjc187n36:test seb$ ocaml m1.ml m2.ml
> sjc187n36:test seb$
>
> :(
>

This is the coherent with the behaviour I have on my mcahine. The file m1.ml has
no side-effects (it merely declares a function) hence does nothing when
executed. (It is not related to flushing the buffers.)

In the man page for ocaml, the [script-file] argument is not given as plural,
nor does the explanation about this argument:
       If a script-file is given, phrases are read silently from the file,
       errors printed on standard error.  ocaml(1) exits after  the  execution
       of the last phrase.

Hence, you can only give one .ml file. To execute several files, you need to
compile. (Which, as noted by thomas, can be quite fast for bytecode
compilation.)

$ ocamlbuild m2.byte
$ ./m2.byte


Cheers,
-- 
_______
Raphael


From thomas.gazagnaire@gmail.com Wed Feb 22 16:59:08 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0FX2-0007cV-Ex (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Wed, 22 Feb 2012 16:59:08 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1291660 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.51 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (thomas.gazagnaire[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ww0-f51.google.com ([74.125.82.51]:57656)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1S0FX0-0003XB-Fi (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Wed, 22 Feb 2012 16:59:08 +0000
Received: by wgbdy1 with SMTP id dy1so170797wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Wed, 22 Feb 2012 08:59:06 -0800 (PST)
Received-SPF: pass (google.com: domain of thomas.gazagnaire@gmail.com
	designates 10.216.136.200 as permitted sender)
	client-ip=10.216.136.200; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	thomas.gazagnaire@gmail.com designates 10.216.136.200 as
	permitted sender) smtp.mail=thomas.gazagnaire@gmail.com;
	dkim=pass header.i=thomas.gazagnaire@gmail.com
Received: from mr.google.com ([10.216.136.200])
	by 10.216.136.200 with SMTP id w50mr9598634wei.2.1329929946764
	(num_hops = 1); Wed, 22 Feb 2012 08:59:06 -0800 (PST)
Received: by 10.216.136.200 with SMTP id w50mr7932174wei.2.1329929946705;
	Wed, 22 Feb 2012 08:59:06 -0800 (PST)
Received: from [192.168.0.14] (gou06-3-88-170-165-56.fbx.proxad.net.
	[88.170.165.56]) by mx.google.com with ESMTPS id
	hb10sm73493087wib.10.2012.02.22.08.59.03
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 22 Feb 2012 08:59:05 -0800 (PST)
Sender: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
From: Thomas Gazagnaire <thomas@gazagnaire.org>
Content-Type: multipart/alternative; boundary=Apple-Mail-58--564576297
Subject: ocaml documentation mirror
Date: Wed, 22 Feb 2012 17:59:01 +0100
Message-Id: <EDD68F5A-129A-40C5-920E-2CE5A7D63D8F@gazagnaire.org>
To: Mirage List <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1084)
X-Mailer: Apple Mail (2.1084)
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 22 Feb 2012 16:59:08 -0000
X-Keywords:                  
X-UID: 192
Status: O
Content-Length: 1200
Lines: 28


--Apple-Mail-58--564576297
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi all,

Anil was asking me to send you the ocaml documentation mirror address on =
the list. Here it is:

http://www.ocamlpro.com/doc/stdlib/

The style is a bit broken, and don't pay attention to the ocp* libs: =
these docs need some clean-up before an official release, but it can =
help when INRIA servers are down.

--
Thomas=

--Apple-Mail-58--564576297
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>Anil was asking me to send you the ocaml documentation mirror address on the list. Here it is:</div><div><br></div><div><a href="http://www.ocamlpro.com/doc/stdlib/">http://www.ocamlpro.com/doc/stdlib/</a></div><div><br></div><div>The style is a bit broken, and don't pay attention to the ocp* libs: these docs need some clean-up before an official release, but it can help when INRIA servers are down.</div><div><br></div><div>--</div><div>Thomas</div></body></html>
--Apple-Mail-58--564576297--


From sebastian.probst.eide@gmail.com Wed Feb 22 17:02:52 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0Fae-00005b-Fi (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Wed, 22 Feb 2012 17:02:52 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1291660 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	*  0.0 HTML_MESSAGE BODY: HTML included in message
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:36449)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S0Fac-0003Nd-SR (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Wed, 22 Feb 2012 17:02:52 +0000
Received: by wera1 with SMTP id a1so182252wer.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 22 Feb 2012 09:02:50 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.87.8 as permitted sender)
	client-ip=10.180.87.8; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.87.8 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.87.8])
	by 10.180.87.8 with SMTP id t8mr38449082wiz.15.1329930170663 (num_hops
	= 1); Wed, 22 Feb 2012 09:02:50 -0800 (PST)
Received: by 10.180.87.8 with SMTP id t8mr31926933wiz.15.1329930170573;
	Wed, 22 Feb 2012 09:02:50 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id y1sm73583462wiw.6.2012.02.22.09.02.48
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 22 Feb 2012 09:02:49 -0800 (PST)
Subject: Re: ocaml documentation mirror
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_F9D3E26B-17A9-4868-B642-98FFEE75B2EE"
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <EDD68F5A-129A-40C5-920E-2CE5A7D63D8F@gazagnaire.org>
Date: Wed, 22 Feb 2012 17:02:47 +0000
Message-Id: <3A39E7BE-957C-4D20-9355-A28B09C8DB72@gmail.com>
References: <EDD68F5A-129A-40C5-920E-2CE5A7D63D8F@gazagnaire.org>
To: Thomas Gazagnaire <thomas@gazagnaire.org>
X-Mailer: Apple Mail (2.1257)
Cc: Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 22 Feb 2012 17:02:52 -0000
X-Keywords:                  
X-UID: 193
Status: O
Content-Length: 1855
Lines: 54


--Apple-Mail=_F9D3E26B-17A9-4868-B642-98FFEE75B2EE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Great!
Thanks Thomas!

All the best,
Sebastian @probst


On 22 Feb 2012, at 16:59, Thomas Gazagnaire wrote:

> Hi all,
>=20
> Anil was asking me to send you the ocaml documentation mirror address =
on the list. Here it is:
>=20
> http://www.ocamlpro.com/doc/stdlib/
>=20
> The style is a bit broken, and don't pay attention to the ocp* libs: =
these docs need some clean-up before an official release, but it can =
help when INRIA servers are down.
>=20
> --
> Thomas


--Apple-Mail=_F9D3E26B-17A9-4868-B642-98FFEE75B2EE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
">Great!<div>Thanks Thomas!</div><div><br></div><div>All the =
best,</div><div>Sebastian&nbsp;@probst</div><div><br></div><div><br><div><=
div>On 22 Feb 2012, at 16:59, Thomas Gazagnaire wrote:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>Anil =
was asking me to send you the ocaml documentation mirror address on the =
list. Here it is:</div><div><br></div><div><a =
href=3D"http://www.ocamlpro.com/doc/stdlib/">http://www.ocamlpro.com/doc/s=
tdlib/</a></div><div><br></div><div>The style is a bit broken, and don't =
pay attention to the ocp* libs: these docs need some clean-up before an =
official release, but it can help when INRIA servers are =
down.</div><div><br></div><div>--</div><div>Thomas</div></div></blockquote=
></div><br></div></body></html>=

--Apple-Mail=_F9D3E26B-17A9-4868-B642-98FFEE75B2EE--


From sebastian.probst.eide@gmail.com Thu Feb 23 09:33:38 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0V3S-0001BA-39 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Thu, 23 Feb 2012 09:33:38 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1292191 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.212.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-wi0-f179.google.com ([209.85.212.179]:34319)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1S0V3Q-0002MN-D1 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Thu, 23 Feb 2012 09:33:37 +0000
Received: by wibhj6 with SMTP id hj6so657013wib.38
	for <cl-mirage@lists.cam.ac.uk>; Thu, 23 Feb 2012 01:33:35 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.96.230 as permitted sender)
	client-ip=10.180.96.230; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.96.230 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.96.230])
	by 10.180.96.230 with SMTP id dv6mr899586wib.11.1329989615736 (num_hops
	= 1); Thu, 23 Feb 2012 01:33:35 -0800 (PST)
Received: by 10.180.96.230 with SMTP id dv6mr735618wib.11.1329989615679;
	Thu, 23 Feb 2012 01:33:35 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id h19sm3105335wiw.9.2012.02.23.01.33.34
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 23 Feb 2012 01:33:34 -0800 (PST)
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Skywriting + mirage
Date: Thu, 23 Feb 2012 09:33:33 +0000
Message-Id: <7192F8BC-9D16-4207-BDCE-C60214C6BA9E@gmail.com>
To: Mirage List <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1257)
X-Mailer: Apple Mail (2.1257)
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 09:33:38 -0000
X-Keywords:                  
X-UID: 194
Status: O
Content-Length: 244
Lines: 8

Dear miragers,

In the "Turning down the LAMP" paper, section 5, it is mentioned that =
mirage is a good match as an execution platform for skywriting (and by =
extension CIEL). Has there already been done any work in that area?

~ Sebastian=


From anil@recoil.org Thu Feb 23 09:47:46 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0VH7-0002BR-VX (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 23 Feb 2012 09:47:45 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:24769
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1S0VH7-000287-Dq (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 23 Feb 2012 09:47:45 +0000
Received: (qmail 1557 invoked by uid 634); 23 Feb 2012 09:47:44 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from host81-149-102-120.in-addr.btopenworld.com (HELO [192.168.0.5])
	(81.149.102.120)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Thu, 23 Feb 2012 09:47:44 +0000
Subject: Re: Skywriting + mirage
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <7192F8BC-9D16-4207-BDCE-C60214C6BA9E@gmail.com>
Date: Thu, 23 Feb 2012 09:47:41 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <89788E08-3542-4BE6-8F75-8A020E4A302A@recoil.org>
References: <7192F8BC-9D16-4207-BDCE-C60214C6BA9E@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>,
	Malte Schwarzkopf <malte.schwarzkopf@cl.cam.ac.uk>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 09:47:46 -0000
X-Keywords:                  
X-UID: 195
Status: O
Content-Length: 1382
Lines: 36

On 23 Feb 2012, at 09:33, Sebastian Probst Eide wrote:

> Dear miragers,
>=20
> In the "Turning down the LAMP" paper, section 5, it is mentioned that =
mirage is a good match as an execution platform for skywriting (and by =
extension CIEL). Has there already been done any work in that area?

Hey Seb,

Yes, there's been ongoing work in that area since the paper. The problem =
with specialising CIEL tasks (or indeed, most data-intensive processing) =
is that the interconnects become increasingly inefficient as the worker =
kernels become more fine-grained.

Malte did some initial work on this to demonstrate the problem:
http://www.cl.cam.ac.uk/~ms705/paper-sfma.pdf

A bunch of us have been developing a more efficient 'elastic' I/O =
interconnect for connecting VMs:
http://anil.recoil.org/papers/2012-resolve-fable.pdf
http://anil.recoil.org/papers/drafts/2012-usenix-ipc-draft1.pdf (short =
paper version draft)
http://anil.recoil.org/talks/fosdem-io-2012.pdf

Meanwhile, David Scott has been rewriting the Xen toolstack to better =
support low-latency microVMs (aka 'stub domains').
http://github.com/djs55/xen-api (cooper branch, unreleased code, Dave's =
on this list).

We're integrating this into Mirage (with multi-language support) at the =
moment. I'll have an update on that in a week or two, as it relates to =
the upcoming 1.0 release plan for Mirage.

-Anil=


From Richard.Mortier@nottingham.ac.uk Thu Feb 23 09:54:12 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0VNM-0002QC-D0 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 09:54:12 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from ixe-mta-19-tx.emailfiltering.com ([194.116.198.150]:57916
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S0VNG-0002xA-St (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 09:54:12 +0000
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.5.86) by TLS
	id 2145587916 ;4cfab5d90ea28d4d; Thu, 23 Feb 2012 09:53:46 +0000
Received: from uiwexhub01.ad.nottingham.ac.uk ([128.243.15.133])
	by smtp1.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1S0VMw-0003yU-I5
	for cl-mirage@lists.cam.ac.uk; Thu, 23 Feb 2012 09:53:46 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 23 Feb 2012 09:53:46 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Date: Thu, 23 Feb 2012 09:53:45 +0000
Subject: brave new world
Thread-Topic: brave new world
Thread-Index: AczyEQeVXi5bCezKRNePcZeG0Izivw==
Message-ID: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 09:54:12 -0000
X-Keywords:                  
X-UID: 196
Status: O
Content-Length: 1209
Lines: 29

so- i've been working through the brave new library-tastic world (on osx) a=
nd have put together a set of notes for what to install from where to get o=
caml, oasis and all the rest.    initial dependencies are homebrew (and thu=
s, git).

questions-

- would anyone find that useful?
- if so, how to deliver it- a README somewhere, a script that Just Does It(=
tm), or both, or something else?
--=20
Cheers,

R.


=
This message and any attachment are intended solely for the addressee a=
nd may contain confidential information. If you have received this mess=
age in error, please send it back to me, and immediately delete it.   P=
lease do not use, copy or disclose the information contained in this me=
ssage or in any attachment.  Any views or opinions expressed by the aut=
hor of this email do not necessarily reflect the views of the Universit=
y of Nottingham.=0D=0A=0D=0AThis message has been checked for viruses b=
ut the contents of an attachment=0D=0Amay still contain software viruse=
s which could damage your computer system:=0D=0Ayou are advised to perf=
orm your own checks. Email communications with the=0D=0AUniversity of N=
ottingham may be monitored as permitted by UK legislation.=


From anil@recoil.org Thu Feb 23 09:57:35 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0VQd-0002YM-N1 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 23 Feb 2012 09:57:35 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:7553
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1S0VQd-0000U1-Da (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 23 Feb 2012 09:57:35 +0000
Received: (qmail 23036 invoked by uid 634); 23 Feb 2012 09:57:35 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from host81-149-102-120.in-addr.btopenworld.com (HELO [192.168.0.5])
	(81.149.102.120)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Thu, 23 Feb 2012 09:57:34 +0000
Subject: Re: brave new world
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
Date: Thu, 23 Feb 2012 09:57:32 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <0DB7458C-6299-4A64-B854-760F2C9C77F4@recoil.org>
References: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 09:57:35 -0000
X-Keywords:                  
X-UID: 197
Status: O
Content-Length: 1496
Lines: 45

yes, yes, and yes!
I know Jon Crowcroft wants it :)

How about resurrecting updates on openmirage.org wiki? It needs a =
restructuring
shortly, but I can rig up a script to autoupdate on a Github web hook...

-Anil

On 23 Feb 2012, at 09:53, Richard Mortier wrote:

> so- i've been working through the brave new library-tastic world (on =
osx) and have put together a set of notes for what to install from where =
to get ocaml, oasis and all the rest.    initial dependencies are =
homebrew (and thus, git).
>=20
> questions-
>=20
> - would anyone find that useful?
> - if so, how to deliver it- a README somewhere, a script that Just =
Does It(tm), or both, or something else?
> --=20
> Cheers,
>=20
> R.
>=20
>=20
> This message and any attachment are intended solely for the addressee =
and may contain confidential information. If you have received this =
message in error, please send it back to me, and immediately delete it.  =
 Please do not use, copy or disclose the information contained in this =
message or in any attachment.  Any views or opinions expressed by the =
author of this email do not necessarily reflect the views of the =
University of Nottingham.
>=20
> This message has been checked for viruses but the contents of an =
attachment
> may still contain software viruses which could damage your computer =
system:
> you are advised to perform your own checks. Email communications with =
the
> University of Nottingham may be monitored as permitted by UK =
legislation.



From sebastian.probst.eide@gmail.com Thu Feb 23 10:37:18 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0W34-0004OO-9O (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Thu, 23 Feb 2012 10:37:18 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1292191 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:53560)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1S0W33-0002l4-DZ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Thu, 23 Feb 2012 10:37:18 +0000
Received: by wera1 with SMTP id a1so688517wer.38
	for <cl-mirage@lists.cam.ac.uk>; Thu, 23 Feb 2012 02:37:17 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.216.137.147 as permitted sender)
	client-ip=10.216.137.147; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.216.137.147 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.216.137.147])
	by 10.216.137.147 with SMTP id y19mr499894wei.5.1329993437145 (num_hops
	= 1); Thu, 23 Feb 2012 02:37:17 -0800 (PST)
Received: by 10.216.137.147 with SMTP id y19mr407510wei.5.1329993437085;
	Thu, 23 Feb 2012 02:37:17 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id gp8sm3449330wib.5.2012.02.23.02.37.15
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 23 Feb 2012 02:37:15 -0800 (PST)
Subject: Re: Skywriting + mirage
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <89788E08-3542-4BE6-8F75-8A020E4A302A@recoil.org>
Date: Thu, 23 Feb 2012 10:37:14 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <77F4B3F6-797D-448B-9E0D-DC2C6318FC26@gmail.com>
References: <7192F8BC-9D16-4207-BDCE-C60214C6BA9E@gmail.com>
	<89788E08-3542-4BE6-8F75-8A020E4A302A@recoil.org>
To: Anil Madhavapeddy <anil@recoil.org>,
	Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1257)
Cc: Malte Schwarzkopf <malte.schwarzkopf@cl.cam.ac.uk>,
	Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 10:37:18 -0000
X-Keywords:                  
X-UID: 198
Status: O
Content-Length: 1981
Lines: 51

Mort:
>> In the "Turning down the LAMP" paper, section 5, it is mentioned that =
mirage is a good match as an execution platform for skywriting (and by =
extension CIEL). Has there already been done any work in that area?
> not that i'm aware of, though the frp stuff starting now/soon is =
arguably part of that.  anil will know better.
> (why?)
I find both Mirage and CIEL/Skywriting very interesting, and would like =
to do some work in those areas.


Anil:
>> Dear miragers,
>>=20
>> In the "Turning down the LAMP" paper, section 5, it is mentioned that =
mirage is a good match as an execution platform for skywriting (and by =
extension CIEL). Has there already been done any work in that area?
>=20
> Hey Seb,
>=20
> Yes, there's been ongoing work in that area since the paper. The =
problem with specialising CIEL tasks (or indeed, most data-intensive =
processing) is that the interconnects become increasingly inefficient as =
the worker kernels become more fine-grained.
>=20
> Malte did some initial work on this to demonstrate the problem:
> http://www.cl.cam.ac.uk/~ms705/paper-sfma.pdf
>=20
> A bunch of us have been developing a more efficient 'elastic' I/O =
interconnect for connecting VMs:
> http://anil.recoil.org/papers/2012-resolve-fable.pdf
> http://anil.recoil.org/papers/drafts/2012-usenix-ipc-draft1.pdf (short =
paper version draft)
> http://anil.recoil.org/talks/fosdem-io-2012.pdf
Thanks for all the references! I'll have a read.

> Meanwhile, David Scott has been rewriting the Xen toolstack to better =
support low-latency microVMs (aka 'stub domains').
> http://github.com/djs55/xen-api (cooper branch, unreleased code, =
Dave's on this list).
Cool! On my watch list.

> We're integrating this into Mirage (with multi-language support) at =
the moment. I'll have an update on that in a week or two, as it relates =
to the upcoming 1.0 release plan for Mirage.
What exactly are you integrating into mirage? The work on fable / ipc?

Thanks.

~ Seb=


From awm22@cl.cam.ac.uk Thu Feb 23 10:37:41 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0W3R-0004PO-5r (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <awm22@cl.cam.ac.uk>); Thu, 23 Feb 2012 10:37:41 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.9 from SpamAssassin-3.3.2-1292191 
	* -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
	* -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
	*      domain
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:51574)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1S0W3Q-0006wH-ry (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <awm22@cl.cam.ac.uk>); Thu, 23 Feb 2012 10:37:41 +0000
Received: from paddington.ad.cl.cam.ac.uk ([128.232.13.42])
	by mta1.cl.cam.ac.uk with esmtp (Exim 4.63)
	(envelope-from <awm22@cl.cam.ac.uk>)
	id 1S0W3q-0004Gj-0o; Thu, 23 Feb 2012 10:38:06 +0000
Received: from SVR-WIN-MTA0.ad.cl.cam.ac.uk ([fe80::381a:9b36:f87b:613e]) by
	paddington.ad.cl.cam.ac.uk ([fe80::69c6:4d69:c57c:7b59%13]) with mapi;
	Thu, 23 Feb 2012 10:37:48 +0000
From: Andrew Moore <Andrew.Moore@cl.cam.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
Date: Thu, 23 Feb 2012 10:37:33 +0000
Subject: Re: brave new world
Thread-Topic: brave new world
Thread-Index: AczyFyc5AigFAviYRWWyWZHRSFiS9A==
Message-ID: <A07489D7-735F-4207-BC68-C8ABDA13ED35@cl.cam.ac.uk>
References: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
In-Reply-To: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 10:37:41 -0000
X-Keywords:                  
X-UID: 199
Status: O
Content-Length: 1374
Lines: 37

I for one woul dwelcome uor overlords from the brave new world.

btw this on Lion or Snow Leopard?

On 23 Feb 2012, at 09:53, Richard Mortier wrote:

> so- i've been working through the brave new library-tastic world (on osx)=
 and have put together a set of notes for what to install from where to get=
 ocaml, oasis and all the rest.    initial dependencies are homebrew (and t=
hus, git).
>=20
> questions-
>=20
> - would anyone find that useful?
> - if so, how to deliver it- a README somewhere, a script that Just Does I=
t(tm), or both, or something else?
> --=20
> Cheers,
>=20
> R.
>=20
>=20
> This message and any attachment are intended solely for the addressee and=
 may contain confidential information. If you have received this message in=
 error, please send it back to me, and immediately delete it.   Please do n=
ot use, copy or disclose the information contained in this message or in an=
y attachment.  Any views or opinions expressed by the author of this email =
do not necessarily reflect the views of the University of Nottingham.
>=20
> This message has been checked for viruses but the contents of an attachme=
nt
> may still contain software viruses which could damage your computer syste=
m:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.



From avsm@dark.recoil.org Thu Feb 23 11:12:50 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0WbS-0006CU-Kf (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Thu, 23 Feb 2012 11:12:50 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:22725
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp id 1S0WbR-00009s-Fw (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Thu, 23 Feb 2012 11:12:50 +0000
Received: (qmail 6694 invoked by uid 10000); 23 Feb 2012 11:12:49 -0000
Date: Thu, 23 Feb 2012 11:12:49 +0000
From: Anil Madhavapeddy <anil@recoil.org>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Subject: Re: Skywriting + mirage
Message-ID: <20120223111249.GA5147@dark.recoil.org>
References: <7192F8BC-9D16-4207-BDCE-C60214C6BA9E@gmail.com>
	<89788E08-3542-4BE6-8F75-8A020E4A302A@recoil.org>
	<77F4B3F6-797D-448B-9E0D-DC2C6318FC26@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <77F4B3F6-797D-448B-9E0D-DC2C6318FC26@gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: Richard Mortier <Richard.Mortier@nottingham.ac.uk>,
	Malte Schwarzkopf <malte.schwarzkopf@cl.cam.ac.uk>,
	Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 11:12:50 -0000
X-Keywords:                  
X-UID: 200
Status: O
Content-Length: 1110
Lines: 23

On Thu, Feb 23, 2012 at 10:37:14AM +0000, Sebastian Probst Eide wrote:
> Mort:
> >> In the "Turning down the LAMP" paper, section 5, it is mentioned that
> >> mirage is a good match as an execution platform for skywriting (and
> >> by extension CIEL). Has there already been done any work in that
> >> area?
> > not that i'm aware of, though the frp stuff starting now/soon is
> > arguably part of that.  anil will know better.  (why?)
> I find both Mirage and CIEL/Skywriting very interesting, and would like
> to do some work in those areas.
...
> > We're integrating this into Mirage (with multi-language support) at
> > the moment. I'll have an update on that in a week or two, as it
> > relates to the upcoming 1.0 release plan for Mirage.
> What exactly are you integrating into mirage? The work on fable / ipc?

Given you're interested in doing research in this area, why don't you
digest the papers above and and related work and give us your opinion as
to what that should be first?  Fresh perspectives always welcome :-)

-- 
Anil Madhavapeddy                                 http://anil.recoil.org


From Richard.Mortier@nottingham.ac.uk Thu Feb 23 13:37:22 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0YrK-0004vq-Bg (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 13:37:22 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from ixe-mta-19-tx.emailfiltering.com ([194.116.198.150]:46503
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1S0Yr3-0002Uh-DY (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 13:37:22 +0000
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.5.86) by TLS
	id 2146014900 ;e82cf0b0d122cd8d; Thu, 23 Feb 2012 13:34:52 +0000
Received: from uiwexhub02.ad.nottingham.ac.uk ([128.243.15.132])
	by smtp1.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1S0Yo9-0003gm-Um; Thu, 23 Feb 2012 13:34:05 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB02.ad.nottingham.ac.uk ([2002:80f3:f84::80f3:f84]) with mapi;
	Thu, 23 Feb 2012 13:34:04 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Andrew Moore <Andrew.Moore@cl.cam.ac.uk>
Date: Thu, 23 Feb 2012 13:34:02 +0000
Subject: Re: brave new world
Thread-Topic: brave new world
Thread-Index: AczyL86lF4sI/PFmSLm0TvqzT4EKpw==
Message-ID: <C10E250E-8DE0-49B6-833A-FA1246934FD0@nottingham.ac.uk>
References: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
	<A07489D7-735F-4207-BC68-C8ABDA13ED35@cl.cam.ac.uk>
In-Reply-To: <A07489D7-735F-4207-BC68-C8ABDA13ED35@cl.cam.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 13:37:22 -0000
X-Keywords:                  
X-UID: 201
Status: O
Content-Length: 1358
Lines: 40


On 23 Feb 2012, at 10:37, Andrew Moore wrote:

> I for one woul dwelcome uor overlords from the brave new world.

I. AM. THE. OVERLORD.

hmm.

> btw this on Lion or Snow Leopard?

snow leopard.  lion is, to all intents and purposes, and as far as i can se=
e, a complete crock.  (but in this case, i would hope it makes no differenc=
e.)

i am adding a page to the openmirage wiki e'en as i type (stuff is building=
).  will push in (hopefully) 30 mins or so.

and then i *really* have to write my exam questions for this semester.  ho =
hum.

--=20
Cheers,

R.


=
This message and any attachment are intended solely for the addressee a=
nd may contain confidential information. If you have received this mess=
age in error, please send it back to me, and immediately delete it.   P=
lease do not use, copy or disclose the information contained in this me=
ssage or in any attachment.  Any views or opinions expressed by the aut=
hor of this email do not necessarily reflect the views of the Universit=
y of Nottingham.=0D=0A=0D=0AThis message has been checked for viruses b=
ut the contents of an attachment=0D=0Amay still contain software viruse=
s which could damage your computer system:=0D=0Ayou are advised to perf=
orm your own checks. Email communications with the=0D=0AUniversity of N=
ottingham may be monitored as permitted by UK legislation.=


From ms705@hermes.cam.ac.uk Thu Feb 23 13:58:57 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0ZCD-0005pc-II (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <ms705@hermes.cam.ac.uk>); Thu, 23 Feb 2012 13:58:57 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mawddach.cl.cam.ac.uk ([128.232.10.102]:54765)
	by ppsw-52.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:465)
	with esmtpsa (PLAIN:ms705) (TLSv1:DHE-RSA-CAMELLIA256-SHA:256)
	id 1S0ZCD-0000bd-EB (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <ms705@hermes.cam.ac.uk>); Thu, 23 Feb 2012 13:58:57 +0000
Message-ID: <4F464621.1000107@cl.cam.ac.uk>
Date: Thu, 23 Feb 2012 13:58:57 +0000
From: Malte Schwarzkopf <malte.schwarzkopf@cl.cam.ac.uk>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US;
	rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19
MIME-Version: 1.0
To: cl-mirage@lists.cam.ac.uk
Subject: Re: brave new world
References: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>	<A07489D7-735F-4207-BC68-C8ABDA13ED35@cl.cam.ac.uk>
	<C10E250E-8DE0-49B6-833A-FA1246934FD0@nottingham.ac.uk>
In-Reply-To: <C10E250E-8DE0-49B6-833A-FA1246934FD0@nottingham.ac.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: Malte Schwarzkopf <ms705@hermes.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 13:58:57 -0000
X-Keywords:                  
X-UID: 202
Status: O
Content-Length: 191
Lines: 13

>
> and then i *really* have to write my exam questions for this semester.  ho hum.
>

The internet. Discuss. [20 marks, plus bonus marks if the examiner 
agrees with you.]

Done! ;-)

M.




From awm22@cl.cam.ac.uk Thu Feb 23 14:12:46 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0ZPa-0006MF-N8 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <awm22@cl.cam.ac.uk>); Thu, 23 Feb 2012 14:12:46 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.9 from SpamAssassin-3.3.2-1292191 
	* -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
	* -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
	*      domain
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mta1.cl.cam.ac.uk ([128.232.25.21]:52678)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1S0ZPa-0006CD-Wx (Exim 4.72)
	(return-path <awm22@cl.cam.ac.uk>); Thu, 23 Feb 2012 14:12:46 +0000
Received: from paddington.ad.cl.cam.ac.uk ([128.232.13.42])
	by mta1.cl.cam.ac.uk with esmtp (Exim 4.63)
	(envelope-from <awm22@cl.cam.ac.uk>)
	id 1S0ZQ2-0001Sc-G0; Thu, 23 Feb 2012 14:13:14 +0000
Received: from SVR-WIN-MTA0.ad.cl.cam.ac.uk ([fe80::381a:9b36:f87b:613e]) by
	paddington.ad.cl.cam.ac.uk ([fe80::69c6:4d69:c57c:7b59%13]) with mapi;
	Thu, 23 Feb 2012 14:12:57 +0000
From: Andrew Moore <Andrew.Moore@cl.cam.ac.uk>
To: Malte Schwarzkopf <malte.schwarzkopf@cl.cam.ac.uk>
Date: Thu, 23 Feb 2012 14:12:41 +0000
Subject: Re: brave new world
Thread-Topic: brave new world
Thread-Index: AczyNT2RaRn9IgB+Tm+igHmutFX0yQ==
Message-ID: <96283816-426A-41AB-9411-9DECE7ACECBE@cl.cam.ac.uk>
References: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
	<A07489D7-735F-4207-BC68-C8ABDA13ED35@cl.cam.ac.uk>
	<C10E250E-8DE0-49B6-833A-FA1246934FD0@nottingham.ac.uk>
	<4F464621.1000107@cl.cam.ac.uk>
In-Reply-To: <4F464621.1000107@cl.cam.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 14:12:46 -0000
X-Keywords:                  
X-UID: 203
Status: O
Content-Length: 350
Lines: 21

So you saw one of my Part 1b questions from last year :-)


On 23 Feb 2012, at 13:58, Malte Schwarzkopf wrote:

>>=20
>> and then i *really* have to write my exam questions for this semester.  =
ho hum.
>>=20
>=20
> The internet. Discuss. [20 marks, plus bonus marks if the examiner=20
> agrees with you.]
>=20
> Done! ;-)
>=20
> M.
>=20
>=20
>=20



From Richard.Mortier@nottingham.ac.uk Thu Feb 23 14:14:31 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0ZRH-0006Po-QA (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 14:14:31 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from ixe-mta-19-tx.emailfiltering.com ([194.116.198.150]:54860
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S0ZRC-0000jC-R7 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 14:14:31 +0000
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.5.86) by TLS
	id 2146079944 ;173ce860aa1891f8; Thu, 23 Feb 2012 14:13:40 +0000
Received: from uiwexhub01.ad.nottingham.ac.uk ([128.243.15.133])
	by smtp2.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1S0ZQS-0005mY-2b; Thu, 23 Feb 2012 14:13:40 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 23 Feb 2012 14:13:40 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Malte Schwarzkopf <malte.schwarzkopf@cl.cam.ac.uk>
Date: Thu, 23 Feb 2012 14:13:38 +0000
Subject: Re: brave new world
Thread-Topic: brave new world
Thread-Index: AczyNVa3pAA8tBveTBaYDGh8/3RL2Q==
Message-ID: <00E81A53-846A-45CA-B9CA-2B7221A6579D@nottingham.ac.uk>
References: <1905470D-0970-4498-BEB3-BDA5E1DA4652@nottingham.ac.uk>
	<A07489D7-735F-4207-BC68-C8ABDA13ED35@cl.cam.ac.uk>
	<C10E250E-8DE0-49B6-833A-FA1246934FD0@nottingham.ac.uk>
	<4F464621.1000107@cl.cam.ac.uk>
In-Reply-To: <4F464621.1000107@cl.cam.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 14:14:31 -0000
X-Keywords:                  
X-UID: 204
Status: O
Content-Length: 1475
Lines: 37

(now way off topic, so ignore at will.)

On 23 Feb 2012, at 13:58, Malte Schwarzkopf wrote:

>> and then i *really* have to write my exam questions for this semester.  =
ho hum.
>>=20
>=20
> The internet. Discuss. [20 marks, plus bonus marks if the examiner=20
> agrees with you.]
>=20
> Done! ;-)

i wish- module based course means assessment per module means i have to set=
 an entire paper on the networking module i lecture.  which in practice mea=
ns 5 or 6 questions.  and then mark them.  and then set the same number of =
extra questions for the (almost inevitable) resits.  and then mark them.  a=
nd then suddenly its the start of next year already...
--=20
Cheers,

R.


=
This message and any attachment are intended solely for the addressee a=
nd may contain confidential information. If you have received this mess=
age in error, please send it back to me, and immediately delete it.   P=
lease do not use, copy or disclose the information contained in this me=
ssage or in any attachment.  Any views or opinions expressed by the aut=
hor of this email do not necessarily reflect the views of the Universit=
y of Nottingham.=0D=0A=0D=0AThis message has been checked for viruses b=
ut the contents of an attachment=0D=0Amay still contain software viruse=
s which could damage your computer system:=0D=0Ayou are advised to perf=
orm your own checks. Email communications with the=0D=0AUniversity of N=
ottingham may be monitored as permitted by UK legislation.=


From Richard.Mortier@nottingham.ac.uk Thu Feb 23 15:27:39 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0aa3-00022B-9Y (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 15:27:39 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from thb-mta-19-tx.emailfiltering.com ([194.116.199.150]:39388
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S0aZx-0006na-Ro (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 15:27:39 +0000
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.5.86) by TLS
	id 2318180378 ;336736d9d56456a3; Thu, 23 Feb 2012 15:27:13 +0000
Received: from uiwexhub01.ad.nottingham.ac.uk ([128.243.15.133])
	by smtp1.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1S0aZc-0004r6-0F
	for cl-mirage@lists.cam.ac.uk; Thu, 23 Feb 2012 15:27:12 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 23 Feb 2012 15:26:57 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Date: Thu, 23 Feb 2012 15:26:57 +0000
Subject: osx install instructions
Thread-Topic: osx install instructions
Thread-Index: AczyP5SRUeN3uxsgStuRSpK1Ie/Ypg==
Message-ID: <4C02ADDC-B6B6-4B57-A329-89AF00A93623@nottingham.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 15:27:39 -0000
X-Keywords:                  
X-UID: 205
Status: O
Content-Length: 1097
Lines: 30

i've pushed these to my fork of mirage-www at=20

https://github.com/mor1/mirage-www

if anyone cares to have a go at them and tell me what i missed, that'd be g=
reat.

anil- i've submitted a pull request to you for them.

(and now for something far less interesting instead...)=20

--=20
Cheers,

R.


=
This message and any attachment are intended solely for the addressee a=
nd may contain confidential information. If you have received this mess=
age in error, please send it back to me, and immediately delete it.   P=
lease do not use, copy or disclose the information contained in this me=
ssage or in any attachment.  Any views or opinions expressed by the aut=
hor of this email do not necessarily reflect the views of the Universit=
y of Nottingham.=0D=0A=0D=0AThis message has been checked for viruses b=
ut the contents of an attachment=0D=0Amay still contain software viruse=
s which could damage your computer system:=0D=0Ayou are advised to perf=
orm your own checks. Email communications with the=0D=0AUniversity of N=
ottingham may be monitored as permitted by UK legislation.=


From Richard.Mortier@nottingham.ac.uk Thu Feb 23 15:31:00 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S0adH-0002Bn-W1 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 15:31:00 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1292191 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from ixe-mta-19-tx.emailfiltering.com ([194.116.198.150]:35398
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S0adC-0002Mn-QL (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 23 Feb 2012 15:30:59 +0000
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.5.86) by TLS
	id 2146224104 ;260f0aac18b4a4ca; Thu, 23 Feb 2012 15:30:34 +0000
Received: from uiwexhub02.ad.nottingham.ac.uk ([128.243.15.132])
	by smtp2.nottingham.ac.uk with esmtps (TLSv1:AES128-SHA:128)
	(Exim 4.77) (envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1S0acr-0002Jq-PK
	for cl-mirage@lists.cam.ac.uk; Thu, 23 Feb 2012 15:30:33 +0000
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::7962:f868:e6ee:6267]) by
	UIWEXHUB02.ad.nottingham.ac.uk ([2002:80f3:f84::80f3:f84]) with mapi;
	Thu, 23 Feb 2012 15:30:33 +0000
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk List" <cl-mirage@lists.cam.ac.uk>
Date: Thu, 23 Feb 2012 15:30:32 +0000
Subject: Re: osx install instructions
Thread-Topic: osx install instructions
Thread-Index: AczyQBUhWlRqthphT8GJ/yqJJl9IgA==
Message-ID: <A0CF486E-2F2C-4EDF-A23C-13A0E8BAC7BC@nottingham.ac.uk>
References: <4C02ADDC-B6B6-4B57-A329-89AF00A93623@nottingham.ac.uk>
In-Reply-To: <4C02ADDC-B6B6-4B57-A329-89AF00A93623@nottingham.ac.uk>
Accept-Language: en-US, en-GB
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-GB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Thu, 23 Feb 2012 15:31:00 -0000
X-Keywords:                  
X-UID: 206
Status: O
Content-Length: 1480
Lines: 47

ps for those who just can't wait, the relevant bits are toward the end of=20

https://raw.github.com/mor1/mirage-www/master/tmpl/wiki/install-ocaml.md

(mirage's markdown parser is a little bit non-standard -- at least wrt the =
github one -- so they don't render nicely on github.)

On 23 Feb 2012, at 15:26, Richard Mortier wrote:

> i've pushed these to my fork of mirage-www at=20
>=20
> https://github.com/mor1/mirage-www
>=20
> if anyone cares to have a go at them and tell me what i missed, that'd be=
 great.
>=20
> anil- i've submitted a pull request to you for them.
>=20
> (and now for something far less interesting instead...)=20
>=20
> --=20
> Cheers,
>=20
> R.
>=20
>=20
> This message and any attachment are intended solely for the addressee and=
 may contain confidential information. If you have received this message in=
 error, please send it back to me, and immediately delete it.   Please do n=
ot use, copy or disclose the information contained in this message or in an=
y attachment.  Any views or opinions expressed by the author of this email =
do not necessarily reflect the views of the University of Nottingham.
>=20
> This message has been checked for viruses but the contents of an attachme=
nt
> may still contain software viruses which could damage your computer syste=
m:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.

--=20
Cheers,

R.




From sebastian.probst.eide@gmail.com Tue Feb 28 14:12:27 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2Nn1-000505-7G (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 28 Feb 2012 14:12:27 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.51 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ww0-f51.google.com ([74.125.82.51]:53056)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1S2Nmz-0000k3-Yj (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 28 Feb 2012 14:12:26 +0000
Received: by wgbed3 with SMTP id ed3so1754636wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Tue, 28 Feb 2012 06:12:25 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.92.165 as permitted sender)
	client-ip=10.180.92.165; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.92.165 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.92.165])
	by 10.180.92.165 with SMTP id cn5mr7968129wib.2.1330438345667 (num_hops
	= 1); Tue, 28 Feb 2012 06:12:25 -0800 (PST)
Received: by 10.180.92.165 with SMTP id cn5mr6282691wib.2.1330438345631;
	Tue, 28 Feb 2012 06:12:25 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id s4sm63753716wiy.5.2012.02.28.06.12.24
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 28 Feb 2012 06:12:24 -0800 (PST)
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Circular build dependencies
Date: Tue, 28 Feb 2012 14:12:23 +0000
Message-Id: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
To: Mirage List <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1257)
X-Mailer: Apple Mail (2.1257)
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 28 Feb 2012 14:12:27 -0000
X-Keywords:                  
X-UID: 207
Status: O
Content-Length: 272
Lines: 10

Dear OCamlers and miragers.

I seem to be spending more time fighting circular build dependencies =
than writing code.
Is there a way to have the compiler work around these?
It might be a sign of bad design, but it regardless, it is just bloody =
annoying!

~ Sebastian=


From anil@recoil.org Tue Feb 28 15:12:42 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2OjK-0000M5-3l (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 28 Feb 2012 15:12:42 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1293136 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:29919
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp id 1S2OjJ-0002P9-Q4 (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 28 Feb 2012 15:12:41 +0000
Received: (qmail 15559 invoked by uid 634); 28 Feb 2012 15:12:40 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.33]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 28 Feb 2012 15:12:40 +0000
Subject: Re: Circular build dependencies
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
Date: Tue, 28 Feb 2012 15:12:40 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <0DF1FDCD-B074-4128-9631-4AC49398E05E@recoil.org>
References: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 28 Feb 2012 15:12:42 -0000
X-Keywords:                  
X-UID: 208
Status: O
Content-Length: 856
Lines: 29

You can declare the signatures in a .mli file, and use those =
independently of the .ml,
and it should "just work" in ocamlbuild.

A more common but subtle problem is having many sub-modules, and the =
wrong one
being picked up from the file-system due an incorrect scope (i.e. a =
bug), and that=20
shows up a circular dependency.  Try to use unique module names to avoid =
this sort
of situation, as the code is less obtuse like that anyway.

Could you describe your specific problem in more detail?

-anil

On 28 Feb 2012, at 14:12, Sebastian Probst Eide wrote:

> Dear OCamlers and miragers.
>=20
> I seem to be spending more time fighting circular build dependencies =
than writing code.
> Is there a way to have the compiler work around these?
> It might be a sign of bad design, but it regardless, it is just bloody =
annoying!
>=20
> ~ Sebastian



From sebastian.probst.eide@gmail.com Tue Feb 28 15:18:41 2012
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2Op7-0000jK-Ew (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 28 Feb 2012 15:18:41 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-we0-f179.google.com ([74.125.82.179]:54579)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp id 1S2Op6-00032M-sj (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Tue, 28 Feb 2012 15:18:41 +0000
Received: by werg1 with SMTP id g1so1739598wer.38
	for <cl-mirage@lists.cam.ac.uk>; Tue, 28 Feb 2012 07:18:40 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.216.134.37 as permitted sender)
	client-ip=10.216.134.37; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.216.134.37 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.216.134.37])
	by 10.216.134.37 with SMTP id r37mr9968091wei.38.1330442320874
	(num_hops = 1); Tue, 28 Feb 2012 07:18:40 -0800 (PST)
Received: by 10.216.134.37 with SMTP id r37mr7913688wei.38.1330442320812;
	Tue, 28 Feb 2012 07:18:40 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id
	bg3sm29374880wib.10.2012.02.28.07.18.39
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 28 Feb 2012 07:18:39 -0800 (PST)
Subject: Re: Circular build dependencies
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <0DF1FDCD-B074-4128-9631-4AC49398E05E@recoil.org>
Date: Tue, 28 Feb 2012 15:18:38 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <EEA9B936-353D-4ABB-94BA-99439EFFD0B5@gmail.com>
References: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
	<0DF1FDCD-B074-4128-9631-4AC49398E05E@recoil.org>
To: Anil Madhavapeddy <anil@recoil.org>
X-Mailer: Apple Mail (2.1257)
Cc: Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 28 Feb 2012 15:18:41 -0000
X-Keywords:                  
X-UID: 209
Status: O
Content-Length: 1727
Lines: 56

> You can declare the signatures in a .mli file, and use those =
independently of the .ml,
> and it should "just work" in ocamlbuild.
Good idea!
I will start using *.mli more extensively.

> A more common but subtle problem is having many sub-modules, and the =
wrong one
> being picked up from the file-system due an incorrect scope (i.e. a =
bug), and that=20
> shows up a circular dependency.  Try to use unique module names to =
avoid this sort
> of situation, as the code is less obtuse like that anyway.
Thanks for the tip!

> Could you describe your specific problem in more detail?
The problem was as follows:

server.ml used signal.ml for signalling
signal.ml would instantiate serverSignalling.ml as functor =
functionality, to get server specific handling of RPCs.
serverSignalling.ml would in turn invoke methods in nodes.ml to update =
system state.
nodes.ml uses signal.ml to send out RPCs.

Hence the circular dependency:
... signal > serverSignalling > nodes > signal ...

At the moment, after some discussion with Haris, I have solved it by =
splitting up the signalling behaviour:
RPCs are now sent through the nodes module, and only incoming RPCs are =
handled by a SignallingHandler.
Since sending an receiving are now dealt with separately, there is no =
longer a circular dependency.

Kind of nasty though...

~ Sebastian

>=20
> -anil
>=20
> On 28 Feb 2012, at 14:12, Sebastian Probst Eide wrote:
>=20
>> Dear OCamlers and miragers.
>>=20
>> I seem to be spending more time fighting circular build dependencies =
than writing code.
>> Is there a way to have the compiler work around these?
>> It might be a sign of bad design, but it regardless, it is just =
bloody annoying!
>>=20
>> ~ Sebastian
>=20



From anil@recoil.org Tue Feb 28 15:24:19 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2OuZ-0001DS-Bn (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 28 Feb 2012 15:24:19 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1293136 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:40336
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp id 1S2OuX-0001i1-Sg (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Tue, 28 Feb 2012 15:24:19 +0000
Received: (qmail 26636 invoked by uid 634); 28 Feb 2012 15:24:17 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.0 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO
	[192.168.1.33]) (86.30.244.239)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.84) with ESMTPA;
	Tue, 28 Feb 2012 15:24:17 +0000
Subject: Re: Circular build dependencies
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <EEA9B936-353D-4ABB-94BA-99439EFFD0B5@gmail.com>
Date: Tue, 28 Feb 2012 15:24:17 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <A47B4D6F-FC57-493B-8C61-83076410A876@recoil.org>
References: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
	<0DF1FDCD-B074-4128-9631-4AC49398E05E@recoil.org>
	<EEA9B936-353D-4ABB-94BA-99439EFFD0B5@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
X-Mailer: Apple Mail (2.1251.1)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 28 Feb 2012 15:24:19 -0000
X-Keywords:                  
X-UID: 210
Status: O
Content-Length: 1278
Lines: 36

On 28 Feb 2012, at 15:18, Sebastian Probst Eide wrote:
> The problem was as follows:
>=20
> server.ml used signal.ml for signalling
> signal.ml would instantiate serverSignalling.ml as functor =
functionality, to get server specific handling of RPCs.
> serverSignalling.ml would in turn invoke methods in nodes.ml to update =
system state.
> nodes.ml uses signal.ml to send out RPCs.
>=20
> Hence the circular dependency:
> ... signal > serverSignalling > nodes > signal ...
>=20
> At the moment, after some discussion with Haris, I have solved it by =
splitting up the signalling behaviour:
> RPCs are now sent through the nodes module, and only incoming RPCs are =
handled by a SignallingHandler.
> Since sending an receiving are now dealt with separately, there is no =
longer a circular dependency.
>=20

Yeah, that's a design issue. Think carefully about the purpose of every =
module, and what its
desired interface can be. OCaml does support recursive modules if =
absolutely required, but the
cases where they are needed are vanishingly small and obscure.

In this case, it sounds like the serverSignalling functor is in the =
wrong place. Easiest way is
just to draw up the dataflow of all the components on a whiteboard, and =
the module set falls out
of it.

-anil



From avsm@dark.recoil.org Tue Feb 28 22:00:39 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2V67-0005B1-V9 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Tue, 28 Feb 2012 22:00:39 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1293136 
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from recoil.dh.bytemark.co.uk ([89.16.177.154]:31893
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp id 1S2V5n-0007CC-Q7 (Exim 4.72) for cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Tue, 28 Feb 2012 22:00:39 +0000
Received: (qmail 24797 invoked by uid 10000); 28 Feb 2012 22:00:18 -0000
Date: Tue, 28 Feb 2012 22:00:18 +0000
From: Anil Madhavapeddy <anil@recoil.org>
To: Raphael Proust <raphlalou@gmail.com>
Subject: Re: Running OCaml scripts from the command line
Message-ID: <20120228220018.GE8426@dark.recoil.org>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>,
	"cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Tue, 28 Feb 2012 22:00:40 -0000
X-Keywords:                  
X-UID: 211
Status: O
Content-Length: 3869
Lines: 138

Out of interest, do you guys have any way of running a shell inside vim,
so I can run a top-level directly as a vim pane? I would find that most
useful, but I lack the vim-fu.  I used to use an external patch for this
about 5 years ago, but it seems to have disappeared and not been
integrated.

-anil

On Tue, Feb 21, 2012 at 06:15:15PM +0100, Raphael Proust wrote:
> Also, if you consider using the toplevel. I'd recommend either rlwrap
> or ledit so as to have edit-line capabilities (historic of typed
> lines) or if you are on the emacs side of the war I hear the toplevel
> integration is nice.
> 
> On Tue, Feb 21, 2012 at 6:11 PM, Raphael Proust <raphlalou@gmail.com> wrote:
> > On Tue, Feb 21, 2012 at 5:56 PM, Sebastian Probst Eide
> > <sebastian.probst.eide@gmail.com> wrote:
> >> Dear OCamlers.
> >> I am doing some quick and dirty OCamling, and while coding would like to
> >> execute my code in the toplevel, rather than first compiling it and then
> >> running my compiled binary.
> >>
> >> if I have a file called test1.ml, for which the following works fine:
> >>
> >> ocaml test1.ml
> >
> > On my machine this does not execute in the top level. That merely runs the code
> > in the file(1) and exits.
> >
> > Consider the sh session:
> > raphael ~ $ cat toto.ml
> > print_endline "blah"
> > raphael ~ $ ocaml toto.ml
> > blah
> > raphael ~ $ ocaml
> > ?? ?? ?? ??Objective Caml version 3.12.0
> >
> > # #use "toto.ml" ;;
> > blah
> > - : unit = ()
> > #
> >
> >
> > Running "in the top level" is achieved by the #use primitive. (Also, toplevel
> > has two meaning in OCaml: a toplevel definition is a definition not nested under
> > any scope and *the* toplevel is the interactive read-compile-execute-print
> > loop.)
> >
> >>
> >> But, now, if test1.ml uses the Test2 module (in test2.ml), I get a module
> >> missing exception. I get around this with:
> >>
> >> ocaml test2.ml test1.ml
> >>
> >> but when supplying both test2 and test1 to the ocaml toplevel, absolutely no
> >> code is executed at all.
> >
> > That is not true. The code in test2.ml is executed (or at least it is on my
> > machine):
> >
> > raphael ~ $ cat tata.ml
> > print_endline "fooooooooooo"
> > raphael ~ $ ocaml toto.ml tata.ml
> > blah
> >
> > And also consider:
> >
> > raphael ~ $ ocaml
> > ?? ?? ?? ??Objective Caml version 3.12.0
> >
> > # #use "toto.ml" ;;
> > blah
> > - : unit = ()
> > # #use "tata.ml" ;;
> > fooooooooooo
> > - : unit = ()
> > #
> >
> >
> >> I have tried to use the -I flag to add the current directory to the search
> >> path (which it should be by default?), but without any luck.
> >>
> >> I haven't had any luck with ocamlfind either, and ocamlfind seems to be for
> >> finding third party libraries, rather than other modules within the same
> >> project?
> >
> > You can try ocamlbuild. If your project is simple enough it will make a binary
> > out of anything.
> >
> > To build a native executable out of the test1.ml, just type:
> >
> > $ ocamlbuild test1.native
> >
> > (replace by test1.byte for the slower but more portable bytecode version.)
> >
> > It should figure out the dependencies if they are in the same directory and give
> > you a nice executable.
> >
> >>
> >> I hope I am missing something trivial here.
> >>
> >
> > $ echo "Module Test2 = struct" > one_file.ml
> > $ cat test2.ml >>one_file.ml
> > $ echo "end" >>one_file.ml
> > $ cat test1.ml >>one_file.ml
> > $ ocaml one_file.ml
> >
> > This is quick and dirty. Don't use it.
> >
> >
> >
> > (1) what it really does is compile the content to byte-code and runs it in the
> > ocaml VM. Code is not interpreted.
> >
> >> Thank you, and have a great afternoon!
> >>
> >> All the best,
> >> Sebastian
> >>
> >>
> >
> >
> >
> > --
> > _______
> > Raphael
> 
> 
> 
> -- 
> _______
> Raphael
> 

-- 
Anil Madhavapeddy                                 http://anil.recoil.org


From raphlalou@gmail.com Wed Feb 29 08:27:22 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2esc-0003Cl-0C (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 29 Feb 2012 08:27:22 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:38814)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S2esb-0004jd-QX (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 29 Feb 2012 08:27:21 +0000
Received: by iakh37 with SMTP id h37so4725001iak.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 29 Feb 2012 00:27:20 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.17.230 as permitted sender) client-ip=10.50.17.230; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.17.230 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.17.230])
	by 10.50.17.230 with SMTP id r6mr5919848igd.54.1330504040468 (num_hops
	= 1); Wed, 29 Feb 2012 00:27:20 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.17.230 with SMTP id r6mr4911910igd.54.1330504040433; Wed,
	29 Feb 2012 00:27:20 -0800 (PST)
Received: by 10.42.221.65 with HTTP; Wed, 29 Feb 2012 00:27:20 -0800 (PST)
In-Reply-To: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
References: <CAE6CC15-2B68-443A-B8B7-25480331BC8C@gmail.com>
Date: Wed, 29 Feb 2012 09:27:20 +0100
Message-ID: <CAAmHUAnLx35E4UP_xLZVBdNwkffUT2gNGwPPnPzcV6AJzhB91A@mail.gmail.com>
Subject: Re: Circular build dependencies
From: Raphael Proust <raphlalou@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Mirage List <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 29 Feb 2012 08:27:22 -0000
X-Keywords:                  
X-UID: 212
Status: O
Content-Length: 1192
Lines: 38

On Tue, Feb 28, 2012 at 3:12 PM, Sebastian Probst Eide
<sebastian.probst.eide@gmail.com> wrote:
> Dear OCamlers and miragers.
>
> I seem to be spending more time fighting circular build dependencies than=
 writing code.

That could be because ocaml lets you spend very little time writing
powerful code=E2=80=A6 </trollish ad>

> Is there a way to have the compiler work around these?

You should check out ocamldep which let's you create a Makefile
friendly summary of all your dependencies. (using something like
ocamldep *.ml > .depend && echo "-include .depend" >> Makefile)

If you prefer ocamlbuild to make this is not necessary, but learning
Makefile syntax is much faster (and applies to more languages) than
learning to write myocamlbuild.ml scripts.

You can also have a look at ocamldsort (less standard then ocamldep though)=
.

> It might be a sign of bad design, but it regardless, it is just bloody an=
noying!

ocamldep will point out real dependency cycles regardless of the order
of its argument.

As pointed out by Anil, it is possible to have recursive modules. But
it makes it necessary to put them in the same file (or to use
"include" tricks).


--=20
_______
Raphael


From sebastian.probst.eide@gmail.com Wed Feb 29 08:28:52 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2eu4-0003Eu-SI (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Wed, 29 Feb 2012 08:28:52 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.51 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ww0-f51.google.com ([74.125.82.51]:64449)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1S2eu2-0008MP-G2 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Wed, 29 Feb 2012 08:28:52 +0000
Received: by wgbed3 with SMTP id ed3so2303529wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Wed, 29 Feb 2012 00:28:50 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.107.99 as permitted sender)
	client-ip=10.180.107.99; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.107.99 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.107.99])
	by 10.180.107.99 with SMTP id hb3mr46590139wib.5.1330504130871
	(num_hops = 1); Wed, 29 Feb 2012 00:28:50 -0800 (PST)
Received: by 10.180.107.99 with SMTP id hb3mr37029642wib.5.1330504130808;
	Wed, 29 Feb 2012 00:28:50 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id
	fl2sm83799452wib.4.2012.02.29.00.28.39
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Feb 2012 00:28:50 -0800 (PST)
Subject: Re: Running OCaml scripts from the command line
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <20120228220018.GE8426@dark.recoil.org>
Date: Wed, 29 Feb 2012 08:28:38 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <360FB0DE-8059-406C-BDF9-7E0B073E7C71@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<20120228220018.GE8426@dark.recoil.org>
To: Anil Madhavapeddy <anil@recoil.org>
X-Mailer: Apple Mail (2.1257)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>,
	Raphael Proust <raphlalou@gmail.com>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 29 Feb 2012 08:28:52 -0000
X-Keywords:                  
X-UID: 213
Status: O
Content-Length: 4435
Lines: 173

I have never tried it myself, but this looks like what you want:
http://www.vim.org/scripts/script.php?script_id=3D2771

What I have also seen people do is split their terminal window (using =
screen for example), with a interactive shell + vim.

Let me know how it works!

~ Sebastian

On 28 Feb 2012, at 22:00, Anil Madhavapeddy wrote:

> Out of interest, do you guys have any way of running a shell inside =
vim,
> so I can run a top-level directly as a vim pane? I would find that =
most
> useful, but I lack the vim-fu.  I used to use an external patch for =
this
> about 5 years ago, but it seems to have disappeared and not been
> integrated.
>=20
> -anil
>=20
> On Tue, Feb 21, 2012 at 06:15:15PM +0100, Raphael Proust wrote:
>> Also, if you consider using the toplevel. I'd recommend either rlwrap
>> or ledit so as to have edit-line capabilities (historic of typed
>> lines) or if you are on the emacs side of the war I hear the toplevel
>> integration is nice.
>>=20
>> On Tue, Feb 21, 2012 at 6:11 PM, Raphael Proust <raphlalou@gmail.com> =
wrote:
>>> On Tue, Feb 21, 2012 at 5:56 PM, Sebastian Probst Eide
>>> <sebastian.probst.eide@gmail.com> wrote:
>>>> Dear OCamlers.
>>>> I am doing some quick and dirty OCamling, and while coding would =
like to
>>>> execute my code in the toplevel, rather than first compiling it and =
then
>>>> running my compiled binary.
>>>>=20
>>>> if I have a file called test1.ml, for which the following works =
fine:
>>>>=20
>>>> ocaml test1.ml
>>>=20
>>> On my machine this does not execute in the top level. That merely =
runs the code
>>> in the file(1) and exits.
>>>=20
>>> Consider the sh session:
>>> raphael ~ $ cat toto.ml
>>> print_endline "blah"
>>> raphael ~ $ ocaml toto.ml
>>> blah
>>> raphael ~ $ ocaml
>>> ?? ?? ?? ??Objective Caml version 3.12.0
>>>=20
>>> # #use "toto.ml" ;;
>>> blah
>>> - : unit =3D ()
>>> #
>>>=20
>>>=20
>>> Running "in the top level" is achieved by the #use primitive. (Also, =
toplevel
>>> has two meaning in OCaml: a toplevel definition is a definition not =
nested under
>>> any scope and *the* toplevel is the interactive =
read-compile-execute-print
>>> loop.)
>>>=20
>>>>=20
>>>> But, now, if test1.ml uses the Test2 module (in test2.ml), I get a =
module
>>>> missing exception. I get around this with:
>>>>=20
>>>> ocaml test2.ml test1.ml
>>>>=20
>>>> but when supplying both test2 and test1 to the ocaml toplevel, =
absolutely no
>>>> code is executed at all.
>>>=20
>>> That is not true. The code in test2.ml is executed (or at least it =
is on my
>>> machine):
>>>=20
>>> raphael ~ $ cat tata.ml
>>> print_endline "fooooooooooo"
>>> raphael ~ $ ocaml toto.ml tata.ml
>>> blah
>>>=20
>>> And also consider:
>>>=20
>>> raphael ~ $ ocaml
>>> ?? ?? ?? ??Objective Caml version 3.12.0
>>>=20
>>> # #use "toto.ml" ;;
>>> blah
>>> - : unit =3D ()
>>> # #use "tata.ml" ;;
>>> fooooooooooo
>>> - : unit =3D ()
>>> #
>>>=20
>>>=20
>>>> I have tried to use the -I flag to add the current directory to the =
search
>>>> path (which it should be by default?), but without any luck.
>>>>=20
>>>> I haven't had any luck with ocamlfind either, and ocamlfind seems =
to be for
>>>> finding third party libraries, rather than other modules within the =
same
>>>> project?
>>>=20
>>> You can try ocamlbuild. If your project is simple enough it will =
make a binary
>>> out of anything.
>>>=20
>>> To build a native executable out of the test1.ml, just type:
>>>=20
>>> $ ocamlbuild test1.native
>>>=20
>>> (replace by test1.byte for the slower but more portable bytecode =
version.)
>>>=20
>>> It should figure out the dependencies if they are in the same =
directory and give
>>> you a nice executable.
>>>=20
>>>>=20
>>>> I hope I am missing something trivial here.
>>>>=20
>>>=20
>>> $ echo "Module Test2 =3D struct" > one_file.ml
>>> $ cat test2.ml >>one_file.ml
>>> $ echo "end" >>one_file.ml
>>> $ cat test1.ml >>one_file.ml
>>> $ ocaml one_file.ml
>>>=20
>>> This is quick and dirty. Don't use it.
>>>=20
>>>=20
>>>=20
>>> (1) what it really does is compile the content to byte-code and runs =
it in the
>>> ocaml VM. Code is not interpreted.
>>>=20
>>>> Thank you, and have a great afternoon!
>>>>=20
>>>> All the best,
>>>> Sebastian
>>>>=20
>>>>=20
>>>=20
>>>=20
>>>=20
>>> --
>>> _______
>>> Raphael
>>=20
>>=20
>>=20
>> --=20
>> _______
>> Raphael
>>=20
>=20
> --=20
> Anil Madhavapeddy                                 =
http://anil.recoil.org



From raphlalou@gmail.com Wed Feb 29 08:31:16 2012
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2ewO-0003J0-OL (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 29 Feb 2012 08:31:16 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.214.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-tul01m020-f179.google.com ([209.85.214.179]:48247)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp id 1S2ewN-0006sZ-RE (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 29 Feb 2012 08:31:16 +0000
Received: by obbup3 with SMTP id up3so289031obb.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 29 Feb 2012 00:31:14 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.50.203.33 as permitted sender) client-ip=10.50.203.33; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.50.203.33 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.50.203.33])
	by 10.50.203.33 with SMTP id kn1mr19811963igc.1.1330504274702 (num_hops
	= 1); Wed, 29 Feb 2012 00:31:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.50.203.33 with SMTP id kn1mr16170558igc.1.1330504274637; Wed,
	29 Feb 2012 00:31:14 -0800 (PST)
Received: by 10.42.221.65 with HTTP; Wed, 29 Feb 2012 00:31:14 -0800 (PST)
In-Reply-To: <20120228220018.GE8426@dark.recoil.org>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<20120228220018.GE8426@dark.recoil.org>
Date: Wed, 29 Feb 2012 09:31:14 +0100
Message-ID: <CAAmHUAkUee=HH34Dj2iguJRqCKF288_i=Cz-nj1JWJV4z8rmhw@mail.gmail.com>
Subject: Re: Running OCaml scripts from the command line
From: Raphael Proust <raphlalou@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>,
	"cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 29 Feb 2012 08:31:16 -0000
X-Keywords:                  
X-UID: 214
Status: O
Content-Length: 4483
Lines: 177

There's a plugin called Conque:
http://www.vim.org/scripts/script.php?script_id=3D2771
http://vim.wikia.com/wiki/Script:2771

You can probably get it with:

:BundleInstall Conque
:ConqueTermVSplit ocaml

I generally use :sh or ! though.

On Tue, Feb 28, 2012 at 11:00 PM, Anil Madhavapeddy <anil@recoil.org> wrote=
:
> Out of interest, do you guys have any way of running a shell inside vim,
> so I can run a top-level directly as a vim pane? I would find that most
> useful, but I lack the vim-fu. =C2=A0I used to use an external patch for =
this
> about 5 years ago, but it seems to have disappeared and not been
> integrated.
>
> -anil
>
> On Tue, Feb 21, 2012 at 06:15:15PM +0100, Raphael Proust wrote:
>> Also, if you consider using the toplevel. I'd recommend either rlwrap
>> or ledit so as to have edit-line capabilities (historic of typed
>> lines) or if you are on the emacs side of the war I hear the toplevel
>> integration is nice.
>>
>> On Tue, Feb 21, 2012 at 6:11 PM, Raphael Proust <raphlalou@gmail.com> wr=
ote:
>> > On Tue, Feb 21, 2012 at 5:56 PM, Sebastian Probst Eide
>> > <sebastian.probst.eide@gmail.com> wrote:
>> >> Dear OCamlers.
>> >> I am doing some quick and dirty OCamling, and while coding would like=
 to
>> >> execute my code in the toplevel, rather than first compiling it and t=
hen
>> >> running my compiled binary.
>> >>
>> >> if I have a file called test1.ml, for which the following works fine:
>> >>
>> >> ocaml test1.ml
>> >
>> > On my machine this does not execute in the top level. That merely runs=
 the code
>> > in the file(1) and exits.
>> >
>> > Consider the sh session:
>> > raphael ~ $ cat toto.ml
>> > print_endline "blah"
>> > raphael ~ $ ocaml toto.ml
>> > blah
>> > raphael ~ $ ocaml
>> > ?? ?? ?? ??Objective Caml version 3.12.0
>> >
>> > # #use "toto.ml" ;;
>> > blah
>> > - : unit =3D ()
>> > #
>> >
>> >
>> > Running "in the top level" is achieved by the #use primitive. (Also, t=
oplevel
>> > has two meaning in OCaml: a toplevel definition is a definition not ne=
sted under
>> > any scope and *the* toplevel is the interactive read-compile-execute-p=
rint
>> > loop.)
>> >
>> >>
>> >> But, now, if test1.ml uses the Test2 module (in test2.ml), I get a mo=
dule
>> >> missing exception. I get around this with:
>> >>
>> >> ocaml test2.ml test1.ml
>> >>
>> >> but when supplying both test2 and test1 to the ocaml toplevel, absolu=
tely no
>> >> code is executed at all.
>> >
>> > That is not true. The code in test2.ml is executed (or at least it is =
on my
>> > machine):
>> >
>> > raphael ~ $ cat tata.ml
>> > print_endline "fooooooooooo"
>> > raphael ~ $ ocaml toto.ml tata.ml
>> > blah
>> >
>> > And also consider:
>> >
>> > raphael ~ $ ocaml
>> > ?? ?? ?? ??Objective Caml version 3.12.0
>> >
>> > # #use "toto.ml" ;;
>> > blah
>> > - : unit =3D ()
>> > # #use "tata.ml" ;;
>> > fooooooooooo
>> > - : unit =3D ()
>> > #
>> >
>> >
>> >> I have tried to use the -I flag to add the current directory to the s=
earch
>> >> path (which it should be by default?), but without any luck.
>> >>
>> >> I haven't had any luck with ocamlfind either, and ocamlfind seems to =
be for
>> >> finding third party libraries, rather than other modules within the s=
ame
>> >> project?
>> >
>> > You can try ocamlbuild. If your project is simple enough it will make =
a binary
>> > out of anything.
>> >
>> > To build a native executable out of the test1.ml, just type:
>> >
>> > $ ocamlbuild test1.native
>> >
>> > (replace by test1.byte for the slower but more portable bytecode versi=
on.)
>> >
>> > It should figure out the dependencies if they are in the same director=
y and give
>> > you a nice executable.
>> >
>> >>
>> >> I hope I am missing something trivial here.
>> >>
>> >
>> > $ echo "Module Test2 =3D struct" > one_file.ml
>> > $ cat test2.ml >>one_file.ml
>> > $ echo "end" >>one_file.ml
>> > $ cat test1.ml >>one_file.ml
>> > $ ocaml one_file.ml
>> >
>> > This is quick and dirty. Don't use it.
>> >
>> >
>> >
>> > (1) what it really does is compile the content to byte-code and runs i=
t in the
>> > ocaml VM. Code is not interpreted.
>> >
>> >> Thank you, and have a great afternoon!
>> >>
>> >> All the best,
>> >> Sebastian
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _______
>> > Raphael
>>
>>
>>
>> --
>> _______
>> Raphael
>>
>
> --
> Anil Madhavapeddy =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://anil.recoil=
.org



--=20
_______
Raphael


From raphlalou@gmail.com Wed Feb 29 08:35:16 2012
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2f0G-0003Ql-U7 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 29 Feb 2012 08:35:16 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.179 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (raphlalou[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-iy0-f179.google.com ([209.85.210.179]:54650)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp id 1S2f0F-0006UC-YH (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Wed, 29 Feb 2012 08:35:16 +0000
Received: by iakh37 with SMTP id h37so4733023iak.38
	for <cl-mirage@lists.cam.ac.uk>; Wed, 29 Feb 2012 00:35:14 -0800 (PST)
Received-SPF: pass (google.com: domain of raphlalou@gmail.com designates
	10.42.175.5 as permitted sender) client-ip=10.42.175.5; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of raphlalou@gmail.com
	designates 10.42.175.5 as permitted sender)
	smtp.mail=raphlalou@gmail.com;
	dkim=pass header.i=raphlalou@gmail.com
Received: from mr.google.com ([10.42.175.5])
	by 10.42.175.5 with SMTP id ay5mr19325934icb.42.1330504514980 (num_hops
	= 1); Wed, 29 Feb 2012 00:35:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.175.5 with SMTP id ay5mr15627496icb.42.1330504514912; Wed,
	29 Feb 2012 00:35:14 -0800 (PST)
Received: by 10.42.221.65 with HTTP; Wed, 29 Feb 2012 00:35:14 -0800 (PST)
In-Reply-To: <360FB0DE-8059-406C-BDF9-7E0B073E7C71@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<20120228220018.GE8426@dark.recoil.org>
	<360FB0DE-8059-406C-BDF9-7E0B073E7C71@gmail.com>
Date: Wed, 29 Feb 2012 09:35:14 +0100
Message-ID: <CAAmHUAkizCiknSanXkmoK-R4rv6SE8v6quP58970y_7eL-Ru3A@mail.gmail.com>
Subject: Re: Running OCaml scripts from the command line
From: Raphael Proust <raphlalou@gmail.com>
To: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>,
	Anil Madhavapeddy <anil@recoil.org>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 29 Feb 2012 08:35:17 -0000
X-Keywords:                  
X-UID: 215
Status: O
Content-Length: 4986
Lines: 187

On Wed, Feb 29, 2012 at 9:28 AM, Sebastian Probst Eide
<sebastian.probst.eide@gmail.com> wrote:
> I have never tried it myself, but this looks like what you want:
> http://www.vim.org/scripts/script.php?script_id=3D2771
>
> What I have also seen people do is split their terminal window (using scr=
een for example), with a interactive shell + vim.

tmux lets you split your terminal but it messes ncurse (and other
terminal interfaces) up. screen is better but only has horizontal
split (annoying with the modern wide-screens). There are other
alternatives I haven't tried.

>
> Let me know how it works!

I use Conque sometime. Once you've gone over the weird interaction
between the modal editor and the non-modal shell, it's okay.

>
> On 28 Feb 2012, at 22:00, Anil Madhavapeddy wrote:
>
>> Out of interest, do you guys have any way of running a shell inside vim,
>> so I can run a top-level directly as a vim pane? I would find that most
>> useful, but I lack the vim-fu. =C2=A0I used to use an external patch for=
 this
>> about 5 years ago, but it seems to have disappeared and not been
>> integrated.
>>
>> -anil
>>
>> On Tue, Feb 21, 2012 at 06:15:15PM +0100, Raphael Proust wrote:
>>> Also, if you consider using the toplevel. I'd recommend either rlwrap
>>> or ledit so as to have edit-line capabilities (historic of typed
>>> lines) or if you are on the emacs side of the war I hear the toplevel
>>> integration is nice.
>>>
>>> On Tue, Feb 21, 2012 at 6:11 PM, Raphael Proust <raphlalou@gmail.com> w=
rote:
>>>> On Tue, Feb 21, 2012 at 5:56 PM, Sebastian Probst Eide
>>>> <sebastian.probst.eide@gmail.com> wrote:
>>>>> Dear OCamlers.
>>>>> I am doing some quick and dirty OCamling, and while coding would like=
 to
>>>>> execute my code in the toplevel, rather than first compiling it and t=
hen
>>>>> running my compiled binary.
>>>>>
>>>>> if I have a file called test1.ml, for which the following works fine:
>>>>>
>>>>> ocaml test1.ml
>>>>
>>>> On my machine this does not execute in the top level. That merely runs=
 the code
>>>> in the file(1) and exits.
>>>>
>>>> Consider the sh session:
>>>> raphael ~ $ cat toto.ml
>>>> print_endline "blah"
>>>> raphael ~ $ ocaml toto.ml
>>>> blah
>>>> raphael ~ $ ocaml
>>>> ?? ?? ?? ??Objective Caml version 3.12.0
>>>>
>>>> # #use "toto.ml" ;;
>>>> blah
>>>> - : unit =3D ()
>>>> #
>>>>
>>>>
>>>> Running "in the top level" is achieved by the #use primitive. (Also, t=
oplevel
>>>> has two meaning in OCaml: a toplevel definition is a definition not ne=
sted under
>>>> any scope and *the* toplevel is the interactive read-compile-execute-p=
rint
>>>> loop.)
>>>>
>>>>>
>>>>> But, now, if test1.ml uses the Test2 module (in test2.ml), I get a mo=
dule
>>>>> missing exception. I get around this with:
>>>>>
>>>>> ocaml test2.ml test1.ml
>>>>>
>>>>> but when supplying both test2 and test1 to the ocaml toplevel, absolu=
tely no
>>>>> code is executed at all.
>>>>
>>>> That is not true. The code in test2.ml is executed (or at least it is =
on my
>>>> machine):
>>>>
>>>> raphael ~ $ cat tata.ml
>>>> print_endline "fooooooooooo"
>>>> raphael ~ $ ocaml toto.ml tata.ml
>>>> blah
>>>>
>>>> And also consider:
>>>>
>>>> raphael ~ $ ocaml
>>>> ?? ?? ?? ??Objective Caml version 3.12.0
>>>>
>>>> # #use "toto.ml" ;;
>>>> blah
>>>> - : unit =3D ()
>>>> # #use "tata.ml" ;;
>>>> fooooooooooo
>>>> - : unit =3D ()
>>>> #
>>>>
>>>>
>>>>> I have tried to use the -I flag to add the current directory to the s=
earch
>>>>> path (which it should be by default?), but without any luck.
>>>>>
>>>>> I haven't had any luck with ocamlfind either, and ocamlfind seems to =
be for
>>>>> finding third party libraries, rather than other modules within the s=
ame
>>>>> project?
>>>>
>>>> You can try ocamlbuild. If your project is simple enough it will make =
a binary
>>>> out of anything.
>>>>
>>>> To build a native executable out of the test1.ml, just type:
>>>>
>>>> $ ocamlbuild test1.native
>>>>
>>>> (replace by test1.byte for the slower but more portable bytecode versi=
on.)
>>>>
>>>> It should figure out the dependencies if they are in the same director=
y and give
>>>> you a nice executable.
>>>>
>>>>>
>>>>> I hope I am missing something trivial here.
>>>>>
>>>>
>>>> $ echo "Module Test2 =3D struct" > one_file.ml
>>>> $ cat test2.ml >>one_file.ml
>>>> $ echo "end" >>one_file.ml
>>>> $ cat test1.ml >>one_file.ml
>>>> $ ocaml one_file.ml
>>>>
>>>> This is quick and dirty. Don't use it.
>>>>
>>>>
>>>>
>>>> (1) what it really does is compile the content to byte-code and runs i=
t in the
>>>> ocaml VM. Code is not interpreted.
>>>>
>>>>> Thank you, and have a great afternoon!
>>>>>
>>>>> All the best,
>>>>> Sebastian
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> _______
>>>> Raphael
>>>
>>>
>>>
>>> --
>>> _______
>>> Raphael
>>>
>>
>> --
>> Anil Madhavapeddy =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://anil.rec=
oil.org
>



--=20
_______
Raphael


From sebastian.probst.eide@gmail.com Wed Feb 29 08:38:08 2012
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-2.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1S2f32-0003UW-B5 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Wed, 29 Feb 2012 08:38:08 +0000
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1293136 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.82.51 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (sebastian.probst.eide[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	* -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
	*      author's domain
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	* -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from mail-ww0-f51.google.com ([74.125.82.51]:60837)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp id 1S2f30-00065t-Do (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <sebastian.probst.eide@gmail.com>);
	Wed, 29 Feb 2012 08:38:08 +0000
Received: by wgbed3 with SMTP id ed3so2308396wgb.20
	for <cl-mirage@lists.cam.ac.uk>; Wed, 29 Feb 2012 00:38:06 -0800 (PST)
Received-SPF: pass (google.com: domain of sebastian.probst.eide@gmail.com
	designates 10.180.93.232 as permitted sender)
	client-ip=10.180.93.232; 
Authentication-Results: mr.google.com; spf=pass (google.com: domain of
	sebastian.probst.eide@gmail.com designates 10.180.93.232 as
	permitted sender) smtp.mail=sebastian.probst.eide@gmail.com;
	dkim=pass header.i=sebastian.probst.eide@gmail.com
Received: from mr.google.com ([10.180.93.232])
	by 10.180.93.232 with SMTP id cx8mr15197941wib.14.1330504686188
	(num_hops = 1); Wed, 29 Feb 2012 00:38:06 -0800 (PST)
Received: by 10.180.93.232 with SMTP id cx8mr12151645wib.14.1330504686096;
	Wed, 29 Feb 2012 00:38:06 -0800 (PST)
Received: from bumblebee.cl.cam.ac.uk (bumblebee.cl.cam.ac.uk. [128.232.1.16])
	by mx.google.com with ESMTPS id s2sm83917633wix.3.2012.02.29.00.38.04
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 29 Feb 2012 00:38:05 -0800 (PST)
Subject: Re: Running OCaml scripts from the command line
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=us-ascii
From: Sebastian Probst Eide <sebastian.probst.eide@gmail.com>
In-Reply-To: <CAAmHUAkizCiknSanXkmoK-R4rv6SE8v6quP58970y_7eL-Ru3A@mail.gmail.com>
Date: Wed, 29 Feb 2012 08:38:04 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <07AE89A8-FFD4-4FF2-AC0C-36656642A9A7@gmail.com>
References: <B075C8AE-45F0-4B82-9D71-9421454D54E9@gmail.com>
	<CAAmHUAkUDAAXwKZjr8gEmsxKvEGLyGJovx=k7aO1Ea2oRWeR4Q@mail.gmail.com>
	<CAAmHUAnkwugxJB9m4PPYzSe2sO52bcVWgYPWCKRSCFC_rdPhVg@mail.gmail.com>
	<20120228220018.GE8426@dark.recoil.org>
	<360FB0DE-8059-406C-BDF9-7E0B073E7C71@gmail.com>
	<CAAmHUAkizCiknSanXkmoK-R4rv6SE8v6quP58970y_7eL-Ru3A@mail.gmail.com>
To: Raphael Proust <raphlalou@gmail.com>
X-Mailer: Apple Mail (2.1257)
Cc: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>,
	Anil Madhavapeddy <anil@recoil.org>
X-BeenThere: cl-mirage@lists.cam.ac.uk
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: MirageOS development <cl-mirage.lists.cam.ac.uk>
List-Unsubscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=unsubscribe>
List-Archive: <https://lists.cam.ac.uk/pipermail/cl-mirage>
List-Post: <mailto:cl-mirage@lists.cam.ac.uk>
List-Help: <mailto:cl-mirage-request@lists.cam.ac.uk?subject=help>
List-Subscribe: <https://lists.cam.ac.uk/mailman/listinfo/cl-mirage>,
	<mailto:cl-mirage-request@lists.cam.ac.uk?subject=subscribe>
X-List-Received-Date: Wed, 29 Feb 2012 08:38:08 -0000
X-Keywords:                  
X-UID: 216
Status: O
Content-Length: 379
Lines: 10

> screen is better but only has horizontal
> split (annoying with the modern wide-screens).
Yes, extremely annoying!
Again something I haven't tried, but there seems to be a patch which =
allows vertical splits in screen: http://fungi.yuggoth.org/vsp4s/
I read about someone using it successfully :) That is as far as I am =
willing to go in terms of endorsement.

~ Sebastian=


