[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] mirage-entropy



On 4 Jul 2014, at 00:43, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote:

> ...So we ended up simplifying the build system (no needs for complex build 
> rules anymore) but putting back the complexity in the functor language. And 
> functors slowly started to contaminate our code base 'cause now, every 
> library using a functor should also expose a functor.

to check: the "contamination" you refer to is simply the (moderate) extra 
syntactic complexity of making the developer have to deal with functors, or are 
there other implications?

> To tackle the difficulty of using functors, we had two strategies. The first 
> one was to develop, during last december, an EDSL to describe the composition 
> of functors[3], which was what we finally released in mirage 1.0. The second 
> one was to be a bit more structured about how we design new libraries. We 
> continue to use the linking trick for modules where there is clearly no way 
> to have two concurrent implementation running at the same time in the same 
> module. In the same time, we try to provide to the user, when possible, 
> default functor instantiation in separate ocamlfind package to make easier to 
> use the libraries. So most of the mirage libraries[4,5,...] are structured as 
> follows:
> - a core ocamlfind package, which consumes and provides a functor, which is 
> independent of the backend
> - a .lwt (should be called .unix really) ocamlfind subpackage, which applies 
> the functors to work with Lwt_unix functions
> - a .xen ocamlfind subpackage, which applies the functors to work with 
> mirage/xen

how does this fly with functorising across Lwt vs Async as done with cohttp 
iirc?  would that just mean that the .unix subpackage would have an extra 
module parameter supplying one or the other?

> ...
> Hope it helps clarifying things a little bit,

yes actually :)  this would make a useful blog post i think... (and perhaps 
content for a full-monty journal paper about mirage.)


-- 
Cheers,

R.




Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.