From Richard.Mortier@nottingham.ac.uk Wed Aug 03 22:49:41 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QojJt-0005YN-A0 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Wed, 03 Aug 2011 22:49:41 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153066 
	* -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]:40606
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QojJn-0001VG-FR (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Wed, 03 Aug 2011 22:49:41 +0100
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 1929926748 for cl-mirage@lists.cam.ac.uk; 176bae809d1e00cd;
	Wed, 03 Aug 2011 22:49:13 +0100
Received: from suismtp2.ad.nottingham.ac.uk ([128.243.42.11])
	by smtp1.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QojJR-0002Wh-J3
	for cl-mirage@lists.cam.ac.uk; Wed, 03 Aug 2011 22:49:13 +0100
Received: from UIWEXHUB02.ad.nottingham.ac.uk ([128.243.15.132]) by
	SUISMTP2.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Wed, 3 Aug 2011 22:49:33 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB02.ad.nottingham.ac.uk ([2002:80f3:f84::80f3:f84]) with mapi;
	Wed, 3 Aug 2011 22:49:33 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
Date: Wed, 3 Aug 2011 22:48:49 +0100
Subject: tangentially relevant...
Thread-Topic: tangentially relevant...
Thread-Index: AcxSJzrcgS9IEnVYQ52sBhCJ19e/2A==
Message-ID: <967D6299-0FCF-49DE-B482-8994E1C5D04D@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-OriginalArrivalTime: 03 Aug 2011 21:49:33.0468 (UTC)
	FILETIME=[3B0AFDC0:01CC5227]
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, 03 Aug 2011 21:49:41 -0000
X-Keywords:                  
X-UID: 16
Status: O
Content-Length: 1014
Lines: 23

http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-again-string.htm=
l

benefits of dynamic vs static compilation- but seems not unrelated to the a=
rguments about compiling the entire stack...
--=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 Wed Aug 03 23:02:03 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QojVr-0005jn-0m (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 03 Aug 2011 23:02:03 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153066 
	* -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]:37194
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp (csa=unknown) id 1QojVq-0004eD-EP (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 03 Aug 2011 23:02:03 +0100
Received: (qmail 2155 invoked by uid 634); 3 Aug 2011 22:02:02 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.111]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Wed, 03 Aug 2011 23:02:01 +0100
Subject: Re: tangentially relevant...
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <967D6299-0FCF-49DE-B482-8994E1C5D04D@nottingham.ac.uk>
Date: Wed, 3 Aug 2011 23:01:58 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <27E8BC73-153B-4364-ABF2-377AE2956E2F@recoil.org>
References: <967D6299-0FCF-49DE-B482-8994E1C5D04D@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
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: Wed, 03 Aug 2011 22:02:03 -0000
X-Keywords:                  
X-UID: 17
Status: O
Content-Length: 1360
Lines: 38

Interestingly in OCaml, the format strings in Printf/Scanf are parsed =
statically at compile time, and an error is thrown if they cannot be =
statically determined. This is because it's otherwise impossible to =
statically type a function with a variable number of arguments...

Anil

On 3 Aug 2011, at 22:48, Richard Mortier wrote:

> =
http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-again-string.ht=
ml
>=20
> benefits of dynamic vs static compilation- but seems not unrelated to =
the arguments about compiling the entire stack...
> --=20
> Cheers,
>=20
> R.
>=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 Richard.Mortier@nottingham.ac.uk Thu Aug 04 14:09:31 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Qoxg3-0005d0-4g (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 04 Aug 2011 14:09:31 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153391 
	* -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]:35266
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1Qoxfx-0000TU-Ey (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 04 Aug 2011 14:09:31 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 1930707896 for cl-mirage@lists.cam.ac.uk; f0b570c7a5d94a6d;
	Thu, 04 Aug 2011 14:09:05 +0100
Received: from suismtp2.ad.nottingham.ac.uk ([128.243.42.11])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QoxWP-0002mS-Eo
	for cl-mirage@lists.cam.ac.uk; Thu, 04 Aug 2011 13:59:35 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP2.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Thu, 4 Aug 2011 13:58:51 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 4 Aug 2011 13:58:50 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Thu, 4 Aug 2011 13:58:49 +0100
Subject: Re: tangentially relevant...
Thread-Topic: tangentially relevant...
Thread-Index: AcxSpkEczP6lcr1GQhu9AK5sMpWv0w==
Message-ID: <4178F98F-6C2F-4960-80EC-35C7F8E3BA78@nottingham.ac.uk>
References: <967D6299-0FCF-49DE-B482-8994E1C5D04D@nottingham.ac.uk>
	<27E8BC73-153B-4364-ABF2-377AE2956E2F@recoil.org>
In-Reply-To: <27E8BC73-153B-4364-ABF2-377AE2956E2F@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
X-OriginalArrivalTime: 04 Aug 2011 12:58:51.0161 (UTC)
	FILETIME=[41F64890:01CC52A6]
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, 04 Aug 2011 13:09:31 -0000
X-Keywords:                  
X-UID: 18
Status: O
Content-Length: 1651
Lines: 48

naive type theory question here- presumably that's to do with the desire to=
 be able to curry arguments?  since i can certainly write a function taking=
 a list of unspecified length...

On 3 Aug 2011, at 23:01, Anil Madhavapeddy wrote:

> Interestingly in OCaml, the format strings in Printf/Scanf are parsed sta=
tically at compile time, and an error is thrown if they cannot be staticall=
y determined. This is because it's otherwise impossible to statically type =
a function with a variable number of arguments...
>=20
> Anil
>=20
> On 3 Aug 2011, at 22:48, Richard Mortier wrote:
>=20
>> http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-again-string.=
html
>>=20
>> benefits of dynamic vs static compilation- but seems not unrelated to th=
e arguments about compiling the entire stack...
>> --=20
>> Cheers,
>>=20
>> R.
>>=20
>> This message and any attachment are intended solely for the addressee an=
d may contain confidential information. If you have received this message i=
n 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 a=
ny 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 attachm=
ent
>> may still contain software viruses which could damage your computer syst=
em:
>> you are advised to perform your own checks. Email communications with th=
e
>> University of Nottingham may be monitored as permitted by UK legislation=
.
>=20

--=20
Cheers,

R.



From anil@recoil.org Thu Aug 04 14:09:40 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QoxgC-0005dZ-OG (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 04 Aug 2011 14:09:40 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1153391 
	* -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]:8240
	helo=dark.recoil.org)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with smtp (csa=unknown) id 1QoxgC-0006TK-q9 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 04 Aug 2011 14:09:40 +0100
Received: (qmail 17822 invoked by uid 634); 4 Aug 2011 13:09:40 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from freak-0.srg.cl.cam.ac.uk (HELO [192.168.2.3]) (128.232.32.220)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 04 Aug 2011 14:09:39 +0100
Subject: Re: tangentially relevant...
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <4178F98F-6C2F-4960-80EC-35C7F8E3BA78@nottingham.ac.uk>
Date: Thu, 4 Aug 2011 14:09:38 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <F0EF2076-1913-4D29-AE98-99A2E0173BE2@recoil.org>
References: <967D6299-0FCF-49DE-B482-8994E1C5D04D@nottingham.ac.uk>
	<27E8BC73-153B-4364-ABF2-377AE2956E2F@recoil.org>
	<4178F98F-6C2F-4960-80EC-35C7F8E3BA78@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
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, 04 Aug 2011 13:09:40 -0000
X-Keywords:                  
X-UID: 19
Status: O
Content-Length: 2403
Lines: 68

You can write a function taking a list of unspecified length, but then =
that's a heap allocated structure being checked at runtime, which could =
also throw an exception if it gets a list of unexpected length.  The =
Printf is meant to be safely checked at compile time instead.

It's impossible to write a type of *variable* arguments that depend on a =
previous type.  This would be a simple form of dependent typing as you =
are computing over the values of types to generate more types (the =
format string -> the subsequent format arguments).

In a similar vein, you can't write a pattern match over a tuple of =
variable elements...

Anil

On 4 Aug 2011, at 13:58, Richard Mortier wrote:

> naive type theory question here- presumably that's to do with the =
desire to be able to curry arguments?  since i can certainly write a =
function taking a list of unspecified length...
>=20
> On 3 Aug 2011, at 23:01, Anil Madhavapeddy wrote:
>=20
>> Interestingly in OCaml, the format strings in Printf/Scanf are parsed =
statically at compile time, and an error is thrown if they cannot be =
statically determined. This is because it's otherwise impossible to =
statically type a function with a variable number of arguments...
>>=20
>> Anil
>>=20
>> On 3 Aug 2011, at 22:48, Richard Mortier wrote:
>>=20
>>> =
http://morepypy.blogspot.com/2011/08/pypy-is-faster-than-c-again-string.ht=
ml
>>>=20
>>> benefits of dynamic vs static compilation- but seems not unrelated =
to the arguments about compiling the entire stack...
>>> --=20
>>> Cheers,
>>>=20
>>> R.
>>>=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.
>>=20
>=20
> --=20
> Cheers,
>=20
> R.
>=20



From eireann.leverett@cantab.net Thu Aug 04 16:04:58 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QozTm-00000S-UP (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <eireann.leverett@cantab.net>);
	Thu, 04 Aug 2011 16:04:58 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.5 from SpamAssassin-3.3.2-1153391 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [72.9.246.58 listed in list.dnswl.dnsbl.ja.net]
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	*  0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from pichi.aluminati.org ([72.9.246.58]:53786)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QozTm-0002zx-R0 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <eireann.leverett@cantab.net>);
	Thu, 04 Aug 2011 16:04:58 +0100
Received: from localhost (localhost [127.0.0.1])
	by pichi.aluminati.org (Postfix) with ESMTP id A6794161E4A3
	for <cl-mirage@lists.cam.ac.uk>; Thu,  4 Aug 2011 16:05:00 +0100 (BST)
X-Virus-Scanned: Debian amavisd-new at aluminati.org
Received: from pichi.aluminati.org ([127.0.0.1])
	by localhost (pichi.aluminati.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id QZPzS3v4qHuz for <cl-mirage@lists.cam.ac.uk>;
	Thu,  4 Aug 2011 16:05:00 +0100 (BST)
Received: from garden.aluminati.org (unknown [10.1.10.32])
	by pichi.aluminati.org (Postfix) with ESMTP id 8FC35161E481
	for <cl-mirage@lists.cam.ac.uk>; Thu,  4 Aug 2011 16:05:00 +0100 (BST)
Received: from webmail.cantab.net (localhost [127.0.0.1])
	by garden.aluminati.org (Postfix) with ESMTP id C00D11A95A9
	for <cl-mirage@lists.cam.ac.uk>; Thu,  4 Aug 2011 16:04:57 +0100 (BST)
Received: from 10.0.16.53
	(SquirrelMail authenticated user eireann.leverett@cantab.net)
	by webmail.cantab.net with HTTP; Thu, 4 Aug 2011 16:04:57 +0100 (BST)
Message-ID: <38101.10.0.16.53.1312470297.squirrel@webmail.cantab.net>
Date: Thu, 4 Aug 2011 16:04:57 +0100 (BST)
Subject: OCAML trouble
From: "Eireann Leverett" <eireann.leverett@cantab.net>
To: cl-mirage@lists.cam.ac.uk
User-Agent: SquirrelMail/1.5.2 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
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: Thu, 04 Aug 2011 15:04:59 -0000
X-Keywords:                  
X-UID: 20
Status: O
Content-Length: 887
Lines: 42

Hi gurus,

I am trying to construct a dnspacket; and I just can't seem to get the
typing right for this detail record.

The record structure looks like this inside dnspacket.ml:

type detail =3D {
  qr: qr;
  opcode: opcode;
  aa: bool;
  tc: bool;
  rd: bool;
  ra: bool;
  rcode: rcode;
}

So I am trying to construct one in my code like this:

module DP =3D Dnspacket

...

let d:DP.detail =3D {qr =3D `Query; opcode =3D `Query; aa =3D false; tc =3D=
 false;
rd =3D false; ra =3D true; rccode =3D `NoError;} in
	print_endline (detail_to_string d);

Which produces this error after the mir-unix-direct build:

Error: Unbound record field label qr

Now earlier I did an experiment to make sure qr had the right type, but
printing our the qr_to_bool of q which worked fine. Somehow though howeve=
r
I massage it to produce the record I get an error. Can you help me Obi
Wan?

Eireann




From raphlalou@gmail.com Thu Aug 04 16:18:42 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Qozh4-0000Fl-JU (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 04 Aug 2011 16:18:42 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1153391 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.173 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-f173.google.com ([209.85.210.173]:34303)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp (csa=unknown) id 1Qozh4-0005ac-pn (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 04 Aug 2011 16:18:42 +0100
Received: by iyk2 with SMTP id 2so2262731iyk.18
	for <cl-mirage@lists.cam.ac.uk>; Thu, 04 Aug 2011 08:18:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.42.158.73 with SMTP id g9mr907994icx.228.1312471121196; Thu,
	04 Aug 2011 08:18:41 -0700 (PDT)
Received: by 10.42.246.130 with HTTP; Thu, 4 Aug 2011 08:18:41 -0700 (PDT)
In-Reply-To: <38101.10.0.16.53.1312470297.squirrel@webmail.cantab.net>
References: <38101.10.0.16.53.1312470297.squirrel@webmail.cantab.net>
Date: Thu, 4 Aug 2011 16:18:41 +0100
Message-ID: <CAAmHUAkKTRwDN-xoBi1wo9efkFQV3rJcWjjS++NsB66Ygri38Q@mail.gmail.com>
Subject: Re: OCAML trouble
From: Raphael Proust <raphlalou@gmail.com>
To: Eireann Leverett <eireann.leverett@cantab.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: 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, 04 Aug 2011 15:18:42 -0000
X-Keywords:                  
X-UID: 21
Status: O
Content-Length: 1706
Lines: 64

On Thu, Aug 4, 2011 at 4:04 PM, Eireann Leverett
<eireann.leverett@cantab.net> wrote:
> Hi gurus,
>
> I am trying to construct a dnspacket; and I just can't seem to get the
> typing right for this detail record.
>
> The record structure looks like this inside dnspacket.ml:
>
> type detail =3D {
> =C2=A0qr: qr;
> =C2=A0opcode: opcode;
> =C2=A0aa: bool;
> =C2=A0tc: bool;
> =C2=A0rd: bool;
> =C2=A0ra: bool;
> =C2=A0rcode: rcode;
> }
>
> So I am trying to construct one in my code like this:
>
> module DP =3D Dnspacket
>
> ...
>
> let d:DP.detail =3D {qr =3D `Query; opcode =3D `Query; aa =3D false; tc =
=3D false;
> rd =3D false; ra =3D true; rccode =3D `NoError;} in
> =C2=A0 =C2=A0 =C2=A0 =C2=A0print_endline (detail_to_string d);
>
> Which produces this error after the mir-unix-direct build:
>
> Error: Unbound record field label qr

The record type is in the namespace of DNSPacket (AKA DP). In order to
access the fields of this record you need to indicate this namespace.
It is done by prefixing the name of each filed with the module name,
like this :

let d:DP.detail =3D {DP.qr =3D `Query; DP.opcode =3D `Query; DP.aa =3D fals=
e;
DP.tc =3D false; DP.rd =3D false; DP.ra =3D true; DP.rccode =3D `NoError;} =
in
       print_endline (detail_to_string d);


If you find it too cumbersome, you can open the DP module locally or
use a syntax extension (whose name I don't remember).

>
> Now earlier I did an experiment to make sure qr had the right type, but
> printing our the qr_to_bool of q which worked fine. Somehow though howeve=
r
> I massage it to produce the record I get an error. Can you help me Obi
> Wan?

May the namespace-aware-static-typing be with you.



--=20
_______
Raphael


From Dave.Scott@eu.citrix.com Thu Aug 04 16:18:52 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QozhE-0000G5-AA (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk (return-path <Dave.Scott@eu.citrix.com>);
	Thu, 04 Aug 2011 16:18:52 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1153391 
	* -0.8 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]:10851
	helo=SMTP.EU.CITRIX.COM)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QozhD-0003Tl-SU (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk (return-path <Dave.Scott@eu.citrix.com>);
	Thu, 04 Aug 2011 16:18:52 +0100
X-IronPort-AV: E=Sophos;i="4.67,317,1309737600"; 
   d="scan'208";a="7114327"
Received: from unknown (HELO LONPMAILMX02.citrite.net) ([10.30.203.163])
	by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5;
	04 Aug 2011 15:18:51 +0000
Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by
	LONPMAILMX02.citrite.net ([10.30.203.163]) with mapi; Thu, 4 Aug 2011
	16:18:51 +0100
From: Dave Scott <Dave.Scott@eu.citrix.com>
To: Eireann Leverett <eireann.leverett@cantab.net>
Date: Thu, 4 Aug 2011 16:18:53 +0100
Subject: Re: OCAML trouble
Thread-Topic: OCAML trouble
Thread-Index: AcxSudBUEBMvtlg6Thm/2rXVWvCdww==
Message-ID: <C9CE4C9E-0066-45C0-9916-F248B32F6AD2@eu.citrix.com>
References: <38101.10.0.16.53.1312470297.squirrel@webmail.cantab.net>
In-Reply-To: <38101.10.0.16.53.1312470297.squirrel@webmail.cantab.net>
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" <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, 04 Aug 2011 15:18:52 -0000
X-Keywords:                  
X-UID: 22
Status: O
Content-Length: 1340
Lines: 57

"unbound record field label" normally means you've forgotten to add a modul=
e prefix to one of your record fields: try changing "qr=3D" into "DP.qr=3D"=
.

Note you only have to prefix one field: with modern ocaml the rest will the=
n be inferred.

HTH,

Dave

On Aug 4, 2011, at 4:05 PM, "Eireann Leverett" <eireann.leverett@cantab.net=
> wrote:

> Hi gurus,
>=20
> I am trying to construct a dnspacket; and I just can't seem to get the
> typing right for this detail record.
>=20
> The record structure looks like this inside dnspacket.ml:
>=20
> type detail =3D {
>  qr: qr;
>  opcode: opcode;
>  aa: bool;
>  tc: bool;
>  rd: bool;
>  ra: bool;
>  rcode: rcode;
> }
>=20
> So I am trying to construct one in my code like this:
>=20
> module DP =3D Dnspacket
>=20
> ...
>=20
> let d:DP.detail =3D {qr =3D `Query; opcode =3D `Query; aa =3D false; tc =
=3D false;
> rd =3D false; ra =3D true; rccode =3D `NoError;} in
>    print_endline (detail_to_string d);
>=20
> Which produces this error after the mir-unix-direct build:
>=20
> Error: Unbound record field label qr
>=20
> Now earlier I did an experiment to make sure qr had the right type, but
> printing our the qr_to_bool of q which worked fine. Somehow though howeve=
r
> I massage it to produce the record I get an error. Can you help me Obi
> Wan?
>=20
> Eireann
>=20
>=20
>=20


From Richard.Mortier@nottingham.ac.uk Thu Aug 11 13:03:25 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrTyv-0006Uk-5f (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 11 Aug 2011 13:03:25 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:43537
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QrTyp-00057B-FV (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 11 Aug 2011 13:03:25 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 1937240344 for cl-mirage@lists.cam.ac.uk; a3f7f8780287393c;
	Thu, 11 Aug 2011 13:02:58 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QrTyT-0007vD-Mv
	for cl-mirage@lists.cam.ac.uk; Thu, 11 Aug 2011 13:02:57 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Thu, 11 Aug 2011 13:02:55 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 11 Aug 2011 13:02:55 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
Date: Thu, 11 Aug 2011 13:02:12 +0100
Subject: n00b question- rebuilding mirage tree
Thread-Topic: n00b question- rebuilding mirage tree
Thread-Index: AcxYHpo8TFhsmFsHToq7OOdp/58MSg==
Message-ID: <6E0C1960-C69C-408A-B43E-464C33CEF507@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-OriginalArrivalTime: 11 Aug 2011 12:02:55.0234 (UTC)
	FILETIME=[9A90B620:01CC581E]
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, 11 Aug 2011 12:03:25 -0000
X-Keywords:                  
X-UID: 23
Status: O
Content-Length: 1822
Lines: 50

just doing a rebuild after not merging for a while - am being told=20

: mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install all ins=
tall
/Users/mort/research/mirage/mirage.git/tools/crunch
Finished, 0 targets (0 cached) in 00:00:00.
Finished, 6 targets (6 cached) in 00:00:00.
/Users/mort/research/mirage/mirage.git/tools/mir
make[1]: Nothing to be done for `all'.
/Users/mort/research/mirage/mirage.git/syntax
Finished, 0 targets (0 cached) in 00:00:00.
Finished, 106 targets (106 cached) in 00:00:00.
/Users/mort/research/mirage/mirage.git/lib
OS: unix
Flow: socket
# No parallelism done
OS: unix
Flow: direct
# No parallelism done
Assembling: camlp4 extensions
Skipping: Xen
Assembling: UNIX direct
Assembling: UNIX socket
Assembling: node socket
Must build node-socket first
make: *** [install] Error 1


...what is node-socket, and how should i install it?  (npm search throws up=
 many socket related things, but nothing called node-socket)

(on osx 10.5/64bit if it makes a difference.)
--=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 Thu Aug 11 13:09:30 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrU4o-0006Zk-IS (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 11 Aug 2011 13:09:30 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.218.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-yi0-f51.google.com ([209.85.218.51]:36831)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QrU4o-0007CI-D6 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 11 Aug 2011 13:09:30 +0100
Received: by yib12 with SMTP id 12so1316181yib.38
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 05:09:29 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.43.134.72 with SMTP id ib8mr8707564icc.94.1313064569211; Thu,
	11 Aug 2011 05:09:29 -0700 (PDT)
Received: by 10.42.169.70 with HTTP; Thu, 11 Aug 2011 05:09:29 -0700 (PDT)
In-Reply-To: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
Date: Thu, 11 Aug 2011 13:09:29 +0100
Message-ID: <CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
Subject: Re: n00b question- rebuilding mirage tree
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" <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, 11 Aug 2011 12:09:30 -0000
X-Keywords:                  
X-UID: 24
Status: O
Content-Length: 2250
Lines: 80

AFAICT, this is a bug in mirage's build process.

After
$ make

you just need to do
$ cd lib
$ make

and then
$ cd ..
$ make install

should work.


I don't know why this particular backend is not compiled when invoking
`make` from the top-level directory.

On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
<Richard.Mortier@nottingham.ac.uk> wrote:
> just doing a rebuild after not merging for a while - am being told
>
> : mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install all i=
nstall
> /Users/mort/research/mirage/mirage.git/tools/crunch
> Finished, 0 targets (0 cached) in 00:00:00.
> Finished, 6 targets (6 cached) in 00:00:00.
> /Users/mort/research/mirage/mirage.git/tools/mir
> make[1]: Nothing to be done for `all'.
> /Users/mort/research/mirage/mirage.git/syntax
> Finished, 0 targets (0 cached) in 00:00:00.
> Finished, 106 targets (106 cached) in 00:00:00.
> /Users/mort/research/mirage/mirage.git/lib
> OS: unix
> Flow: socket
> # No parallelism done
> OS: unix
> Flow: direct
> # No parallelism done
> Assembling: camlp4 extensions
> Skipping: Xen
> Assembling: UNIX direct
> Assembling: UNIX socket
> Assembling: node socket
> Must build node-socket first
> make: *** [install] Error 1
>
>
> ...what is node-socket, and how should i install it? =C2=A0(npm search th=
rows up many socket related things, but nothing called node-socket)
>
> (on osx 10.5/64bit if it makes a difference.)
> --
> Cheers,
>
> R.
>
> 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. =C2=A0 Please=
 do not use, copy or disclose the information contained in this message or =
in any attachment. =C2=A0Any views or opinions expressed by the author of t=
his email do not necessarily reflect the views of the University of Notting=
ham.
>
> 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
_______
Raphael


From eireann.leverett@cantab.net Thu Aug 11 13:24:46 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrUJa-0006v7-3I (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <eireann.leverett@cantab.net>);
	Thu, 11 Aug 2011 13:24:46 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.5 from SpamAssassin-3.3.2-1156072 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [72.9.246.58 listed in list.dnswl.dnsbl.ja.net]
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	*  0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
	*      valid
	*  0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from pichi.aluminati.org ([72.9.246.58]:59757)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QrUJZ-0003YP-Rp (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <eireann.leverett@cantab.net>);
	Thu, 11 Aug 2011 13:24:46 +0100
Received: from localhost (localhost [127.0.0.1])
	by pichi.aluminati.org (Postfix) with ESMTP id A0F99161E18B
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 13:24:49 +0100 (BST)
X-Virus-Scanned: Debian amavisd-new at aluminati.org
Received: from pichi.aluminati.org ([127.0.0.1])
	by localhost (pichi.aluminati.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id QOCVw-jYsghr for <cl-mirage@lists.cam.ac.uk>;
	Thu, 11 Aug 2011 13:24:49 +0100 (BST)
Received: from house.aluminati.org (unknown [10.1.10.33])
	by pichi.aluminati.org (Postfix) with ESMTP id 71D38161E3B1
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 13:24:49 +0100 (BST)
Received: from webmail.cantab.net (localhost [127.0.0.1])
	by house.aluminati.org (Postfix) with ESMTP id E3D2D26F97
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 13:24:44 +0100 (BST)
Received: from 10.0.7.178
	(SquirrelMail authenticated user eireann.leverett@cantab.net)
	by webmail.cantab.net with HTTP;
	Thu, 11 Aug 2011 13:24:44 +0100 (BST)
Message-ID: <43304.10.0.7.178.1313065484.squirrel@webmail.cantab.net>
Date: Thu, 11 Aug 2011 13:24:44 +0100 (BST)
Subject: DNS A record resolution pseudo-code
From: "Eireann Leverett" <eireann.leverett@cantab.net>
To: "Open Mirage Mailing List" <cl-mirage@lists.cam.ac.uk>
User-Agent: SquirrelMail/1.5.2 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
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: Thu, 11 Aug 2011 12:24:46 -0000
X-Keywords:                  
X-UID: 25
Status: O
Content-Length: 1038
Lines: 34

Hi all,

I have mocked up some basic experiments with Mirage and UDP packets and
DNS packets. However, now it's time to roll up my sleeves and think about
the structure of the pseudo-code, and what I'd like to eventually commit
to the project. I think better with a group, out loud as it were so I hop=
e
you don't mind my leaving this here:

Initialise PRNG
Generate Random Port #
Query Input (initially command line later as args to function)
Start UDP Listener on Random Port
Start Timeout Clock
Determine NSServer to query (Initially hardcoded but later a list from
config)
Generate Random Packet ID # and store for reference later
Construct Query for A record
Send DNSPacket to NSServer port 453
If arrive before timeout
    Parse the reply or report parsing error
    If good Id #
        Report resolved name or handle data dependant errors
    Else bad id #
        Report potential spoofery
else timed out
    Report no results due to timeout
Close UDP Listener

Please ask questions and make suggestions/revisions...

Eireann



From thomas.gazagnaire@gmail.com Thu Aug 11 13:41:10 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrUZS-00077j-A7 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Thu, 11 Aug 2011 13:41:10 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.43 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-pz0-f43.google.com ([209.85.210.43]:40000)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QrUZR-00029I-FK (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Thu, 11 Aug 2011 13:41:10 +0100
Received: by pzk1 with SMTP id 1so4235119pzk.16
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 05:41:08 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.149.5 with SMTP id w5mr8020444wfd.326.1313066468447; Thu,
	11 Aug 2011 05:41:08 -0700 (PDT)
Received: by 10.142.12.2 with HTTP; Thu, 11 Aug 2011 05:41:08 -0700 (PDT)
In-Reply-To: <CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
Date: Thu, 11 Aug 2011 14:41:08 +0200
Message-ID: <CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
Subject: Re: n00b question- rebuilding mirage tree
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
To: Raphael Proust <raphlalou@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Richard Mortier <Richard.Mortier@nottingham.ac.uk>,
	"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, 11 Aug 2011 12:41:10 -0000
X-Keywords:                  
X-UID: 26
Status: O
Content-Length: 2675
Lines: 93

I've just tried to build mirage as well, and I get:

File "os/xen/oS.cmx", line 1, characters 0-1:
Error: The files os/xen/io_page.cmi and /usr/local/lib/ocaml/pervasives.cmi
       make inconsistent assumptions over interface Pervasives
Command exited with code 1.

on a fresh clone (on ubuntu)

2011/8/11 Raphael Proust <raphlalou@gmail.com>:
> AFAICT, this is a bug in mirage's build process.
>
> After
> $ make
>
> you just need to do
> $ cd lib
> $ make
>
> and then
> $ cd ..
> $ make install
>
> should work.
>
>
> I don't know why this particular backend is not compiled when invoking
> `make` from the top-level directory.
>
> On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
> <Richard.Mortier@nottingham.ac.uk> wrote:
>> just doing a rebuild after not merging for a while - am being told
>>
>> : mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install all =
install
>> /Users/mort/research/mirage/mirage.git/tools/crunch
>> Finished, 0 targets (0 cached) in 00:00:00.
>> Finished, 6 targets (6 cached) in 00:00:00.
>> /Users/mort/research/mirage/mirage.git/tools/mir
>> make[1]: Nothing to be done for `all'.
>> /Users/mort/research/mirage/mirage.git/syntax
>> Finished, 0 targets (0 cached) in 00:00:00.
>> Finished, 106 targets (106 cached) in 00:00:00.
>> /Users/mort/research/mirage/mirage.git/lib
>> OS: unix
>> Flow: socket
>> # No parallelism done
>> OS: unix
>> Flow: direct
>> # No parallelism done
>> Assembling: camlp4 extensions
>> Skipping: Xen
>> Assembling: UNIX direct
>> Assembling: UNIX socket
>> Assembling: node socket
>> Must build node-socket first
>> make: *** [install] Error 1
>>
>>
>> ...what is node-socket, and how should i install it? =A0(npm search thro=
ws up many socket related things, but nothing called node-socket)
>>
>> (on osx 10.5/64bit if it makes a difference.)
>> --
>> Cheers,
>>
>> R.
>>
>> This message and any attachment are intended solely for the addressee an=
d may contain confidential information. If you have received this message i=
n error, please send it back to me, and immediately delete it. =A0 Please d=
o not use, copy or disclose the information contained in this message or in=
 any attachment. =A0Any views or opinions expressed by the author of this e=
mail do not necessarily reflect the views of the University of Nottingham.
>>
>> This message has been checked for viruses but the contents of an attachm=
ent
>> may still contain software viruses which could damage your computer syst=
em:
>> you are advised to perform your own checks. Email communications with th=
e
>> University of Nottingham may be monitored as permitted by UK legislation=
.
>>
>
>
>
> --
> _______
> Raphael
>
>


From raphlalou@gmail.com Thu Aug 11 13:52:56 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrUkq-0007Rt-3A (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 11 Aug 2011 13:52:56 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.160.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-gy0-f179.google.com ([209.85.160.179]:64165)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QrUkp-0005bd-Qp (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 11 Aug 2011 13:52:56 +0100
Received: by gyb11 with SMTP id 11so1342094gyb.38
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 05:52:54 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.42.105.146 with SMTP id v18mr8609161ico.429.1313067174344;
	Thu, 11 Aug 2011 05:52:54 -0700 (PDT)
Received: by 10.42.169.70 with HTTP; Thu, 11 Aug 2011 05:52:54 -0700 (PDT)
In-Reply-To: <CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
	<CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
Date: Thu, 11 Aug 2011 13:52:54 +0100
Message-ID: <CAAmHUAnpGrmH7fZ9Kry3iUZwYAbepHRN0vyozn8drgr6VW9Pdg@mail.gmail.com>
Subject: Re: n00b question- rebuilding mirage tree
From: Raphael Proust <raphlalou@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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, 11 Aug 2011 12:52:56 -0000
X-Keywords:                  
X-UID: 27
Status: O
Content-Length: 3479
Lines: 119

That's probably because (for a reason I don't know) lib/os/xen/_tags
lacks the `true: mirage` assertion.

(See difference between
https://github.com/avsm/mirage/blob/master/lib/os/xen/_tags and
https://github.com/avsm/mirage/blob/master/lib/os/unix/_tags )

Curiously, the problem isn't raised on my machine with a fresh
repository. Probably because my two pervasives are similar=E2=80=A6

I think `true: mirage` should be added to all the _tags files under
/lib/ (and any subdirectories), but I'm not sure. I'm especially not
sure for some parts of OS and Flow=E2=80=A6

On Thu, Aug 11, 2011 at 1:41 PM, Thomas Gazagnaire
<thomas.gazagnaire@gmail.com> wrote:
> I've just tried to build mirage as well, and I get:
>
> File "os/xen/oS.cmx", line 1, characters 0-1:
> Error: The files os/xen/io_page.cmi and /usr/local/lib/ocaml/pervasives.c=
mi
> =C2=A0 =C2=A0 =C2=A0 make inconsistent assumptions over interface Pervasi=
ves
> Command exited with code 1.
>
> on a fresh clone (on ubuntu)
>
> 2011/8/11 Raphael Proust <raphlalou@gmail.com>:
>> AFAICT, this is a bug in mirage's build process.
>>
>> After
>> $ make
>>
>> you just need to do
>> $ cd lib
>> $ make
>>
>> and then
>> $ cd ..
>> $ make install
>>
>> should work.
>>
>>
>> I don't know why this particular backend is not compiled when invoking
>> `make` from the top-level directory.
>>
>> On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
>> <Richard.Mortier@nottingham.ac.uk> wrote:
>>> just doing a rebuild after not merging for a while - am being told
>>>
>>> : mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install all=
 install
>>> /Users/mort/research/mirage/mirage.git/tools/crunch
>>> Finished, 0 targets (0 cached) in 00:00:00.
>>> Finished, 6 targets (6 cached) in 00:00:00.
>>> /Users/mort/research/mirage/mirage.git/tools/mir
>>> make[1]: Nothing to be done for `all'.
>>> /Users/mort/research/mirage/mirage.git/syntax
>>> Finished, 0 targets (0 cached) in 00:00:00.
>>> Finished, 106 targets (106 cached) in 00:00:00.
>>> /Users/mort/research/mirage/mirage.git/lib
>>> OS: unix
>>> Flow: socket
>>> # No parallelism done
>>> OS: unix
>>> Flow: direct
>>> # No parallelism done
>>> Assembling: camlp4 extensions
>>> Skipping: Xen
>>> Assembling: UNIX direct
>>> Assembling: UNIX socket
>>> Assembling: node socket
>>> Must build node-socket first
>>> make: *** [install] Error 1
>>>
>>>
>>> ...what is node-socket, and how should i install it? =C2=A0(npm search =
throws up many socket related things, but nothing called node-socket)
>>>
>>> (on osx 10.5/64bit if it makes a difference.)
>>> --
>>> Cheers,
>>>
>>> R.
>>>
>>> This message and any attachment are intended solely for the addressee a=
nd may contain confidential information. If you have received this message =
in error, please send it back to me, and immediately delete it. =C2=A0 Plea=
se do not use, copy or disclose the information contained in this message o=
r in any attachment. =C2=A0Any views or opinions expressed by the author of=
 this email do not necessarily reflect the views of the University of Notti=
ngham.
>>>
>>> This message has been checked for viruses but the contents of an attach=
ment
>>> may still contain software viruses which could damage your computer sys=
tem:
>>> you are advised to perform your own checks. Email communications with t=
he
>>> University of Nottingham may be monitored as permitted by UK legislatio=
n.
>>>
>>
>>
>>
>> --
>> _______
>> Raphael
>>
>>
>



--=20
_______
Raphael


From raphlalou@gmail.com Thu Aug 11 14:07:13 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrUyf-0007nZ-IC (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 11 Aug 2011 14:07:13 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.173 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-f173.google.com ([209.85.210.173]:55431)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QrUyd-0003Qy-Yn (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Thu, 11 Aug 2011 14:07:13 +0100
Received: by iyk2 with SMTP id 2so2833408iyk.18
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 06:07:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.42.105.146 with SMTP id v18mr8621738ico.429.1313068016568;
	Thu, 11 Aug 2011 06:06:56 -0700 (PDT)
Received: by 10.42.169.70 with HTTP; Thu, 11 Aug 2011 06:06:40 -0700 (PDT)
In-Reply-To: <CAAmHUAnpGrmH7fZ9Kry3iUZwYAbepHRN0vyozn8drgr6VW9Pdg@mail.gmail.com>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
	<CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
	<CAAmHUAnpGrmH7fZ9Kry3iUZwYAbepHRN0vyozn8drgr6VW9Pdg@mail.gmail.com>
Date: Thu, 11 Aug 2011 14:06:40 +0100
Message-ID: <CAAmHUAmWCLvMtNuwPKbWJ9PwzE0SqHzD=jz72ZXY2=VS6Toydw@mail.gmail.com>
Subject: Re: n00b question- rebuilding mirage tree
From: Raphael Proust <raphlalou@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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, 11 Aug 2011 13:07:13 -0000
X-Keywords:                  
X-UID: 28
Status: O
Content-Length: 3796
Lines: 131

@Thomas: can you try with my repository? I just added `true: mirage`
to all _tags under /lib.

On Thu, Aug 11, 2011 at 1:52 PM, Raphael Proust <raphlalou@gmail.com> wrote=
:
> That's probably because (for a reason I don't know) lib/os/xen/_tags
> lacks the `true: mirage` assertion.
>
> (See difference between
> https://github.com/avsm/mirage/blob/master/lib/os/xen/_tags and
> https://github.com/avsm/mirage/blob/master/lib/os/unix/_tags )
>
> Curiously, the problem isn't raised on my machine with a fresh
> repository. Probably because my two pervasives are similar=E2=80=A6
>
> I think `true: mirage` should be added to all the _tags files under
> /lib/ (and any subdirectories), but I'm not sure. I'm especially not
> sure for some parts of OS and Flow=E2=80=A6
>
> On Thu, Aug 11, 2011 at 1:41 PM, Thomas Gazagnaire
> <thomas.gazagnaire@gmail.com> wrote:
>> I've just tried to build mirage as well, and I get:
>>
>> File "os/xen/oS.cmx", line 1, characters 0-1:
>> Error: The files os/xen/io_page.cmi and /usr/local/lib/ocaml/pervasives.=
cmi
>> =C2=A0 =C2=A0 =C2=A0 make inconsistent assumptions over interface Pervas=
ives
>> Command exited with code 1.
>>
>> on a fresh clone (on ubuntu)
>>
>> 2011/8/11 Raphael Proust <raphlalou@gmail.com>:
>>> AFAICT, this is a bug in mirage's build process.
>>>
>>> After
>>> $ make
>>>
>>> you just need to do
>>> $ cd lib
>>> $ make
>>>
>>> and then
>>> $ cd ..
>>> $ make install
>>>
>>> should work.
>>>
>>>
>>> I don't know why this particular backend is not compiled when invoking
>>> `make` from the top-level directory.
>>>
>>> On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
>>> <Richard.Mortier@nottingham.ac.uk> wrote:
>>>> just doing a rebuild after not merging for a while - am being told
>>>>
>>>> : mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install al=
l install
>>>> /Users/mort/research/mirage/mirage.git/tools/crunch
>>>> Finished, 0 targets (0 cached) in 00:00:00.
>>>> Finished, 6 targets (6 cached) in 00:00:00.
>>>> /Users/mort/research/mirage/mirage.git/tools/mir
>>>> make[1]: Nothing to be done for `all'.
>>>> /Users/mort/research/mirage/mirage.git/syntax
>>>> Finished, 0 targets (0 cached) in 00:00:00.
>>>> Finished, 106 targets (106 cached) in 00:00:00.
>>>> /Users/mort/research/mirage/mirage.git/lib
>>>> OS: unix
>>>> Flow: socket
>>>> # No parallelism done
>>>> OS: unix
>>>> Flow: direct
>>>> # No parallelism done
>>>> Assembling: camlp4 extensions
>>>> Skipping: Xen
>>>> Assembling: UNIX direct
>>>> Assembling: UNIX socket
>>>> Assembling: node socket
>>>> Must build node-socket first
>>>> make: *** [install] Error 1
>>>>
>>>>
>>>> ...what is node-socket, and how should i install it? =C2=A0(npm search=
 throws up many socket related things, but nothing called node-socket)
>>>>
>>>> (on osx 10.5/64bit if it makes a difference.)
>>>> --
>>>> Cheers,
>>>>
>>>> R.
>>>>
>>>> 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. =C2=A0 Ple=
ase do not use, copy or disclose the information contained in this message =
or in any attachment. =C2=A0Any views or opinions expressed by the author o=
f this email do not necessarily reflect the views of the University of Nott=
ingham.
>>>>
>>>> This message has been checked for viruses but the contents of an attac=
hment
>>>> may still contain software viruses which could damage your computer sy=
stem:
>>>> you are advised to perform your own checks. Email communications with =
the
>>>> University of Nottingham may be monitored as permitted by UK legislati=
on.
>>>>
>>>
>>>
>>>
>>> --
>>> _______
>>> Raphael
>>>
>>>
>>
>
>
>
> --
> _______
> Raphael
>



--=20
_______
Raphael


From Richard.Mortier@nottingham.ac.uk Thu Aug 11 14:23:59 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrVEt-0000OQ-6A (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 11 Aug 2011 14:23:59 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:52548
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QrVEn-00013B-FZ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 11 Aug 2011 14:23:59 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 1937393288 for cl-mirage@lists.cam.ac.uk; fb625dd8573289f8;
	Thu, 11 Aug 2011 14:23:33 +0100
Received: from suismtp2.ad.nottingham.ac.uk ([128.243.42.11])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QrV9j-0002tL-Nm
	for cl-mirage@lists.cam.ac.uk; Thu, 11 Aug 2011 14:18:39 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP2.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Thu, 11 Aug 2011 14:19:06 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 11 Aug 2011 14:19:05 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Raphael Proust <raphlalou@gmail.com>
Date: Thu, 11 Aug 2011 14:18:22 +0100
Subject: Re: n00b question- rebuilding mirage tree
Thread-Topic: n00b question- rebuilding mirage tree
Thread-Index: AcxYKT31D5rFyvjLShO7VyTADvPjXA==
Message-ID: <6D7877D5-9045-45FF-808A-A2B6A4524A11@nottingham.ac.uk>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
In-Reply-To: <CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
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-OriginalArrivalTime: 11 Aug 2011 13:19:06.0333 (UTC)
	FILETIME=[3F2710D0:01CC5829]
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, 11 Aug 2011 13:23:59 -0000
X-Keywords:                  
X-UID: 29
Status: O
Content-Length: 1104
Lines: 26


On 11 Aug 2011, at 13:09, Raphael Proust wrote:

> I don't know why this particular backend is not compiled when invoking
> `make` from the top-level directory.

aha!  a moment's debugging following lunch shows that it's because i don't =
have js_of_ocaml installed. oops- fixing that... :)
--=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 Aug 11 15:10:26 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrVxq-0001XI-1N (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 11 Aug 2011 15:10:26 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:37201
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp (csa=unknown) id 1QrVxk-0002rJ-qh (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 11 Aug 2011 15:10:26 +0100
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 2072104930 for cl-mirage@lists.cam.ac.uk; 433a7b50dff983ac;
	Thu, 11 Aug 2011 15:09:59 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp1.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QrVxP-00052Q-8H
	for cl-mirage@lists.cam.ac.uk; Thu, 11 Aug 2011 15:09:59 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Thu, 11 Aug 2011 15:10:21 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 11 Aug 2011 15:10:22 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
Date: Thu, 11 Aug 2011 15:09:39 +0100
Subject: building node-socket
Thread-Topic: building node-socket
Thread-Index: AcxYMGfIRcay+a0TT86+nX8uZBmN0Q==
Message-ID: <244F8995-997A-4F23-9355-ECD5AA742A02@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-OriginalArrivalTime: 11 Aug 2011 14:10:22.0257 (UTC)
	FILETIME=[688BD210:01CC5830]
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, 11 Aug 2011 14:10:26 -0000
X-Keywords:                  
X-UID: 30
Status: O
Content-Length: 1095
Lines: 24

i've attempted to add a simple script that detects if js_of_ocaml is unavai=
lable, and installs it along with  necessary dependencies.  $ROOT/lib/deps.=
sh

pushed to my github (github.com/mor1/mirage) - if anyone wants to try it ou=
t, or spots obvious bugs, please let me know :)
--=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 Aug 11 16:29:06 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrXBy-0003Xo-LX (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 11 Aug 2011 16:29:06 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:18214
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QrXBy-00025q-QZ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 11 Aug 2011 16:29:06 +0100
Received: (qmail 32669 invoked by uid 634); 11 Aug 2011 15:29:06 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from no-dns-yet.demon.co.uk (HELO [192.168.14.104]) (62.49.66.12)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 11 Aug 2011 16:29:05 +0100
Subject: Re: DNS A record resolution pseudo-code
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=iso-8859-1
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <43304.10.0.7.178.1313065484.squirrel@webmail.cantab.net>
Date: Thu, 11 Aug 2011 16:29:05 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <1C53617D-CA00-46BA-865C-3291FF37CAD9@recoil.org>
References: <43304.10.0.7.178.1313065484.squirrel@webmail.cantab.net>
To: "Eireann Leverett" <eireann.leverett@cantab.net>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: Open Mirage 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: Thu, 11 Aug 2011 15:29:06 -0000
X-Keywords:                  
X-UID: 31
Status: O
Content-Length: 1980
Lines: 63

Eireann,

Looks good to start with! Minor comments:

- Send DNSPacket to port 53, not 453, I guess.
- This is a stub resolver, so no iterative resolution required (hence =
just a single resolution is fine).=20

The next step is to start building it up from the inside out: generate a =
single packet for a hardcoded domain (with all the RRsets in the query), =
and send it to a local resolver and see if you get the response back. =
Once that's working, then the rest of the logic can be built up around =
that function.

In particular, our stack doesn't do a particularly robust job of DNS ID =
selection at the moment (deliberately), but this can be saved till last =
as it only affects security when deployed in production, and not =
functionality for the purposes of a fit prototype resolver.

cheers
Anil

On 11 Aug 2011, at 13:24, Eireann Leverett wrote:

> Hi all,
>=20
> I have mocked up some basic experiments with Mirage and UDP packets =
and
> DNS packets. However, now it's time to roll up my sleeves and think =
about
> the structure of the pseudo-code, and what I'd like to eventually =
commit
> to the project. I think better with a group, out loud as it were so I =
hope
> you don't mind my leaving this here:
>=20
> Initialise PRNG
> Generate Random Port #
> Query Input (initially command line later as args to function)
> Start UDP Listener on Random Port
> Start Timeout Clock
> Determine NSServer to query (Initially hardcoded but later a list from
> config)
> Generate Random Packet ID # and store for reference later
> Construct Query for A record
> Send DNSPacket to NSServer port 453
> If arrive before timeout
>    Parse the reply or report parsing error
>    If good Id #
>        Report resolved name or handle data dependant errors
>    Else bad id #
>        Report potential spoofery
> else timed out
>    Report no results due to timeout
> Close UDP Listener
>=20
> Please ask questions and make suggestions/revisions...
>=20
> Eireann
>=20
>=20



From anil@recoil.org Thu Aug 11 16:30:13 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrXD3-0003Zs-F6 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 11 Aug 2011 16:30:13 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:17601
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QrXD3-0003Ae-Q8 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 11 Aug 2011 16:30:13 +0100
Received: (qmail 17234 invoked by uid 634); 11 Aug 2011 15:30:12 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from no-dns-yet.demon.co.uk (HELO [192.168.14.104]) (62.49.66.12)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 11 Aug 2011 16:30:11 +0100
Subject: Re: building node-socket
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <244F8995-997A-4F23-9355-ECD5AA742A02@nottingham.ac.uk>
Date: Thu, 11 Aug 2011 16:30:11 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <A1B0DBAE-DD2A-4667-BA15-8A88D82398AC@recoil.org>
References: <244F8995-997A-4F23-9355-ECD5AA742A02@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
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, 11 Aug 2011 15:30:13 -0000
X-Keywords:                  
X-UID: 32
Status: O
Content-Length: 1353
Lines: 39

This bails out in a bit way on MacOS (no wget, the OASIS build in Lwt =
gives an odd error).

Unfortunately, I think it's time for a ./configure script... I'll take a =
look at this shortly.

-Anil

On 11 Aug 2011, at 15:09, Richard Mortier wrote:

> i've attempted to add a simple script that detects if js_of_ocaml is =
unavailable, and installs it along with  necessary dependencies.  =
$ROOT/lib/deps.sh
>=20
> pushed to my github (github.com/mor1/mirage) - if anyone wants to try =
it out, or spots obvious bugs, please let me know :)
> --=20
> Cheers,
>=20
> R.
>=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 anil@recoil.org Thu Aug 11 16:42:39 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrXP5-0003nB-RR (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 11 Aug 2011 16:42:39 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:11930
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QrXP1-0005FQ-QQ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 11 Aug 2011 16:42:39 +0100
Received: (qmail 24861 invoked by uid 634); 11 Aug 2011 15:42:34 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from no-dns-yet.demon.co.uk (HELO [192.168.14.104]) (62.49.66.12)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 11 Aug 2011 16:42:33 +0100
Subject: Re: n00b question- rebuilding mirage tree
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=windows-1252
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CAAmHUAmWCLvMtNuwPKbWJ9PwzE0SqHzD=jz72ZXY2=VS6Toydw@mail.gmail.com>
Date: Thu, 11 Aug 2011 16:42:33 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <0A7ECBBF-94FE-4BD9-B420-F505ED985625@recoil.org>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
	<CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
	<CAAmHUAnpGrmH7fZ9Kry3iUZwYAbepHRN0vyozn8drgr6VW9Pdg@mail.gmail.com>
	<CAAmHUAmWCLvMtNuwPKbWJ9PwzE0SqHzD=jz72ZXY2=VS6Toydw@mail.gmail.com>
To: Raphael Proust <raphlalou@gmail.com>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: "cl-mirage@lists.cam.ac.uk" <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: Thu, 11 Aug 2011 15:42:39 -0000
X-Keywords:                  
X-UID: 33
Status: O
Content-Length: 4595
Lines: 149

We could also get rid of that tag now. It's only use is to add -nostdlib =
and -annot to the ocaml invocations:

     (* do not compile and pack with the standard lib *)
     flag ["ocaml"; "compile"; "mirage" ] & S [A"-nostdlib"; A"-annot"];
     flag ["ocaml"; "pack"; "mirage"] & S [A"-nostdlib"];

Nowadays, everything is built against the standard library, so I see no =
reason why it shouldn't just be removed. I've pushed Raphel's patch for =
now, to ensure everything builds reliably. I wonder why it was working =
for me all this time?? :-)

Anil

On 11 Aug 2011, at 14:06, Raphael Proust wrote:

> @Thomas: can you try with my repository? I just added `true: mirage`
> to all _tags under /lib.
>=20
> On Thu, Aug 11, 2011 at 1:52 PM, Raphael Proust <raphlalou@gmail.com> =
wrote:
>> That's probably because (for a reason I don't know) lib/os/xen/_tags
>> lacks the `true: mirage` assertion.
>>=20
>> (See difference between
>> https://github.com/avsm/mirage/blob/master/lib/os/xen/_tags and
>> https://github.com/avsm/mirage/blob/master/lib/os/unix/_tags )
>>=20
>> Curiously, the problem isn't raised on my machine with a fresh
>> repository. Probably because my two pervasives are similar=85
>>=20
>> I think `true: mirage` should be added to all the _tags files under
>> /lib/ (and any subdirectories), but I'm not sure. I'm especially not
>> sure for some parts of OS and Flow=85
>>=20
>> On Thu, Aug 11, 2011 at 1:41 PM, Thomas Gazagnaire
>> <thomas.gazagnaire@gmail.com> wrote:
>>> I've just tried to build mirage as well, and I get:
>>>=20
>>> File "os/xen/oS.cmx", line 1, characters 0-1:
>>> Error: The files os/xen/io_page.cmi and =
/usr/local/lib/ocaml/pervasives.cmi
>>>       make inconsistent assumptions over interface Pervasives
>>> Command exited with code 1.
>>>=20
>>> on a fresh clone (on ubuntu)
>>>=20
>>> 2011/8/11 Raphael Proust <raphlalou@gmail.com>:
>>>> AFAICT, this is a bug in mirage's build process.
>>>>=20
>>>> After
>>>> $ make
>>>>=20
>>>> you just need to do
>>>> $ cd lib
>>>> $ make
>>>>=20
>>>> and then
>>>> $ cd ..
>>>> $ make install
>>>>=20
>>>> should work.
>>>>=20
>>>>=20
>>>> I don't know why this particular backend is not compiled when =
invoking
>>>> `make` from the top-level directory.
>>>>=20
>>>> On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
>>>> <Richard.Mortier@nottingham.ac.uk> wrote:
>>>>> just doing a rebuild after not merging for a while - am being told
>>>>>=20
>>>>> : mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install =
all install
>>>>> /Users/mort/research/mirage/mirage.git/tools/crunch
>>>>> Finished, 0 targets (0 cached) in 00:00:00.
>>>>> Finished, 6 targets (6 cached) in 00:00:00.
>>>>> /Users/mort/research/mirage/mirage.git/tools/mir
>>>>> make[1]: Nothing to be done for `all'.
>>>>> /Users/mort/research/mirage/mirage.git/syntax
>>>>> Finished, 0 targets (0 cached) in 00:00:00.
>>>>> Finished, 106 targets (106 cached) in 00:00:00.
>>>>> /Users/mort/research/mirage/mirage.git/lib
>>>>> OS: unix
>>>>> Flow: socket
>>>>> # No parallelism done
>>>>> OS: unix
>>>>> Flow: direct
>>>>> # No parallelism done
>>>>> Assembling: camlp4 extensions
>>>>> Skipping: Xen
>>>>> Assembling: UNIX direct
>>>>> Assembling: UNIX socket
>>>>> Assembling: node socket
>>>>> Must build node-socket first
>>>>> make: *** [install] Error 1
>>>>>=20
>>>>>=20
>>>>> ...what is node-socket, and how should i install it?  (npm search =
throws up many socket related things, but nothing called node-socket)
>>>>>=20
>>>>> (on osx 10.5/64bit if it makes a difference.)
>>>>> --
>>>>> Cheers,
>>>>>=20
>>>>> R.
>>>>>=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.
>>>>>=20
>>>>=20
>>>>=20
>>>>=20
>>>> --
>>>> _______
>>>> Raphael
>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>>=20
>> --
>> _______
>> Raphael
>>=20
>=20
>=20
>=20
> --=20
> _______
> Raphael
>=20



From thomas.gazagnaire@gmail.com Thu Aug 11 16:51:22 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrXXW-00042N-U7 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Thu, 11 Aug 2011 16:51:22 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156072 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.161.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-gx0-f179.google.com ([209.85.161.179]:52466)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QrXXR-0005e9-YO (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Thu, 11 Aug 2011 16:51:22 +0100
Received: by gxk1 with SMTP id 1so1474091gxk.38
	for <cl-mirage@lists.cam.ac.uk>; Thu, 11 Aug 2011 08:51:17 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.249.34 with SMTP id w34mr1606945wfh.440.1313077876506;
	Thu, 11 Aug 2011 08:51:16 -0700 (PDT)
Received: by 10.142.12.2 with HTTP; Thu, 11 Aug 2011 08:51:16 -0700 (PDT)
In-Reply-To: <0A7ECBBF-94FE-4BD9-B420-F505ED985625@recoil.org>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
	<CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
	<CAAmHUAnpGrmH7fZ9Kry3iUZwYAbepHRN0vyozn8drgr6VW9Pdg@mail.gmail.com>
	<CAAmHUAmWCLvMtNuwPKbWJ9PwzE0SqHzD=jz72ZXY2=VS6Toydw@mail.gmail.com>
	<0A7ECBBF-94FE-4BD9-B420-F505ED985625@recoil.org>
Date: Thu, 11 Aug 2011 17:51:16 +0200
Message-ID: <CAK==wUxBkgWFx0kpC=buKzLRDQuvpxuP1WcrrE1csyye8KmRAQ@mail.gmail.com>
Subject: Re: n00b question- rebuilding mirage tree
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Cc: "cl-mirage@lists.cam.ac.uk" <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: Thu, 11 Aug 2011 15:51:23 -0000
X-Keywords:                  
X-UID: 34
Status: O
Content-Length: 4849
Lines: 159

Ok, now the build succeeds.

I've pushed a patch in my tree to make the node backend install
optional (ie. if it has not been built, don't install it)

Thomas

2011/8/11 Anil Madhavapeddy <anil@recoil.org>:
> We could also get rid of that tag now. It's only use is to add -nostdlib =
and -annot to the ocaml invocations:
>
> =A0 =A0 (* do not compile and pack with the standard lib *)
> =A0 =A0 flag ["ocaml"; "compile"; "mirage" ] & S [A"-nostdlib"; A"-annot"=
];
> =A0 =A0 flag ["ocaml"; "pack"; "mirage"] & S [A"-nostdlib"];
>
> Nowadays, everything is built against the standard library, so I see no r=
eason why it shouldn't just be removed. I've pushed Raphel's patch for now,=
 to ensure everything builds reliably. I wonder why it was working for me a=
ll this time?? :-)
>
> Anil
>
> On 11 Aug 2011, at 14:06, Raphael Proust wrote:
>
>> @Thomas: can you try with my repository? I just added `true: mirage`
>> to all _tags under /lib.
>>
>> On Thu, Aug 11, 2011 at 1:52 PM, Raphael Proust <raphlalou@gmail.com> wr=
ote:
>>> That's probably because (for a reason I don't know) lib/os/xen/_tags
>>> lacks the `true: mirage` assertion.
>>>
>>> (See difference between
>>> https://github.com/avsm/mirage/blob/master/lib/os/xen/_tags and
>>> https://github.com/avsm/mirage/blob/master/lib/os/unix/_tags )
>>>
>>> Curiously, the problem isn't raised on my machine with a fresh
>>> repository. Probably because my two pervasives are similar=85
>>>
>>> I think `true: mirage` should be added to all the _tags files under
>>> /lib/ (and any subdirectories), but I'm not sure. I'm especially not
>>> sure for some parts of OS and Flow=85
>>>
>>> On Thu, Aug 11, 2011 at 1:41 PM, Thomas Gazagnaire
>>> <thomas.gazagnaire@gmail.com> wrote:
>>>> I've just tried to build mirage as well, and I get:
>>>>
>>>> File "os/xen/oS.cmx", line 1, characters 0-1:
>>>> Error: The files os/xen/io_page.cmi and /usr/local/lib/ocaml/pervasive=
s.cmi
>>>> =A0 =A0 =A0 make inconsistent assumptions over interface Pervasives
>>>> Command exited with code 1.
>>>>
>>>> on a fresh clone (on ubuntu)
>>>>
>>>> 2011/8/11 Raphael Proust <raphlalou@gmail.com>:
>>>>> AFAICT, this is a bug in mirage's build process.
>>>>>
>>>>> After
>>>>> $ make
>>>>>
>>>>> you just need to do
>>>>> $ cd lib
>>>>> $ make
>>>>>
>>>>> and then
>>>>> $ cd ..
>>>>> $ make install
>>>>>
>>>>> should work.
>>>>>
>>>>>
>>>>> I don't know why this particular backend is not compiled when invokin=
g
>>>>> `make` from the top-level directory.
>>>>>
>>>>> On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
>>>>> <Richard.Mortier@nottingham.ac.uk> wrote:
>>>>>> just doing a rebuild after not merging for a while - am being told
>>>>>>
>>>>>> : mort@greyjay:mirage.git$; make PREFIX=3D~/research/mirage/install =
all install
>>>>>> /Users/mort/research/mirage/mirage.git/tools/crunch
>>>>>> Finished, 0 targets (0 cached) in 00:00:00.
>>>>>> Finished, 6 targets (6 cached) in 00:00:00.
>>>>>> /Users/mort/research/mirage/mirage.git/tools/mir
>>>>>> make[1]: Nothing to be done for `all'.
>>>>>> /Users/mort/research/mirage/mirage.git/syntax
>>>>>> Finished, 0 targets (0 cached) in 00:00:00.
>>>>>> Finished, 106 targets (106 cached) in 00:00:00.
>>>>>> /Users/mort/research/mirage/mirage.git/lib
>>>>>> OS: unix
>>>>>> Flow: socket
>>>>>> # No parallelism done
>>>>>> OS: unix
>>>>>> Flow: direct
>>>>>> # No parallelism done
>>>>>> Assembling: camlp4 extensions
>>>>>> Skipping: Xen
>>>>>> Assembling: UNIX direct
>>>>>> Assembling: UNIX socket
>>>>>> Assembling: node socket
>>>>>> Must build node-socket first
>>>>>> make: *** [install] Error 1
>>>>>>
>>>>>>
>>>>>> ...what is node-socket, and how should i install it? =A0(npm search =
throws up many socket related things, but nothing called node-socket)
>>>>>>
>>>>>> (on osx 10.5/64bit if it makes a difference.)
>>>>>> --
>>>>>> Cheers,
>>>>>>
>>>>>> R.
>>>>>>
>>>>>> This message and any attachment are intended solely for the addresse=
e and may contain confidential information. If you have received this messa=
ge in error, please send it back to me, and immediately delete it. =A0 Plea=
se do not use, copy or disclose the information contained in this message o=
r in any attachment. =A0Any views or opinions expressed by the author of th=
is email do not necessarily reflect the views of the University of Nottingh=
am.
>>>>>>
>>>>>> This message has been checked for viruses but the contents of an att=
achment
>>>>>> may still contain software viruses which could damage your computer =
system:
>>>>>> you are advised to perform your own checks. Email communications wit=
h the
>>>>>> University of Nottingham may be monitored as permitted by UK legisla=
tion.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> _______
>>>>> Raphael
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> _______
>>> Raphael
>>>
>>
>>
>>
>> --
>> _______
>> Raphael
>>
>
>


From avsm@dark.recoil.org Thu Aug 11 17:08:11 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrXnn-0004JO-2H (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Thu, 11 Aug 2011 17:08:11 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156072 
	* -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]:40539
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QrXnm-000243-R0 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <avsm@dark.recoil.org>); Thu, 11 Aug 2011 17:08:11 +0100
Received: (qmail 29912 invoked by uid 10000); 11 Aug 2011 16:08:10 -0000
Date: Thu, 11 Aug 2011 17:08:10 +0100
From: Anil Madhavapeddy <anil@recoil.org>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
Subject: Re: n00b question- rebuilding mirage tree
Message-ID: <20110811160810.GA24894@dark.recoil.org>
References: <6E0C1960-C69C-408A-B43E-464C33CEF507@nottingham.ac.uk>
	<CAAmHUAmfeyKK4eOhJZNTqHWi4b0Qty8cT5xZCeGgfHT9VMO-vw@mail.gmail.com>
	<CAK==wUx2Dx6M1b84-PKGKGV96WepnbGN-_ZhqU+nZaS9=8-bRw@mail.gmail.com>
	<CAAmHUAnpGrmH7fZ9Kry3iUZwYAbepHRN0vyozn8drgr6VW9Pdg@mail.gmail.com>
	<CAAmHUAmWCLvMtNuwPKbWJ9PwzE0SqHzD=jz72ZXY2=VS6Toydw@mail.gmail.com>
	<0A7ECBBF-94FE-4BD9-B420-F505ED985625@recoil.org>
	<CAK==wUxBkgWFx0kpC=buKzLRDQuvpxuP1WcrrE1csyye8KmRAQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAK==wUxBkgWFx0kpC=buKzLRDQuvpxuP1WcrrE1csyye8KmRAQ@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: Raphael Proust <raphlalou@gmail.com>,
	"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, 11 Aug 2011 16:08:11 -0000
X-Keywords:                  
X-UID: 35
Status: O
Content-Length: 5354
Lines: 149

Cheers, I've pushed your patch and dropped Mort's (in favour of a future
configure script), so the build should work without js_of_ocaml again.

Anil

On Thu, Aug 11, 2011 at 05:51:16PM +0200, Thomas Gazagnaire wrote:
> Ok, now the build succeeds.
> 
> I've pushed a patch in my tree to make the node backend install
> optional (ie. if it has not been built, don't install it)
> 
> Thomas
> 
> 2011/8/11 Anil Madhavapeddy <anil@recoil.org>:
> > We could also get rid of that tag now. It's only use is to add -nostdlib and -annot to the ocaml invocations:
> >
> > ? ? (* do not compile and pack with the standard lib *)
> > ? ? flag ["ocaml"; "compile"; "mirage" ] & S [A"-nostdlib"; A"-annot"];
> > ? ? flag ["ocaml"; "pack"; "mirage"] & S [A"-nostdlib"];
> >
> > Nowadays, everything is built against the standard library, so I see no reason why it shouldn't just be removed. I've pushed Raphel's patch for now, to ensure everything builds reliably. I wonder why it was working for me all this time?? :-)
> >
> > Anil
> >
> > On 11 Aug 2011, at 14:06, Raphael Proust wrote:
> >
> >> @Thomas: can you try with my repository? I just added `true: mirage`
> >> to all _tags under /lib.
> >>
> >> On Thu, Aug 11, 2011 at 1:52 PM, Raphael Proust <raphlalou@gmail.com> wrote:
> >>> That's probably because (for a reason I don't know) lib/os/xen/_tags
> >>> lacks the `true: mirage` assertion.
> >>>
> >>> (See difference between
> >>> https://github.com/avsm/mirage/blob/master/lib/os/xen/_tags and
> >>> https://github.com/avsm/mirage/blob/master/lib/os/unix/_tags )
> >>>
> >>> Curiously, the problem isn't raised on my machine with a fresh
> >>> repository. Probably because my two pervasives are similar?
> >>>
> >>> I think `true: mirage` should be added to all the _tags files under
> >>> /lib/ (and any subdirectories), but I'm not sure. I'm especially not
> >>> sure for some parts of OS and Flow?
> >>>
> >>> On Thu, Aug 11, 2011 at 1:41 PM, Thomas Gazagnaire
> >>> <thomas.gazagnaire@gmail.com> wrote:
> >>>> I've just tried to build mirage as well, and I get:
> >>>>
> >>>> File "os/xen/oS.cmx", line 1, characters 0-1:
> >>>> Error: The files os/xen/io_page.cmi and /usr/local/lib/ocaml/pervasives.cmi
> >>>> ? ? ? make inconsistent assumptions over interface Pervasives
> >>>> Command exited with code 1.
> >>>>
> >>>> on a fresh clone (on ubuntu)
> >>>>
> >>>> 2011/8/11 Raphael Proust <raphlalou@gmail.com>:
> >>>>> AFAICT, this is a bug in mirage's build process.
> >>>>>
> >>>>> After
> >>>>> $ make
> >>>>>
> >>>>> you just need to do
> >>>>> $ cd lib
> >>>>> $ make
> >>>>>
> >>>>> and then
> >>>>> $ cd ..
> >>>>> $ make install
> >>>>>
> >>>>> should work.
> >>>>>
> >>>>>
> >>>>> I don't know why this particular backend is not compiled when invoking
> >>>>> `make` from the top-level directory.
> >>>>>
> >>>>> On Thu, Aug 11, 2011 at 1:02 PM, Richard Mortier
> >>>>> <Richard.Mortier@nottingham.ac.uk> wrote:
> >>>>>> just doing a rebuild after not merging for a while - am being told
> >>>>>>
> >>>>>> : mort@greyjay:mirage.git$; make PREFIX=~/research/mirage/install all install
> >>>>>> /Users/mort/research/mirage/mirage.git/tools/crunch
> >>>>>> Finished, 0 targets (0 cached) in 00:00:00.
> >>>>>> Finished, 6 targets (6 cached) in 00:00:00.
> >>>>>> /Users/mort/research/mirage/mirage.git/tools/mir
> >>>>>> make[1]: Nothing to be done for `all'.
> >>>>>> /Users/mort/research/mirage/mirage.git/syntax
> >>>>>> Finished, 0 targets (0 cached) in 00:00:00.
> >>>>>> Finished, 106 targets (106 cached) in 00:00:00.
> >>>>>> /Users/mort/research/mirage/mirage.git/lib
> >>>>>> OS: unix
> >>>>>> Flow: socket
> >>>>>> # No parallelism done
> >>>>>> OS: unix
> >>>>>> Flow: direct
> >>>>>> # No parallelism done
> >>>>>> Assembling: camlp4 extensions
> >>>>>> Skipping: Xen
> >>>>>> Assembling: UNIX direct
> >>>>>> Assembling: UNIX socket
> >>>>>> Assembling: node socket
> >>>>>> Must build node-socket first
> >>>>>> make: *** [install] Error 1
> >>>>>>
> >>>>>>
> >>>>>> ...what is node-socket, and how should i install it? ?(npm search throws up many socket related things, but nothing called node-socket)
> >>>>>>
> >>>>>> (on osx 10.5/64bit if it makes a difference.)
> >>>>>> --
> >>>>>> Cheers,
> >>>>>>
> >>>>>> R.
> >>>>>>
> >>>>>> 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.
> >>>>>>
> >>>>>> 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.
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> _______
> >>>>> Raphael
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> _______
> >>> Raphael
> >>>
> >>
> >>
> >>
> >> --
> >> _______
> >> Raphael
> >>
> >
> >
> 

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


From Richard.Mortier@nottingham.ac.uk Fri Aug 12 09:14:03 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrmsV-0000NY-Fe (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Fri, 12 Aug 2011 09:14:03 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156542 
	* -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]:45346
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QrmsP-0004Oy-G3 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Fri, 12 Aug 2011 09:14:03 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 2072990482 for cl-mirage@lists.cam.ac.uk; f77e6b089257815b;
	Fri, 12 Aug 2011 09:13:37 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1Qrms5-0006BL-Hs
	for cl-mirage@lists.cam.ac.uk; Fri, 12 Aug 2011 09:13:37 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Fri, 12 Aug 2011 09:13:36 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Fri, 12 Aug 2011 09:13:36 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
Date: Fri, 12 Aug 2011 09:12:53 +0100
Subject: odd build error
Thread-Topic: odd build error
Thread-Index: AcxYx7uRPFS6O6CnQbi+owgoPHy1yw==
Message-ID: <67C1553C-1200-4195-A9C3-178982695734@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-OriginalArrivalTime: 12 Aug 2011 08:13:36.0692 (UTC)
	FILETIME=[BC3F8F40:01CC58C7]
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, 12 Aug 2011 08:14:03 -0000
X-Keywords:                  
X-UID: 36
Status: O
Content-Length: 2331
Lines: 70

i'm making a start at an openflow implementation in mirage.  just starting =
to get dave's packet parsing mpl ported over to bitstring.  am hitting a co=
mpile error that i don't understand:

/usr/local/bin/ocamldep.opt -pp 'camlp4o -I ../../../syntax/_build pa_lwt.c=
ma pa_bitstring.cma pa_js.cma' -modules openflow/ofpacket.ml > openflow/ofp=
acket.ml.depends
+ /usr/local/bin/ocamldep.opt -pp 'camlp4o -I ../../../syntax/_build pa_lwt=
.cma pa_bitstring.cma pa_js.cma' -modules openflow/ofpacket.ml > openflow/o=
fpacket.ml.depends
File "ghost-location", line 448, characters 40--13388 (end at line 1, chara=
cter 0):
Failure: "invalid long identifier type"
Preprocessing error on file openflow/ofpacket.ml
Command exited with code 2.
make[1]: *** [node-socket-node] Error 10

all checked in on openflow branch; code around that line is:

"""
type phy_port =3D {
	port_no: uint16;
	hw_addr: eaddr;
	name: string;
	config: port_config; =20
	stp_forward: bool;
	stp_learn: bool;
	link_down: bool;
	curr: phy_port_feature;
	advertised: phy_port_feature;
	supported: phy_port_feature;
	peer: phy_port_feature;
}

type port_status_reason =3D [ ADD | DEL | MOD ]  <=3D=3D=3D=3D=3D=3D=3D thi=
s is line 448
let port_status_reason_of_int =3D function
  | 0 -> ADD
  | 1 -> DEL
  | 2 -> MOD
and int_of_port_status_reason =3D function
  | ADD -> 0
  | DEL -> 1
  | MOD -> 2
and string_of_port_status_reason =3D function
  | ADD -> sp "ADD"
  | DEL -> sp "DEL"
  | MOD -> sp "MOD"
"""

hints, suggestions, answers welcome :)

--=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 Fri Aug 12 09:19:02 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrmxK-0000Ub-Gd (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Fri, 12 Aug 2011 09:19:02 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156542 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.210.173 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-f173.google.com ([209.85.210.173]:62926)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with esmtp (csa=unknown) id 1QrmxK-0005Vk-Cu (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <raphlalou@gmail.com>); Fri, 12 Aug 2011 09:19:02 +0100
Received: by iyk2 with SMTP id 2so929108iyk.18
	for <cl-mirage@lists.cam.ac.uk>; Fri, 12 Aug 2011 01:19:00 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.42.133.7 with SMTP id f7mr696390ict.161.1313137139566; Fri, 12
	Aug 2011 01:18:59 -0700 (PDT)
Received: by 10.42.169.70 with HTTP; Fri, 12 Aug 2011 01:18:59 -0700 (PDT)
In-Reply-To: <67C1553C-1200-4195-A9C3-178982695734@nottingham.ac.uk>
References: <67C1553C-1200-4195-A9C3-178982695734@nottingham.ac.uk>
Date: Fri, 12 Aug 2011 09:18:59 +0100
Message-ID: <CAAmHUAnxyV7ehm-6x4nkUJQm6at5rW9s3v4anOPA-N86jiBQ+w@mail.gmail.com>
Subject: Re: odd build error
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" <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, 12 Aug 2011 08:19:02 -0000
X-Keywords:                  
X-UID: 37
Status: O
Content-Length: 2531
Lines: 73

On Fri, Aug 12, 2011 at 9:12 AM, Richard Mortier
<Richard.Mortier@nottingham.ac.uk> wrote:
> i'm making a start at an openflow implementation in mirage. =C2=A0just st=
arting to get dave's packet parsing mpl ported over to bitstring. =C2=A0am =
hitting a compile error that i don't understand:
>
> /usr/local/bin/ocamldep.opt -pp 'camlp4o -I ../../../syntax/_build pa_lwt=
.cma pa_bitstring.cma pa_js.cma' -modules openflow/ofpacket.ml > openflow/o=
fpacket.ml.depends
> + /usr/local/bin/ocamldep.opt -pp 'camlp4o -I ../../../syntax/_build pa_l=
wt.cma pa_bitstring.cma pa_js.cma' -modules openflow/ofpacket.ml > openflow=
/ofpacket.ml.depends
> File "ghost-location", line 448, characters 40--13388 (end at line 1, cha=
racter 0):
> Failure: "invalid long identifier type"
> Preprocessing error on file openflow/ofpacket.ml
> Command exited with code 2.
> make[1]: *** [node-socket-node] Error 10
>
> all checked in on openflow branch; code around that line is:
>
> """
> type phy_port =3D {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0port_no: uint16;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0hw_addr: eaddr;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0name: string;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0config: port_config;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0stp_forward: bool;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0stp_learn: bool;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0link_down: bool;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0curr: phy_port_feature;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0advertised: phy_port_feature;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0supported: phy_port_feature;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0peer: phy_port_feature;
> }
>
> type port_status_reason =3D [ ADD | DEL | MOD ] =C2=A0<=3D=3D=3D=3D=3D=3D=
=3D this is line 448
> let port_status_reason_of_int =3D function
> =C2=A0| 0 -> ADD
> =C2=A0| 1 -> DEL
> =C2=A0| 2 -> MOD
> and int_of_port_status_reason =3D function
> =C2=A0| ADD -> 0
> =C2=A0| DEL -> 1
> =C2=A0| MOD -> 2
> and string_of_port_status_reason =3D function
> =C2=A0| ADD -> sp "ADD"
> =C2=A0| DEL -> sp "DEL"
> =C2=A0| MOD -> sp "MOD"
> """
>
> hints, suggestions, answers welcome :)

You probably want to loose the brackets:
type port_status_reason =3D ADD |  DEL | MOD

Alternatively (but it doesn't look like you need it) you can use
polymorphic variants, in which case you want to keep the brackets but
add backquotes:
type port_status_reason =3D [ `ADD | `DEL | `MOD ]

Polymorphic variants are only useful if you want to use a sub/super
type of port_status_reason. Eg. if at some point you can restrict the
values to be either ADD or DEL but not MOD=E2=80=A6




--=20
_______
Raphael


From anil@recoil.org Fri Aug 12 09:19:37 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Qrmxt-0000Uy-S2 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 12 Aug 2011 09:19:37 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156542 
	* -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]:30677
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1Qrmxs-0002l8-Sw (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 12 Aug 2011 09:19:37 +0100
Received: (qmail 21976 invoked by uid 634); 12 Aug 2011 08:19:36 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=0.4 required=5.0
	tests=ALL_TRUSTED,MIME_QP_LONG_LINE
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.101]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Fri, 12 Aug 2011 09:19:36 +0100
References: <67C1553C-1200-4195-A9C3-178982695734@nottingham.ac.uk>
In-Reply-To: <67C1553C-1200-4195-A9C3-178982695734@nottingham.ac.uk>
Mime-Version: 1.0 (iPhone Mail 8L1)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii
Message-Id: <2E6296F5-C024-4113-A156-D6681039A7AC@recoil.org>
X-Mailer: iPhone Mail (8L1)
From: Anil Madhavapeddy <anil@recoil.org>
Subject: Re: odd build error
Date: Fri, 12 Aug 2011 09:19:32 +0100
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
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: Fri, 12 Aug 2011 08:19:38 -0000
X-Keywords:                  
X-UID: 38
Status: O
Content-Length: 2690
Lines: 81

Remove the square brackets around the type, as those are only for polymorphi=
c variants. Or add a backtick to the ADD, REMOVE to make them polymorphic.

Anil=20



On 12 Aug 2011, at 09:12, Richard Mortier <Richard.Mortier@nottingham.ac.uk>=
 wrote:

> i'm making a start at an openflow implementation in mirage.  just starting=
 to get dave's packet parsing mpl ported over to bitstring.  am hitting a co=
mpile error that i don't understand:
>=20
> /usr/local/bin/ocamldep.opt -pp 'camlp4o -I ../../../syntax/_build pa_lwt.=
cma pa_bitstring.cma pa_js.cma' -modules openflow/ofpacket.ml > openflow/ofp=
acket.ml.depends
> + /usr/local/bin/ocamldep.opt -pp 'camlp4o -I ../../../syntax/_build pa_lw=
t.cma pa_bitstring.cma pa_js.cma' -modules openflow/ofpacket.ml > openflow/o=
fpacket.ml.depends
> File "ghost-location", line 448, characters 40--13388 (end at line 1, char=
acter 0):
> Failure: "invalid long identifier type"
> Preprocessing error on file openflow/ofpacket.ml
> Command exited with code 2.
> make[1]: *** [node-socket-node] Error 10
>=20
> all checked in on openflow branch; code around that line is:
>=20
> """
> type phy_port =3D {
>    port_no: uint16;
>    hw_addr: eaddr;
>    name: string;
>    config: port_config; =20
>    stp_forward: bool;
>    stp_learn: bool;
>    link_down: bool;
>    curr: phy_port_feature;
>    advertised: phy_port_feature;
>    supported: phy_port_feature;
>    peer: phy_port_feature;
> }
>=20
> type port_status_reason =3D [ ADD | DEL | MOD ]  <=3D=3D=3D=3D=3D=3D=3D th=
is is line 448
> let port_status_reason_of_int =3D function
>  | 0 -> ADD
>  | 1 -> DEL
>  | 2 -> MOD
> and int_of_port_status_reason =3D function
>  | ADD -> 0
>  | DEL -> 1
>  | MOD -> 2
> and string_of_port_status_reason =3D function
>  | ADD -> sp "ADD"
>  | DEL -> sp "DEL"
>  | MOD -> sp "MOD"
> """
>=20
> hints, suggestions, answers welcome :)
>=20
> --=20
> Cheers,
>=20
> R.
>=20
> This message and any attachment are intended solely for the addressee and m=
ay contain confidential information. If you have received this message in er=
ror, please send it back to me, and immediately delete it.   Please do not u=
se, copy or disclose the information contained in this message or in any att=
achment.  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 attachmen=
t
> 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 Richard.Mortier@nottingham.ac.uk Fri Aug 12 18:05:03 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrvAN-0004pb-HS (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Fri, 12 Aug 2011 18:05:03 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1156542 
	* -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]:54107
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp (csa=unknown) id 1QrvAH-0003K7-sJ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Fri, 12 Aug 2011 18:05:03 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 2073745406 for cl-mirage@lists.cam.ac.uk; 17af93323a3c7c25;
	Fri, 12 Aug 2011 18:04:37 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1Qrv9x-0005Dx-HY
	for cl-mirage@lists.cam.ac.uk; Fri, 12 Aug 2011 18:04:37 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Fri, 12 Aug 2011 18:04:54 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Fri, 12 Aug 2011 18:04:54 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk" <cl-mirage@lists.cam.ac.uk>
Date: Fri, 12 Aug 2011 18:04:12 +0100
Subject: using a newly created library
Thread-Topic: using a newly created library
Thread-Index: AcxZEfS57vZoGqMsQIO/3mHzLli/SQ==
Message-ID: <449026AD-4A29-46BA-9AB0-424A9C81A5ED@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-OriginalArrivalTime: 12 Aug 2011 17:04:54.0983 (UTC)
	FILETIME=[F530BD70:01CC5911]
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, 12 Aug 2011 17:05:03 -0000
X-Keywords:                  
X-UID: 39
Status: O
Content-Length: 1321
Lines: 26

so, i'm creating this openflow library- what's the appropriate place to cre=
ate a test harness for it, and how do i setup things up to link it in? =20

eg., i've currently added "openflow" to the list of otherlibs in lib/myocam=
lbuild.ml ; and to the list of libs in the After_rules in scripts/myocamlbu=
ild.ml - but is this the right way to do it?  or should i use a _tags file =
in the test harness directory (tests/openflow)?  can i make use of the new =
library without adding it to the standard libs?
--=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 thomas.gazagnaire@gmail.com Fri Aug 12 20:02:00 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QrwzY-0005gu-Si (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 12 Aug 2011 20:02:00 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1156542 
	* -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 *       (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-yw0-f51.google.com ([209.85.213.51]:47815)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QrwzX-0006VF-Qm (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 12 Aug 2011 20:02:00 +0100
Received: by ywt32 with SMTP id 32so507199ywt.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 12 Aug 2011 12:01:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.149.5 with SMTP id w5mr647546wfd.326.1313175717974; Fri,
	12 Aug 2011 12:01:57 -0700 (PDT)
Received: by 10.142.12.2 with HTTP; Fri, 12 Aug 2011 12:01:57 -0700 (PDT)
In-Reply-To: <977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
Date: Fri, 12 Aug 2011 21:01:57 +0200
Message-ID: <CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
Subject: Re: ocamldoc generation and packed files
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: 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, 12 Aug 2011 19:02:01 -0000
X-Keywords:                  
X-UID: 40
Status: O
Content-Length: 2767
Lines: 69

It will be anounced quite shortly on the ocaml mailing list, so I can
give you the link to ocp-pack :

http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz

It should help you to pack modules easily and have a working doc.

--
Thomas

2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
> That tool will be very useful! I've committed the 'make doc' target. The =
output is still pretty dirty as we don't use the documentation tags properl=
y, but I'll go through adding .mli files and adding proper documentation on=
 the more stable interfaces.
>
> It would be quite nice to eventually have a single documentation output f=
or all the backends, with an addition section saying 'only present in Xen' =
or 'only present in Node'. I think that should be possible by parsing the o=
camldoc dump outputs, but something for the future!
>
> Anil
>
> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>
>> We have as well a program which pack together ML files (and is able to f=
unctorize packs as well...) it is not released yet, but I guess we can open=
-source it shortly.
>>
>> But I think overriding the default rule for ocamldoc+pack in ocamlbuild =
is sufficient for now on so you should push your patch :-)
>>
>> Thomas
>>
>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>
>>> I'd really like to generate ocamldoc (HTML/PDF) of all the various libr=
aries so that it's easier to learn Mirage (and support editor auto-completi=
on, etc).
>>>
>>> The big problem is that ocamldoc doesn't support packed modules, and we=
 use packing quite extensively (in Net, Http, Block, etc).
>>>
>>> So I've hacked up an ocamlbuild target that concats together the *sourc=
e* ML files from an .mlpack and uses that to generate the ocamldoc for the =
standard library, with one set of HTML files generated per backend (Xen, Ne=
t-Direct, Net-Socket, and so on).
>>>
>>> The issue is that these rules are a little grim: everywhere where we ha=
ve a .mlpack file at the moment, we need to override that rule to generate =
a concatenated ML file that is used for ocamldoc (but not for actual compil=
ation, since line numbers get lost since those aren't preserved when conver=
ting from ML files into a single big one).
>>>
>>> Does anyone have a better solution for ocamldoc and packed files? All o=
f the grimness here is hidden away in the ocamlbuild rules, so I'm inclined=
 to just commit this patch, and perhaps see about adding -pack support into=
 ocamldoc at a later stage (there's an open bug in Mantis somewhere).
>>>
>>> Dave, do you use pack in XAPI, and/or ocamldoc? =A0I wonder if everyone=
 else (like Core) also have their own swanky 'cat ML files into one' script=
 too...
>>>
>>> -anil
>>
>
>


From anil@recoil.org Sat Aug 13 14:47:54 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsEZ8-0007Uo-UP (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sat, 13 Aug 2011 14:47:54 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157010 
	* -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]:30356
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp (csa=unknown) id 1QsEZ8-0003j1-X0 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sat, 13 Aug 2011 14:47:54 +0100
Received: (qmail 15998 invoked by uid 634); 13 Aug 2011 13:47:53 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.102]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Sat, 13 Aug 2011 14:47:53 +0100
Subject: Re: ocamldoc generation and packed files
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=iso-8859-1
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
Date: Sat, 13 Aug 2011 14:47:54 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: 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, 13 Aug 2011 13:47:55 -0000
X-Keywords:                  
X-UID: 41
Status: O
Content-Length: 3351
Lines: 86

Thanks Thomas, that looks very useful and definitely better than the =
script in tree at the moment.

One question: ocp-pack also requires that the list of files be passed in =
dependency order, or else the resulting pack file will not compile.  =
Have you tried to integrate it as an ocamlbuild rule, so that it can =
automatically sort the input modules before generates the packed file / =
functor?

Anil

On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:

> It will be anounced quite shortly on the ocaml mailing list, so I can
> give you the link to ocp-pack :
>=20
> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>=20
> It should help you to pack modules easily and have a working doc.
>=20
> --
> Thomas
>=20
> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>> That tool will be very useful! I've committed the 'make doc' target. =
The output is still pretty dirty as we don't use the documentation tags =
properly, but I'll go through adding .mli files and adding proper =
documentation on the more stable interfaces.
>>=20
>> It would be quite nice to eventually have a single documentation =
output for all the backends, with an addition section saying 'only =
present in Xen' or 'only present in Node'. I think that should be =
possible by parsing the ocamldoc dump outputs, but something for the =
future!
>>=20
>> Anil
>>=20
>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>=20
>>> We have as well a program which pack together ML files (and is able =
to functorize packs as well...) it is not released yet, but I guess we =
can open-source it shortly.
>>>=20
>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>=20
>>> Thomas
>>>=20
>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>=20
>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the various =
libraries so that it's easier to learn Mirage (and support editor =
auto-completion, etc).
>>>>=20
>>>> The big problem is that ocamldoc doesn't support packed modules, =
and we use packing quite extensively (in Net, Http, Block, etc).
>>>>=20
>>>> So I've hacked up an ocamlbuild target that concats together the =
*source* ML files from an .mlpack and uses that to generate the ocamldoc =
for the standard library, with one set of HTML files generated per =
backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>=20
>>>> The issue is that these rules are a little grim: everywhere where =
we have a .mlpack file at the moment, we need to override that rule to =
generate a concatenated ML file that is used for ocamldoc (but not for =
actual compilation, since line numbers get lost since those aren't =
preserved when converting from ML files into a single big one).
>>>>=20
>>>> Does anyone have a better solution for ocamldoc and packed files? =
All of the grimness here is hidden away in the ocamlbuild rules, so I'm =
inclined to just commit this patch, and perhaps see about adding -pack =
support into ocamldoc at a later stage (there's an open bug in Mantis =
somewhere).
>>>>=20
>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>=20
>>>> -anil
>>>=20
>>=20
>>=20
>=20



From anil@recoil.org Sat Aug 13 14:53:43 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsEel-0007Wg-3t (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sat, 13 Aug 2011 14:53:43 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157010 
	* -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]:49144
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp (csa=unknown) id 1QsEek-0004v1-Yj (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sat, 13 Aug 2011 14:53:43 +0100
Received: (qmail 1897 invoked by uid 634); 13 Aug 2011 13:53:42 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.102]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Sat, 13 Aug 2011 14:53:42 +0100
Subject: Re: using a newly created library
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <449026AD-4A29-46BA-9AB0-424A9C81A5ED@nottingham.ac.uk>
Date: Sat, 13 Aug 2011 14:53:43 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <80A1B9A4-7F7F-4E87-9617-8491A51E3465@recoil.org>
References: <449026AD-4A29-46BA-9AB0-424A9C81A5ED@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
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: Sat, 13 Aug 2011 13:53:43 -0000
X-Keywords:                  
X-UID: 42
Status: O
Content-Length: 2261
Lines: 56

To add a new library currently requires:

- appending the directory name to the 'let otherlibs =3D' variable in =
lib/myocamlbuild.ml
- adding the module name to lib/std/stdlib.mllib

The Mirage standard library is simply a collection of all the libraries =
in the tree, and so the top-level target is to build stdlib.cmxa, which =
will include all the other directories as dependencies.

Raphael and I are working out a directory scheme to make it easier to =
add library variants for particular platforms (e.g. a js_of_ocaml Regexp =
module instead of a pure OCaml one).  More details on this shortly when =
I have it working next week.

Also, it's time to start thinking about a test harness that can set up =
network tests more easily, rather than the ad-hoc collection of stuff in =
tests/. I'd like this before CUFP, so I'll spend some time on it next =
week too...

Anil

On 12 Aug 2011, at 18:04, Richard Mortier wrote:

> so, i'm creating this openflow library- what's the appropriate place =
to create a test harness for it, and how do i setup things up to link it =
in? =20
>=20
> eg., i've currently added "openflow" to the list of otherlibs in =
lib/myocamlbuild.ml ; and to the list of libs in the After_rules in =
scripts/myocamlbuild.ml - but is this the right way to do it?  or should =
i use a _tags file in the test harness directory (tests/openflow)?  can =
i make use of the new library without adding it to the standard libs?
> --=20
> Cheers,
>=20
> R.
>=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 thomas.gazagnaire@gmail.com Sat Aug 13 17:51:01 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsHQL-0001Gs-IO (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Sat, 13 Aug 2011 17:51:01 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1157010 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [74.125.83.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.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-gw0-f51.google.com ([74.125.83.51]:52707)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QsHQK-0001i3-YE (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Sat, 13 Aug 2011 17:51:01 +0100
Received: by gwj17 with SMTP id 17so2659445gwj.38
	for <cl-mirage@lists.cam.ac.uk>; Sat, 13 Aug 2011 09:51:00 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.196.14 with SMTP id t14mr930572wff.98.1313254258728; Sat,
	13 Aug 2011 09:50:58 -0700 (PDT)
Received: by 10.142.12.2 with HTTP; Sat, 13 Aug 2011 09:50:58 -0700 (PDT)
In-Reply-To: <6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
Date: Sat, 13 Aug 2011 18:50:58 +0200
Message-ID: <CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
Subject: Re: ocamldoc generation and packed files
From: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: 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, 13 Aug 2011 16:51:01 -0000
X-Keywords:                  
X-UID: 43
Status: O
Content-Length: 3549
Lines: 92

No ocamlbuild integration yet but would be definitely useful to add. I
can have a look at integrating it to mirage build next week if it's
useful.

--
Thomas

2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
> Thanks Thomas, that looks very useful and definitely better than the scri=
pt in tree at the moment.
>
> One question: ocp-pack also requires that the list of files be passed in =
dependency order, or else the resulting pack file will not compile. =A0Have=
 you tried to integrate it as an ocamlbuild rule, so that it can automatica=
lly sort the input modules before generates the packed file / functor?
>
> Anil
>
> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>
>> It will be anounced quite shortly on the ocaml mailing list, so I can
>> give you the link to ocp-pack :
>>
>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>
>> It should help you to pack modules easily and have a working doc.
>>
>> --
>> Thomas
>>
>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>> That tool will be very useful! I've committed the 'make doc' target. Th=
e output is still pretty dirty as we don't use the documentation tags prope=
rly, but I'll go through adding .mli files and adding proper documentation =
on the more stable interfaces.
>>>
>>> It would be quite nice to eventually have a single documentation output=
 for all the backends, with an addition section saying 'only present in Xen=
' or 'only present in Node'. I think that should be possible by parsing the=
 ocamldoc dump outputs, but something for the future!
>>>
>>> Anil
>>>
>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>
>>>> We have as well a program which pack together ML files (and is able to=
 functorize packs as well...) it is not released yet, but I guess we can op=
en-source it shortly.
>>>>
>>>> But I think overriding the default rule for ocamldoc+pack in ocamlbuil=
d is sufficient for now on so you should push your patch :-)
>>>>
>>>> Thomas
>>>>
>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>
>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the various li=
braries so that it's easier to learn Mirage (and support editor auto-comple=
tion, etc).
>>>>>
>>>>> The big problem is that ocamldoc doesn't support packed modules, and =
we use packing quite extensively (in Net, Http, Block, etc).
>>>>>
>>>>> So I've hacked up an ocamlbuild target that concats together the *sou=
rce* ML files from an .mlpack and uses that to generate the ocamldoc for th=
e standard library, with one set of HTML files generated per backend (Xen, =
Net-Direct, Net-Socket, and so on).
>>>>>
>>>>> The issue is that these rules are a little grim: everywhere where we =
have a .mlpack file at the moment, we need to override that rule to generat=
e a concatenated ML file that is used for ocamldoc (but not for actual comp=
ilation, since line numbers get lost since those aren't preserved when conv=
erting from ML files into a single big one).
>>>>>
>>>>> Does anyone have a better solution for ocamldoc and packed files? All=
 of the grimness here is hidden away in the ocamlbuild rules, so I'm inclin=
ed to just commit this patch, and perhaps see about adding -pack support in=
to ocamldoc at a later stage (there's an open bug in Mantis somewhere).
>>>>>
>>>>> Dave, do you use pack in XAPI, and/or ocamldoc? =A0I wonder if everyo=
ne else (like Core) also have their own swanky 'cat ML files into one' scri=
pt too...
>>>>>
>>>>> -anil
>>>>
>>>
>>>
>>
>
>


From anil@recoil.org Sat Aug 13 20:39:25 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsK3J-0002XV-R2 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sat, 13 Aug 2011 20:39:25 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157010 
	* -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]:27117
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp (csa=unknown) id 1QsK3I-0004Op-Ek (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sat, 13 Aug 2011 20:39:25 +0100
Received: (qmail 10844 invoked by uid 634); 13 Aug 2011 19:39:24 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from dhcp-128-232-129-39.eduroam.csx.cam.ac.uk (HELO
	[128.232.129.39]) (128.232.129.39)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Sat, 13 Aug 2011 20:39:23 +0100
Subject: Re: ocamldoc generation and packed files
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=iso-8859-1
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
Date: Sat, 13 Aug 2011 20:39:23 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1244.3)
X-Virus-Checked: Checked by ClamAV on dark.recoil.org
Cc: 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, 13 Aug 2011 19:39:25 -0000
X-Keywords:                  
X-UID: 44
Status: O
Content-Length: 4752
Lines: 124

Sure, go for it if you get a chance.

The current packing "works", but the doc target cannot be built at the =
same time as the normal code (because it causes the source pack to leave =
.ml files in lib/std/foo.ml, which then causes the lib/std/foo.cm{xo} to =
be rebuilt instead of the -packed copied .cmx to be used).

Basically, its a bit of a mess :-)

As a sneak preview, check out http://github.com/avsm/mirage-browser.git =
(on index.html). This is a *very* rough jQuery-based module browser of =
the Mirage OCamldoc that I'd like to have live on the website before the =
CUFP tutorial.  The live search is pretty nice, and I'll flesh out the =
rendering over the next few days.

This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).=20

Killer feature: the js_of_ocaml interactive top-level should work in =
here... :-)

Anil

On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:

> No ocamlbuild integration yet but would be definitely useful to add. I
> can have a look at integrating it to mirage build next week if it's
> useful.
>=20
> --
> Thomas
>=20
> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>> Thanks Thomas, that looks very useful and definitely better than the =
script in tree at the moment.
>>=20
>> One question: ocp-pack also requires that the list of files be passed =
in dependency order, or else the resulting pack file will not compile.  =
Have you tried to integrate it as an ocamlbuild rule, so that it can =
automatically sort the input modules before generates the packed file / =
functor?
>>=20
>> Anil
>>=20
>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>=20
>>> It will be anounced quite shortly on the ocaml mailing list, so I =
can
>>> give you the link to ocp-pack :
>>>=20
>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>=20
>>> It should help you to pack modules easily and have a working doc.
>>>=20
>>> --
>>> Thomas
>>>=20
>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>=20
>>>> It would be quite nice to eventually have a single documentation =
output for all the backends, with an addition section saying 'only =
present in Xen' or 'only present in Node'. I think that should be =
possible by parsing the ocamldoc dump outputs, but something for the =
future!
>>>>=20
>>>> Anil
>>>>=20
>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>=20
>>>>> We have as well a program which pack together ML files (and is =
able to functorize packs as well...) it is not released yet, but I guess =
we can open-source it shortly.
>>>>>=20
>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>=20
>>>>> Thomas
>>>>>=20
>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>=20
>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>=20
>>>>>> The big problem is that ocamldoc doesn't support packed modules, =
and we use packing quite extensively (in Net, Http, Block, etc).
>>>>>>=20
>>>>>> So I've hacked up an ocamlbuild target that concats together the =
*source* ML files from an .mlpack and uses that to generate the ocamldoc =
for the standard library, with one set of HTML files generated per =
backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>=20
>>>>>> The issue is that these rules are a little grim: everywhere where =
we have a .mlpack file at the moment, we need to override that rule to =
generate a concatenated ML file that is used for ocamldoc (but not for =
actual compilation, since line numbers get lost since those aren't =
preserved when converting from ML files into a single big one).
>>>>>>=20
>>>>>> Does anyone have a better solution for ocamldoc and packed files? =
All of the grimness here is hidden away in the ocamlbuild rules, so I'm =
inclined to just commit this patch, and perhaps see about adding -pack =
support into ocamldoc at a later stage (there's an open bug in Mantis =
somewhere).
>>>>>>=20
>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>=20
>>>>>> -anil
>>>>>=20
>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>=20



From anil@recoil.org Sun Aug 14 20:00:47 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsfvT-0004wx-Cg (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sun, 14 Aug 2011 20:00:47 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157350 
	* -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]:27072
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QsfvS-0005Vs-Qw (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sun, 14 Aug 2011 20:00:47 +0100
Received: (qmail 23836 invoked by uid 634); 14 Aug 2011 19:00:45 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.102]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Sun, 14 Aug 2011 20:00:45 +0100
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: Test framework thoughts
Date: Sun, 14 Aug 2011 20:00:46 +0100
Message-Id: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@recoil.org>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1244.3)
X-Mailer: Apple Mail (2.1244.3)
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: Sun, 14 Aug 2011 19:00:47 -0000
X-Keywords:                  
X-UID: 45
Status: O
Content-Length: 1003
Lines: 24

I've been thinking about the best to way to implement the test =
framework. We need it for two things:

- Compile test all the supported backends
- Making sure the supported backends actually all work, via simple unit =
tests
- Performance testing of various components.

Some tests require setting up an environment (e.g. network interfaces, =
or block devices) before the tests can run. =20

There are a few testing libraries that are easy to incorporate (e.g. =
oUnit or Kaputt), but I've been wondering if we can just use ocamlbuild =
to make things much easier.  It supports dynamic build dependencies =
(much as our CIEL framework also does), so a test can block mid-test and =
wait for another target to finish.=20

An individual test could be written as a module (say Foo), with a =
foo.test file that describes any dependencies and parameters, and =
ocamlbuild could just run them in parallel.  I'm still thinking it =
through, but wondering if anyone else has any thoughts on this.=20

Anil=


From thomas.gazagnaire@gmail.com Sun Aug 14 20:39:27 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsgWt-0005AH-7L (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Sun, 14 Aug 2011 20:39:27 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1157350 
	* -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-wy0-f179.google.com ([74.125.82.179]:45784)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QsgWs-0000mR-Wn (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Sun, 14 Aug 2011 20:39:27 +0100
Received: by wyh22 with SMTP id 22so3290144wyh.38
	for <cl-mirage@lists.cam.ac.uk>; Sun, 14 Aug 2011 12:39:26 -0700 (PDT)
Received: by 10.216.4.208 with SMTP id 58mr1412978wej.93.1313350765903;
	Sun, 14 Aug 2011 12:39:25 -0700 (PDT)
Received: from [192.168.0.10] (gou06-3-88-170-165-56.fbx.proxad.net
	[88.170.165.56])
	by mx.google.com with ESMTPS id a43sm3198019wed.4.2011.08.14.12.39.23
	(version=TLSv1/SSLv3 cipher=OTHER);
	Sun, 14 Aug 2011 12:39:24 -0700 (PDT)
Subject: Re: Test framework thoughts
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: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@recoil.org>
Date: Sun, 14 Aug 2011 21:39:22 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <964D2E89-F913-42B8-8F8D-2286E6494536@gmail.com>
References: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@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: Sun, 14 Aug 2011 19:39:27 -0000
X-Keywords:                  
X-UID: 46
Status: O
Content-Length: 1663
Lines: 44

> There are a few testing libraries that are easy to incorporate (e.g. =
oUnit or Kaputt), but I've been wondering if we can just use ocamlbuild =
to make things much easier.  It supports dynamic build dependencies =
(much as our CIEL framework also does), so a test can block mid-test and =
wait for another target to finish.=20

> An individual test could be written as a module (say Foo), with a =
foo.test file that describes any dependencies and parameters, and =
ocamlbuild could just run them in parallel.  I'm still thinking it =
through, but wondering if anyone else has any thoughts on this.=20

I don't see why using ocamlbuild can really help here. What I have =
started to do in another project is the following :

* The unit-tests of foo.ml are written in foo_test.ml, in keeping the =
same structure (ie. if you have Bar.x inside foo.ml, then you have an =
easy way to register the test "Bar.x"  in foo_test.ml :
module Bar =3D struct
  let x =3D Test.group "x" [ test (fun () -> <something which returns =
bool> ]
  let test =3D Test.group "Bar" [ x ]
end

* At the end of foo_test.ml, you have something like :
Test.register [ Bar.test ]

* And then elsewhere, you have a main test file which just does : =
Test.run (). The trick is to -linkall all the *_test.ml in the right =
order when creating the test binary. Also, Test.run () catches all the =
exception that unit-tests can raise, and try to run all the possible =
tests.

For the complex settings to run some of the unit-tests, I guess you need =
to have a library able to set-up correctly you environment, and use =
register some post and pre-hooks if needed.

--
Thomas


>=20
> Anil



From anil@recoil.org Sun Aug 14 20:46:05 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsgdJ-0005ED-RW (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sun, 14 Aug 2011 20:46:05 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157350 
	* -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]:36009
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QsgdJ-0006E4-RB (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Sun, 14 Aug 2011 20:46:05 +0100
Received: (qmail 23802 invoked by uid 634); 14 Aug 2011 19:46:05 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.102]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Sun, 14 Aug 2011 20:46:04 +0100
Subject: Re: Test framework thoughts
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <964D2E89-F913-42B8-8F8D-2286E6494536@gmail.com>
Date: Sun, 14 Aug 2011 20:46:02 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <A22A8E6A-9725-4D7B-B809-9597EA01DC9A@recoil.org>
References: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@recoil.org>
	<964D2E89-F913-42B8-8F8D-2286E6494536@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1244.3)
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: Sun, 14 Aug 2011 19:46:05 -0000
X-Keywords:                  
X-UID: 47
Status: O
Content-Length: 2527
Lines: 57

On 14 Aug 2011, at 20:39, Thomas Gazagnaire wrote:

>> There are a few testing libraries that are easy to incorporate (e.g. =
oUnit or Kaputt), but I've been wondering if we can just use ocamlbuild =
to make things much easier.  It supports dynamic build dependencies =
(much as our CIEL framework also does), so a test can block mid-test and =
wait for another target to finish.=20
>=20
>> An individual test could be written as a module (say Foo), with a =
foo.test file that describes any dependencies and parameters, and =
ocamlbuild could just run them in parallel.  I'm still thinking it =
through, but wondering if anyone else has any thoughts on this.=20
>=20
> I don't see why using ocamlbuild can really help here.
> What I have started to do in another project is the following :
>=20
> * The unit-tests of foo.ml are written in foo_test.ml, in keeping the =
same structure (ie. if you have Bar.x inside foo.ml, then you have an =
easy way to register the test "Bar.x"  in foo_test.ml :
> module Bar =3D struct
>  let x =3D Test.group "x" [ test (fun () -> <something which returns =
bool> ]
>  let test =3D Test.group "Bar" [ x ]
> end
>=20
> * At the end of foo_test.ml, you have something like :
> Test.register [ Bar.test ]

Right, but the problem here is that you have to link in *all* the tests =
into one huge binary, which takes quite a while to compile. It's a =
similar problem to the tests in our ORM library.

On the other hand, if each test is a module, then ocamlbuild can link up =
a binary to run just that one test (with a target like 'ocamlbuild =
test1.run'), and that would pull in any dependencies automatically.

You could still have a 'run all.itarget' that would include all the =
tests for a full run, but this way I could just quickly define some =
oUnit tests for a module like JSON, and test it without having to worry =
about all the others tests running.

> For the complex settings to run some of the unit-tests, I guess you =
need to have a library able to set-up correctly you environment, and use =
register some post and pre-hooks if needed.

Indeed... some of the settings are very specific to the backend being =
used (like the Xen ones), so it's a bit tricky to do this from one big =
library.

The other thing with ocamlbuild is that it can run the tests in parallel =
without any additional help, as '-j' should just work if the =
dependencies are setup correctly.  Any errors would show up as a build =
failure, and the product file would be the performance results.

Anil



From Richard.Mortier@nottingham.ac.uk Mon Aug 15 05:02:39 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsoNr-0000qT-Kz (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Mon, 15 Aug 2011 05:02:39 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157350 
	* -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]:56702
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp (csa=unknown) id 1QsoNm-0005ky-q5 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Mon, 15 Aug 2011 05:02:39 +0100
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 2075207862 for cl-mirage@lists.cam.ac.uk; 2686a9ea40b1084;
	Mon, 15 Aug 2011 05:02:13 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp1.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QsoNR-0001ue-OV
	for cl-mirage@lists.cam.ac.uk; Mon, 15 Aug 2011 05:02:13 +0100
Received: from UIWEXHUB02.ad.nottingham.ac.uk ([128.243.15.132]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Mon, 15 Aug 2011 05:02:50 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB02.ad.nottingham.ac.uk ([2002:80f3:f84::80f3:f84]) with mapi;
	Mon, 15 Aug 2011 05:02:50 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Mon, 15 Aug 2011 05:02:04 +0100
Subject: Re: Test framework thoughts
Thread-Topic: Test framework thoughts
Thread-Index: AcxbADKmXK5XYqtpTMqJmQKvGdBZQQ==
Message-ID: <AD1F9A34-0D46-4BC4-A0E0-F51BFDF4D2E6@nottingham.ac.uk>
References: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@recoil.org>
	<964D2E89-F913-42B8-8F8D-2286E6494536@gmail.com>
	<A22A8E6A-9725-4D7B-B809-9597EA01DC9A@recoil.org>
In-Reply-To: <A22A8E6A-9725-4D7B-B809-9597EA01DC9A@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
X-OriginalArrivalTime: 15 Aug 2011 04:02:50.0422 (UTC)
	FILETIME=[33363560:01CC5B00]
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: Mon, 15 Aug 2011 04:02:39 -0000
X-Keywords:                  
X-UID: 48
Status: O
Content-Length: 2490
Lines: 53


On 14 Aug 2011, at 15:46, Anil Madhavapeddy wrote:
> Right, but the problem here is that you have to link in *all* the tests i=
nto one huge binary, which takes quite a while to compile. It's a similar p=
roblem to the tests in our ORM library.
>=20
> On the other hand, if each test is a module, then ocamlbuild can link up =
a binary to run just that one test (with a target like 'ocamlbuild test1.ru=
n'), and that would pull in any dependencies automatically.

not sure if this question makes sense but - is it reasonable to have a mira=
ge program that only succeeds for a subset of the backends?

> You could still have a 'run all.itarget' that would include all the tests=
 for a full run, but this way I could just quickly define some oUnit tests =
for a module like JSON, and test it without having to worry about all the o=
thers tests running.
>=20
>> For the complex settings to run some of the unit-tests, I guess you need=
 to have a library able to set-up correctly you environment, and use regist=
er some post and pre-hooks if needed.
>=20
> Indeed... some of the settings are very specific to the backend being use=
d (like the Xen ones), so it's a bit tricky to do this from one big library=
.
>=20
> The other thing with ocamlbuild is that it can run the tests in parallel =
without any additional help, as '-j' should just work if the dependencies a=
re setup correctly.  Any errors would show up as a build failure, and the p=
roduct file would be the performance results.

neat; even better would be an ability to assert that the results file produ=
ce had to meet a template configuration, so you couldn't validly commit cod=
e that broke performance.

--=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 Mon Aug 15 09:40:18 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QssiY-0005sn-SS (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 15 Aug 2011 09:40:18 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157497 
	* -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]:10795
	helo=dark.recoil.org)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with smtp (csa=unknown) id 1QssiT-0005hu-YR (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Mon, 15 Aug 2011 09:40:18 +0100
Received: (qmail 15969 invoked by uid 634); 15 Aug 2011 08:40:13 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.102]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Mon, 15 Aug 2011 09:40:13 +0100
Subject: Re: Test framework thoughts
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <AD1F9A34-0D46-4BC4-A0E0-F51BFDF4D2E6@nottingham.ac.uk>
Date: Mon, 15 Aug 2011 09:40:12 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <3F690E14-8A4C-4E33-A58F-887ACF5F212E@recoil.org>
References: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@recoil.org>
	<964D2E89-F913-42B8-8F8D-2286E6494536@gmail.com>
	<A22A8E6A-9725-4D7B-B809-9597EA01DC9A@recoil.org>
	<AD1F9A34-0D46-4BC4-A0E0-F51BFDF4D2E6@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
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>,
	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: Mon, 15 Aug 2011 08:40:19 -0000
X-Keywords:                  
X-UID: 49
Status: O
Content-Length: 2013
Lines: 48

On 15 Aug 2011, at 05:02, Richard Mortier wrote:

>=20
> On 14 Aug 2011, at 15:46, Anil Madhavapeddy wrote:
>> Right, but the problem here is that you have to link in *all* the =
tests into one huge binary, which takes quite a while to compile. It's a =
similar problem to the tests in our ORM library.
>>=20
>> On the other hand, if each test is a module, then ocamlbuild can link =
up a binary to run just that one test (with a target like 'ocamlbuild =
test1.run'), and that would pull in any dependencies automatically.
>=20
> not sure if this question makes sense but - is it reasonable to have a =
mirage program that only succeeds for a subset of the backends?

Yes -- consider the unit tests for Xen block front, or the Node.js URL =
parser.

The emerging rule of thumb it that if a type or function is defined, it =
will be the same as all the other backends. But a type or function may =
not be defined in all backends.

So, OS.Clock.tm will always have the same timezone structure, but =
OS.Evtchn is only defined in the Xen backend (or actually soon, in the =
UNIX backend too, due to being able to use the /dev/evtchn userspace =
device).

This is another reason why it's difficult to link one big test binary =
together (although we could still have one binary per backend, of =
course).

>=20
> neat; even better would be an ability to assert that the results file =
produce had to meet a template configuration, so you couldn't validly =
commit code that broke performance.

Yeah, I'm thinking that all of these pre- and post- conditions are just =
targets in the make system, so you might have a .perf output in JSON =
format, and could run assertion scripts over those.

Dave pointed out the other day that, particularly with storage backends =
these days, we don't really know what the optimal settings of all the =
various knobs are, and so running a fitness function to explore the =
parameter space to optimise a VM for a particular hardware setup would =
be quite easy with Mirage.

Anil=


From Richard.Mortier@nottingham.ac.uk Mon Aug 15 15:46:45 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QsyRB-0006vM-Bv (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Mon, 15 Aug 2011 15:46:45 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1157497 
	* -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]:56270
	helo=thb-mta-19.emailfiltering.com)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QsyR6-0002tM-Po (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Mon, 15 Aug 2011 15:46:45 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by thb-mta-19.emailfiltering.com with emfmta (version 4.8.2.32) vanilla
	id 2076135774 for cl-mirage@lists.cam.ac.uk; 93a86cfad1560e99;
	Mon, 15 Aug 2011 15:46:19 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QsyQA-0002GB-RE
	for cl-mirage@lists.cam.ac.uk; Mon, 15 Aug 2011 15:45:42 +0100
Received: from UIWEXHUB02.ad.nottingham.ac.uk ([128.243.15.132]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Mon, 15 Aug 2011 15:46:04 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB02.ad.nottingham.ac.uk ([2002:80f3:f84::80f3:f84]) with mapi;
	Mon, 15 Aug 2011 15:46:03 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Mon, 15 Aug 2011 15:45:21 +0100
Subject: Re: Test framework thoughts
Thread-Topic: Test framework thoughts
Thread-Index: AcxbWg5dV7PDOD4OSBKHTM5KrQMEtQ==
Message-ID: <3AFDF65F-3096-4A59-95EE-FDBB33989580@nottingham.ac.uk>
References: <59AE4314-8C24-4BD1-A60C-DDE0E5B6C614@recoil.org>
	<964D2E89-F913-42B8-8F8D-2286E6494536@gmail.com>
	<A22A8E6A-9725-4D7B-B809-9597EA01DC9A@recoil.org>
	<AD1F9A34-0D46-4BC4-A0E0-F51BFDF4D2E6@nottingham.ac.uk>
	<3F690E14-8A4C-4E33-A58F-887ACF5F212E@recoil.org>
In-Reply-To: <3F690E14-8A4C-4E33-A58F-887ACF5F212E@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
X-OriginalArrivalTime: 15 Aug 2011 14:46:04.0507 (UTC)
	FILETIME=[0F143AB0:01CC5B5A]
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: Mon, 15 Aug 2011 14:46:45 -0000
X-Keywords:                  
X-UID: 50
Status: O
Content-Length: 1502
Lines: 34


On 15 Aug 2011, at 04:40, Anil Madhavapeddy wrote:

> Yeah, I'm thinking that all of these pre- and post- conditions are just t=
argets in the make system, so you might have a .perf output in JSON format,=
 and could run assertion scripts over those.
>=20
> Dave pointed out the other day that, particularly with storage backends t=
hese days, we don't really know what the optimal settings of all the variou=
s knobs are, and so running a fitness function to explore the parameter spa=
ce to optimise a VM for a particular hardware setup would be quite easy wit=
h Mirage.

that sounds very cool - add a "-OX" or somesuch flag - i like the idea of w=
hole system optimization like that.

--=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 Aug 18 15:25:31 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1Qu3XH-0002FV-Na (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 18 Aug 2011 15:25:31 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1158582 
	* -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]:6586
	helo=dark.recoil.org)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with smtp (csa=unknown) id 1Qu3XH-00012V-qQ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 18 Aug 2011 15:25:31 +0100
Received: (qmail 1255 invoked by uid 634); 18 Aug 2011 14:25:31 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from freak-0.srg.cl.cam.ac.uk (HELO [192.168.2.3]) (128.232.32.220)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 18 Aug 2011 15:25:30 +0100
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: API changes in my tree
Date: Thu, 18 Aug 2011 15:25:29 +0100
Message-Id: <C7CBDE30-5596-47B1-8018-87EFB14054B6@recoil.org>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1244.3)
X-Mailer: Apple Mail (2.1244.3)
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: Thu, 18 Aug 2011 14:25:31 -0000
X-Keywords:                  
X-UID: 51
Status: O
Content-Length: 1394
Lines: 37

I've pushed some changes that firm up the device APIs in my tree, but =
will break existing code until they settle down.

The idea is to convert all the device attachments into hot plug events, =
and make the API simply call a function whenever a new device shows up.=20=


So for example, for networking, you now do:

Manager.create (fun mgr interface id ->
  Manager.configure interface (`IPv4 (addr, netmask, gw)) >>
  let src =3D (None, 8081) in
  Channel.listen mgr (
    `TCPv4 (src, fun (remote_addr, remote_port) ->
           ...

Whenever a new VIF/tap interface shows up, the callback function is =
called, which applies configuration to the interface (essential under =
Xen, optional under UNIX if the sockets mode is being used).

If (as Balraj is doing), you need two interfaces to create a dummy net, =
then a wrapper thread can be used to block until both the interfaces =
show up.

The reason I'm doing this is to also apply the same logic to the =
Block/Filesystem layer, which is a pre-requisite to the testing =
infrastructure I hope to have in by early next week.  Once that's done, =
it should be the last of the major changes before a preview release, and =
we can work on tidying up the TCP and Openflow code that Haris is =
working on.

TLDR; my tree is a bit in flux at the moment, so rollback or talk to me =
if you pull and your code suddenly breaks.

cheers
Anil=


From anil@recoil.org Fri Aug 19 10:58:22 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuLqI-0002w2-Hx (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 19 Aug 2011 10:58:22 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159091 
	* -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]:8676
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp (csa=unknown) id 1QuLqH-00021a-Db (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 19 Aug 2011 10:58:22 +0100
Received: (qmail 15247 invoked by uid 634); 19 Aug 2011 09:58:21 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from no-dns-yet.demon.co.uk (HELO [192.168.14.167]) (62.49.66.12)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Fri, 19 Aug 2011 10:58:19 +0100
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Apple Message framework v1244.3)
Subject: Re: ocamldoc generation and packed files
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
Date: Fri, 19 Aug 2011 10:58:17 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>,
	"cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
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: Fri, 19 Aug 2011 09:58:22 -0000
X-Keywords:                  
X-UID: 52
Status: O
Content-Length: 5306
Lines: 140

As a followup to this, I've integrated ocaml-ocp into my tree and it's =
working really well. Thanks for releasing this Thomas!  There was an =
off-by-one in the cpp directives for line numbering (fixed in our tree).

It would be very useful to have some way for .annot files to work =
without compiling the individual sub-files; any thoughts on how this =
might work?

Anil

On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:

> Sure, go for it if you get a chance.
>=20
> The current packing "works", but the doc target cannot be built at the =
same time as the normal code (because it causes the source pack to leave =
.ml files in lib/std/foo.ml, which then causes the lib/std/foo.cm{xo} to =
be rebuilt instead of the -packed copied .cmx to be used).
>=20
> Basically, its a bit of a mess :-)
>=20
> As a sneak preview, check out =
http://github.com/avsm/mirage-browser.git (on index.html). This is a =
*very* rough jQuery-based module browser of the Mirage OCamldoc that I'd =
like to have live on the website before the CUFP tutorial.  The live =
search is pretty nice, and I'll flesh out the rendering over the next =
few days.
>=20
> This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).=20
>=20
> Killer feature: the js_of_ocaml interactive top-level should work in =
here... :-)
>=20
> Anil
>=20
> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>=20
>> No ocamlbuild integration yet but would be definitely useful to add. =
I
>> can have a look at integrating it to mirage build next week if it's
>> useful.
>>=20
>> --
>> Thomas
>>=20
>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>> Thanks Thomas, that looks very useful and definitely better than the =
script in tree at the moment.
>>>=20
>>> One question: ocp-pack also requires that the list of files be =
passed in dependency order, or else the resulting pack file will not =
compile.  Have you tried to integrate it as an ocamlbuild rule, so that =
it can automatically sort the input modules before generates the packed =
file / functor?
>>>=20
>>> Anil
>>>=20
>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>=20
>>>> It will be anounced quite shortly on the ocaml mailing list, so I =
can
>>>> give you the link to ocp-pack :
>>>>=20
>>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>=20
>>>> It should help you to pack modules easily and have a working doc.
>>>>=20
>>>> --
>>>> Thomas
>>>>=20
>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>>=20
>>>>> It would be quite nice to eventually have a single documentation =
output for all the backends, with an addition section saying 'only =
present in Xen' or 'only present in Node'. I think that should be =
possible by parsing the ocamldoc dump outputs, but something for the =
future!
>>>>>=20
>>>>> Anil
>>>>>=20
>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>=20
>>>>>> We have as well a program which pack together ML files (and is =
able to functorize packs as well...) it is not released yet, but I guess =
we can open-source it shortly.
>>>>>>=20
>>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>>=20
>>>>>> Thomas
>>>>>>=20
>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>=20
>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>>=20
>>>>>>> The big problem is that ocamldoc doesn't support packed modules, =
and we use packing quite extensively (in Net, Http, Block, etc).
>>>>>>>=20
>>>>>>> So I've hacked up an ocamlbuild target that concats together the =
*source* ML files from an .mlpack and uses that to generate the ocamldoc =
for the standard library, with one set of HTML files generated per =
backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>=20
>>>>>>> The issue is that these rules are a little grim: everywhere =
where we have a .mlpack file at the moment, we need to override that =
rule to generate a concatenated ML file that is used for ocamldoc (but =
not for actual compilation, since line numbers get lost since those =
aren't preserved when converting from ML files into a single big one).
>>>>>>>=20
>>>>>>> Does anyone have a better solution for ocamldoc and packed =
files? All of the grimness here is hidden away in the ocamlbuild rules, =
so I'm inclined to just commit this patch, and perhaps see about adding =
-pack support into ocamldoc at a later stage (there's an open bug in =
Mantis somewhere).
>>>>>>>=20
>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>>=20
>>>>>>> -anil
>>>>>>=20
>>>>>=20
>>>>>=20
>>>>=20
>>>=20
>>>=20
>>=20
>=20
>=20



From thomas.gazagnaire@gmail.com Fri Aug 19 12:22:04 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuN9I-0004s3-CF (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 19 Aug 2011 12:22:04 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1159091 
	* -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.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]:37896)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QuN9G-0002XD-ZN (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 19 Aug 2011 12:22:04 +0100
Received: by wwi18 with SMTP id 18so2214945wwi.20
	for <cl-mirage@lists.cam.ac.uk>; Fri, 19 Aug 2011 04:22:02 -0700 (PDT)
Received: by 10.227.201.8 with SMTP id ey8mr1607655wbb.108.1313752922589;
	Fri, 19 Aug 2011 04:22:02 -0700 (PDT)
Received: from [192.168.0.10] (gou06-3-88-170-165-56.fbx.proxad.net
	[88.170.165.56])
	by mx.google.com with ESMTPS id fm9sm2498315wbb.44.2011.08.19.04.21.59
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 19 Aug 2011 04:22:00 -0700 (PDT)
Subject: Re: ocamldoc generation and packed files
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: <AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
Date: Fri, 19 Aug 2011 13:21:57 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@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: Fri, 19 Aug 2011 11:22:04 -0000
X-Keywords:                  
X-UID: 53
Status: O
Content-Length: 6033
Lines: 158

I don't have concrete available solution for the .annot files. The two I =
can see are :

* releasing the .ml -> .annot part of the compiler as a stand-alone tool =
and use it to generate individual .annot files (I guess that's not very =
different from running ocamlc -annot on every file)
* having a tool to split out a packed .annot file into individual .annot =
files. I guess it's not so difficult to do (just need to parse the =
directive lines in the packed source file + its annot file and do some =
comparison), but we don't have it yet.

Thomas

On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:

> As a followup to this, I've integrated ocaml-ocp into my tree and it's =
working really well. Thanks for releasing this Thomas!  There was an =
off-by-one in the cpp directives for line numbering (fixed in our tree).
>=20
> It would be very useful to have some way for .annot files to work =
without compiling the individual sub-files; any thoughts on how this =
might work?
>=20
> Anil
>=20
> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>=20
>> Sure, go for it if you get a chance.
>>=20
>> The current packing "works", but the doc target cannot be built at =
the same time as the normal code (because it causes the source pack to =
leave .ml files in lib/std/foo.ml, which then causes the =
lib/std/foo.cm{xo} to be rebuilt instead of the -packed copied .cmx to =
be used).
>>=20
>> Basically, its a bit of a mess :-)
>>=20
>> As a sneak preview, check out =
http://github.com/avsm/mirage-browser.git (on index.html). This is a =
*very* rough jQuery-based module browser of the Mirage OCamldoc that I'd =
like to have live on the website before the CUFP tutorial.  The live =
search is pretty nice, and I'll flesh out the rendering over the next =
few days.
>>=20
>> This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).=20
>>=20
>> Killer feature: the js_of_ocaml interactive top-level should work in =
here... :-)
>>=20
>> Anil
>>=20
>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>=20
>>> No ocamlbuild integration yet but would be definitely useful to add. =
I
>>> can have a look at integrating it to mirage build next week if it's
>>> useful.
>>>=20
>>> --
>>> Thomas
>>>=20
>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>> Thanks Thomas, that looks very useful and definitely better than =
the script in tree at the moment.
>>>>=20
>>>> One question: ocp-pack also requires that the list of files be =
passed in dependency order, or else the resulting pack file will not =
compile.  Have you tried to integrate it as an ocamlbuild rule, so that =
it can automatically sort the input modules before generates the packed =
file / functor?
>>>>=20
>>>> Anil
>>>>=20
>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>=20
>>>>> It will be anounced quite shortly on the ocaml mailing list, so I =
can
>>>>> give you the link to ocp-pack :
>>>>>=20
>>>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>=20
>>>>> It should help you to pack modules easily and have a working doc.
>>>>>=20
>>>>> --
>>>>> Thomas
>>>>>=20
>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>>>=20
>>>>>> It would be quite nice to eventually have a single documentation =
output for all the backends, with an addition section saying 'only =
present in Xen' or 'only present in Node'. I think that should be =
possible by parsing the ocamldoc dump outputs, but something for the =
future!
>>>>>>=20
>>>>>> Anil
>>>>>>=20
>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>=20
>>>>>>> We have as well a program which pack together ML files (and is =
able to functorize packs as well...) it is not released yet, but I guess =
we can open-source it shortly.
>>>>>>>=20
>>>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>>>=20
>>>>>>> Thomas
>>>>>>>=20
>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>=20
>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>>>=20
>>>>>>>> The big problem is that ocamldoc doesn't support packed =
modules, and we use packing quite extensively (in Net, Http, Block, =
etc).
>>>>>>>>=20
>>>>>>>> So I've hacked up an ocamlbuild target that concats together =
the *source* ML files from an .mlpack and uses that to generate the =
ocamldoc for the standard library, with one set of HTML files generated =
per backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>=20
>>>>>>>> The issue is that these rules are a little grim: everywhere =
where we have a .mlpack file at the moment, we need to override that =
rule to generate a concatenated ML file that is used for ocamldoc (but =
not for actual compilation, since line numbers get lost since those =
aren't preserved when converting from ML files into a single big one).
>>>>>>>>=20
>>>>>>>> Does anyone have a better solution for ocamldoc and packed =
files? All of the grimness here is hidden away in the ocamlbuild rules, =
so I'm inclined to just commit this patch, and perhaps see about adding =
-pack support into ocamldoc at a later stage (there's an open bug in =
Mantis somewhere).
>>>>>>>>=20
>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>>>=20
>>>>>>>> -anil
>>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>=20
>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>=20



From thomas.gazagnaire@gmail.com Fri Aug 19 12:27:34 2011
Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuNEc-0004v0-SG (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 19 Aug 2011 12:27:34 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1159091 
	* -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-wy0-f179.google.com ([74.125.82.179]:59326)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with esmtp (csa=unknown) id 1QuNEb-0003qI-Rk (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 19 Aug 2011 12:27:34 +0100
Received: by wyh22 with SMTP id 22so2158275wyh.38
	for <cl-mirage@lists.cam.ac.uk>; Fri, 19 Aug 2011 04:27:33 -0700 (PDT)
Received: by 10.227.68.203 with SMTP id w11mr2883998wbi.69.1313753253288;
	Fri, 19 Aug 2011 04:27:33 -0700 (PDT)
Received: from [192.168.0.10] (gou06-3-88-170-165-56.fbx.proxad.net
	[88.170.165.56])
	by mx.google.com with ESMTPS id fm9sm2505414wbb.27.2011.08.19.04.27.30
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 19 Aug 2011 04:27:31 -0700 (PDT)
Subject: Re: ocamldoc generation and packed files
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: <2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
Date: Fri, 19 Aug 2011 13:27:29 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
	<2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1084)
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: Fri, 19 Aug 2011 11:27:34 -0000
X-Keywords:                  
X-UID: 54
Status: O
Content-Length: 6410
Lines: 167

Well, actually it's seems quite easy to do, as the packed .annot file =
contains already the right location information. I can try to work out =
on a quick-and-dirty tool to fix your issue :-)

=20
On Aug 19, 2011, at 1:21 PM, Thomas Gazagnaire wrote:

> I don't have concrete available solution for the .annot files. The two =
I can see are :
>=20
> * releasing the .ml -> .annot part of the compiler as a stand-alone =
tool and use it to generate individual .annot files (I guess that's not =
very different from running ocamlc -annot on every file)
> * having a tool to split out a packed .annot file into individual =
.annot files. I guess it's not so difficult to do (just need to parse =
the directive lines in the packed source file + its annot file and do =
some comparison), but we don't have it yet.
>=20
> Thomas
>=20
> On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:
>=20
>> As a followup to this, I've integrated ocaml-ocp into my tree and =
it's working really well. Thanks for releasing this Thomas!  There was =
an off-by-one in the cpp directives for line numbering (fixed in our =
tree).
>>=20
>> It would be very useful to have some way for .annot files to work =
without compiling the individual sub-files; any thoughts on how this =
might work?
>>=20
>> Anil
>>=20
>> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>>=20
>>> Sure, go for it if you get a chance.
>>>=20
>>> The current packing "works", but the doc target cannot be built at =
the same time as the normal code (because it causes the source pack to =
leave .ml files in lib/std/foo.ml, which then causes the =
lib/std/foo.cm{xo} to be rebuilt instead of the -packed copied .cmx to =
be used).
>>>=20
>>> Basically, its a bit of a mess :-)
>>>=20
>>> As a sneak preview, check out =
http://github.com/avsm/mirage-browser.git (on index.html). This is a =
*very* rough jQuery-based module browser of the Mirage OCamldoc that I'd =
like to have live on the website before the CUFP tutorial.  The live =
search is pretty nice, and I'll flesh out the rendering over the next =
few days.
>>>=20
>>> This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).=20
>>>=20
>>> Killer feature: the js_of_ocaml interactive top-level should work in =
here... :-)
>>>=20
>>> Anil
>>>=20
>>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>>=20
>>>> No ocamlbuild integration yet but would be definitely useful to =
add. I
>>>> can have a look at integrating it to mirage build next week if it's
>>>> useful.
>>>>=20
>>>> --
>>>> Thomas
>>>>=20
>>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>>> Thanks Thomas, that looks very useful and definitely better than =
the script in tree at the moment.
>>>>>=20
>>>>> One question: ocp-pack also requires that the list of files be =
passed in dependency order, or else the resulting pack file will not =
compile.  Have you tried to integrate it as an ocamlbuild rule, so that =
it can automatically sort the input modules before generates the packed =
file / functor?
>>>>>=20
>>>>> Anil
>>>>>=20
>>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>>=20
>>>>>> It will be anounced quite shortly on the ocaml mailing list, so I =
can
>>>>>> give you the link to ocp-pack :
>>>>>>=20
>>>>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>>=20
>>>>>> It should help you to pack modules easily and have a working doc.
>>>>>>=20
>>>>>> --
>>>>>> Thomas
>>>>>>=20
>>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>>>>=20
>>>>>>> It would be quite nice to eventually have a single documentation =
output for all the backends, with an addition section saying 'only =
present in Xen' or 'only present in Node'. I think that should be =
possible by parsing the ocamldoc dump outputs, but something for the =
future!
>>>>>>>=20
>>>>>>> Anil
>>>>>>>=20
>>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>>=20
>>>>>>>> We have as well a program which pack together ML files (and is =
able to functorize packs as well...) it is not released yet, but I guess =
we can open-source it shortly.
>>>>>>>>=20
>>>>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>>>>=20
>>>>>>>> Thomas
>>>>>>>>=20
>>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>>=20
>>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>>>>=20
>>>>>>>>> The big problem is that ocamldoc doesn't support packed =
modules, and we use packing quite extensively (in Net, Http, Block, =
etc).
>>>>>>>>>=20
>>>>>>>>> So I've hacked up an ocamlbuild target that concats together =
the *source* ML files from an .mlpack and uses that to generate the =
ocamldoc for the standard library, with one set of HTML files generated =
per backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>>=20
>>>>>>>>> The issue is that these rules are a little grim: everywhere =
where we have a .mlpack file at the moment, we need to override that =
rule to generate a concatenated ML file that is used for ocamldoc (but =
not for actual compilation, since line numbers get lost since those =
aren't preserved when converting from ML files into a single big one).
>>>>>>>>>=20
>>>>>>>>> Does anyone have a better solution for ocamldoc and packed =
files? All of the grimness here is hidden away in the ocamlbuild rules, =
so I'm inclined to just commit this patch, and perhaps see about adding =
-pack support into ocamldoc at a later stage (there's an open bug in =
Mantis somewhere).
>>>>>>>>>=20
>>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>>>>=20
>>>>>>>>> -anil
>>>>>>>>=20
>>>>>>>=20
>>>>>>>=20
>>>>>>=20
>>>>>=20
>>>>>=20
>>>>=20
>>>=20
>>>=20
>>=20
>=20



From anil@recoil.org Fri Aug 19 13:20:28 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuO3o-0005wj-Bf (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 19 Aug 2011 13:20:28 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159091 
	* -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]:22158
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp (csa=unknown) id 1QuO3n-0002Z5-DK (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 19 Aug 2011 13:20:28 +0100
Received: (qmail 13036 invoked by uid 634); 19 Aug 2011 12:20:26 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from freak-0.srg.cl.cam.ac.uk (HELO [192.168.2.3]) (128.232.32.220)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Fri, 19 Aug 2011 13:20:25 +0100
Subject: Re: ocamldoc generation and packed files
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
Date: Fri, 19 Aug 2011 13:20:22 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <F1D5A2FB-991F-496C-AF59-B41AD7C3E3B2@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
	<2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
	<37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
To: Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
X-Mailer: Apple Mail (2.1244.3)
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: Fri, 19 Aug 2011 12:20:28 -0000
X-Keywords:                  
X-UID: 55
Status: O
Content-Length: 7122
Lines: 185

Oh, if it's easy that would be pretty useful!  I could also modify =
ocaml-annot to handle the packed versions (I need to hack it to =
understand _build directories anyway at some point).

I'd quite like to have a 'blessed' vim and emacs bundle that works with =
Mirage+extensions by the time the tutorial comes around, as right now =
dealing with the syntax extensions is quite problematic.  I think =
between us we have a reasonable mix of vim/emacs users (Raphael and I =
use vim, and Balraj and you use emacs at least!).

Anil

On 19 Aug 2011, at 12:27, Thomas Gazagnaire wrote:

> Well, actually it's seems quite easy to do, as the packed .annot file =
contains already the right location information. I can try to work out =
on a quick-and-dirty tool to fix your issue :-)
>=20
>=20
> On Aug 19, 2011, at 1:21 PM, Thomas Gazagnaire wrote:
>=20
>> I don't have concrete available solution for the .annot files. The =
two I can see are :
>>=20
>> * releasing the .ml -> .annot part of the compiler as a stand-alone =
tool and use it to generate individual .annot files (I guess that's not =
very different from running ocamlc -annot on every file)
>> * having a tool to split out a packed .annot file into individual =
.annot files. I guess it's not so difficult to do (just need to parse =
the directive lines in the packed source file + its annot file and do =
some comparison), but we don't have it yet.
>>=20
>> Thomas
>>=20
>> On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:
>>=20
>>> As a followup to this, I've integrated ocaml-ocp into my tree and =
it's working really well. Thanks for releasing this Thomas!  There was =
an off-by-one in the cpp directives for line numbering (fixed in our =
tree).
>>>=20
>>> It would be very useful to have some way for .annot files to work =
without compiling the individual sub-files; any thoughts on how this =
might work?
>>>=20
>>> Anil
>>>=20
>>> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>>>=20
>>>> Sure, go for it if you get a chance.
>>>>=20
>>>> The current packing "works", but the doc target cannot be built at =
the same time as the normal code (because it causes the source pack to =
leave .ml files in lib/std/foo.ml, which then causes the =
lib/std/foo.cm{xo} to be rebuilt instead of the -packed copied .cmx to =
be used).
>>>>=20
>>>> Basically, its a bit of a mess :-)
>>>>=20
>>>> As a sneak preview, check out =
http://github.com/avsm/mirage-browser.git (on index.html). This is a =
*very* rough jQuery-based module browser of the Mirage OCamldoc that I'd =
like to have live on the website before the CUFP tutorial.  The live =
search is pretty nice, and I'll flesh out the rendering over the next =
few days.
>>>>=20
>>>> This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).=20
>>>>=20
>>>> Killer feature: the js_of_ocaml interactive top-level should work =
in here... :-)
>>>>=20
>>>> Anil
>>>>=20
>>>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>>>=20
>>>>> No ocamlbuild integration yet but would be definitely useful to =
add. I
>>>>> can have a look at integrating it to mirage build next week if =
it's
>>>>> useful.
>>>>>=20
>>>>> --
>>>>> Thomas
>>>>>=20
>>>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>>>> Thanks Thomas, that looks very useful and definitely better than =
the script in tree at the moment.
>>>>>>=20
>>>>>> One question: ocp-pack also requires that the list of files be =
passed in dependency order, or else the resulting pack file will not =
compile.  Have you tried to integrate it as an ocamlbuild rule, so that =
it can automatically sort the input modules before generates the packed =
file / functor?
>>>>>>=20
>>>>>> Anil
>>>>>>=20
>>>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>>>=20
>>>>>>> It will be anounced quite shortly on the ocaml mailing list, so =
I can
>>>>>>> give you the link to ocp-pack :
>>>>>>>=20
>>>>>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>>>=20
>>>>>>> It should help you to pack modules easily and have a working =
doc.
>>>>>>>=20
>>>>>>> --
>>>>>>> Thomas
>>>>>>>=20
>>>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>>>>>=20
>>>>>>>> It would be quite nice to eventually have a single =
documentation output for all the backends, with an addition section =
saying 'only present in Xen' or 'only present in Node'. I think that =
should be possible by parsing the ocamldoc dump outputs, but something =
for the future!
>>>>>>>>=20
>>>>>>>> Anil
>>>>>>>>=20
>>>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>>>=20
>>>>>>>>> We have as well a program which pack together ML files (and is =
able to functorize packs as well...) it is not released yet, but I guess =
we can open-source it shortly.
>>>>>>>>>=20
>>>>>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>>>>>=20
>>>>>>>>> Thomas
>>>>>>>>>=20
>>>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>>>=20
>>>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>>>>>=20
>>>>>>>>>> The big problem is that ocamldoc doesn't support packed =
modules, and we use packing quite extensively (in Net, Http, Block, =
etc).
>>>>>>>>>>=20
>>>>>>>>>> So I've hacked up an ocamlbuild target that concats together =
the *source* ML files from an .mlpack and uses that to generate the =
ocamldoc for the standard library, with one set of HTML files generated =
per backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>>>=20
>>>>>>>>>> The issue is that these rules are a little grim: everywhere =
where we have a .mlpack file at the moment, we need to override that =
rule to generate a concatenated ML file that is used for ocamldoc (but =
not for actual compilation, since line numbers get lost since those =
aren't preserved when converting from ML files into a single big one).
>>>>>>>>>>=20
>>>>>>>>>> Does anyone have a better solution for ocamldoc and packed =
files? All of the grimness here is hidden away in the ocamlbuild rules, =
so I'm inclined to just commit this patch, and perhaps see about adding =
-pack support into ocamldoc at a later stage (there's an open bug in =
Mantis somewhere).
>>>>>>>>>>=20
>>>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>>>>>=20
>>>>>>>>>> -anil
>>>>>>>>>=20
>>>>>>>>=20
>>>>>>>>=20
>>>>>>>=20
>>>>>>=20
>>>>>>=20
>>>>>=20
>>>>=20
>>>>=20
>>>=20
>>=20
>=20
>=20



From h.rotsos@gmail.com Fri Aug 19 13:21:40 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuO4y-0005xi-Uk (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <h.rotsos@gmail.com>); Fri, 19 Aug 2011 13:21:40 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.6 from SpamAssassin-3.3.2-1159091 
	* -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,
	low *      trust
	*      [209.85.216.172 listed in list.dnswl.dnsbl.ja.net]
	* 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
	provider *       (h.rotsos[at]gmail.com)
	* -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
	*      [score: 0.0000]
	*  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-qy0-f172.google.com ([209.85.216.172]:45461)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QuO4x-0005mh-Y9 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <h.rotsos@gmail.com>); Fri, 19 Aug 2011 13:21:40 +0100
Received: by qyk34 with SMTP id 34so295677qyk.17
	for <cl-mirage@lists.cam.ac.uk>; Fri, 19 Aug 2011 05:21:39 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.224.31.11 with SMTP id w11mr1883102qac.132.1313756498691; Fri,
	19 Aug 2011 05:21:38 -0700 (PDT)
Sender: h.rotsos@gmail.com
Received: by 10.229.100.8 with HTTP; Fri, 19 Aug 2011 05:21:38 -0700 (PDT)
In-Reply-To: <37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
	<2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
	<37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
Date: Fri, 19 Aug 2011 13:21:38 +0100
X-Google-Sender-Auth: 16a3JvQ5cxM7yYQUAP5-JSHKENQ
Message-ID: <CALerif5Q=50Eq=TdkHoWKSve9TyvLn5mq52hJd=c6jeChDturw@mail.gmail.com>
Subject: Re: ocamldoc generation and packed files
From: Haris Rotsos <cr409@cl.cam.ac.uk>
To: Thomas Gazagnaire <thomas.gazagnaire@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: Fri, 19 Aug 2011 12:21:41 -0000
X-Keywords:                  
X-UID: 56
Status: O
Content-Length: 6915
Lines: 185

On a similar problem, is there a way using the makefile or the
ocamlbuild command to regenerate the *.mli files? When I update a
source file, I notice that the interface file is not updated leading
to error in the compilation and I end up editing it by hand.

On 19 August 2011 12:27, Thomas Gazagnaire <thomas.gazagnaire@gmail.com> wr=
ote:
> Well, actually it's seems quite easy to do, as the packed .annot file con=
tains already the right location information. I can try to work out on a qu=
ick-and-dirty tool to fix your issue :-)
>
>
> On Aug 19, 2011, at 1:21 PM, Thomas Gazagnaire wrote:
>
>> I don't have concrete available solution for the .annot files. The two I=
 can see are :
>>
>> * releasing the .ml -> .annot part of the compiler as a stand-alone tool=
 and use it to generate individual .annot files (I guess that's not very di=
fferent from running ocamlc -annot on every file)
>> * having a tool to split out a packed .annot file into individual .annot=
 files. I guess it's not so difficult to do (just need to parse the directi=
ve lines in the packed source file + its annot file and do some comparison)=
, but we don't have it yet.
>>
>> Thomas
>>
>> On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:
>>
>>> As a followup to this, I've integrated ocaml-ocp into my tree and it's =
working really well. Thanks for releasing this Thomas! =C2=A0There was an o=
ff-by-one in the cpp directives for line numbering (fixed in our tree).
>>>
>>> It would be very useful to have some way for .annot files to work witho=
ut compiling the individual sub-files; any thoughts on how this might work?
>>>
>>> Anil
>>>
>>> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>>>
>>>> Sure, go for it if you get a chance.
>>>>
>>>> The current packing "works", but the doc target cannot be built at the=
 same time as the normal code (because it causes the source pack to leave .=
ml files in lib/std/foo.ml, which then causes the lib/std/foo.cm{xo} to be =
rebuilt instead of the -packed copied .cmx to be used).
>>>>
>>>> Basically, its a bit of a mess :-)
>>>>
>>>> As a sneak preview, check out http://github.com/avsm/mirage-browser.gi=
t (on index.html). This is a *very* rough jQuery-based module browser of th=
e Mirage OCamldoc that I'd like to have live on the website before the CUFP=
 tutorial. =C2=A0The live search is pretty nice, and I'll flesh out the ren=
dering over the next few days.
>>>>
>>>> This tool is also quite standalone as it uses the output of odoc_json/=
ocamldoc, and so could be applied to the standard distribution and also to =
the Citrix xapi-libs (if you're interested, David).
>>>>
>>>> Killer feature: the js_of_ocaml interactive top-level should work in h=
ere... :-)
>>>>
>>>> Anil
>>>>
>>>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>>>
>>>>> No ocamlbuild integration yet but would be definitely useful to add. =
I
>>>>> can have a look at integrating it to mirage build next week if it's
>>>>> useful.
>>>>>
>>>>> --
>>>>> Thomas
>>>>>
>>>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>>>> Thanks Thomas, that looks very useful and definitely better than the=
 script in tree at the moment.
>>>>>>
>>>>>> One question: ocp-pack also requires that the list of files be passe=
d in dependency order, or else the resulting pack file will not compile. =
=C2=A0Have you tried to integrate it as an ocamlbuild rule, so that it can =
automatically sort the input modules before generates the packed file / fun=
ctor?
>>>>>>
>>>>>> Anil
>>>>>>
>>>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>>>
>>>>>>> It will be anounced quite shortly on the ocaml mailing list, so I c=
an
>>>>>>> give you the link to ocp-pack :
>>>>>>>
>>>>>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>>>
>>>>>>> It should help you to pack modules easily and have a working doc.
>>>>>>>
>>>>>>> --
>>>>>>> Thomas
>>>>>>>
>>>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>>> That tool will be very useful! I've committed the 'make doc' targe=
t. The output is still pretty dirty as we don't use the documentation tags =
properly, but I'll go through adding .mli files and adding proper documenta=
tion on the more stable interfaces.
>>>>>>>>
>>>>>>>> It would be quite nice to eventually have a single documentation o=
utput for all the backends, with an addition section saying 'only present i=
n Xen' or 'only present in Node'. I think that should be possible by parsin=
g the ocamldoc dump outputs, but something for the future!
>>>>>>>>
>>>>>>>> Anil
>>>>>>>>
>>>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>>>
>>>>>>>>> We have as well a program which pack together ML files (and is ab=
le to functorize packs as well...) it is not released yet, but I guess we c=
an open-source it shortly.
>>>>>>>>>
>>>>>>>>> But I think overriding the default rule for ocamldoc+pack in ocam=
lbuild is sufficient for now on so you should push your patch :-)
>>>>>>>>>
>>>>>>>>> Thomas
>>>>>>>>>
>>>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>>>
>>>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the vario=
us libraries so that it's easier to learn Mirage (and support editor auto-c=
ompletion, etc).
>>>>>>>>>>
>>>>>>>>>> The big problem is that ocamldoc doesn't support packed modules,=
 and we use packing quite extensively (in Net, Http, Block, etc).
>>>>>>>>>>
>>>>>>>>>> So I've hacked up an ocamlbuild target that concats together the=
 *source* ML files from an .mlpack and uses that to generate the ocamldoc f=
or the standard library, with one set of HTML files generated per backend (=
Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>>>
>>>>>>>>>> The issue is that these rules are a little grim: everywhere wher=
e we have a .mlpack file at the moment, we need to override that rule to ge=
nerate a concatenated ML file that is used for ocamldoc (but not for actual=
 compilation, since line numbers get lost since those aren't preserved when=
 converting from ML files into a single big one).
>>>>>>>>>>
>>>>>>>>>> Does anyone have a better solution for ocamldoc and packed files=
? All of the grimness here is hidden away in the ocamlbuild rules, so I'm i=
nclined to just commit this patch, and perhaps see about adding -pack suppo=
rt into ocamldoc at a later stage (there's an open bug in Mantis somewhere)=
.
>>>>>>>>>>
>>>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc? =C2=A0I wonder i=
f everyone else (like Core) also have their own swanky 'cat ML files into o=
ne' script too...
>>>>>>>>>>
>>>>>>>>>> -anil
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
>
>



--=20
Charalampos Rotsos
PhD student
The University of Cambridge
Computer Laboratory
William Gates Building
JJ Thomson Avenue
Cambridge
CB3 0FD

Phone: +44-(0) 1223 767032
Email: cr409@cl.cam.ac.uk


From anil@recoil.org Fri Aug 19 13:33:18 2011
Received: from ppsw-52.csi.cam.ac.uk ([131.111.8.152])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuOGE-0006Bc-BM (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 19 Aug 2011 13:33:18 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159091 
	* -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]:22935
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp (csa=unknown) id 1QuOGD-0006jV-EP (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Fri, 19 Aug 2011 13:33:18 +0100
Received: (qmail 18622 invoked by uid 634); 19 Aug 2011 12:33:17 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from freak-0.srg.cl.cam.ac.uk (HELO [192.168.2.3]) (128.232.32.220)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Fri, 19 Aug 2011 13:33:16 +0100
Subject: Re: ocamldoc generation and packed files
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <CALerif5Q=50Eq=TdkHoWKSve9TyvLn5mq52hJd=c6jeChDturw@mail.gmail.com>
Date: Fri, 19 Aug 2011 13:33:14 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <4C0C0220-8202-4021-B5C0-579F8C2C89B9@recoil.org>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
	<2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
	<37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
	<CALerif5Q=50Eq=TdkHoWKSve9TyvLn5mq52hJd=c6jeChDturw@mail.gmail.com>
To: Haris Rotsos <cr409@cl.cam.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
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>,
	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: Fri, 19 Aug 2011 12:33:18 -0000
X-Keywords:                  
X-UID: 57
Status: O
Content-Length: 8647
Lines: 242

The MLI files are actually quite often different from the =
implementation, as the interface can expose a more abstract view to =
other users.

For example:

foo.ml:

type t =3D int
let create () =3D 1
let add x =3D x + 1
let int_of_t x =3D x

foo.mli can provide a more abstract view that hides the internal =
implementation of t:

type t
val create: unit -> t
val add: t -> t
val int_of_t: t -> int

Now, users of Foo will never know that 'type t' is actually an integer =
internally, and have to go through the conversion function to make it =
into an integer.

In Mirage, there is a convenience target to generate a default inferred =
interface, via:

$ ocamlbuild foo.inferred.mli
$ cat _build/unix-direct/foo.inferred.mli

This can then be manually copied to the source directory to give a =
skeleton interface, and then edited to restrict the interface as =
desired. However, if you modify the implementation later on, you will =
need to manually update the .mli (as you are seeing).

MLI files are actually optional in normal OCaml, but are required in =
Mirage as a consequence of the build system we are using (the =
ocp-ocaml).  If an .mli file is not present, it is assumed to be blank =
(and thus, no interface will be exposed!). We could work around this, =
but it's good discipline to require an explicit interface file too...

Anil

On 19 Aug 2011, at 13:21, Haris Rotsos wrote:

> On a similar problem, is there a way using the makefile or the
> ocamlbuild command to regenerate the *.mli files? When I update a
> source file, I notice that the interface file is not updated leading
> to error in the compilation and I end up editing it by hand.
>=20
> On 19 August 2011 12:27, Thomas Gazagnaire =
<thomas.gazagnaire@gmail.com> wrote:
>> Well, actually it's seems quite easy to do, as the packed .annot file =
contains already the right location information. I can try to work out =
on a quick-and-dirty tool to fix your issue :-)
>>=20
>>=20
>> On Aug 19, 2011, at 1:21 PM, Thomas Gazagnaire wrote:
>>=20
>>> I don't have concrete available solution for the .annot files. The =
two I can see are :
>>>=20
>>> * releasing the .ml -> .annot part of the compiler as a stand-alone =
tool and use it to generate individual .annot files (I guess that's not =
very different from running ocamlc -annot on every file)
>>> * having a tool to split out a packed .annot file into individual =
.annot files. I guess it's not so difficult to do (just need to parse =
the directive lines in the packed source file + its annot file and do =
some comparison), but we don't have it yet.
>>>=20
>>> Thomas
>>>=20
>>> On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:
>>>=20
>>>> As a followup to this, I've integrated ocaml-ocp into my tree and =
it's working really well. Thanks for releasing this Thomas!  There was =
an off-by-one in the cpp directives for line numbering (fixed in our =
tree).
>>>>=20
>>>> It would be very useful to have some way for .annot files to work =
without compiling the individual sub-files; any thoughts on how this =
might work?
>>>>=20
>>>> Anil
>>>>=20
>>>> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>>>>=20
>>>>> Sure, go for it if you get a chance.
>>>>>=20
>>>>> The current packing "works", but the doc target cannot be built at =
the same time as the normal code (because it causes the source pack to =
leave .ml files in lib/std/foo.ml, which then causes the =
lib/std/foo.cm{xo} to be rebuilt instead of the -packed copied .cmx to =
be used).
>>>>>=20
>>>>> Basically, its a bit of a mess :-)
>>>>>=20
>>>>> As a sneak preview, check out =
http://github.com/avsm/mirage-browser.git (on index.html). This is a =
*very* rough jQuery-based module browser of the Mirage OCamldoc that I'd =
like to have live on the website before the CUFP tutorial.  The live =
search is pretty nice, and I'll flesh out the rendering over the next =
few days.
>>>>>=20
>>>>> This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).
>>>>>=20
>>>>> Killer feature: the js_of_ocaml interactive top-level should work =
in here... :-)
>>>>>=20
>>>>> Anil
>>>>>=20
>>>>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>>>>=20
>>>>>> No ocamlbuild integration yet but would be definitely useful to =
add. I
>>>>>> can have a look at integrating it to mirage build next week if =
it's
>>>>>> useful.
>>>>>>=20
>>>>>> --
>>>>>> Thomas
>>>>>>=20
>>>>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>> Thanks Thomas, that looks very useful and definitely better than =
the script in tree at the moment.
>>>>>>>=20
>>>>>>> One question: ocp-pack also requires that the list of files be =
passed in dependency order, or else the resulting pack file will not =
compile.  Have you tried to integrate it as an ocamlbuild rule, so that =
it can automatically sort the input modules before generates the packed =
file / functor?
>>>>>>>=20
>>>>>>> Anil
>>>>>>>=20
>>>>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>>>>=20
>>>>>>>> It will be anounced quite shortly on the ocaml mailing list, so =
I can
>>>>>>>> give you the link to ocp-pack :
>>>>>>>>=20
>>>>>>>> =
http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>>>>=20
>>>>>>>> It should help you to pack modules easily and have a working =
doc.
>>>>>>>>=20
>>>>>>>> --
>>>>>>>> Thomas
>>>>>>>>=20
>>>>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>>>>>>=20
>>>>>>>>> It would be quite nice to eventually have a single =
documentation output for all the backends, with an addition section =
saying 'only present in Xen' or 'only present in Node'. I think that =
should be possible by parsing the ocamldoc dump outputs, but something =
for the future!
>>>>>>>>>=20
>>>>>>>>> Anil
>>>>>>>>>=20
>>>>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>>>>=20
>>>>>>>>>> We have as well a program which pack together ML files (and =
is able to functorize packs as well...) it is not released yet, but I =
guess we can open-source it shortly.
>>>>>>>>>>=20
>>>>>>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>>>>>>=20
>>>>>>>>>> Thomas
>>>>>>>>>>=20
>>>>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>>>>=20
>>>>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>>>>>>=20
>>>>>>>>>>> The big problem is that ocamldoc doesn't support packed =
modules, and we use packing quite extensively (in Net, Http, Block, =
etc).
>>>>>>>>>>>=20
>>>>>>>>>>> So I've hacked up an ocamlbuild target that concats together =
the *source* ML files from an .mlpack and uses that to generate the =
ocamldoc for the standard library, with one set of HTML files generated =
per backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>>>>=20
>>>>>>>>>>> The issue is that these rules are a little grim: everywhere =
where we have a .mlpack file at the moment, we need to override that =
rule to generate a concatenated ML file that is used for ocamldoc (but =
not for actual compilation, since line numbers get lost since those =
aren't preserved when converting from ML files into a single big one).
>>>>>>>>>>>=20
>>>>>>>>>>> Does anyone have a better solution for ocamldoc and packed =
files? All of the grimness here is hidden away in the ocamlbuild rules, =
so I'm inclined to just commit this patch, and perhaps see about adding =
-pack support into ocamldoc at a later stage (there's an open bug in =
Mantis somewhere).
>>>>>>>>>>>=20
>>>>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>>>>>>=20
>>>>>>>>>>> -anil
>>>>>>>>>>=20
>>>>>>>>>=20
>>>>>>>>>=20
>>>>>>>>=20
>>>>>>>=20
>>>>>>>=20
>>>>>>=20
>>>>>=20
>>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>>=20
>=20
>=20
>=20
> --=20
> Charalampos Rotsos
> PhD student
> The University of Cambridge
> Computer Laboratory
> William Gates Building
> JJ Thomson Avenue
> Cambridge
> CB3 0FD
>=20
> Phone: +44-(0) 1223 767032
> Email: cr409@cl.cam.ac.uk
>=20



From thomas.gazagnaire@gmail.com Fri Aug 19 13:49:58 2011
Received: from ppsw-51.csi.cam.ac.uk ([131.111.8.151])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuOWM-0006XQ-Qa (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 19 Aug 2011 13:49:58 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -2.7 from SpamAssassin-3.3.2-1159091 
	* -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.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]:49776)
	by ppsw-51.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.148]:25)
	with esmtp (csa=unknown) id 1QuOWL-0006ZH-Z4 (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <thomas.gazagnaire@gmail.com>);
	Fri, 19 Aug 2011 13:49:58 +0100
Received: by wwi18 with SMTP id 18so2270005wwi.20
	for <cl-mirage@lists.cam.ac.uk>; Fri, 19 Aug 2011 05:49:57 -0700 (PDT)
Received: by 10.227.196.196 with SMTP id eh4mr1700080wbb.23.1313758197371;
	Fri, 19 Aug 2011 05:49:57 -0700 (PDT)
Received: from [192.168.0.10] (gou06-3-88-170-165-56.fbx.proxad.net
	[88.170.165.56])
	by mx.google.com with ESMTPS id et16sm2558967wbb.36.2011.08.19.05.49.53
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 19 Aug 2011 05:49:55 -0700 (PDT)
Subject: Re: ocamldoc generation and packed files
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: <F1D5A2FB-991F-496C-AF59-B41AD7C3E3B2@recoil.org>
Date: Fri, 19 Aug 2011 14:49:51 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <F4F7BE90-1471-431A-8E4F-08EFF42C7183@gmail.com>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
	<2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
	<37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
	<F1D5A2FB-991F-496C-AF59-B41AD7C3E3B2@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: Fri, 19 Aug 2011 12:49:58 -0000
X-Keywords:                  
X-UID: 58
Status: O
Content-Length: 7640
Lines: 202

> Oh, if it's easy that would be pretty useful!  I could also modify =
ocaml-annot to handle the packed versions (I need to hack it to =
understand _build directories anyway at some point).

here you are (very dirty) :

http://www.ocamlpro.com/test/files/ocp-pack-1.0.1.tar.gz

ocp-split seems to work fine with my limited testing ...

> I'd quite like to have a 'blessed' vim and emacs bundle that works =
with Mirage+extensions by the time the tutorial comes around, as right =
now dealing with the syntax extensions is quite problematic.  I think =
between us we have a reasonable mix of vim/emacs users (Raphael and I =
use vim, and Balraj and you use emacs at least!).

I guess the best thing would be to create some custom rules in =
myocamlbuild to move back the .annot files in the source directories. =
There is some -prefix option that you can pass to ocp-split to do that =
kind of thing.

--
Thomas

>=20
> Anil
>=20
> On 19 Aug 2011, at 12:27, Thomas Gazagnaire wrote:
>=20
>> Well, actually it's seems quite easy to do, as the packed .annot file =
contains already the right location information. I can try to work out =
on a quick-and-dirty tool to fix your issue :-)
>>=20
>>=20
>> On Aug 19, 2011, at 1:21 PM, Thomas Gazagnaire wrote:
>>=20
>>> I don't have concrete available solution for the .annot files. The =
two I can see are :
>>>=20
>>> * releasing the .ml -> .annot part of the compiler as a stand-alone =
tool and use it to generate individual .annot files (I guess that's not =
very different from running ocamlc -annot on every file)
>>> * having a tool to split out a packed .annot file into individual =
.annot files. I guess it's not so difficult to do (just need to parse =
the directive lines in the packed source file + its annot file and do =
some comparison), but we don't have it yet.
>>>=20
>>> Thomas
>>>=20
>>> On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:
>>>=20
>>>> As a followup to this, I've integrated ocaml-ocp into my tree and =
it's working really well. Thanks for releasing this Thomas!  There was =
an off-by-one in the cpp directives for line numbering (fixed in our =
tree).
>>>>=20
>>>> It would be very useful to have some way for .annot files to work =
without compiling the individual sub-files; any thoughts on how this =
might work?
>>>>=20
>>>> Anil
>>>>=20
>>>> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>>>>=20
>>>>> Sure, go for it if you get a chance.
>>>>>=20
>>>>> The current packing "works", but the doc target cannot be built at =
the same time as the normal code (because it causes the source pack to =
leave .ml files in lib/std/foo.ml, which then causes the =
lib/std/foo.cm{xo} to be rebuilt instead of the -packed copied .cmx to =
be used).
>>>>>=20
>>>>> Basically, its a bit of a mess :-)
>>>>>=20
>>>>> As a sneak preview, check out =
http://github.com/avsm/mirage-browser.git (on index.html). This is a =
*very* rough jQuery-based module browser of the Mirage OCamldoc that I'd =
like to have live on the website before the CUFP tutorial.  The live =
search is pretty nice, and I'll flesh out the rendering over the next =
few days.
>>>>>=20
>>>>> This tool is also quite standalone as it uses the output of =
odoc_json/ocamldoc, and so could be applied to the standard distribution =
and also to the Citrix xapi-libs (if you're interested, David).=20
>>>>>=20
>>>>> Killer feature: the js_of_ocaml interactive top-level should work =
in here... :-)
>>>>>=20
>>>>> Anil
>>>>>=20
>>>>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>>>>=20
>>>>>> No ocamlbuild integration yet but would be definitely useful to =
add. I
>>>>>> can have a look at integrating it to mirage build next week if =
it's
>>>>>> useful.
>>>>>>=20
>>>>>> --
>>>>>> Thomas
>>>>>>=20
>>>>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>> Thanks Thomas, that looks very useful and definitely better than =
the script in tree at the moment.
>>>>>>>=20
>>>>>>> One question: ocp-pack also requires that the list of files be =
passed in dependency order, or else the resulting pack file will not =
compile.  Have you tried to integrate it as an ocamlbuild rule, so that =
it can automatically sort the input modules before generates the packed =
file / functor?
>>>>>>>=20
>>>>>>> Anil
>>>>>>>=20
>>>>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>>>>=20
>>>>>>>> It will be anounced quite shortly on the ocaml mailing list, so =
I can
>>>>>>>> give you the link to ocp-pack :
>>>>>>>>=20
>>>>>>>> =
http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>>>>=20
>>>>>>>> It should help you to pack modules easily and have a working =
doc.
>>>>>>>>=20
>>>>>>>> --
>>>>>>>> Thomas
>>>>>>>>=20
>>>>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>>>> That tool will be very useful! I've committed the 'make doc' =
target. The output is still pretty dirty as we don't use the =
documentation tags properly, but I'll go through adding .mli files and =
adding proper documentation on the more stable interfaces.
>>>>>>>>>=20
>>>>>>>>> It would be quite nice to eventually have a single =
documentation output for all the backends, with an addition section =
saying 'only present in Xen' or 'only present in Node'. I think that =
should be possible by parsing the ocamldoc dump outputs, but something =
for the future!
>>>>>>>>>=20
>>>>>>>>> Anil
>>>>>>>>>=20
>>>>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>>>>=20
>>>>>>>>>> We have as well a program which pack together ML files (and =
is able to functorize packs as well...) it is not released yet, but I =
guess we can open-source it shortly.
>>>>>>>>>>=20
>>>>>>>>>> But I think overriding the default rule for ocamldoc+pack in =
ocamlbuild is sufficient for now on so you should push your patch :-)
>>>>>>>>>>=20
>>>>>>>>>> Thomas
>>>>>>>>>>=20
>>>>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>>>>=20
>>>>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the =
various libraries so that it's easier to learn Mirage (and support =
editor auto-completion, etc).
>>>>>>>>>>>=20
>>>>>>>>>>> The big problem is that ocamldoc doesn't support packed =
modules, and we use packing quite extensively (in Net, Http, Block, =
etc).
>>>>>>>>>>>=20
>>>>>>>>>>> So I've hacked up an ocamlbuild target that concats together =
the *source* ML files from an .mlpack and uses that to generate the =
ocamldoc for the standard library, with one set of HTML files generated =
per backend (Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>>>>=20
>>>>>>>>>>> The issue is that these rules are a little grim: everywhere =
where we have a .mlpack file at the moment, we need to override that =
rule to generate a concatenated ML file that is used for ocamldoc (but =
not for actual compilation, since line numbers get lost since those =
aren't preserved when converting from ML files into a single big one).
>>>>>>>>>>>=20
>>>>>>>>>>> Does anyone have a better solution for ocamldoc and packed =
files? All of the grimness here is hidden away in the ocamlbuild rules, =
so I'm inclined to just commit this patch, and perhaps see about adding =
-pack support into ocamldoc at a later stage (there's an open bug in =
Mantis somewhere).
>>>>>>>>>>>=20
>>>>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if =
everyone else (like Core) also have their own swanky 'cat ML files into =
one' script too...
>>>>>>>>>>>=20
>>>>>>>>>>> -anil
>>>>>>>>>>=20
>>>>>>>>>=20
>>>>>>>>>=20
>>>>>>>>=20
>>>>>>>=20
>>>>>>>=20
>>>>>>=20
>>>>>=20
>>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>=20



From Richard.Mortier@nottingham.ac.uk Fri Aug 19 19:16:06 2011
Received: from ppsw-50.csi.cam.ac.uk ([131.111.8.150])
	by lists-1.csi.cam.ac.uk (lists.cam.ac.uk [131.111.8.15]:25)
	with esmtp id 1QuTby-0004fm-Ox (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Fri, 19 Aug 2011 19:16:06 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1159091 
	* -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]:45138
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp (csa=unknown) id 1QuTbs-0007MN-qf (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Fri, 19 Aug 2011 19:16:06 +0100
Received: from smtp2.nottingham.ac.uk ([128.243.44.5])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.3.54) vanilla
	id 1945648860 for cl-mirage@lists.cam.ac.uk; a0d39baf86cff4c7;
	Fri, 19 Aug 2011 19:15:40 +0100
Received: from suismtp2.ad.nottingham.ac.uk ([128.243.42.11])
	by smtp2.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QuTbY-0007F2-0d
	for cl-mirage@lists.cam.ac.uk; Fri, 19 Aug 2011 19:15:40 +0100
Received: from UIWEXHUB02.ad.nottingham.ac.uk ([128.243.15.132]) by
	SUISMTP2.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Fri, 19 Aug 2011 19:16:05 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB02.ad.nottingham.ac.uk ([2002:80f3:f84::80f3:f84]) with mapi;
	Fri, 19 Aug 2011 19:16:05 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: Anil Madhavapeddy <anil@recoil.org>
Date: Fri, 19 Aug 2011 19:15:10 +0100
Subject: Re: ocamldoc generation and packed files
Thread-Topic: ocamldoc generation and packed files
Thread-Index: AcxenA725IClcfzbR+y40qw9hBAhYQ==
Message-ID: <CAE703D2-A816-4296-AEBE-7F78EE75864A@nottingham.ac.uk>
References: <0296729D-1BEC-40D2-B491-F7098A07FEB4@recoil.org>
	<29701FD7-6824-40F1-8244-5D2A06F827B2@gmail.com>
	<977F1FF7-4400-415E-9A00-C69715488676@recoil.org>
	<CAK==wUzLbFZSJsPX5cLpRgXM1d=YQDW1_vbWQwr7b9ZLRLXBvw@mail.gmail.com>
	<6FD1989D-648A-48E0-8BB6-B1E954C608B8@recoil.org>
	<CAK==wUyDsbi42SxeDvvTzBiJueiLXmWgAO5cT5XC=udPGNN4XQ@mail.gmail.com>
	<B5BB67D1-EA90-4348-AF85-41CE9D15085C@recoil.org>
	<AC2045E1-E558-413A-AED1-E0C8B5626F97@recoil.org>
	<2557E160-3A71-4910-8A67-F2D311DC8873@gmail.com>
	<37C2E389-91A8-45A3-8A6E-41518F0E30CE@gmail.com>
	<F1D5A2FB-991F-496C-AF59-B41AD7C3E3B2@recoil.org>
In-Reply-To: <F1D5A2FB-991F-496C-AF59-B41AD7C3E3B2@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
X-OriginalArrivalTime: 19 Aug 2011 18:16:05.0299 (UTC)
	FILETIME=[0F638030:01CC5E9C]
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: Fri, 19 Aug 2011 18:16:06 -0000
X-Keywords:                  
X-UID: 59
Status: O
Content-Length: 8251
Lines: 201

fwiw i did a tweak or to to tuareg-mode so the syntax highlighting supports=
 lwt to some extent.  agree good to gather all this together.

On 19 Aug 2011, at 08:20, Anil Madhavapeddy wrote:

> Oh, if it's easy that would be pretty useful!  I could also modify ocaml-=
annot to handle the packed versions (I need to hack it to understand _build=
 directories anyway at some point).
>=20
> I'd quite like to have a 'blessed' vim and emacs bundle that works with M=
irage+extensions by the time the tutorial comes around, as right now dealin=
g with the syntax extensions is quite problematic.  I think between us we h=
ave a reasonable mix of vim/emacs users (Raphael and I use vim, and Balraj =
and you use emacs at least!).
>=20
> Anil
>=20
> On 19 Aug 2011, at 12:27, Thomas Gazagnaire wrote:
>=20
>> Well, actually it's seems quite easy to do, as the packed .annot file co=
ntains already the right location information. I can try to work out on a q=
uick-and-dirty tool to fix your issue :-)
>>=20
>>=20
>> On Aug 19, 2011, at 1:21 PM, Thomas Gazagnaire wrote:
>>=20
>>> I don't have concrete available solution for the .annot files. The two =
I can see are :
>>>=20
>>> * releasing the .ml -> .annot part of the compiler as a stand-alone too=
l and use it to generate individual .annot files (I guess that's not very d=
ifferent from running ocamlc -annot on every file)
>>> * having a tool to split out a packed .annot file into individual .anno=
t files. I guess it's not so difficult to do (just need to parse the direct=
ive lines in the packed source file + its annot file and do some comparison=
), but we don't have it yet.
>>>=20
>>> Thomas
>>>=20
>>> On Aug 19, 2011, at 11:58 AM, Anil Madhavapeddy wrote:
>>>=20
>>>> As a followup to this, I've integrated ocaml-ocp into my tree and it's=
 working really well. Thanks for releasing this Thomas!  There was an off-b=
y-one in the cpp directives for line numbering (fixed in our tree).
>>>>=20
>>>> It would be very useful to have some way for .annot files to work with=
out compiling the individual sub-files; any thoughts on how this might work=
?
>>>>=20
>>>> Anil
>>>>=20
>>>> On 13 Aug 2011, at 20:39, Anil Madhavapeddy wrote:
>>>>=20
>>>>> Sure, go for it if you get a chance.
>>>>>=20
>>>>> The current packing "works", but the doc target cannot be built at th=
e same time as the normal code (because it causes the source pack to leave =
.ml files in lib/std/foo.ml, which then causes the lib/std/foo.cm{xo} to be=
 rebuilt instead of the -packed copied .cmx to be used).
>>>>>=20
>>>>> Basically, its a bit of a mess :-)
>>>>>=20
>>>>> As a sneak preview, check out http://github.com/avsm/mirage-browser.g=
it (on index.html). This is a *very* rough jQuery-based module browser of t=
he Mirage OCamldoc that I'd like to have live on the website before the CUF=
P tutorial.  The live search is pretty nice, and I'll flesh out the renderi=
ng over the next few days.
>>>>>=20
>>>>> This tool is also quite standalone as it uses the output of odoc_json=
/ocamldoc, and so could be applied to the standard distribution and also to=
 the Citrix xapi-libs (if you're interested, David).=20
>>>>>=20
>>>>> Killer feature: the js_of_ocaml interactive top-level should work in =
here... :-)
>>>>>=20
>>>>> Anil
>>>>>=20
>>>>> On 13 Aug 2011, at 17:50, Thomas Gazagnaire wrote:
>>>>>=20
>>>>>> No ocamlbuild integration yet but would be definitely useful to add.=
 I
>>>>>> can have a look at integrating it to mirage build next week if it's
>>>>>> useful.
>>>>>>=20
>>>>>> --
>>>>>> Thomas
>>>>>>=20
>>>>>> 2011/8/13 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>> Thanks Thomas, that looks very useful and definitely better than th=
e script in tree at the moment.
>>>>>>>=20
>>>>>>> One question: ocp-pack also requires that the list of files be pass=
ed in dependency order, or else the resulting pack file will not compile.  =
Have you tried to integrate it as an ocamlbuild rule, so that it can automa=
tically sort the input modules before generates the packed file / functor?
>>>>>>>=20
>>>>>>> Anil
>>>>>>>=20
>>>>>>> On 12 Aug 2011, at 20:01, Thomas Gazagnaire wrote:
>>>>>>>=20
>>>>>>>> It will be anounced quite shortly on the ocaml mailing list, so I =
can
>>>>>>>> give you the link to ocp-pack :
>>>>>>>>=20
>>>>>>>> http://www.ocamlpro.com/code/2011-08-10-ocaml-pack-functors.html
>>>>>>>> http://www.ocamlpro.com/files/ocp-pack-1.0.0.tar.gz
>>>>>>>>=20
>>>>>>>> It should help you to pack modules easily and have a working doc.
>>>>>>>>=20
>>>>>>>> --
>>>>>>>> Thomas
>>>>>>>>=20
>>>>>>>> 2011/7/28 Anil Madhavapeddy <anil@recoil.org>:
>>>>>>>>> That tool will be very useful! I've committed the 'make doc' targ=
et. The output is still pretty dirty as we don't use the documentation tags=
 properly, but I'll go through adding .mli files and adding proper document=
ation on the more stable interfaces.
>>>>>>>>>=20
>>>>>>>>> It would be quite nice to eventually have a single documentation =
output for all the backends, with an addition section saying 'only present =
in Xen' or 'only present in Node'. I think that should be possible by parsi=
ng the ocamldoc dump outputs, but something for the future!
>>>>>>>>>=20
>>>>>>>>> Anil
>>>>>>>>>=20
>>>>>>>>> On 27 Jul 2011, at 16:56, Thomas Gazagnaire wrote:
>>>>>>>>>=20
>>>>>>>>>> We have as well a program which pack together ML files (and is a=
ble to functorize packs as well...) it is not released yet, but I guess we =
can open-source it shortly.
>>>>>>>>>>=20
>>>>>>>>>> But I think overriding the default rule for ocamldoc+pack in oca=
mlbuild is sufficient for now on so you should push your patch :-)
>>>>>>>>>>=20
>>>>>>>>>> Thomas
>>>>>>>>>>=20
>>>>>>>>>> On Jul 27, 2011, at 5:36 PM, Anil Madhavapeddy wrote:
>>>>>>>>>>=20
>>>>>>>>>>> I'd really like to generate ocamldoc (HTML/PDF) of all the vari=
ous libraries so that it's easier to learn Mirage (and support editor auto-=
completion, etc).
>>>>>>>>>>>=20
>>>>>>>>>>> The big problem is that ocamldoc doesn't support packed modules=
, and we use packing quite extensively (in Net, Http, Block, etc).
>>>>>>>>>>>=20
>>>>>>>>>>> So I've hacked up an ocamlbuild target that concats together th=
e *source* ML files from an .mlpack and uses that to generate the ocamldoc =
for the standard library, with one set of HTML files generated per backend =
(Xen, Net-Direct, Net-Socket, and so on).
>>>>>>>>>>>=20
>>>>>>>>>>> The issue is that these rules are a little grim: everywhere whe=
re we have a .mlpack file at the moment, we need to override that rule to g=
enerate a concatenated ML file that is used for ocamldoc (but not for actua=
l compilation, since line numbers get lost since those aren't preserved whe=
n converting from ML files into a single big one).
>>>>>>>>>>>=20
>>>>>>>>>>> Does anyone have a better solution for ocamldoc and packed file=
s? All of the grimness here is hidden away in the ocamlbuild rules, so I'm =
inclined to just commit this patch, and perhaps see about adding -pack supp=
ort into ocamldoc at a later stage (there's an open bug in Mantis somewhere=
).
>>>>>>>>>>>=20
>>>>>>>>>>> Dave, do you use pack in XAPI, and/or ocamldoc?  I wonder if ev=
eryone else (like Core) also have their own swanky 'cat ML files into one' =
script too...
>>>>>>>>>>>=20
>>>>>>>>>>> -anil
>>>>>>>>>>=20
>>>>>>>>>=20
>>>>>>>>>=20
>>>>>>>>=20
>>>>>>>=20
>>>>>>>=20
>>>>>>=20
>>>>>=20
>>>>>=20
>>>>=20
>>>=20
>>=20
>>=20
>=20
>=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 Aug 25 10:03:39 2011
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 1QwVqd-0006Aw-N2 (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 25 Aug 2011 10:03:39 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1161015 
	* -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]:46589
	helo=ixe-mta-19.emailfiltering.com)
	by ppsw-50.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.147]:25)
	with esmtp (csa=unknown) id 1QwVqY-0003Bc-qp (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <Richard.Mortier@nottingham.ac.uk>);
	Thu, 25 Aug 2011 10:03:39 +0100
Received: from smtp1.nottingham.ac.uk ([128.243.44.4])
	by ixe-mta-19.emailfiltering.com with emfmta (version 4.8.3.54) vanilla
	id 1950435736 for cl-mirage@lists.cam.ac.uk; 52f2c426a8043f1e;
	Thu, 25 Aug 2011 10:03:14 +0100
Received: from suismtp1.ad.nottingham.ac.uk ([128.243.42.10])
	by smtp1.nottingham.ac.uk with esmtp (Exim 4.60)
	(envelope-from <Richard.Mortier@nottingham.ac.uk>)
	id 1QwVqE-0008Lx-0h
	for cl-mirage@lists.cam.ac.uk; Thu, 25 Aug 2011 10:03:14 +0100
Received: from UIWEXHUB01.ad.nottingham.ac.uk ([128.243.15.133]) by
	SUISMTP1.ad.nottingham.ac.uk with Microsoft SMTPSVC(6.0.3790.4675); 
	Thu, 25 Aug 2011 10:03:50 +0100
Received: from EXCHANGE1.ad.nottingham.ac.uk ([fe80::60c2:2879:5a5a:29a6]) by
	UIWEXHUB01.ad.nottingham.ac.uk ([2002:80f3:f85::80f3:f85]) with mapi;
	Thu, 25 Aug 2011 10:03:50 +0100
From: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Date: Thu, 25 Aug 2011 10:03:50 +0100
Subject: foo.inferred.mli and lazy typists
Thread-Topic: foo.inferred.mli and lazy typists
Thread-Index: AcxjBegKx9Qb/mMqRluOcJ0T+jfdDQ==
Message-ID: <BF4E0E43-FC22-4659-B1E9-D57B05C55427@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-OriginalArrivalTime: 25 Aug 2011 09:03:50.0659 (UTC)
	FILETIME=[E8152D30:01CC6305]
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, 25 Aug 2011 09:03:39 -0000
X-Keywords:                  
X-UID: 60
Status: O
Content-Length: 1531
Lines: 31

trying to regenerate a skeleton mli for a largeish module that i don't real=
ly want to have to type everything in for by hand.  aiui the best way to do=
 this is via the "ocamlbuild foo.inferred.mli" convenience target.

unfortunately this is a little less convenient than it might be - if the mo=
dule in question opens mirage related modules (Lwt, Bitstring) or uses synt=
ax extensions (certainly Bitstring, maybe more), the generation seems to fa=
il.

are there some other switches i should be passing on the command line, or i=
s there a better way of doing this?  at the moment i'm commenting out the b=
its that cause failure just to force a partial skeleton to be built, but th=
at really does feel kludgy :)
--=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 Aug 25 10:18:41 2011
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 1QwW5B-0006fL-Ov (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 25 Aug 2011 10:18:41 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1161015 
	* -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]:46347
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QwW5B-00075k-RE (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 25 Aug 2011 10:18:41 +0100
Received: (qmail 4093 invoked by uid 634); 25 Aug 2011 09:18:41 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from freak-0.srg.cl.cam.ac.uk (HELO [192.168.2.3]) (128.232.32.220)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 25 Aug 2011 10:18:41 +0100
Subject: Re: foo.inferred.mli and lazy typists
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <BF4E0E43-FC22-4659-B1E9-D57B05C55427@nottingham.ac.uk>
Date: Thu, 25 Aug 2011 10:18:42 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <112339C4-BF0C-469F-B625-8883EEE9C58B@recoil.org>
References: <BF4E0E43-FC22-4659-B1E9-D57B05C55427@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
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: Thu, 25 Aug 2011 09:18:41 -0000
X-Keywords:                  
X-UID: 61
Status: O
Content-Length: 999
Lines: 26

On 25 Aug 2011, at 10:03, Richard Mortier wrote:

> trying to regenerate a skeleton mli for a largeish module that i don't =
really want to have to type everything in for by hand.  aiui the best =
way to do this is via the "ocamlbuild foo.inferred.mli" convenience =
target.
>=20
> unfortunately this is a little less convenient than it might be - if =
the module in question opens mirage related modules (Lwt, Bitstring) or =
uses syntax extensions (certainly Bitstring, maybe more), the generation =
seems to fail.

How does it fail? It certainly shouldn't.  If you open modules, they =
will appear in full in the inferred interface, but you just delete that =
from the MLI.

>=20
> are there some other switches i should be passing on the command line, =
or is there a better way of doing this?  at the moment i'm commenting =
out the bits that cause failure just to force a partial skeleton to be =
built, but that really does feel kludgy :)

No idea without seeing the actual failure.

-anil=


From anil@recoil.org Thu Aug 25 12:50:53 2011
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 1QwYST-00040w-SD (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 25 Aug 2011 12:50:53 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1161015 
	* -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]:48914
	helo=dark.recoil.org)
	by ppsw-41.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.146]:25)
	with smtp (csa=unknown) id 1QwYST-0000mU-RB (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Thu, 25 Aug 2011 12:50:53 +0100
Received: (qmail 7351 invoked by uid 634); 25 Aug 2011 11:50:53 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from freak-0.srg.cl.cam.ac.uk (HELO [192.168.2.3]) (128.232.32.220)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Thu, 25 Aug 2011 12:50:52 +0100
Subject: Re: foo.inferred.mli and lazy typists
Mime-Version: 1.0 (Apple Message framework v1244.3)
Content-Type: text/plain; charset=us-ascii
From: Anil Madhavapeddy <anil@recoil.org>
In-Reply-To: <DE6CA8CC-7D2E-4759-80BB-338F5EA208AD@nottingham.ac.uk>
Date: Thu, 25 Aug 2011 12:50:52 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <B7C2A2EA-9F89-4CFF-B330-15B2003C60DB@recoil.org>
References: <BF4E0E43-FC22-4659-B1E9-D57B05C55427@nottingham.ac.uk>
	<112339C4-BF0C-469F-B625-8883EEE9C58B@recoil.org>
	<DE6CA8CC-7D2E-4759-80BB-338F5EA208AD@nottingham.ac.uk>
To: Richard Mortier <Richard.Mortier@nottingham.ac.uk>
X-Mailer: Apple Mail (2.1244.3)
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: Thu, 25 Aug 2011 11:50:53 -0000
X-Keywords:                  
X-UID: 62
Status: O
Content-Length: 1273
Lines: 37

On 25 Aug 2011, at 11:02, Richard Mortier wrote:

>=20
> On 25 Aug 2011, at 10:18, Anil Madhavapeddy wrote:
>> How does it fail? It certainly shouldn't.  If you open modules, they =
will appear in full in the inferred interface, but you just delete that =
from the MLI.
>=20
> : mort@greyjay:openflow$; pwd
> /Users/mort/research/mirage/src/mirage.git/lib/openflow
> : mort@greyjay:openflow$; ocamlbuild ofpacket.inferred.mli
> + /usr/local/bin/ocamlc.opt -i ofpacket.ml > ofpacket.inferred.mli
> File "ofpacket.ml", line 17, characters 0-8:
> Error: Unbound module Lwt
> Command exited with code 2.
>=20

Aha! You can only run ocamlbuild from the lib/ directory, and not =
subdirectories (since lib/myocamlbuild.ml has all the custom Mirage =
rules).

If I run your command line as:

$ cd mirage/lib
$ ocamlbuild openflow/ofpacket.inferred.mli
Finished, 0 targets (0 cached) in 00:00:00.
+ /usr/local/bin/ocamlc.opt -I openflow -I std -i -pp 'camlp4o -I =
../../../syntax/_build pa_lwt.cma pa_bitstring.cma ' =
openflow/ofpacket.ml > openflow/ofpacket.inferred.mli
File "openflow/ofpacket.ml", line 171, characters 4-14:
Warning 11: this match case is unused.
Finished, 22 targets (20 cached) in 00:00:02.

I've added this point to NOTES.md as it's not obvious...

Anil=


From anil@recoil.org Wed Aug 31 21:35:59 2011
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 1QyrVv-0003wG-AF (Exim 4.70) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 31 Aug 2011 21:35:59 +0100
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: score -1.9 from SpamAssassin-3.3.2-1162027 
	* -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]:24552
	helo=dark.recoil.org)
	by ppsw-52.csi.cam.ac.uk (mx.cam.ac.uk [131.111.8.149]:25)
	with smtp (csa=unknown) id 1QyrVu-0002ff-FZ (Exim 4.72) for
	cl-mirage@lists.cam.ac.uk
	(return-path <anil@recoil.org>); Wed, 31 Aug 2011 21:35:59 +0100
Received: (qmail 20014 invoked by uid 634); 31 Aug 2011 20:35:58 -0000
X-Spam-Level: *
X-Spam-Status: No, hits=-1.4 required=5.0
	tests=ALL_TRUSTED
X-Spam-Check-By: dark.recoil.org
Received: from cpc2-cmbg9-0-0-cust410.5-4.cable.virginmedia.com (HELO
	[192.168.1.102]) (82.16.101.155)
	(smtp-auth username remote@recoil.org, mechanism cram-md5)
	by dark.recoil.org (qpsmtpd/0.83) with ESMTPA;
	Wed, 31 Aug 2011 21:35:58 +0100
From: Anil Madhavapeddy <anil@recoil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: New build system
Date: Wed, 31 Aug 2011 21:35:55 +0100
Message-Id: <F7205B2F-65EB-455E-834D-8120AB5ACEEF@recoil.org>
To: "cl-mirage@lists.cam.ac.uk Mailing List" <cl-mirage@lists.cam.ac.uk>
Mime-Version: 1.0 (Apple Message framework v1244.3)
X-Mailer: Apple Mail (2.1244.3)
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: Wed, 31 Aug 2011 20:35:59 -0000
X-Keywords:                  
X-UID: 63
Status: O
Content-Length: 2138
Lines: 56

I've just pushed a number of changes to the way Mirage is built to my =
tree, as well as merged Mort/Haris' Openflow branches and David's Xen =
changes.

The most visible user-change is that you now build your domains via a =
single command "mir-build":

$ mir-build unix-direct/foo.bin # unix
$ mir-build xen/foo.xen         # xen kernel
$ mir-build node/foo.js         # node.js

Will build the relevant targets. There is also the start of a test =
harness that can automatically build and test domains across all the =
backends, using the 'mir-run' command. You can try this by:

$ cd regress
$ ocamlbuild -j 5 suite.run # run 5 parallel tests
$ cat _build/suite.run # show log of all the results

The suite file also contains the list of tests, and an individual test =
can be run by:

$ ocamlbuild lwt/heads2.exec
$ cat _build/lwt/heads2.exec # show the log of this test
$ ocamlbuild lwt/heads2.xen.exec # run just the xen version of this test

Another improvement is that you no longer need to specify a .mir file at =
all, as it is automatically inferred.  The hello world is now smaller. =
If you have hello.ml:

let main () =3D
  OS.Console.Log "hello!";
  Lwt.return ()

You can build it via 'mir-build unix-socket/hello.bin'

Note that you no longer need the "let _ =3D OS.Main.run (main())", as =
this is automatically inserted by the build system. You simply need a =
function called 'main' in the file. If you're entry point is another =
function, just specify it in a .mir file (e.g. "Hello.mymain").

This set of changes simplifies things considerably behind the scenes, =
and lets us have a really nice test harness that can even do performance =
testing quite easily.

There's another set of changes coming up very soon that adds support for =
first-class modules in the device system, and will make it very easy to =
virtualise Mirage instances (for example, to simulate large scale =
networks).  More on that later this week... I'll also upgrade the docs =
on the website.

Meanwhile, if anyone feels the urge to add more tests into regress/, =
please feel free to start sticking small unit tests in there :-)

Anil=


