From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 972F5BBAF for ; Sun, 12 Oct 2008 19:00:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As8AAHfJ8UjRVdkPm2dsb2JhbACMLoZvPgEBAQEBCAkKCRGcWgVohXoBAgEDgWmBPg X-IronPort-AV: E=Sophos;i="4.33,397,1220220000"; d="scan'208";a="15982942" Received: from mail-gx0-f15.google.com ([209.85.217.15]) by mail2-smtp-roc.national.inria.fr with ESMTP; 12 Oct 2008 19:00:27 +0200 Received: by gxk8 with SMTP id 8so1905390gxk.3 for ; Sun, 12 Oct 2008 10:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date :user-agent:cc:references:in-reply-to:content-type :content-transfer-encoding:content-disposition:message-id; bh=RLcztI8lIFY8aXIIwmjVBDoJSdQBQgKMOu2CxvMim9U=; b=Jy2uNROha24KGRHZobtNJOkYea6rlGIiC/+GNwUlN+oApEPi73ZIDbXr01ghG+ulu2 P0NFZEp1AFBzNjgadOU3wzaG5s/CXp1Ac1k0h8q28CzRrN5l1nrKu00Dq2Q5aPE8wRDC lWxgkwquCtkQ/FuCv7DKBkzVdz5sBwR+xOPb8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to :content-type:content-transfer-encoding:content-disposition :message-id; b=hSH7xWzjrJlmZts6kLz/K6fRL30lgTcCnF1q9TStymtXmi/13qNG1nokAizUdRGK+I ouhtN/5v/NxXStsGApf61XFODy/ReTDdpErDDkwoX6kt5xZT8lg6wbUnkZv3zkmr32/s FsLRuRDiReFdHR2VJM49icO4JqVUR+Upckppw= Received: by 10.90.78.14 with SMTP id a14mr4332178agb.43.1223830825988; Sun, 12 Oct 2008 10:00:25 -0700 (PDT) Received: from ?192.168.0.102? (c-24-99-180-210.hsd1.ga.comcast.net [24.99.180.210]) by mx.google.com with ESMTPS id 52sm4453244hsf.1.2008.10.12.10.00.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 12 Oct 2008 10:00:25 -0700 (PDT) From: Peng Zang Reply-To: peng.zang@gmail.com To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ANN OCaml Batteries Included alpha 1 Date: Sun, 12 Oct 2008 13:00:17 -0400 User-Agent: KMail/1.9.7 Cc: David Teller , OCaml References: <1223732914.7333.22.camel@Blefuscu> <200810120142.23667.peng.zang@gmail.com> <1223819953.6213.22.camel@Blefuscu> In-Reply-To: <1223819953.6213.22.camel@Blefuscu> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810121300.23231.peng.zang@gmail.com> X-Spam: no; 0.00; ocaml:01 hash:01 cheers:01 toplevel:01 corresponds:01 makefile:01 toplevel:01 topfind:01 mutable:01 topfind:01 lib:01 ocaml:01 findlib:01 lib:01 camlp:01 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday 12 October 2008 09:59:13 am David Teller wrote: > Hi, > > It seems we forgot one dependency in the README: you need Bin-prot to > get Batteries to work. I must confess that we could have removed that > dependency for Alpha 1, as we don't use any feature of Bin-prot yet. > > Cheers, > David Thanks for your help. Installing Bin-prot has seemed to fix that error. Unfortunately, now I get a different one. To give some context, I am trying to create an equivalent toplevel init.ml file that corresponds to the ocamlbuild _tags file. To build a project with Batteries all you need is "<*>: use_batteries" in the _tags file. I don't really use ocamlbuild so I am assuming the _tags file plays a similar role to your normal Makefile. My equivalent init.ml file which aims to start an ocamltoplevel in an environment where any code that compiles will run in the toplevel consists, so far of: #use "topfind" #require "batteries" The new error is: Reference to undefined global `Ref' I am not familiar with Ref. It looks like it's a module in Batteries, so I'm not sure why it's throwing this error. I tried to open Data.Mutable to see if perhaps things worked despite the warning, but it does not appear to be so. Any ideas? I've attached the complete output below for reference. Thanks in advance, Peng Objective Caml version 3.10.2 # #use "topfind";; - - : unit = () [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] Findlib has been successfully loaded. Additional directives: #require "package";; to load a package #list;; to list the available packages #camlp4o;; to load camlp4 (standard syntax) #camlp4r;; to load camlp4 (revised syntax) #predicates "p,q,...";; to set these predicates Topfind.reset();; to force that packages will be reloaded #thread;; to enable threads - - : unit = () # #require "batteries";; /home/peng/app-data/godi-latest/lib/ocaml/std-lib/bigarray.cma: loaded /home/peng/app-data/godi-latest/lib/ocaml/std-lib/nums.cma: loaded [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top: added to search path /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top/num_top.cma: loaded [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num: added to search path [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib: added to search path /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib/sexplib.cma: loaded /home/peng/app-data/godi-latest/lib/ocaml/std-lib/unix.cma: loaded /home/peng/app-data/godi-latest/lib/ocaml/std-lib/str.cma: loaded [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib: added to search path [.] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4: added to search path [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/camomile] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/camomile: added to search path /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/camomile/camomile.cma: loaded [.] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/batteries_nothreads] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/camomile] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/sexplib] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/num-top] [/home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/findlib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib] [/home/peng/app-data/godi-latest/lib/ocaml/std-lib/camlp4] /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/batteries_nothreads: added to search path /home/peng/app-data/godi-latest/lib/ocaml/pkg-lib/batteries_nothreads/batteries.cma: loaded Reference to undefined global `Ref' # open Data.Mutable;; Characters 0-17: open Data.Mutable;; ^^^^^^^^^^^^^^^^^ Unbound module Data.Mutable # On Sunday 12 October 2008 09:59:13 am David Teller wrote: > Hi, > > It seems we forgot one dependency in the README: you need Bin-prot to > get Batteries to work. I must confess that we could have removed that > dependency for Alpha 1, as we don't use any feature of Bin-prot yet. > > Cheers, > David > > On Sun, 2008-10-12 at 01:42 -0400, Peng Zang wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Hi, > > > > I think Batteries Included is a great idea and have been looking forward > > to seeing how it turns out. I've just installed it and have been playing > > around with it. A quick question, how do you get batteries to work in > > the toplevel? I tried the usual: > > > > # #use "topfind";; > > # #require "batteries";; > > No such package: bin_prot.syntax - Required by > > `batteries.bin_prot.syntax' > > > > But I get an error. Attempts to "#require" batteries.bin_prot.syntax > > yield similar errors. > > > > This is quite important to me. I don't know what the general sentiment > > of the community is, but the toplevel is one of the major reasons I use > > OCaml. In fact, for every Makefile I write, I write an equivalent > > toplevel init file. This ensures that any code I write in the toplevel, > > will compile with no changes and vice versa. Even when making simple > > edits to compiled code, I will open up a toplevel, load the library/file > > and open the correct name space of where the edit will take place > > (automated with some elisp of course). This allows me to test, in the > > toplevel, each little change I make. > > > > Thanks in advance, > > > > Peng > > > > On Saturday 11 October 2008 09:48:34 am David Teller wrote: > > > Dear list, > > > > > > We're happy to inform you that the first alpha version of OCaml > > > Batteries Included has just been released. You may find the source on > > > the Forge [1], as well as the release notes [2], and you can browse > > > the documentation online, including a detailed presentation of what > > > OCaml Batteries Included is all about [3]. A GODI package has also > > > been uploaded for OCaml 3.10 . > > > > > > The list of features is a tad too long for detailing it here. Let's > > > just say that there are new or improved data structures, i/o, unicode > > > ropes, syntax extensions, primitives for invoking some of the tools of > > > the toolchain, etc. > > > > > > It's alpha-level code, so use with caution, and not all the features we > > > have in mind have been implemented yet. On the other hand, any form of > > > feedback is greatly appreciated. > > > > > > [1] http://forge.ocamlcore.org/frs/?group_id=17&release_id=44 > > > [2] http://forge.ocamlcore.org/frs/shownotes.php?release_id=44 > > > [3] http://forge.ocamlcore.org/docman/?group_id=17 > > > > > > Have fun coding, > > > David > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v2.0.7 (GNU/Linux) > > > > iD8DBQFI8Y4/fIRcEFL/JewRAst2AKCRnKy/uB70LhSBnb/Rvny2EJTKYwCgz+j+ > > 1oNcyf/KdXaQrwOe4dChrlk= > > =zMpC > > -----END PGP SIGNATURE----- > > > > _______________________________________________ > > 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFI8i0nfIRcEFL/JewRApnwAKCqPZaijL+32hbQj8DlohKlk4118wCglYim LCDOwzSBws+IRUIq80ChZQs= =ieQo -----END PGP SIGNATURE-----