January 26, 2008 § Leave a comment
La communauté OCaml vient de gagner un lieu de discussion pour les recommandations sur la standardisation.
Pour ceux qui sont intéressés, rendez-vous sur le wiki de l’Alliance OCaml.
Des projets sont aussi en train de se mettre en place pour un prochain Summer of Code. Si vous avez des sujets à suggérer, rendez-vous sur la page correspondante.
Pour ceux qui veulent les détails, voici la transcription partielle de la journée :
Is anyone transcribing already ?
Xavier Leroy (XL) is currently describing OCaml 3.10.
XL: (stuff from the release notes)
XL: a second bugfix release scheduled soon.
XL: Work on Ocaml 3.11 (scheduled Q3 2008)
XL: dynamic loading of native code, performance improvements on thread synch.
XL: discussed: small extension of coercions, private type abbreviations.
XL: possible port to iPhone.
* Yoric[DT] hopes somebody is reading or saving logs.
<Yoric[DT]> XL: iPhone hacks have started.
XL: status of the Caml Consortium.
XL: in 2007, from 4 to 7 members.
<asmanur> i am :p
<Yoric[DT]> XL: the consortium sells permissive licensing conditions on the OCaml code base, enables lightweight corporate sponsoring + good place to discuss industrial needs.
XL: the consortium *does not* bring enough funds to pay fr a full-time developer, or anything else.
XL: Challenge 1 = Manpower.
XL: Currently, there’s about 0.5 person working full-time.
XL: Everybody has full-time cutting-edge research projects.
XL: What can the community do about it ?
XL: Firstly, avoir unreasonable demands.
XL: Plus testing, contribute to the Windows port, take over construction and distribution of binary releases for Windows and MacOS.
XL: Plus bug reports.
XL: Plus organize initiatives.
XL: Plus apply as Ingénieur de Recherche in INRIA.
XL: 2 permanent positions.
XL: Challenge 2 = Core vs. the rest.
XL: The .tar.gz from Inria does not include everything.
XL: Everything they include must be copyright INRIA, ends up being maintained by INRIA forever and slows down the release cycles.
XL: Actually, the INRIA distribution should be even smaller.
XL: What can the community do about it ?
XL: Draw some inspiration from Linux, CPAN, etc. : organize distributions.
XL: Things such as GODI, Debian OCaml package.
XL: Try and converge towards a single distribution effort in the style of CPAN, even if it ends up less sophisticated than the above.
XL: Challenge 3 = Backward compatibility.
XL: Incompatible changes don’t go down well with users.
XL: Unfortunately, it prevents incremental fixing of past design errors.
XL: Not much the community can do about that.
XL: Now, on to technical challenges.
XL: Challenge 4 = More type system features.
XL: Many things could be added to the type system.
XL: For instance, GADT (Generalized Algebraic Data Types).
type ‘a ty =
| Int constraint ‘a = int
| Pair of ‘b ty * ‘c ty constraint ‘a = ‘b * ‘c
let rec print : forall ‘a. ‘a ty -> ‘a -> unit =
fun t x -> match t with
| Int -> print_int x
| Pair(t1, t2) -> print t1 (fst x); print t2 (snd x)
XL: Essentially, you know that if t is an Int, ‘a is int and if t is Pair, ‘a is ‘*b * ‘c .
XL: The theory is mostly done, including inference.
XL: But is it worth the trouble ?
<cygnus_> where is he chatting
<Yoric[DT]> XL: The current type inference engine is reaching its limits (design limitations, too many incremental extensions piled on top of one another, plus its implementation is excessively imperative)
cygnus_: École Nationale Supérieure des Télécommunications, Paris.
<cygnus_> oh he’s talkin in real life ?
and you are typing it
<Yoric[DT]> XL: Essentially, this means that the inference engine will need to be reimplemented from scratch based on more modern, constraint-based systems.
–> l_a_m (email@example.com) has joined #ocaml
<Yoric[DT]> XL: Challenge 5 = Parallelism.
XL: we (the CS community) ‘re moving towards more cores, distributed memory, plus clusters.
XL: What’s a good programming model for parallelism ?
XL: Worst -> best
XL: 1) Shared memory, locks, condition variables (e.g. Java, current OCaml). Pretty awful.
XL: 2) Same thing with static type-checking of locking (no implementation, based on e.g. Abadi & Flanagan). Safer but still awful.
XL: 3) STM (à la Haskell) : database-like transactions behaving atomically, except the compiler is doing the actual work. Much more agreeable for programmers but quite imperative.
XL: 4) Message passing (à la Erlang or JoCaml).
XL: No obvious winner.
XL: Now, what should be done about the run-time system for all this ?
XL: Simplest -> Most complex.
XL: 1) No shared heap, IPC (done in Zheng Li’s coThreads, no change to the run-time).
XL: 2) No shared heap, IPC when necessary, local communications when needed (about 1/3 of the run-time must be rewritten to remove global-state stuff).
XL: 3) Shared heap with concurrent GC (about 2/3 of the run-time must be rewritten, very hard algorithmic issues with weakly consistent memory models, no solution yet).
XL: What about encapsulation of effects ?
XL: For clean semantics for parallel computations, one needs to statically control or eliminate entirely shared mutable data structures.
XL: Two threads can race for access to a reference.
XL: In any approach, encapsulation is needed.
XL: That’s quite different from today’s OCaml.
XL: Answering questions wrt licensing issues.
<tsuyoshi> so are they actively working on a new type inferer?
<Yoric[DT]> XL: If you have problems with our licenses, the best solution is probably to become a member of the consortium.
XL: Answering question wrt concurrency.
XL: “I personally prefer message passing.”
tsuyoshi: I’ll ask.
<Yoric[DT]> XL: No.
XL: At some point it’ll be needed, but it’s not started.
[ sidenote: although he does seem to know who would work on that if necessary. ]
Question: How many parallel APIs can coexist in a system ? There’s already Camlp3l, MPI, JoCaml…
XL: Er… I’m not sure.
<tsuyoshi> I have been struggling to add support for relational algebra to the compiler.. if the type system was more flexible it would be easier
<Yoric[DT]> XL: If you have any kind of message passing, you can probably implement Camlp3l easily on top of it.
XL: Join Patterns on top of simple message passing would be hard.
<tsuyoshi> so it’s good to hear that they’re think,nthinking about it, at least
<Yoric[DT]> tsuyoshi: do you want me to say that ?
<tsuyoshi> yoric: if you think he’d be interested in that
<Yoric[DT]> Well, I repeated what you say and there was no real answer.
Question: what about type-safe message passing ?
XL: As long as it’s one program, that’s easy.
XL: What is more subtle is if you have separately compiled programs.
XL: There have been several proposals, in GCaml, another one very closed [I didn’t get the name], yet another one [mumbled name].
XL: I think it is possible, we could already have this.
XL: I’m kind of waiting for one specific approach to emerge.
XL: The community could help with agreeing on one specific approach out of these three.
(end of talk)
Vincent Balat (VB) is now talking about the Ocsigen.
<flux> yoric[dt], thanks for the effort, btw
<Yoric[DT]> VB: Ocsigen = OCaml [web] Site Generator, research project of PPS (Guy Cousnieau, Pierre-Louis Curien, Jérôme Vouillon, Roerto Di Cosmo…)
VB: You may not know them because they’re not in the OCaml mailing-list, but some of them are the original authors of Caml.
VB: The lab is working on relations between proofs and programs.
<cygnus_> why are they not on the ml then
<Yoric[DT]> VB: A number of web programming projects in OCaml.
VB: OCamlnet, mod_caml (apache module for writing website with OCaml => Cocanwiki), WDialog, ASXCaml (?)…
VB: What’s the difference between Ocsigen and these projects ?
VB: It’s not another web programming tool in OCaml, it’s a research project, we’re attempting to find new programming techniques for the web.
VB: Two projects Ocsigen (OCaml-specific) and WebSiCoLa (mostly language independent).
VB: The main idea is continuation-based web programming.
VB: Other related projects (Seaside, Links, Hop, Wash, PLT Scheme) and that’s about it.
VB: Quite few wrt other web programming tools.
VB: Trying to build an open-source community around the project.
–> Mr_Awesome (firstname.lastname@example.org) has joined #ocaml
<Yoric[DT]> VB: [Demo of Nurpawiki written with the currently released Ocsigen tools]
VB: [Demo of the Lambdium-light CMS written with the currently released Ocsigen tools]
VB: Ocsigen 1.0 (scheduled within a few weeks) = full-featured, extensible web-server, a module called Elium (continuation-based web programming), libraries (Ocsimore).
>flux< My pleasure.
<Yoric[DT]> VB: The server implements http, extension mechanism, static pages, access control, data compression, CGI just in case, reverse proxy and of course Elium.
VB: It’s built on cooperative multi-threading (itself written with LWT, threads in monadic style) + some preemptive threads for non-cooperative libraries.
VB: Cooperative MT = only one thread of execution, never use blocking functions, go back to another continuation instead.
let r = request() in parse_answer r ====> requesr () >>= fun r -> parse_answer r
VB: We will release LWT for people who want to use it — we actually encourage people to use it, it’s quite functional-programming friendly.
VB: You’re all actual OCaml developers, I can show you some code.
VB: Let’s try and develop a forum.
VB: Static checking of HTML.
VB: Module Text => untyped pages.
VB: Module Xhtml => Type checking with polymorphic variants.
VB: Module OcamlDuce => Type checking with OCamlDuce (XHTML, XML).
[Currently on display some source code]
[First example uses a syntax extension to write nearly inline HTML. The type checker uses polymorphic variants to find errors.]
VB: Other output modules.
<asmanur> Yoric[DT]: can’t you ask for the code or something ? it would be interesting
<Yoric[DT]> asmanur: I’ll try.
<Yoric[DT]> [Second example uses usual OCaml syntax]
VB: For general XML, use OcamlDuce.
VB: The paradigm is that clicking on a link or sending stuff with a form is calling a function.
VB: We’re calling these functions “services”.
let mainpage = new_service ~path:[“stuff”] ~get_params:unit ()
let () = register mainpage (fun sp () () ->
Mylib.create_page sp “Messages” [Mylib.display_messages ………. (gasp)
create_page was one of the earlier examples.
VB: There’s some XML dialect used to describe the set of services.
VB: Second example, more complex, with parameters.
* Yoric[DT] doesn’t quite catch how that can typecheck.
<Yoric[DT]> [Okay, I misunderstood something, it was not a XML dialect to describe the set of services, the XML dialect was used to generate a web page by calling some OCaml functions]
VB: There are no broken links, because that would be an unbound identifier, caught by the compiler.
asmanur: code seems similar to http://www.ocsigen.org/tutorial0.99.5-1#p1baseprinciples .
<asmanur> ok thanks
<Yoric[DT]> VB: When you load twice the same webpage, if you are doing two different things on the same page at once (e.g. placing two orders on the same website), you have a difficulty.
VB: It’s the “back button problem”.
VB: It’s trivial with functional programming, because that’s just continuations.
* Yoric[DT] is wondering about garbage-collection.
<Yoric[DT]> VB: The problem has been described by Christian something (didn’t catch last name).
VB: In Elium, new services may be created dynamically to implement these continuations (we’re calling them “coservices”).
[And from the source code, it’s actually registering continuations]
VB: My example is not very clean, I should have factorized code better.
VB: On a forum, when you click on a link after writing down your message, you don’t want to display a page, you just want your message to be taken into account, then you want your current webpage to be redisplayed.
VB: We call this an “action”.
[Some example I don’t quite get, seemingly related to logging]
VB: Some services are attached to URLs, some [like logging on a BBForum, if I understand], are not.
VB: Some services registered dynamically are available only for one user.
VB: It’s really easy to write sophisticated behavior with few lines of code.
VB: The whole example [a small forum] is 146 loc.
* flux is browsing ocsigen pages, again
<Yoric[DT]> VB: Summary of features: static checking of pages, full set of service kinds (strong use of continuation-based web programming, very precise control of URLs, highly related to concrete needs of web developers…), automatic session management.
VB: 1.0 is almost ready.
VB: For the future, higher-level features, more dynamic website.
<pango> (ajax ?)
<Yoric[DT]> VB: For the future, use only OCaml to write code that will be partly executed on the client.
VB: Maybe generating JS or maybe using some plug-in.
Answering stuff wrt garbage-collection.
VB: You can limit co-services to n uses or you can add some time-out.
VB: A closure is not bigger than the data you want to keep in memory.
VB: You need to implement some mechanism to limit resource consumption.
VB: We’re not using call/cc, we’re actually building closures, which does not need to save the whole stack.
Question by Martin Jambon (MJ).
MJ: What happens if you upgrade the server ? What happens to the users currently connected ?
VB: We have a mechanism to reload the modules without shutting down the server.
VB: You will lose the sessions.
VB: But you can persist services.
VB: Not co-services, though, as they’re expected to be short-lived.
(end of talk)
VB: The slides and examples are on the Cocan Wiki.
Next talk by Gerhardt Stolpmann.
GS: I’d like to show you GODI.
GS: OCaml user since version 1.0.3 or so.
GS: In his previous job, he had one day per week working on personal projects.
GS: Now consultant.
GS: Now lives of OCaml.
GS: GODI started as a personal project.
GS: History: 1996 OCaml, 1997 GS’s first OCaml program, 1999 Findlib, around 2002 GS’s written code becomes impossible to mange, 2003 GODI, 2008 about 110 packages in GODI.
<flux> hm, I suppose a tool to convert godi-packages to debian-packages could be useful; all packages could be targeted for godi then
<Yoric[DT]> GS: Goals = Make it easy to rebuild everything, support for multiple platforms.
GS: Community effect = packages add more software, users help debugging, QA improved.
GS: + business reasons = good reason to start talking and offer services as a consultant🙂
[Looks like a demo of GODI installation is starting]
[Okay, I’m not going to describe the demo, it works essentially like any package management system]
<flux> I have a live demo of that running here, too..
<Yoric[DT]> [Demo on compiling against libraries that are not installed system-wide]
[Demo on upgrading]
<flux> seems to work fine.. now, dare I try it on a solaris machine..
* Yoric[DT] is planning to try it on Cygwin some day.
Yoric[DT] is a bit too scared for that, though.
<Yoric[DT]> [Explanation of dependencies]
<flux> if it worked on native windows, now that’d be cool
As it is, I’ll need to install linux on my student’s laptops😦
GS: Anatomy of a package.
GS: distfile = original tarball, as distributed by the author downloaded from the original http/ftp server.
<flux> I wonder if godi works for cross-compiling.. (I guess it is extremely likely it will not)
<Yoric[DT]> GS: buildfile = wrapper around distfile = additional tarball from GODI with driving scripts and metadata, downloaded from GODI server, although custom locations are possible, too.
flux: do you want me to ask ?
GS: The format originates in BSD “ports”.
GS: (actually heavily customized NetBSD port system)
<flux> yoric[dt], I suppose you could, although the answer is most likely “no”; even ocaml Makefiles need to be patched to make that happen
<Yoric[DT]> GS: godi_console written in OCaml.
flux: well, then I guess you have your answer🙂
GS: godi_make not so nice, based on BSD make, written in C with scripts written in Shell.
<flux> (also, ocaml needs too big runtime environment to be useful for the target I’ve tried..)
<Yoric[DT]> Embedded targets ?
<Yoric[DT]> Have you looked at Desert Spring Time ?
<flux> well, not the runtime environment itself, but couple that with the produced binary size – and the fact that there are no shared ocaml libraries..
<Yoric[DT]> GS: New implementation of godi_make written in OCaml.
<flux> hmm, I distinctly remember the name, but I can’t recall what it is -> checking
<Yoric[DT]> GS: replacing Shell is an open issue. Shell is powerful stuff.
<flux> apparently the site is gone
It was interesting.
GS: Makefile uses BSD-make syntax.
GS: framework, metadata (name, download…), dependencies, build options, post-install stuff.
<– kelaouch1 has quit (“leaving”)
<Yoric[DT]> GS: not-so-nice part: the plist = the list of files that are part of the package.
–> kelaouchi (email@example.com) has joined #ocaml
<Yoric[DT]> GS: currently, needs to be written manually.
GS: When all that is written, test the package locally (does it build successfully, can it be removed successfully ?)
GS: There’s an online release tool for submitting stuff & updates to GODI.
* GS: There’s an alternate approch called GODIVA.
* Makefile and PLIST are generated.
GS: Requires adhering to a make interface outlined in the “GODIVA policy”.
GS: Perhaps this could serve as a standard distribution policy for OCaml packages.
GS: Now, you can also run your own GODI server.
GS: Packages provided by additional servers are merged with the packages from the official site.
GS: Note that GODI can package non-OCaml software.
GS: Most packages can be built on all system types : bytecode-only/native-code, with/without pthreads, shared/static libraries.
GS: + doc.
GS: The future…
GS: New bootstrap architecture (prototype available).
GS: Reduced dependency on software written in C.
GS: GUI for godi_console would be nice.
GS: Native Windows support would be nice, too. Probably only as a commercial project, because that’s lots of work, plus Windows users just don’t have build environment, so binary packages would be needed.
–> ygrek_ (i=user@gateway/tor/x-1ecd7e9389bdbd1c) has joined #ocaml
<Yoric[DT]> GS: Currently about 30 package maintainers.
GS: 2/3 of the packages are not maintained by GS.
GS: New packages are always welcome, but it does take some skills in Shell, etc.
GS: I focus on the core packages and GODI itself, not much time for anything more.
(end of talk)
<– ygrek has quit (Remote closed the connection)
<Yoric[DT]> Question about sharing work between Debian packages and GODI packages. Common infrastructure would be noce.
GS: Would be possible. That’s something like the GODIVA approach.
Sylvain Le Gall (I think) = SLG
SLG: I have tried to backport GODI patches to Debian.
SLG: We could share some metafiles.
SLG: The GODIVA policy is nice but it just won’t work with OMake, OCamlMakefile, ocamlbuild, etc. it’s too much C inspired.
SLG: There are technical issues regarding where and when to build stuff, because in Debian you build first and distribute later (as under Windows).
GS: The discussion will continnue.
Question: GODI supports a lots of architectures, but not as many as ocamlbuild, what would be the alternatives to BSD make and stuff ?
GS: Well, starting with software that already worked let me concentrate on OCaml-specific problems.
GS: Plus it’s easy to modify.
GS: So yeah, that was probably the right choice.
GS: This big shell scripting stuff is hard to maintain, though.
Question about cross-compilation
GS: I haven’t even thought about it.
(end of talk, start of lunch)
–> elus (n=elus@S010600010228eee3.vs.shawcable.net) has joined #ocaml
<Yoric[DT]> [Transcription will resume around 13h30]
thanks for the transcription :p
<Yoric[DT]> (French time, of course :))
<flux> I wonder if godi support SMP (for compiling stuff) – this bootstrapping takes ages..
even if packages didn’t support it, packages themselves could be compiled in parallel
–> middayc (firstname.lastname@example.org) has joined #ocaml
<– asmanur has quit (Read error: 110 (Connection timed out))
* Yoric[DT] is back.
[Dropping ocamlbrowser and labltk from a “standard distribution” — not provided by INRIA itself]
[People involved in the discussion are rwjones, slegall, mjambon and our local bluestorm]
[Although bluestorm is lurking]
[Non-religious discussions between Fedora and Debian]
[Back to CPAN]
[Site should be mostly static]
[Could be the official source for GODI packages]
<– pango has quit (Remote closed the connection)
ygrek_ has quit (Remote closed the connection)
<Yoric[DT]> [Talk by Nicolas Pouillard = NP about OCamlBuild]
–> pango (i=iiiiiiii@gateway/tor/x-c43b0d8c22cef545) has joined #ocaml
<Yoric[DT]> [Before the talk, we have a photo session]
[Back to NP]
<middayc> will there be any videos available?
<Yoric[DT]> NP: OCamlbuild is a compilation manager for OCaml projects.
NP: Standard in 3.10.
NP: Makefiles are annoying and bug-prone.
NP: The objective of OCamlBuild is a tool that just works ™.
NP: There are basically 3 kinds of projects : Regular (automatically handled by OCamlBuild, one command is sufficient), Regular with exceptions (require a _tag file), Everything else (need a plug-in).
NP: OCamlBuild provides automated whole-project compilation, minimal recompilation, lots of useful targets, support for multiple build directories, automatic and safe cleaning.
* Yoric[DT] needs to ask about caching preprocessing.
<Yoric[DT]> NP: Plus it’s portable and it’s shipped with OCaml.
–> Snark (email@example.com) has joined #ocaml
<Yoric[DT]> NP: Regular project = compilation units, parsers and lexers, packages, libraries and toplevels, external libraries, one main OCaml unit from which these units are reachable.
<middayc> (thanks for letting us know what is going on)
<Yoric[DT]> NP: OCaml has subtle compilation rules, in particular suffixes are different for native and bytecode object files, interfaces may be absent, but sometimes buildable from yacc source files, native packages are difficult to do, linkage order matters, include directories order matters, ocamldep only gives partial information, etc.
>middayc< My pleasure.
<Yoric[DT]> How does OCamlBuild manage all that ?
NP: How does OCamlBuild manage all that ?
NP: Lots of hand-crafted OCaml-specific compilation logic.
NP: (i.e. the standard library)
NP: Dynamic exploration approach: start from the given targets, attempt to discover dependencies using ocamldep, sometimes ocamldep cannot be trusted, so backtrack if necessary, then launch compilations and discover new dependencies.
NP: Now, sometimes, you need to deal with exceptions.
NP: around 10% of projects have exceptions.
NP: Custom warnings, debugging, profiling, recursive types, linkall, threads, custom pervasives, units that need external C libraries, binaries that need external OCaml libraries, etc.
[Examples of _tags]
[I’m not going to copy these examples, that’s basically the same ones as in the manual]
[Well, not exactly]
NP: Each line is made of a pattern and a list of signed tags.
NP: A line adds or removes tags from matching files.
* Yoric[DT] needs to ask about quoting, too.
–> marmottine (firstname.lastname@example.org) has joined #OCaml
<Yoric[DT]> NP: dynamic dependencies may be added from plugins.
NP:Let’s see how to write a plug-in.
NP: They’re written in plain OCaml.
NP: Plug-ins are compiled on the fly.
NP: They provide dynamic configuration if necessary.
NP: Plug-ins can extend/create/override rules, add flags based on tags, tag files, change options, define the precise directory structure, help ocamldep, specify external libraries.
NP: Parallel execution is possible, where applicable.
NP: Rules know how to ask for // targets, the system manages synchronization.
NP: It’s not an optimal scheduling, because the graph may be dynamic.
NP: By the way, there’s support for non-standard tools such as menhir (replacement for ocamlyacc).
NP: + ocamldoc
NP: + camlp4
NP: +nice output
NP: OCaml will save you lots of time and let you concentrate on your code.
[Plenty of questions wrt Camlp4 + OCamlBuild]
[The manual should answer the questions, someone needs to write it down]
[Reasons why OCamlBuild is part of the distribution]
SLG: But that makes the core of OCaml bigger.
XL: Well, yeah, but we need it for Camlp4, and Camlp4 is part of the distribution and we couldn’t put it anywhere else.
XL: Now, OCamlBuild is used to build OCaml anyway.
SLG: So we’re back to this morning’s question about internal data structures and of how difficult it is to develop OCaml tools without accessing the source code of OCaml.
[End of talk]
[Sylvain Le Gall will talk again]
* Yoric[DT] ‘s fingers are burning.
<Yoric[DT]> SLG: Do we want to do this again next year ?
SLG: There will be a section on the Wiki regarding comments and suggestions on this meeting.
SLG: That and volunteers🙂
SLG: It’s easy to send e-mails on the mailing-list, but some things can only happen face-to-face.
[Now, on to the real talk]
SLG: OCaml in Debian.
SLG: This will be shorter and less technical than other talks.
SLG: Because I didn’t have time to prepare anything complex anyway.
SLG: Let’s see the issues related to distributing OCaml in Debian — and later about other distributions.
SLG: Debian is a binary distribution created in 1993 and based around a very good package management system.
SLG: It’s also recognized for its very strict policies.
SLG: In particular, Debian has been annoying INRIA for some time about OCaml licensing issues.
SLG: And that’s going to continue🙂
SLG: Oh, yeah, and big flamewars are just part of the fun.
<Yoric[DT]> SLG: Recruitement of Debian Developers is based on sharing a common vision of what Debian is all about.
SLG: There’s a central repository, which is quite important as it allows us to make a number of tests on packages, among other things related to the possibility of rebuilding packages.
SLG: We have tools to try and determine what files are left if a package is installed and deinstalled, etc.
SLG: There’s also a bug category Failed To Build From Source, the highest level bug.
SLG: To make a Debian package, take a pristine upstream source ( = direct from the author ).
SLG: Every Debian package contains this unmodified tarball.
SLG: The only exception is when some files don’t comply with the Debian licence and can’t be included directly.
SLG: For instance, in MLDonkey, some files had to be removed, because they really looked reverse-engineered from Windows source.
SLG: So, please, if there are things we can’t distribute, put it in a plug-in.
–> asmanur (n=asmanur@ADijon-157-1-46-68.w86-218.abo.wanadoo.fr) has joined #ocaml
<Yoric[DT]> SLG: To this source code, we add a debian/ directory, containing rules (a Makefile), control (description of dependencies and binary dependencies when they can’t be guessed), ChangeLog, copyright, etc.
SLG: Without that copyright, we wouldn’t be allowed to distribute the software, mind you.
SLG: Let’s talk about OCaml.
SLG: The first ChangeLog entry of OCaml package dates back to 1.02, and was done by Christophe Le Bars.
SLG: That was in 1996 and OCaml wasn’t in the official archive because OCaml was considered non-free.
SLG: The official OCaml for Debian is Sven Luther in 2000.
SLG: Now it’s maintained by the community, not by a specific packager.
SLG: It’s sometimes a problem, because in case of bug report, nobody really knows who should handle it.
SLG: There’s a mailing list DOM (Debian OCaml Maintainer) since 2000, a policy since 2002 and an alioth project since 2003.
SLG: Since 1999, the number of packages has climbed from around 4 to around 125. Not all these packages are actually released to the repository.
SLG: The number of active maintainers has climbed from 1 to around 15.
[around = because I’m reading from a graph]
SLG: We are working by step.
SLG: At the moment, we’re including LiquidSOAP, an application for PodCast (or is that WebCast ?), and all the dependencies.
ppsmimou: you’re being quoted
SLG: There’s a small group of 5-6 people doing most of the work.
SLG: Most of the other people have a short lifespan.
SLG: Now, closed issues.
SLG: We use OCamlfind.
SLG: The problem of naming schemes is not completely closed yet, because .cmo are not native, so they may not end up in the same package as .cmx .
SLG: The ABI issues are not fully closed yet, there’s a solution, not a great one, but it should work : OCaml won’t enter testing unless it can compile all OCaml packages.
<– Mr_Awesome has quit (“aunt jemima is the devil!”)
<Yoric[DT]> SLG: Team maintainance works.
SLG: Some issues are really open, thoug.
SLG: Dependencies between libraries are not solved.
SLG: If OCamlNet needs to be rebuilt, so does everything that depends on OCamlNet.
SLG: Bytecode stripping is another problem. It turns out that .cmo files contain executable debugging information, nobody knows why.
XL: It’s an obsolete feature, none of your packages should have that.
XL: Probably a command-line error when invoking the compiler.
XL: We’re willing to help.
XL: It’s due to a compiler option only useful for platforms without dlopen, which is definitely not the case of Linux.
SLG: Another problem is that 3 architectures are currently broken.
SLG: We found out when compiling Felix and Camomile.
SLG: That’s IA64, ARM [and a third one I didn’t catch].
SLG: That’s waiting for bugfixes from INRIA.
XL: ARM now works with Debian stable.
XL: We have a problem with ARM since they have many different ABIs.
XL: The situation is complicated.
XL: For the other ABIs, floating point is very different — and broken.
XL: QUestion, btw, who is still using OCaml in IA64 and Alpha ?
XL: We don’t really have time to maintain this, plus we don’t have the hardware.
RWJ: Red Hat is shipping a commercial product based on OCaml in IA64.
SLG: Debian has more OCaml packages because we have started early.
SLG: The build system/package management system doesn’t work well with OCaml.
SLG: We are still trying to find solutions to make apt work with OCaml.
SLG: Frankly, we don’t know how to get dependency analysis between libraries.
SLG: But GODI is very nice.
SLG: I hope we will be able to cooperate.
RWJ: We have a few interesting scripts using ocamlopt and parsing the output.
SLG: So do we.
RJW: It kind of works with the necessary adjustments.
SLG: Anyway, OCaml is great, but packaging it is hard.
SLG: It’s the same kind of problems for Python, mind you.
SLG: We are looking for solutions.
SLG: If you have ideas (or just fresh blood), please manifest yourself.
SLG: Questions ?
Alain Frisch: What’s the point of having Debian packages for developers ?
SLG: Well, it’s important for applications.
SLG: For developers, not so much.
SLG: It can be a time-saver.
SLG: But a user of LiquidSOAP will probably prefer installing the binaries rather than recompiling everything.
AF: Yeah, but you need to decide between stable, testing, unstable.
SLG: Yeah, developers using stable should use GODI.
AF: Why does MLDonkey have dependencies to other packages ?
SLG: For build dependencies, not run-time dependencies.
?: Would it be possible to replace debian packages by GODI ?
SLG: Yeah, but haaard.
SLG: Not enough manpower.
Same ? [I’ll call him
Same ? [I’ll call him ‘a] : Any technical problems ?
SLG: You need to keep track of what has been installed from GODI, what has been installed from apt, plus to manage upgrades…
‘b: Maybe source installation is interesting but there’s a reason why Coq wasn’t chosen for the GODI demo. It wouldn’t have been installed in 15 seconds.
SLG: In addition, when people start a development, they tend to prefer if the environment remains the same.
SLG: Debian is good far stability.
‘b = Pierre Letouzey : [ ? ]
PL : What is the difficulty of specifying dependencies for .cmi / .cmo ?
SLG: Because the Debian system is designed for C.
SLG: OCaml uses MD5 sums, which don’t appear in C-style .so .
PL: Is your point the fact that OCaml changes appear in each release ?
SLG: Basically, if you change one thing in the whole chain of dependencies, you have to rebuild everything and things can’t be discovered automatically.
SLG: If you just add a function, you’re going to break the MD5, hence the ABI.
RWJ: Whereas in C, that’s a compatible change.
Jaap Bender: Couldn’t GODI generate Debian packages ?
SLG: That would be nice.
SLG: We’d like to integrate everything as much as possible but we need time to do it, plus good ideas.
‘c : There’s another contribution upstream developers could do : put packages in a sane state. That’s something that doesn’t often happen. It’s the same problem with GODI. In this kind of circumstances, the maintainer needs to patch the source.
‘c : That’s something which could be shared between GODI and Debian.
GS: Sometimes, we don’t know who maintains the software.
SLG: There’s a difference between C and OCaml libraries.
SLG: it’s hard to measure responsiveness of OCaml maintainers, because usually, there’s no bug, so no bug reports, bugfixes, etc. So people start to believe that nobody uses the package.
SLG: Well, another problem is that upstream authors are often unresponsive.
‘d : Would there be a way for GODI to ask for Debian dependencies ?
SLG: I suppose, you should ask GS. Perhaps from findlib.
SLG: You could test if the package is there and install it if isn’t.
SG: No, the problem would be the [?] files.
SG: No, the problem would be the C files.
SG: For instance, the pcre OCaml library requires the pcre C library.
SG: GODI doesn’t handle that.
SG: Thank you.
[End of talk]
Xavier Clerc (XC): Running OCaml on a JVM.
XC: Not endorsed by the Inria.
XC: Let’s compare OCaml and Java.
XC: OCaml is expressive, Java is verbose.
XC: OCaml community is small, Java is huge.
XC: OCaml Libraries are few, Java many
XC: OCaml code quality of libraries is high, Java’s is … not as bad as C.
XC: The idea is to get the best of both worlds.
XC: There’s already JavaCaml by GS, an interpreter of OCaml bytecode in Java (a port of OCamlRun), looks dead.
XC: Plus CamlJava, an OCaml <-> Java interface through JNI. Portable but quite low-level and requires compilation on each architecture.
XC: O’Jacare, an interface generator for OCamlJava, by Henry.
(same limitations as CamlJava)
XC: Our objective is to use 100% pure Java, without JNI, run programs both interpreted and compiled, easy access to Java classes and no special runtime for the bytecode. Plus compatibility with the original implementation. Another nice property would be to have several OCaml programs running in the same JVM.
XC: Current version is 1.0 alpha (available at ocamljava.x9c.fr), beta version in February, for OCaml 3.10.1. Targets Java 1.5, implements the whole standard library (including lexing, parsing, marshalling, bigarray, dbm, dynlink, graph, num, str, unix, threads).
XC: The only missing library is Tk.
XC: Already able to run toplevel and build a working ocamlc.jar.
XC: Subprojects Barista (bytecode gen), Cadmium (interpreter & runtime support), Cafesterol (OCaml-to-Java compiler), Nickel (bindings generator) and OCamlScripting (scripting engine for Java, based on the rest).
XC: Let’s start with Barista : Library for class file manipulation, asm/unasm, implements the whole Java 1.5, depends on Camlzip and Camomile, released under GPL 3.
[Example of the OCaml data structure representing the Hello World class]
XC: Cadimum = Java port of ocamlrun + runtime support for Cafesterol-compiled programs.
XC: When used as an interpreter, implements the whole bytecode instruction set except Tk.
XC: No dependencies, released under LGPL 3.
[Source: implementation of caml_string_get, looks more readable than the C version]
XC: Cafesterol, provides ocamljava, counterpart of ocamlc/ocamlopt. implements all language constructs, supports two compilation modes.
XC: Standalone mode or library sharing mode.
XC: Dependencies on Camlzip, Barista, sources for OCaml.
XC: Released under QPL v1.
XC: Let’s compare ocamlc, ocamlopt, ocalmjava.
For interfaces, they produce .cmi/.cmi/.cmi .
For implementations, they produce .cmo/.cmx/.cmj .
For binaries, – / .o / .jo .
For libraries, .cma / .cmxa / .cmja .
For library binaries – / .a,.so / .jar
Default is dynamic linking (Java style), but standalone linking is available (OCaml) as well as linking as Applet or as Servlet.
XC: Nickel generates OCaml bindings for Java classes, uses OCaml object system and supports callbacks, for instance to implement event handlers. Java interfaces may be implemented in OCaml. No dependencies, GPL 3.
[Slide: the kind of file read by Nickel, a XML dialect that seems to describe Java type signatures]
XC: Constructing an instance is done by feeding a polymorphic variant. That’s how we replace the several constructors.
XC: For an ActionListener, you just need to write the actionPerformed method and this will be used by the generated wrapper to create a class fit for use as an ActionListener.
XC: OCamlScripting provides a scripting engine for Java.
[Code: using the scripting engine to run dynamically compiled OCaml code inside Java]
XC: Compatibility issues : the implementation is big-endian.
XC: Unsafe features may behave differently, possibly fail badly.
XC: Some Unix primitives are emulated.
XC: Fonts are different for the graphics module.
XC: http://cadmium.x9c.fr/distrib/cadmium-compatibility.pdf — list of all primitives and their difference with the original implementation.
XC: Compatibility of Cafesterol : Evaluation order is not the same as ocamlopt. This should not be a problem.
<– Demitar has quit (Read error: 110 (Connection timed out))
<Yoric[DT]> XC: Object cache not implemented. This should not be a problem either, because it doesn’t affect the semantics.
XC: Pending signals are checked at given points, which probably means less reactivity to Unix signals.
XC: Stack overflow / memory shortage are handled by Java, not by OCaml.
XC: There’s rudimentary support for backtrace.
XC: Tail calls are optimized only for direct recursion.
XC: Are they optimized for mutual recursion in ocamlopt ?
XC: Well, in Java, it’s contrary to semantics.
XC: So there’s no easy optimization for this.
XC: Some very big functions may fail to compile due to a built-in limit for Java methods.
XC: In this case, turn off inlining or split your function.
XC: Roadmap: 1.0 alpha September 2007, beta scheduled for February, featuring some JDBC bindings plus bugfixes, 1.0 final scheduled for April.
XC: Later, compatibility, features and move to 1.6, as soon as it’s available under MacOS X.
XC: 2.x, performance issues.
XC: 3.x, converge to OCaml version number.
XC: Cadmium relies on Java reflection, you need to trust the applet.
XC: It’s slow but the computer is 5 year-old.
[Not that slow]
[Demonstrating factorial and #trace ]
[Display looks slow, but that’s usual with Java]
<flux> hmm. idea: patch to toplevel to produce graphviz output with #trace
<Yoric[DT]> [Pseudo-drawing software, not very interesting as far as features are concerned]
[Source: open Cadmium open Graphics and about 60 lines of OCaml. The only difference with an usual application is that there are a few lines of registration at the end.]
[Demo of a UI written in Swing, with the implementation written in OCaml]
RWJ: Problems with 64 bits ?
XC: Currently 32 bits, because of an early decision. Need to check some semantics of Java.
XC: If you try to write the same implementation for 32bits and 64bits, you won’t be able to create a large block.
RWJ: String length is it as in OCaml or Java ?
DT: Same set of command-line switches ?
DT: Do you believe I will be able to write an Eclipse plug-in in OCaml ?
XC: I hope so. At least, ocamlc and ocamlopt can be compiled and work.
Somebody Wang: What about performances ?
XC: Of course it’s a major problem.
XC: According to my limited tests, Cafesterol-compiled programs are faster than Python or Ruby programs.
XC: So Cafesterol should be sufficient if you only need Python- or Ruby-speed.
XC: As marshalling is fully implemented, you can have Cafesterol-compiled source communicating with ocamlopt-compiled source.
XC: So for performance-intensive code, you can use that.
XC: But the more closures you use, the slower the program.
SW: Do you have ideas on how to improve performances ?
XC: I do.
XC: For instance, values are represented in Java in a very memory-consuming manner, so it puts lots of pressure on the GC and this has a large impact on performaces.
XC: I have a clear idea of what I have to do to improve performance.
XC: But features and compatibility first, I’ll work on performance later.
XC: With a better encoding, we should have huge performance gains.
XC: At the moment, just tweaking the GC will help a lot. Performance of Cafesterol-compiled programs is very dependent on GC.
[Questions on how to remember which subproject does what]
‘d: A non-technical remark. I heard of your project before but I didn’t look at it carefully. Just looking at the presentation, I believe it’s an exciting project. It deserves improving, testing, etc. In my experience, based on Ocsigen, we started to find a lot of bugs and we started to improved Ocsigen a lot when people started using it.
‘d : 20 people was enough.
‘d : So put screenshots, examples, applets, etc. Attract people. I felt kind of lost on that website.
‘d : Tutorial, examples…
XC: I totally agree. I need more time. That’s one of the two things I want to do for the beta : better website, simple examples and a binary distribution.
bluestorm: Did you run into problems with the binding of objects because of different models, in particular wrt inheritance ?
XC: Not really. The main problem is that OCaml only has one constructor per object.
XC: Oh, yeah, a naming problem, when several methods have the same parameters. We add apostrophes or we could rename them using the XML file.
DT: What is that XML file ?
XC: One XML file contains the information about all the Java classes you want to use. Then you pass this file to Nickel and it generates a .ml with type definitions and externals, a .java file containing the glue, and .c file defining all the externals needed by the ml file so that you can use ocamlc to compile your program.
XC: The .c file is just a stub to trick the linker.
XC: Oh, and you need to write the XML file yourself.
[Questions wrt name mangling]
AF: Looks like a huge project, especially for a hobby.
AF: Do you have any plans for it ?
XC: It started as a way to understand OCaml.
XC: So, just for fun.
XC: Well, that and F#.
XC: I prefer OCaml.
XC: But no precise project.
XC: This program can’t be used on multicore architectures.
XC: It should have the same limitations as OCaml.
XL: You’re bug-for-bug compatible🙂
[ Coffee break ]
<pango> good idea😉
–> ita (n=ita@138.Red-83-60-105.dynamicIP.rima-tde.net) has joined #ocaml
pango_ (i=pango@gateway/tor/x-d639a42aab13d02f) has joined #ocaml
<Yoric[DT]> [ General discussion ]
SLG: First subject : Unicode.
SLG: Necessary for instance for Unison, for international file names.
‘e: We need a mechanism to produce recommandation for libraries.
SLG: Something like JSR, yes.
SLG: Not just for Unicode.
SLG: There was something like this for ExtLib and IO classes.
GS: We have a document somewhere. We don’t have nominal typings like Java, we can get around some things by using structural typings.
SLG: That’s another point in the list, if we have nothing special to say about Unicode, we’re going to pursue.
Philippe Wang: What about identifiers with accents ?
XL: We did that for Caml-Light.
XL: Should the syntax of OCaml accept Unicode in identifiers ? Presumably with a UTF-8 encoding, just like Java.
XL: I have considered that. Why not, at least for identifiers, there’s no real problem, we can use the same kind of specifications of Java.
XL: The only difficulty is deciding for infix operators, so far we have only a few characters, with Unicode, the sky’s the limit. Do you want to use Klingon ?
XL: That would not make the lexer much more complex.
PW: My point is that teaching that accents don’t work is not the job of the teacher.
SLG: You say we should decide which operators are infix. Why don’t we use Java’s specifications ?
XL: Well, they don’t have infix operators.
Martin Jambon: Oh, there’s also the problem of uppercase vs. lowercase.
XL: There’s a Java specification regarding that is uppercase and what is lowercase.
<– pango has quit (Remote closed the connection)
<Yoric[DT]> ‘e: Why not say that everything >= 128 is lowercase ?
XL: Because you won’t be able to have a constructor called gamma🙂
RWJ: What about letting users decide precedence ?
XL: Because it won’t work with the current OCaml parser.
DT: Where do we have that debate ?
XL: Let’s start on the mailing-list and find people who are really interested. I’m open to suggestions.
SLG: Let’s use the Cocan Wiki for that, too.
SLG: Let’s create a section “OSR”.
[Practical questions regarding Camlp4]
[Extending OCamlBuild to use findlib]
–> sergez__ (email@example.com) has joined #ocaml
<– sergez__ has quit (Read error: 104 (Connection reset by peer))
–> sergez__ (firstname.lastname@example.org) has joined #ocaml
<Yoric[DT]> XL: Status of JoCaml is advanced prototype.
<ita> accents in identifier is one of the best obfuscation schemes
<Yoric[DT]> SLG: What about menhir ?
XL: It exists and it works well.
SLG: Will this replace ocamlyacc ?
XL: Possibly. I haven’t discussed that with the author yet.
<– sergez__ has quit (Remote closed the connection)
<Yoric[DT]> bluestorm: What is the status of overloading of operators ?
XL: I’m not a big fan. It doesn’t work very well with with type inference.
XL: It’s all I can say at this point.
PW: Will there be formal specifications of OCaml ?
XL: Well, some people in Cambridge are working on formal specifications of Caml-light.
XL: It’s good to have specifications, it’s even better to be able to use them. I haven’t checked that yet.
XL: It’s a huge undertaking, so you need to balance the benefits vs. the effort.
PW: Maybe some people would want to write another OCaml.
XL: Not having specifications never prevented anyone from writing another compiler, so that’s not really needed.
[OOT: http://cocan.org/ocaml_standard_recommandations ]
XL: Basically think how you could justify that to your boss.
PW: What about removing the parts that are not specified ?
XL: oO Well, that would require removing lots of things, starting with == .
XL: It’s an old debate but in formal methods, you often leave things unspecified.
PW: What about evaluation order ? Obj ?
XL: Well, Obj isn’t specified and will remain so.
RWJ: [Sorry, didnt’ catch it]
‘f : Unrelated question. Sometimes, I find it interesting to have a repository of questions and answers to these difficult questions. Sometimes, questions are asked on the mailing-list and the answer essentially gets lost.
‘f : Sometimes the question is asked again but nobody remembers the answer. In particular wrt difficult typing issues.
XL: A FAQ wiki, why not ?
PW: What about renaming some functions in the standard library ? What about make vs. create ?
XL: Well, that won’t change, for compatibility.
XL: Don’t hesitate to work on ExtLib or something related.
XL: Oh, and pay attention to the name of your functions🙂
RWJ: Can I get rid of every single definition including list and option ?
XL: oO Probably not everything, no.
‘g : What about the ability to create infix constructors ? I mean, Camlp4 lets you do that, but without Camlp4 ?
[Subject : Should we organize OCaml Summer of Codes ? What kind of code would we need ?]
SLG: Did anyone take part in Google Summer of Code ?
‘h : I have. It’s quite agreeable. Everything is organized by you and your supervisor.
‘h : At the end you’re evaluated as Passed or Fail, there’s lots of freedom to decide almost everything.
‘h : They don’t really care about the project, they just give the money.
XL: Jane Street Capital is probably going to organize that again this summer.
XL: Good place to work on OCaml or get your students to do so.
SLG: My problem is that there’s no actual OCaml organization.
XL: You can use some other organization as a sponsor. Is there anything in France ?
SLG: Maybe INRIA or PPS ?
SLG: Maybe they could apply to Google SoC and get some money.
XL: Good idea, we should check.
‘i : Problem is you have to provide a mentor. Someone connected to the project.
‘j : I don’t know, in GNU, we have the EFF, but the organization is very loose, mentoring is at most an exchange of 2-3 messages per week. So mentors might not be hard to find.
PL: Problem is usually not money but mentors.
PL: Universities have money, INRIA has money, what’s lacking is mentors.
SLG: Any idea about subject ?
DT: What about an IDE ?
SLG: Well, ODT is good.
SLG: Or Cameleon.
DT: I personally can’t even run it in Debian…
SLG: Well, it breaks every time.
SLG: We often can’t compile it at all.
<– ita has quit (“Hasta luego!”)
–> dbueno (email@example.com) has joined #ocaml
<Yoric[DT]> SLG: We weren’t even informed that repositories had moved or that there was a Cameleon 2.
SLG: So Cameleon is probably not the perfect idea.
SLG: But Eclipse is good, you don’t need to redo everything.
<– dbueno (firstname.lastname@example.org) has left #ocaml (“Leaving”)
–> thermoplyae (email@example.com) has joined #ocaml
<Yoric[DT]> SLG: If you want to submit Summer of Code subjects, put it on COCAN.
SLG: Now, let’s organize the next meeting.
SLG: In 6 months, if you find that this meeting was useful, let’s start and organize it. I might not be able to handle it.