On Tue, Jul 27, 2010 at 3:22 PM, <[email protected]> wrote: > Are you trying to the same thing as HOP [1] ?
I haven't looked at HOP yet, but I heard a lot and will probably try to read about it in the future. > > What kind of restrictions do you impose on the expressions you can > transfer from the server to the client (only non-functional values) ? How > do you ensure them in your program ? We try to minimize restriction by providing users a way to define their own [un]wrappers for exotic values. Such a value is (1) wrapped, (2) marshalled, (3) sent to the client, (4) unmarshalled and (5) unwrapped. It is not possible to send a value that has no associated wrapper (but their a basic wrapper for generic values). The "weirder" type we currently support is probably ['a React.E.t][1]. Types are currently checked (and inferred) via the wrap and unwrap function. > > Are you sure splitting the code into two parts is sufficient ? How will > you handle branching than you can decide only at runtime, as example ? HOP > is using a javascrip compiler embedded in a library to compile efficiently > the right client code at runtime. The client code is obtained with js_of_ocaml[2], an ocaml byte-code to Javascript compiler. Code is compiled statically. Branching is handled by the client at runtime. > > Btw, would be glad to have more details on what you have done and plan to > do as I am working on similar things (not very actively currently) : I've > been trying to make camloo, a caml-light to bigloo compiler, working > again (current version[2] is quite working - still few things to finish). > At one point, the goal would be to extand the source language with similar > constructs than yours and to compile to HOP ... [1] http://erratique.ch/software/react/doc/React [2] http://ocsigen.org/js_of_ocaml -- _______ Raphael _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
