flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
<Jedai> rpg: aab is smaller, it's lexicographic order
<rpg> yeah i kinda figured that
<rpg> lol
<rpg> i even didd a little comparison test
<rpg> ab > aab
Axioplase is now known as Axioplase_
struktured has joined #ocaml
jeddhaberstro has quit []
Smerdyakov has joined #ocaml
Smerdyakov has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
<palomer> hah
<palomer> I wrote this magnificient algorithm a couple of months ago
<palomer> and now I can't understand it for the life of me
<ozy`> did you accidentally write it in haskell?
<palomer> woops! so that's why I can't understand liftM . $ return uncurry id
<mbishop> heh
<palomer> I think that deserves more than a heh.
<mbishop> heh heh
<palomer> better
doy has joined #ocaml
<doy> so i have a program running on linux with lablgtk
<doy> and i'm trying to get it running on windows
<doy> i've gotten everything compiled, but when i try to run the program, all i get is "Fatal error: exception Not_found"
<doy> this isn't very helpful, especially since there's no windows debugger
<doy> any ideas?
<doy> the example programs packaged with lablgtk work fine
Associat0r has quit []
<flux> doy, compile with -g
<flux> then export OCAMLRUNPARAM=b
<flux> and then run the binary so that you can see its standard output
Submarine has joined #ocaml
seafood has joined #ocaml
<tsuyoshi> gdb doesn't work on windows?
subconscious has quit ["Leaving"]
<doy> flux: awesome, that's working
<doy> thanks
zakiazigazi has joined #ocaml
<tsuyoshi> doy: so what was the problem causing the exception?
<doy> tsuyoshi: trying to get the HOME environment variable
<doy> (:
<doy> second question: what kinds of things would make ocamlopt run out of memory when compiling a native-code file?
<flux> ocamlopt run out of memory? sounds like a bug :-o
<doy> any ideas on how to figure out what's wrong?
<flux> what version?
seafood has quit []
<doy> 3.10.0
Submarine has quit [Read error: 110 (Connection timed out)]
<flux> well, try 3.10.2 :-)
<flux> backstraces should work in natively compiled binaries too, though
<flux> to perhaps the OCAMLRUNPARAM=b -trick?
<doy> no, it's during compilation
<doy> and i've tried 3.10.0 on linux and 3.10.2 on windows, both do the same thing
<flux> oh it does that on linux too?
<doy> yeah
<flux> perhaps you're really doing something to trick the compiler up; could still be a bug
<flux> is your source code very large? (such as computer-generated?)
<doy> not incredibly, it's not generated
Snark has joined #ocaml
<doy> that's the make output
<doy> that's the file it's trying to compile
<flux> what's CamlExt?
<doy> just a bunch of utility functions
<flux> sigh, DialSlider.. this is an endless swamp :)
<flux> and I actually need to be going, perhaps I can venture further later
<doy> alright
<doy> (:
<doy> dialslider is a custom gtk widget i wrote
<doy> the whole project is only like 5.5k lines
mishok13 has joined #ocaml
Submarine_ has joined #ocaml
Submarine_ has quit [Client Quit]
<tsuyoshi> doy: that file is not large.. I would report that as a bug
<tsuyoshi> I don't see anything unusual in it at all
filp has joined #ocaml
filp has quit [Client Quit]
<doy> alright, reported
marmotine has joined #ocaml
filp has joined #ocaml
filp has quit [Client Quit]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
ozy` has quit []
jeremiah has joined #ocaml
ozy` has joined #ocaml
ozy` has quit [Client Quit]
Axioplase_ is now known as Axioplase
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
<flux> hello.
<Yoric[DT]> How do you do?
<flux> I'm fine. How are you?
<flux> although I'm most of the time dumbfounded by that question. I'm not sure if there is supposed to be an answer or a counter-question or not ;)
<flux> atleast not anything deep is expected as the answer..
<Yoric[DT]> :)
<Axioplase> ooh. I'm not the only one left on Earth to ask "how do you do?" \o/
<Yoric[DT]> :)
<Yoric[DT]> mmmhhh...
<Yoric[DT]> I'm currently attempting to rename things around my repository.
<Yoric[DT]> Does anyone know how I can easily remove a prefix from a file name?
<Yoric[DT]> Oh, forget it. Just remembered rename.
<Axioplase> rename 's/^prefix(.*)/$1/' * iirc
<Yoric[DT]> Yep.
<flux> just 's/^prefix//' would do, though
<Axioplase> indeed
rwmjones has joined #ocaml
zakiazigazi has left #ocaml []
seafood has joined #ocaml
Philonous has joined #ocaml
<Yoric[DT]> I'm in a module called Foo (which is actually going to be packed as Bar.Foo) and I need to make reference to another module called Foo.
<Yoric[DT]> Can anyone think of a simple way of doing this, besides packing that other Foo module in Sna.Foo?
filp has joined #ocaml
filp has quit [Client Quit]
seafood has quit []
Hadaka has quit [calvino.freenode.net irc.freenode.net]
Yoric[DT] has quit ["Ex-Chat"]
mjambon has joined #ocaml
mishok13 has quit [Read error: 110 (Connection timed out)]
Naked has joined #ocaml
sporkmonger has joined #ocaml
guillem__ has joined #ocaml
mjambon has left #ocaml []
subconscious has joined #ocaml
<Axioplase> Simple ? no. I'd tweak the code and try some two passes linking (solution not guaranteed)
GustNG has joined #ocaml
Associat0r has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
jeremiah has joined #ocaml
filp has joined #ocaml
filp has quit [Client Quit]
doy has left #ocaml []
Axioplase is now known as Axioplase_
rwmjones has quit ["Closed connection"]
petchema has quit [Remote closed the connection]
hkBst has joined #ocaml
GustNG1 has joined #ocaml
petchema has joined #ocaml
GustNG2 has joined #ocaml
GustNG3 has joined #ocaml
GustNG has quit [Read error: 110 (Connection timed out)]
GustNG1 has quit [Read error: 110 (Connection timed out)]
GustNG2 has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
jihelhere has joined #ocaml
tomh has joined #ocaml
Linktim_ has joined #ocaml
pango has joined #ocaml
Linktim has quit [Read error: 113 (No route to host)]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
tomh has joined #ocaml
guillem__ has quit [Remote closed the connection]
guillem has joined #ocaml
jihelhere has quit ["Leaving."]
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
Kopophex has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> smimram: ping
Philonous has quit [Remote closed the connection]
<smimram> Yoric[DT]: pong
<flux> man, that's some bad latency
struktured_ has joined #ocaml
<olegfink> those guys at Houston had to deal with something like that
struktured has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Yoric[DT] has joined #ocaml
munga has quit [Read error: 110 (Connection timed out)]
munga has joined #ocaml
GustNG has joined #ocaml
GustNG3 has quit [Read error: 110 (Connection timed out)]
tomh has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Submarine has joined #ocaml
struktured_ has quit [Read error: 110 (Connection timed out)]
struktured_ has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
guillem has quit [Remote closed the connection]
struktured__ has joined #ocaml
Snark has quit ["Ex-Chat"]
GustNG1 has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
struktured_ has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
GustNG has quit [Read error: 110 (Connection timed out)]
Palace_Chan has joined #ocaml
jeremiah has joined #ocaml
DRMacIver has joined #ocaml
Submarine has quit [Read error: 110 (Connection timed out)]
<DRMacIver> Is there something in the way of "Here's everything you need to know about building ocaml projects?" introduction. I'm trying to extract a library from an existing OCaml application and *cough* use it as a Ruby module, but my knowledge of OCaml is limited to mucking around in the REPL years ago
<DRMacIver> I've more or less grasped the "use it as a Ruby module" part, but I'm a little confused by the plethora of file extensions and how to take an existing pile of source files and package it as a binary library.
<hcarty> DRMacIver: rocaml may be of some assistance - http://eigenclass.org/repos/rocaml/head/
<DRMacIver> hcarty: Right, that's what I'm using
<DRMacIver> I seem to understand how to take a single source file and turn it into a Ruby module (I'm sure I'll fall on some of the details, but I'll figure those out), but I'm totally unfamiliar with the OCaml build ecosystem.
<DRMacIver> So something like a "Here's how to create an OCaml project and package it as a library" tutorial or whatever would be fantastic. :) Failing that I'll try to just read the OCamlbuild documentation until things make sense.
<hcarty> DRMacIver: Do you want to install the OCaml library for use from OCaml? I don't have any experience with rocaml
<DRMacIver> hcarty: Yes
<hcarty> DRMacIver: For installing, ocamlfind is probably the easiest way to go
<DRMacIver> hcarty: My aim here is to have the main library compiled as some sort of binary which I can package and then write a small OCaml frontend which deals with the export to ruby
<hcarty> ocamlfind install mymodule mymodule.cma mymodule.cmxa META ...
<DRMacIver> hcarty: This seems to generate an arbitrarily large number of module files though (well, ok, not that large. But more than one. :) ). Am I able to bundle these together in some way?
<DRMacIver> Sorry for the stupid questions. :)
<hcarty> If the module is pure OCaml (no C or other languages) then ocamlbuild + ocamlfind is probably easiest
<hcarty> They definitely are not stupid questions :-) A "holy crap where did all of these files come from" reaction is understandable.
<DRMacIver> The module is pure OCaml. Hm. I suppose I could get the extconf.rb (script which handles the configuration of the external project) to manage compiling and installing it.
<DRMacIver> I'm trying to think in terms of how to make this work for bundling the OCaml code in either source or compiled form, so just installing it on my local system isn't enough
<hcarty> DRMacIver: There was a mail list post about this recently. http://groups.google.com/group/fa.caml/browse_thread/thread/cf74ffa8876aa578
<hcarty> That may be rather opaque though, coming in without much experience
<DRMacIver> Thanks. I'll take a look
<hcarty> This Vec library is fairly simple, and installs cleanly with ocamlfind: http://luca.dealfaro.org/Vec-Extensible-Functional-Arrays-for-Ocaml
<hcarty> ocamlbuild could just as easily be used to handle the compilation. But the "install:" section of the Makefile should give help get an idea of which files to install
<DRMacIver> There's actually already an ocamlbuild setup for the project.
<DRMacIver> (For what it's worth, the project is hunpos. I'd like to be able to use its parts of speech tagging as a library)
<hcarty> Generally, the .cmi, .cma, cmxa, .so and .a files are, I think, enough. The .cmo and .cmx files can also be useful for the compiler.
<DRMacIver> Is there an explanation somewhere of what the different extensions do?
<DRMacIver> I mean, some of them are standard, but I'm a little perplexed by cmi, cma, and cmxa. (the mli is an interface description for the module, right?)
<hcarty> DRMacIver: That mailing list post has some explanation
seafood has joined #ocaml
<DRMacIver> Oh, so it does. Sorry
<hcarty> DRMacIver: .mli is the interface to a module; .cmi is (I think) a compiled .mli; .cma is a byte code library package; .cmxa is a native code library package
<DRMacIver> ok
<hcarty> Richard Jones' post has more detail
<hcarty> DRMacIver: Sorry, here is a wiki page with (hopefully) more readable information from the above mailing list thread - http://ocaml-tutorial.org/filenames
<DRMacIver> Ah, excellent. Thanks
<hcarty> The object and library files should generally be installed, and the .mli files can be useful to provide for reference purposes
<DRMacIver> ok
sporkmonger has quit []
marmotine has quit ["mv marmotine Laurie"]
<hcarty> DRMacIver: I apologize for the convoluted explanation .. I hope it has helped
<DRMacIver> I think so. And thanks very much for it. :) I'm playing around with ocamlfind and ocamlbuild now and will probably have more questions in a bit
<DRMacIver> Hm. I think I might have communicated my problem not brilliantly. The issue isn't just that I have a single module and need to know how to package that. i.e. it's not just mymodule.{cmx, cmi, ...} I need to package. It's a multi-module project and I'm not sure how to package all the different ones together.
<hcarty> DRMacIver: Will they all be packed in to one large module?
<DRMacIver> Um. I think I only need the definitions in one module whcih uses all the rest
<DRMacIver> Does that answer your question? I'm not sure what it means to pack multiple modules into one.
<hcarty> Would the individual modules be used separately, or will they all be treated as pieces of a whole, never used on their own?
<DRMacIver> Never used on their own
<DRMacIver> There's basically one module I actually care about and all the rest are there to support it
<DRMacIver> As far as I know they need never be referred to in source
Linktim_ has quit ["Quitte"]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
<hcarty> DRMacIver: Then /I think/ only the resulting library needs to be installed
<DRMacIver> Ok. I'm not entirely clear ony how to package it all as one library though.
<DRMacIver> Some experimentation suggests that just distributing the output files for the final module doesn't do the job
<DRMacIver> At least for the bytecode form it complains about missing references
<hcarty> DRMacIver: If you are using ocamlbuild, you may need to create a mylib.mlpack and a _tags file. This may depend on how you are putting the modules together
itewsh has quit ["KTHXBYE"]
<DRMacIver> Ah, ok. Thanks.
<Yoric[DT]> Yep, you'll need that.
<Yoric[DT]> Don't forget packing, unpacked modules are evil (and cause collisions).
<hcarty> DRMacIver: http://ocaml.pastebin.com/d51dd573f is some of what I use
<Yoric[DT]> Anyway, time to call it a night.
<Yoric[DT]> Cheers.
<hcarty> Yoric[DT]: Thanks for the clarification
<Yoric[DT]> A pleasure.
Yoric[DT] has quit ["Ex-Chat"]
<DRMacIver> hcarty: Thanks
<hcarty> DRMacIver: You're welcome. The .mlpack and _tags files let ocamlbuild know what modules to pack together in to the module Mylib
hkBst has quit [Read error: 104 (Connection reset by peer)]
<hcarty> With Mylib compiled in this way, I only have to install the mylib.{cma, cmxa, ...} files for the module to work properly
<DRMacIver> Great. Thanks.
<DRMacIver> And then allt he modules packed together are visible as submodules of MyLib?
<DRMacIver> Or they have the same top level names?
<hcarty> DRMacIver: They are submodules of Mylib. So there is Mylib.General, Mylib.MyArray, Mylib.Math, etc
<hcarty> You could use "open Mylib" to expose all of those modules directly, open them individually, or just qualify their contents with Mylib.Foo.x
<DRMacIver> ok
sporkmonger has joined #ocaml
jeddhaberstro has joined #ocaml
js__ has joined #ocaml
<DRMacIver> Oops. Got to go
<hcarty> DRMacIver: Best of luck
<DRMacIver> hcarty: Thanks very much for your help. Hopefully I'll get this figured out. :)
<DRMacIver> (ANd if not, I'll be back with more questions. :) )
js__ has left #ocaml []
<hcarty> :-)
spyker has joined #ocaml
spyker has quit [Client Quit]
Mr_Awesome has quit ["aunt jemima is the devil!"]
Palace_Chan has quit [Client Quit]
seafood has quit []
seafood has joined #ocaml
seafood has quit [Client Quit]
seafood has joined #ocaml
seafood has quit [Client Quit]