"ocaml_beginners"::[] getting up and running with godi and batteries

View: New views
4 Messages — Rating Filter:   Alert me  

"ocaml_beginners"::[] getting up and running with godi and batteries

by Martin DeMello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 2, 2009 at 7:32 PM, Peng Zang <peng.zang@...> wrote:
>
> In my opinion, the only way to use OCaml is through GODI. It makes installing
> and using packages easy. If you haven't tried GODI, I strongly urge you to
> give it a try. It makes a world of difference.

Ah, the perpetual tension between the distribution's package manager
and the language's :) Anyway, I've uninstalled ocaml and packages from
arch and installed godi.

Here's my new makefile:

# -------------------------------------------------------
RESULT = varix

SOURCES = \
                                        utility.ml\
                                        dawg.ml bag.ml sset.ml\
                                        search.ml \
                                        debug.ml \
                                        ledit/cursor.ml \
                                        ledit/ledit.mli ledit/ledit.ml \
                                        varix.ml

GODI = /home/martin/opt/godi/lib/ocaml
LIBS = unix bigarray str pcre run_mikmatch_pcre
PACKS = unix bigarray str mikmatch_pcre pcre batteries
INCDIRS = $(GODI)/pkg-lib/batteries $(GODI)/std-lib/camlp5
$(GODI)/pkg-lib/pcre $(GODI)/pkg-lib/mikmatch_pcre
CREATE_LIB = yes
PRE_TARGETS = ledit/pa_local.cmo ledit/pa_def.cmo
USE_CAMLP4 = yes
PP = ./camlp4find $(PACKS)
export PP

OCAMLMAKEFILE = OCamlMakefile
include $(OCAMLMAKEFILE)
# -------------------------------------------------------

But now, how do I actually use batteries? If, for instance, I try to
add extlib to LIBS it complains about the missing cmxa file (and
indeed godi/lib/ocaml/pkg-lib/batteries doesn't contain any .cma or
.cmxa files).

Also the version  of batteries shipping with godi is between beta1 and
beta2; can I upgrade it manually or will I have to wait for the godi
package to update?

martin

Re: "ocaml_beginners"::[] getting up and running with godi and batteries

by Peng Zang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm thrilled you installed GODI!  Isn't it awesome?  I run Gentoo and for a
long time I used the ocaml packages in portage, but it just didn't have the
breadth of packages.  Also with GODI I can have several versions installed
(for 3.09, 3.10 and 3.11).

I think from that makefile you can already use batteries.  Here is a sample
project I threw together as a demo.  (I think it works, haven't had a chance
to test it yet)  (Also my OCamlMakefile is slightly modified, just minor
tweaks).

Hope this helps illustrate how to use batteries.

Peng


On Monday 02 November 2009 01:56:48 pm Martin DeMello wrote:

> On Mon, Nov 2, 2009 at 7:32 PM, Peng Zang <peng.zang@...> wrote:
> > In my opinion, the only way to use OCaml is through GODI. It makes
> > installing and using packages easy. If you haven't tried GODI, I strongly
> > urge you to give it a try. It makes a world of difference.
>
> Ah, the perpetual tension between the distribution's package manager
> and the language's :) Anyway, I've uninstalled ocaml and packages from
> arch and installed godi.
>
> Here's my new makefile:
>
> # -------------------------------------------------------
> RESULT = varix
>
> SOURCES = \
> utility.ml\
> dawg.ml bag.ml sset.ml\
> search.ml \
> debug.ml \
> ledit/cursor.ml \
> ledit/ledit.mli ledit/ledit.ml \
> varix.ml
>
> GODI = /home/martin/opt/godi/lib/ocaml
> LIBS = unix bigarray str pcre run_mikmatch_pcre
> PACKS = unix bigarray str mikmatch_pcre pcre batteries
> INCDIRS = $(GODI)/pkg-lib/batteries $(GODI)/std-lib/camlp5
> $(GODI)/pkg-lib/pcre $(GODI)/pkg-lib/mikmatch_pcre
> CREATE_LIB = yes
> PRE_TARGETS = ledit/pa_local.cmo ledit/pa_def.cmo
> USE_CAMLP4 = yes
> PP = ./camlp4find $(PACKS)
> export PP
>
> OCAMLMAKEFILE = OCamlMakefile
> include $(OCAMLMAKEFILE)
> # -------------------------------------------------------
>
> But now, how do I actually use batteries? If, for instance, I try to
> add extlib to LIBS it complains about the missing cmxa file (and
> indeed godi/lib/ocaml/pkg-lib/batteries doesn't contain any .cma or
> .cmxa files).
>
> Also the version  of batteries shipping with godi is between beta1 and
> beta2; can I upgrade it manually or will I have to wait for the godi
> package to update?
>
> martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFK73DLfIRcEFL/JewRAqHSAJ9l0GrM2/iK1yB/WfczrjR/oW4MmQCgiRqL
/p5ulg9fhSJiwGClJIhM6Lk=
=pmFG
-----END PGP SIGNATURE-----


[Non-text portions of this message have been removed]


Re: "ocaml_beginners"::[] getting up and running with godi and batteries

by Martin DeMello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 5:22 AM, Peng Zang <peng.zang@...> wrote:
>
> I'm thrilled you installed GODI! Isn't it awesome? I run Gentoo and for a
> long time I used the ocaml packages in portage, but it just didn't have the
> breadth of packages. Also with GODI I can have several versions installed
> (for 3.09, 3.10 and 3.11).

yeah, it looks very neat :) some packages (lablgl, lablgtk and omake)
compiled from pacman but not from godi, but i don't need any of them
immediately and i'm happy to take the time to figure it out.

> I think from that makefile you can already use batteries. Here is a sample
> project I threw together as a demo. (I think it works, haven't had a chance
> to test it yet) (Also my OCamlMakefile is slightly modified, just minor
> tweaks).
>
> Hope this helps illustrate how to use batteries.

404 program not found :)

martin

Re: "ocaml_beginners"::[] getting up and running with godi and batteries

by Rakotomandimby Mihamina-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

11/02/2009 09:56 PM, Martin DeMello:
> Ah, the perpetual tension between the distribution's package manager
> and the language's :)

Distribution package management is one of the strength of Linux.

--
       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                                    +261 33 11 207 36