tags/batterieszack's home pagehttp://upsilon.cc/~zack/tags/batteries/zack's home pageikiwiki2010-03-06T15:39:15Zocaml batteries included 1.1.0 is in debian nowhttp://upsilon.cc/~zack/blog/posts/2010/03/ocaml_batteries_included_1.1.0_is_in_debian_now/2010-03-06T15:39:15Z2010-03-06T15:39:15Z
<h1>OCaml Batteries Included 1.1.0 has arrived in Debian</h1>
<p>I've just uploaded the <strong>Debian package of <a href=
"https://forge.ocamlcore.org/forum/forum.php?forum_id=552">OCaml
Batteries Included 1.1.0</a></strong> to the Debian unstable
archive; hopefully, it will quickly enter testing to be released
with the next Debian stable release. This is the first release in
Debian of the "new generation" of Batteries Included, which has
followed a strict diet, and now has <a href=
"http://camomile.sourceforge.net/">Camomile</a> as its only
external dependency.</p>
<p>It took me a while to package it due to an intertwining
transition to OCaml 3.11.2 (during which we have fleshed out the
last remaining few bits of transition to <a href=
"http://upsilon.cc/~zack/blog/posts/2009/11/Enforcing_type-safe_linking_using_package_dependencies/">
our new dependency system</a>). Also, I had to fix some typical
build issue with upstream, which kindly coordinated with me to have
the fixes included in 1.1.0.</p>
<p>So go, enjoy Batteries 1.1.0, and let me know your feedback:</p>
<pre><code> # apt-get install ocaml-batteries-included
</code></pre>
<p><small>(check that it will install 1.1.0 though, it might take a
few days to hit your favorite architecture and mirror)</small></p>
<p><strong>Tip:</strong> starting from this version you will need
the following to use Batteries in place of the legacy standard
library in your sources:</p>
<pre><code> open Batteries_uni
</code></pre>
<p>for multi-threaded programs you should rather use <code>open
Batteries</code>. Check the <code>FAQ</code> file installed under
<code>/usr/share/doc/libbatteries-ocaml-dev/</code> for more quick
start information.</p>
jane street core 0.6.0 has arrivedhttp://upsilon.cc/~zack/blog/posts/2009/11/jane_street_core_0.6.0_has_arrived/2009-11-28T12:00:16Z2009-11-13T14:47:57Z
<h1>Debian "Core" 0.6.0 packages ready</h1>
<p>I've completed the packaging of the new release of <a href=
"http://www.janestreet.com/ocaml"><strong>(Jane Street)
Core</strong></a>, version <strong>0.6.0</strong>. Core is (yet
another) extended / alternative standard library for OCaml,
integrating not only the much needed "everyday functions" but also
offering consistent abstractions throughout all stdlib modules
(with a lot of inspiration from well-known type classes from the
Haskell stdlib), consistent naming conventions (e.g. all functions
using exceptions as meaningful return values ends in
<code>_exn</code>), and significant syntax extensions.</p>
<p>While I've been thus far an <a href=
"http://batteries.forge.ocamlcore.org/">OCaml <strong>Batteries
Included</strong></a> fanboy, I confess that nowadays I'm more
<strong>skeptical about its success</strong> than in the past, in
spite of having contributed a tad of code to it. The reason is
simply that <a href=
"https://lists.ocamlcore.org/pipermail/batteries-devel/2009-September/000879.html">
the lead of the project is now gone</a> and, more importantly, has
done so without having (yet?) clearly appointed/found a new lead.
That does not change the fact that David has only to be kudoed for
his amount of impressive work on Batteries. Still, as a matter of
fact right there is no stable release yet and there is no one that
will be taking the project to deliver one, since no one else has
stepped forward (yet?).</p>
<p>In this interim the OCaml problems in delivering, on top of an
amazing core language, an amazing development platform in which
programmers are not forced to reinvent wheels, stand. Core fills
such a gap properly. I was preferring Batteries to it due to its
more open development process, but in spite of that Core is a
pretty damn good stdlib. Long life to Jane Street that currently
maintains it <img src="http://upsilon.cc/~zack/smileys/smile.png" alt=":-)" /></p>
<p>Now, back to the main topic of this post, <strong>Debian
packages for Core 0.6.0 are now available</strong>; you will be
able to get it from the main/unstable archive soon (some manual NEW
processing is required). In the meantime they can be fetched from
my personal APT repository, as usual:</p>
<pre><code> deb http://people.debian.org/~zack/debian zack-unstable/
deb-src http://people.debian.org/~zack/debian zack-unstable/
</code></pre>
<p>A few <strong>noteworthy changes</strong> from the past package
releases:</p>
<ul>
<li>
<p>There is now a new set of packages
(<code>libcore-extended-ocaml{,-dev}</code>) that contains
<strong>Core_extended</strong>. It is a new subset of Core, which
offers more features on top of Core, but which has more
dependencies (most notably Pcre-OCaml) and is declared to be less
thoroughly peer-reviewed than Core itself.</p>
</li>
<li>
<p>There is now a separate <strong>documentation</strong> package
(<code>libcore-ocaml-doc</code>) which contains the built ocamldoc
HTML API reference for Core and Core_extended.</p>
<p>Note that it is not exactly the same doc that <a href=
"http://ocaml.janestreet.com/?q=node/74">has been recently
announced</a> by Jane Street and that is now <a href=
"http://www.janestreet.com/ocaml/janestreet-ocamldocs/">available
on the web</a>. The latter is comprehensive of all other Jane
Street libraries (sexplib, bin-prot, ...). I'll be probably
packaging that too, but first <a href=
"http://lists.debian.org/debian-ocaml-maint/2009/11/msg00101.html"><em>
some licensing problems</em></a> need to be solved.</p>
</li>
</ul>
<p><strong>Update</strong> 18/10/2009: core 0.6.0 and all its
components have passed through NEW, they are now available in the
Debian archive as usual</p>
ocaml batteries in Debian unstablehttp://upsilon.cc/~zack/blog/posts/2009/04/ocaml_batteries_in_Debian_unstable/2009-11-28T12:00:16Z2009-04-03T08:35:02Z
<h1>batteries approaching Beta 1: now in unstable</h1>
<p><a href=
"http://upsilon.cc/~zack/blog/posts/2008/10/ocaml_batteries_included_debian_packages/">
It's been a while</a>, but work on <a href=
"http://batteries.forge.ocamlcore.org">OCaml batteries included</a>
has continued steadily in the past months. We are now approaching
the first <strong>Beta release</strong>, which is due in a few
days.</p>
<p>In the meantime, a couple of days ago I've uploaded the Debian
<a href=
"http://packages.debian.org/sid/ocaml-batteries-included"><strong>ocaml-batteries
package</strong></a> to the unstable archive for the first time (it
was only available from experimental thus far). It is an “almost
Beta” release which you are <strong>encouraged to test</strong>
both for packaging aspects and for having a feeling of what
batteries will look like in its final shape.</p>
<p>To <strong>get started</strong> just do the following:</p>
<pre><code># aptitude install ocaml-batteries-included
$ ledit ocaml-batteries
</code></pre>
batteries alpha2 Debian packageshttp://upsilon.cc/~zack/blog/posts/2008/11/batteries_alpha2_Debian_packages/2009-11-28T12:00:16Z2008-11-12T07:51:03Z
<h1>OCaml Batteries alpha 2: Debian packages</h1>
<p>Out of popular request (wow, people on
<code>#ocaml@freenode</code> are very excited about the Batteries
thingy, good!), I've prepared <strong>Debian packages for <a href=
"http://batteries.forge.ocamlcore.org">OCaml Batteries
Included</a>, version <a href=
"http://forge.ocamlcore.org/forum/forum.php?forum_id=211">alpha
2</a></strong> (which does include the <a href=
"http://upsilon.cc/~zack/blog/posts/2008/11/ocaml_batteries_gzip/">support for
transparent gzip-ed channels</a>).</p>
<p><small>Packaging shameless plug: packaging this version has been
a nice showcase for <a href=
"http://packages.debian.org/sid/topgit">TopGit</a> as now I've a
couple of inter-dependent branches. TopGit has indeed rocked my
world, yay. (Well, I also have to admit to myself that this tiny
bit of TopGit mention wont assolve me from the need to
<strike>advertise</strike>blog about TopGit, ...
eventually!)</small></p>
<p>Packages have been <strong>uploaded to experimental</strong>. As
usually I build/upload for amd64, but experimental in Debian
<em>is</em> auto-built so eventually the will show up also for
other architectures, of course including i386. If you want to take
them directly from experimental you have to add this line to your
<code>/etc/apt/sources.list</code>:</p>
<pre><code> deb http://ftp.de.debian.org/debian/ experimental main non-free contrib
</code></pre>
<p>and then install requesting explicitly experimental (for some
time now, experimental is treated specially, and it won't be used
by APT unless explicitly asked for):</p>
<pre><code> apt-get install -t experimental ocaml-batteries-included
</code></pre>
<p>The Debian version (roughly) corresponding to alpha 2 is
<code>0.20081112+gitBB342A7-1</code>.</p>
<p>Alternatively, you can grab the packages <a href=
"http://people.debian.org/~zack/ocaml-batteries/"><strong>from my
people.d.o space</strong></a>. Since people were interested I've
made available both amd64 and i386 builds there.</p>
camlbz2 bzip2 ocaml bindingshttp://upsilon.cc/~zack/blog/posts/2008/11/camlbz2_bzip2_ocaml_bindings/2009-11-28T12:00:16Z2008-11-03T22:26:05Z
<h1>CamlBZ2: OCaml bindings for libbz2</h1>
<p>Since the next building block for <a href=
"http://upsilon.cc/~zack/blog/posts/2008/11/ocaml_batteries_gzip/">proper compression
support</a> in <a href=
"http://batteries.forge.ocamlcore.org">Batteries</a> is <a href=
"http://www.bzip.org">bzip2</a> integration, I started from the
basic ingredient: <strong>OCaml bindings for bzip2</strong>.</p>
<p>It was not entirely missing: the <a href=
"http://ocamlplot.sourceforge.net/ocamlplot.html#gz">old GZ
project</a> by <a href="http://oandrieu.nerim.net/">Olivier
Andrieu</a> was in fact offering bzip2 bindings, but was doing that
in tandem with <a href="http://www.gzip.org">gzip</a> bindings
(which already have a standard de facto implementation: <a href=
"http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=84">Camlzip</a>).</p>
<p>Hence I contacted the author and together we decided to split
away the two parts and releasing <strong><a href=
"http://camlbz2.forge.ocamlcore.org">CamlBZ2</a></strong> as a new
project, devoted to bzip2 bindings alone.</p>
<p>The old code has been ported to latest OCaml versions and a
couple of bugs have been squashed in the interim. The project is
now hosted on <a href="http://forge.ocamlcore.org">the OCaml
forge</a>, has its own <a href=
"http://camlbz2.forge.ocamlcore.org">homepage</a>, and <a href=
"http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=camlbz2/camlbz2.git;a=summary">
a Git repo</a> (<em>look ma, it looks like a serious
project!</em>).</p>
<p>Today I've made the first alpha release: <a href=
"http://forge.ocamlcore.org/frs/download.php/70/camlbz2-0.5.99.tar.gz">
<strong>CamlBZ2 0.5.99</strong></a> is <a href=
"http://forge.ocamlcore.org/forum/forum.php?forum_id=206">now
available</a>. It is intended to be a test release ... so please
test it <img src="http://upsilon.cc/~zack/smileys/smile.png" alt=":-)" /> and report
any issue you find using <a href=
"http://forge.ocamlcore.org/tracker/?group_id=63">the
tracker</a>.</p>
<p>Next steps for CamlBZ2:</p>
<ul>
<li>0.6.0 release,</li>
<li>a <a href="http://www.debian.org">Debian</a> package,</li>
<li>and of course an API flexible enough to enable Batteries
integration!</li>
</ul>
ocaml batteries gziphttp://upsilon.cc/~zack/blog/posts/2008/11/ocaml_batteries_gzip/2009-11-28T12:00:16Z2008-11-02T21:40:09Z
<h1>OCaml batteries, now with GZip-ed channels</h1>
<p>This week-end I've spent some time to kick-start my hacking onto
<a href="http://batteries.forge.ocamlcore.org/">OCaml Batteries
Included</a> (yes, it deserves a proper website).</p>
<p><a href=
"http://upsilon.cc/~zack/blog/posts/2008/10/ocaml_batteries_included_debian_packages/">
Last time I wrote about it</a> was with my package maintainer hat
on. In the meantime I've got trapped<code>^W</code>involved with
upstream development as well, after having been so fool to propose
integration with <a href=
"http://batteries.forge.ocamlcore.org/doc.preview/batteries-alpha1/batteries/html/api/System.IO.html">
Batteries' I/O channels</a> of compression/decompression
libraries.</p>
<p>Well, here are the first tiny teeny results:</p>
<pre><code> # open Batteries.System;;
# let i = File.open_in "/tmp/fstab.gz";;
val i : InnerIO.input = <abstr>
# let i2 = GZip.uncompress i;;
val i2 : InnerIO.input = <abstr>
# IO.read_line i2;;
- : string = "# /etc/fstab: static file system information."
# IO.read_line i2;;
- : string = "#"
# (* same goes for output of course *)
</code></pre>
<p>i.e., no matter how you created an I/O channel (and with
Batteries you can create it out of <em>a lot</em> of entities), you
can apply a <code>gzip</code> compress/decompress filter.</p>
<p>The underlying library is <a href=
"http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=84">Camlzip</a>,
which also sets a precedent on how to integrate external libraries
into Batteries properly.</p>
<p>The code is not released yet (hey, Batteries is still alpha!),
but is available from the <a href=
"http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=summary">
Git repo</a>, (<a href=
"http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=shortlog;h=refs/heads/zack/compress">zack/compress
branch</a>).</p>
<p>Next milestone: <code>bzip2</code> ... of course with the same
interface, so that changing (de)compressor will be as easy as
<code>s/GZip/BZip2/g</code> in the code above. <code>tar</code> and
<code>zip</code> will come next (but with different interfaces, as
old *nix jokes tell us, compressing and archiving are different
tasks).</p>
ocaml batteries included debian packageshttp://upsilon.cc/~zack/blog/posts/2008/10/ocaml_batteries_included_debian_packages/2009-11-28T12:00:16Z2008-10-13T09:04:46Z
<h1>preview of OCaml batteries included Debian packages</h1>
<p><a href="http://batteries.forge.ocamlcore.org/"><strong>OCaml
batteries included</strong></a> is a wonderful community-driven
initiative to standardize the OCaml development platform. It is
similar to initiatives sharing the same motto, like <a href=
"http://www.haskell.org/haskellwiki/Haskell_Platform"><em>Haskell
batteries included</em></a> and <em>Python batteries included</em>
(which then has become the legacy Python distribution), but I have
always felt that OCaml was more desperately needing a similar
initiative.</p>
<p><a href=
"http://dutherenverseauborddelatable.wordpress.com/">David
Teller</a> and the OCaml batteries included team have been the
first actually doing something to address the frustration of many
otherwise enthusiastic OCaml developers.</p>
<p>A couple of days ago, their efforts have given birth to a first
milestone: the <a href=
"http://dutherenverseauborddelatable.wordpress.com/2008/10/11/ocaml-batteries-included-version-alpha/">
release of the first alpha version of batteries included</a>.</p>
<p>To help out, I've released as quickly as possible <strong>the
Debian packages of OCaml batteries included</strong>. You can find
them in <a href=
"http://packages.debian.org/experimental/">experimental</a>
(actually in <a href=
"http://ftp-master.debian.org/new.html">NEW</a>, at the time of
writing), and from <a href=
"http://people.debian.org/~zack/ocaml-batteries/">my
<code>people.d.o</code> space</a>.</p>
<p><small>I've only built the packages for <code>amd64</code>, if
you need some other architecture you can build on it by yourself,
but I recommend <em>not</em> trying to rebuild the
<code>-doc</code> package (which takes 10 minutes on my laptop to
build). You can reuse the <code>-doc</code> package I've built,
which is <code>arch: all</code>, to rebuild only the
<code>-dev</code> part unpack the source package and do
<code>fakeroot debian/rules binary-arch</code>.</small></p>