Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of June 20 to 27, 2006.

  1. The GHC hackathon: 14,15 September 2006, Portland
  2. Typing unmarshalling without marshalling types
  3. pa_monad 1.1
  4. Which development framework for web application in OCaml?
  5. Ocamldoc

The GHC hackathon: 14,15 September 2006, Portland

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/ced4579cc9203980/106988dbbb419c33#106988dbbb419c33

Simon Peyton-Jones announced:
After some encouragement at last year's ICFP, Simon and I are going to 
run a GHC hackathon, in Portland, just before ICFP this September 
(14-15th).  It'll be held at Galois's offices, in Beaverton; we're very 
grateful to Galois for hosting the meeting.  The details are here: 

        http://hackage.haskell.org/trac/ghc/wiki/Hackathon 

If you are interested in finding out a bit about how GHC works inside, 
then you should find the hackathon fun.  It will certainly be informal 
and interactive.   GHC is a 100% open-source project, and the more 
people that are involved the better it goes. 

If you think you might come, please take a look at the above page, and 
let us know by registering. 
      

Typing unmarshalling without marshalling types

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/6bfbd921c13ce5ca/d7b758e3d1c5574b#d7b758e3d1c5574b

Michel Mauny announced:
We are pleased to announce a patch for Objective Caml that provides 
type safe unmarshalling functions. In short, the main features are: 

  - a type for type representations ('a tyrepr, a singleton type) 

  - unmarshalling functions like the following: 

       SafeUnmarshal.from_string:  'a tyrepr -> string -> int -> 'a 

such that 

       SafeUnmarshal.from_string ty str off 

returns the value whose marshal is the string str (starting at offset 
off) and gives it the type (represented by) ty, if possible. If the 
value cannot be of type ty, the function fails. 

For instance, 

       SafeUnmarshal.from_string  [^ ( float *  int ) ^] str 0 

asks the (memory representation of the) unmarshalled value to be 
compatible with the type (float * int). 

  - there is no type information in the marshalled data: marshalling 
functions are not modified by this patch. 

  - classical (unsafe) unmarshalling functions are still available. 

The easiest way to obtained a patched version of OCaml is to download: 

  http://www.pps.jussieu.fr/~henry/marshal/src/make_source_tree.sh 

and to execute the following sequence: 

/make_source_tree.sh ocaml-ty && cd ocaml-ty && ./configure && make worl 
d && 
make -C otherlibs/safe_unmarshaling top 

The last command of the sequence runs the patched OCaml toplevel. 

More information at: 

  http://www.pps.jussieu.fr/~henry/marshal/ 

Have fun, 

-- Grégoire Henry and Michel Mauny
      

pa_monad 1.1

Jacques Carette announced:
As requested, pa_monad 1.1 now is integrated with findlib [thanks to Lydia], and Oleg's delimited continuations are included in the distribution (and compatible with the extension).

See http://www.cas.mcmaster.ca/~carette/pa_monad for full details.
      

Which development framework for web application in OCaml?

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/47e3244b5bd1c2d1/ed3e35a9815c49e2#ed3e35a9815c49e2

David MENTRE asked:
For my demexp server, I'm considering the development of a web 
interface, accessible from a simple web browser. I have standard 
requirements (html forms) as well as "advanced" ones (would like to 
support AJAX-like things, navigation in tree data structures, etc.). 
Which development frameworks are available to do such things in OCaml? 
I'm looking for frameworks under a license compatible with GNU GPL. 

Right now, I know about: 
 - WDialog 
 - XCaml 

For low level stuff (basic CGI interface), there is also OCamlNet. 

I've made some experiments with WDialog but I'm not entirely convinced 
by its approach of separating interface description from event 
handling code. Moreover it lacks some features that would be useful 
for us : i18n support (even if, thanks to Gerd, a preliminary code is 
available in CVS tree), advanced widgets (tree structures), AJAX 
support, etc. 

What other people are using to do web stuff? Is everybody using PHP? ;-) 

Any recommandation on building such complex web interface with 
available OCaml software? 

Best regards, 
david 

PS : My current demexp server is an autonomous Unix daemon, written in 
OCaml, accessible through ONC RPC calls over a TCP socket. Until know, 
I have made a simple CGI that access the demexp server. But I'm 
considering merging the server part with the web part. Has somebody 
some knowledge on the design of web architecture and recommendation or 
pointer to relevant litterature? 
      
Richard Jones said:
Don't forget mod_caml!  http://www.merjis.com/developers/mod_caml/ 
      
Till Varoquaux said and David MENTRE answered:
> Behold, here comes a rutheless attempt of self promotion.... 
> You could consider programming in cduce. It integrates really nicely 
> with caml and has an amazing typing system (using xml elements as 
> first class values). 
> There is an ongoing project (which I'm part of) to make a web 
> framework for cduce. You can check it out here: 
> http://reglisse.ens.fr/ecduce/ 
> We (me for the ecduce part, the cduce team for cduce) would be more 
> than happy to help you out. 

Thank you for the pointer, even if, right now, I have some issue to 
understand how an XML toolkit could help me design a dynamic web site. 
BTW, the ECDuce pages lack a little description on the aim of the project. 

> P.S. IMHO, although Cduce is a little rough around the edges, going 
> back to php afterwards is about as painfull as moving back from Caml 
> to C... 

I'm already using CDuce to read/write XML files in my server. So I'm 
suppose to already know it. ;-) 
> P.P.S as for the ajax and toolkit abstraction you might want to have a 
> look at openlaszlo http://www.openlaszlo.org/ . An integration with an 
> xml oriented should be quite easy to do... 

Well... I've looked at OpenLazlo and I'm quite skeptical on such a 
framework. Non-withstanding that OpenLazlo is aimed at Flash 
environment and that DHTML support is apparently still under 
development, I'm not really fond of technology targetting only 
Javascript-only web browser. I would like to develop my web site for 
both new and old browsers. Moreover, OpenLazlo servers are in Java, 
and using XML has a programming language seems a bit silly to me. 
Regarding my own (quite foggy) requirements, I would like to develop a 
web site using a efficient language that I like (OCaml), but without 
re-inventing the wheel, thus my search for an OCaml friendly web 
framework. Until now, I've found technologies for developing such a 
framework, but no real read-to-use framework (except maybe WDialog 
which lacks support beyond basic HTML) like those[1] that can be found 
for other languages (Java, PHP and Python). 

Best wishes, 
david 

[1] http://en.wikipedia.org/wiki/List_of_web_application_frameworks 
    http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks 
      

Ocamldoc

Archive: http://groups.google.com/group/fa.caml/browse_thread/thread/518b137f47a87366/3eac422bb209a288#3eac422bb209a288

Jonathan Bryant asked and Maxence Guesdon answered:
> Is there an XML generator for ocamldoc? 

Hello, 
I began one. Here is the DTD I plan to follow. I'm not a specialist of XML 
and DTDs, so comments are welcome. 
The code of the generator is not finished yet. 

(Attached file at the url above)
      

Using folding to read the cwn in vim 6+

Here is a quick trick to help you read this CWN if you are viewing it using vim (version 6 or greater).

:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'^=\\{78}$'?'<1':1
zM

If you know of a better way, please let me know.


Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.


Alan Schmitt