gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Batteries 1.2.0 released http://batteries.forge.ocamlcore.org
pad has quit [Read error: Connection reset by peer]
pad has joined #ocaml
pad has left #ocaml []
ccasin has joined #ocaml
Submarine has quit [Ping timeout: 264 seconds]
alexyk has joined #ocaml
elehack has joined #ocaml
ski has quit [Remote host closed the connection]
ski has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
gildor has quit [Ping timeout: 276 seconds]
valross has joined #ocaml
ski has joined #ocaml
gildor has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
kmkaplan has quit [Ping timeout: 260 seconds]
kmkaplan has joined #ocaml
valross has quit [Quit: Ex-Chat]
valross has joined #ocaml
walrus__ has joined #ocaml
walrus__ has quit [Client Quit]
elehack has quit [Ping timeout: 245 seconds]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
prince has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
elehack has joined #ocaml
<elehack> thelema, I have the Batteries GODI packaging updated and have made inquiry into getting it published.
<thelema> elehack: yay! thank you very much
<elehack> np
elehack has quit [Quit: Goodbye...]
travisbrady has quit [Quit: travisbrady]
ccasin has quit [Quit: Leaving]
alexyk has quit [Quit: alexyk]
travisbrady has joined #ocaml
f[x] has quit [Ping timeout: 240 seconds]
f[x] has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Ping timeout: 248 seconds]
coucou747 has quit [Ping timeout: 260 seconds]
coucou747 has joined #ocaml
thrasibule has quit [Ping timeout: 245 seconds]
Shoggoth has joined #ocaml
ulfdoz has joined #ocaml
mehdid has quit [Ping timeout: 260 seconds]
mehdid has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
enthymeme has joined #ocaml
joewilliams is now known as joewilliams_away
ygrek has joined #ocaml
Yoric has joined #ocaml
Amorphous has quit [Ping timeout: 248 seconds]
Associ8or has joined #ocaml
Associat0r has quit [Ping timeout: 265 seconds]
ttamttam has joined #ocaml
valross has quit [Remote host closed the connection]
Amorphous has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
Submarine has joined #ocaml
mrvn_ has quit [Ping timeout: 264 seconds]
mrvn has joined #ocaml
Skolem has joined #ocaml
<Skolem> I'm getting "Error: Unbound value Multiset.of_list" when I run my program with "ocaml ab.ml". multiset.mli and multiset.ml are in the same directory as ab.ml, and of_list is part of the module specification, so I would (naively) expect ocaml to find the module & the function. What am I missing? Do I need to somehow add "." to ocaml's include path, and if so, how do I do that? Googling for "ocaml include-path" wasn't helpful.
ftrvxmtrx has joined #ocaml
<adrien> Skolem: did you compile the multiset.ml file?
<adrien> also, 'ocaml' will only run your program through the toplevel, if you want to compile, you'll have to use 'ocamlc' instead
ztfw has joined #ocaml
<adrien> and last point, you need to put 'multiset.cmo' on the command-line
ikaros has joined #ocaml
<Skolem> adrien: I ran ocamlopt -c multiset.ml which created multiset.cmi
<Skolem> How do I get the cmo?
<julm> ocamlc -c
<adrien> you use 'ocamlc' XOR 'ocamlopt', you can't mix the output of both (except for the .cmi)
<adrien> so, if you want a .cmo, use ocamlc as julm said
<adrien> ocamlc -> bytecode, .cmo and .cma files
<adrien> ocamlopt -> native code, .cmx and .cmxa files
<Skolem> Beautiful, OK, I think that fixed it.
<Skolem> I'm following allong with this, and when I try the "Set.Make" examples, I get: "Error: Unbound constructor Set.Make". What do I have to do to "load" the Set.Module in the toplevel?
<Skolem> Oops, by "this" I mean http://www.ocaml-tutorial.org/modules
<Skolem> Oh, wait. TYpo. Sorry for the noise, it's working.
<adrien> :-)
ttamttam1 has joined #ocaml
ttamttam has quit [Ping timeout: 276 seconds]
<Skolem> I'm sure this is an annoyingly easy problem, but I'm just starting out and I've put off learning ocaml long enough, so I'll bother you guys with a few more questions. I'm tryingto use multiset.ml from http://web.archive.org/web/*/http://lamp.epfl.ch/~sbriais/caml/multiset.tgz (Jun 07, 2004 version). By the way, I welcome references to a more current implementation of a multiset data structure in ocaml. Anyway...
avsm has joined #ocaml
<Skolem> I compiled multiset.ml as above, and have a file test.ml which contains two lines: "module String_set = Set.Make (String);;" and "module Region_set = Multiset.Make (String);;". When I run "ocaml multiset.cmo test.ml", I get: "Error: Unbound module Multiset.Make"
<Skolem> SO it's failing on the Multiset make (I gather module names are equal to the file name with the first letter capitalized?), not on the Set.Make.
<Skolem> I think my syntax is OK, because I copied the 2nd line from the first and just replaced Set with Multiset. Maybe there's something wrong in the implementation of the multiset, but I doubt it, it seems like people wer using it for a hile there.
<Skolem> Anyway, I want a multiset, so if someone wants to help me get the "hello wold" multiset working, that'd be awesome. If not, I'll keep bumbling along and figure it out eventually.
jonafan has quit [Read error: Connection reset by peer]
<adrien> Skolem: it's working for me... maybe try to remove the .cm* files and try again?
<Skolem> Ok, one sec.
<Skolem> So, first question. When I run, "ocamlc -c multiset.ml", it says, "Error: Could not find the .cmi file for interface multiset.mli". What does that even mean?
<Skolem> (I feel like the actual programming will be simpler once I get these framework/library/compilation issues sorted out, but I may be mistaken...)
<Skolem> For the record, I've had spectacularly poor results when googling for these error messages, by the way. As compared to when I try the same thing with Perl or C. Luckily you guys are helpful, but I'd rather let google answer the boring questions and save the interesting ones for here.
<adrien> ah, maybe it hadn't created the .cmo file?
<adrien> if you have a A.mli file in the same folder as A.ml, you need to 'compile' it first: ocamlc -c A.mli
<adrien> it'll create a .cmi file
<Skolem> I have no idea... When I google for (ocaml cmi mli) the top hit is "The Structure of OCaml Programs". Oh, that looks helpful. Unfortunately the string "cmi" occurs just once on that page, and it's in the line "/usr/lib/ocaml/3.08/graphics.cmi". Gah!
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
<Skolem> adrien: Ah! That worked. Ok, moving on...
<adrien> :-)
<adrien> googling for that shouldn't be that easy if you don't already know the answer unfortunately =/
<Skolem> Now I run "ocaml multiset.cmo test.ml" and it works! Hooray!
<Skolem> ok, now to get down to some coding. *rubs hands gleefully*
<adrien> =)
ygrek has quit [Ping timeout: 245 seconds]
<Skolem> I want to make a set in which each element is a list of integers. When I run this simple program, "type intlist = List of int;; module IntList_set = Set.Make (struct type t = intlist let compare = compare end);; let x = IntList_set.add [1;2;3]", I get "Error: This expression has type 'a list but an expression was expected of type IntList_set.elt = intlist" It looks like the types align, even in the error message, so what does that me
<f[x]> List of int is not int list
<adrien> 'List of int' doesn't define a list of int, you want 'int list' instead
<f[x]> List of int is "isomorphic" to A of int
<Skolem> Ah. Gotcha.
ikaros_ has joined #ocaml
Submarine has quit [Quit: Leaving]
ikaros has quit [Ping timeout: 264 seconds]
LionMadeOfLions has quit [Ping timeout: 248 seconds]
infoe has quit [Ping timeout: 264 seconds]
infoe has joined #ocaml
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
barismetin has joined #ocaml
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has quit [Excess Flood]
LionMadeOfLions has joined #ocaml
LionMadeOfLions has left #ocaml []
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Submarine has joined #ocaml
kaustuv has joined #ocaml
ygrek has joined #ocaml
<Skolem> Suppose I have "module StringSet = Set.Make (String)". How do I declare "stringset" to be the type in which each element is a StringSet?
leino has joined #ocaml
<mfp> Skolem: type stringset = StringSet.t
<Skolem> I can write "type stringset = StringSet.t", but then when I type "[StringSet.empty]" into the toplevel, it infers the type to be "StringSet.t = <abstr>", not "stringset".
prince has quit [Ping timeout: 258 seconds]
<mfp> Skolem: the toplevel sometimes prints the wrong type alias, but there will be no pb as far as typing is concerned
<Skolem> OK, thanks.
prince has joined #ocaml
<mfp> in fact, there's no way the toplevel could know that StringSet.empty is to be shown as being of type stringset
<mfp> OTOH, if you do let a : stringset = StringSet.empty;;
<mfp> you get # a;; - : stringset = <abstr>
sidolin has left #ocaml []
ygrek has quit [Ping timeout: 245 seconds]
rossberg_ has joined #ocaml
rossberg_ has quit [Client Quit]
rossberg has quit [Quit: Leaving]
rossberg has joined #ocaml
rossberg has left #ocaml []
rossberg has joined #ocaml
rossberg has left #ocaml []
valross has joined #ocaml
rossberg has joined #ocaml
<rossberg> Skolem, you want a set of set of strings?
<rossberg> then simply do: module StringSetSet = Set.Make (Set.Make (String))
ftrvxmtrx_ has joined #ocaml
sdschulz` has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 272 seconds]
sdschulze has quit [Ping timeout: 258 seconds]
ftrvxmtrx_ has quit [Ping timeout: 264 seconds]
ftrvxmtrx has joined #ocaml
<Skolem> mfp: awesome! rossberg: cool, thanks.
Skolem has quit [Quit: Connection reset by pear]
_andre has joined #ocaml
_unK has joined #ocaml
thrasibule has joined #ocaml
valross has quit [Quit: Ex-Chat]
Yoric has quit [Ping timeout: 258 seconds]
thrasibule has quit [Ping timeout: 258 seconds]
Associ8or has quit [Quit: Associ8or]
ccasin has joined #ocaml
Modius has joined #ocaml
ftrvxmtrx has quit [Remote host closed the connection]
boscop has joined #ocaml
ftrvxmtrx has joined #ocaml
derdon has joined #ocaml
Yoric has joined #ocaml
joewilliams_away is now known as joewilliams
oriba has joined #ocaml
jonafan has joined #ocaml
Shoggoth has quit [Read error: Connection reset by peer]
kaustuv has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
travisbrady has quit [Quit: travisbrady]
ulfdoz has joined #ocaml
_unK has quit [Remote host closed the connection]
ttamttam1 has quit [Quit: Leaving.]
Submarine has quit [Quit: Leaving]
ftrvxmtrx has quit [Ping timeout: 265 seconds]
fraggle_laptop has quit [Read error: Operation timed out]
travisbrady has joined #ocaml
ftrvxmtrx has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
ygrek has joined #ocaml
_unK has joined #ocaml
barismetin has quit [Remote host closed the connection]
sepp2k has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
palomer has joined #ocaml
avsm has quit [Quit: Leaving.]
ikaros_ has quit [Quit: Leave the magic to Houdini]
palomer has quit [Quit: Leaving]
ttamttam has joined #ocaml
Yoric has quit [Quit: Yoric]
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 248 seconds]
palomer has joined #ocaml
ztfw` has joined #ocaml
ztfw has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
oc13 has joined #ocaml
Submarine has joined #ocaml
oriba has quit [Quit: Verlassend]
Associat0r has joined #ocaml
ztfw` has left #ocaml []
<hcarty> mrvn: Did you report a bug on your module packing problem? (val bar1 : Foo.foo_t in not included in val bar1 : Foo.foo_t)
<palomer> :o
<palomer> im trying to use curses with caml
<palomer> but I'm getting this error:
<palomer> /usr/lib/ocaml/curses/libcurses_stubs.a(ml_curses.o): In function `mlcurses_attrset':
<palomer> (.text+0x5f): undefined reference to `stdscr'
Yoric has joined #ocaml
<palomer> yoric!
<palomer> ltns
<palomer> how's mlstate?
<Yoric> hi
<Yoric> It's fine, thanks :)
<Yoric> Plenty of interesting problems to solve.
<Yoric> What about Jane Street?
<palomer> great
<palomer> trying to debug a curses problem
<palomer> (.text+0x2f13): undefined reference to `slk_clear'
<palomer> /usr/lib/ocaml/curses/libcurses_stubs.a(ml_curses.o): In function `mlcurses_slk_label':
<palomer> got any hints?
<sgnb> palomer: could you give more context?
<derdon> palomer: curses is PITA
<sgnb> (i.e. repro case)
<palomer> ocamlfind ocamlopt -package curses -warn-error A -I . -o test.opt test.cmx -linkpkg
<palomer> that's what I compile with
<sgnb> and what is test.ml?
<palomer> let _ = Curses.stdscr ()
<palomer> I get a bunch of undefined references
<sgnb> works for me
<sgnb> what is your system?
<palomer> ubuntu 9.10
<flux> I remember having some issues with curses as well
<palomer> what do undefined references come from?
<palomer> hrmph
<palomer> how do I get ocamlfind to output the exact ocaml command?
<hcarty> palomer: Improper linking with C most likely
<hcarty> palomer: -verbose
<palomer> ocamlopt -verbose -warn-error A -I . -o test.opt -I /usr/lib/ocaml/curses -ccopt -I/usr/lib/ocaml/curses -ccopt -L/usr/lib/ocaml/curses /usr/lib/ocaml/curses/curses.cmxa test.cmx
<palomer> that's what I'm running
<palomer> I don't see any references to the object files
<hcarty> palomer: It could be a problem with the Ubuntu OCaml Curses package
<palomer> ok, I'll install from source
* sgnb can reproduce the bug
<hcarty> Or it could be a bug in the bindings :-)
<palomer> so the ocamlfind command works, but not the ocamlopt command?
<sgnb> there is a new version, btw
<travisbrady> I'm getting a 'bus error' message when trying to run a sample program I wrote to interface w/ a C library on OS X. Anyone know how I get a more detailed error message?
<palomer> of the bindings?
<palomer> where?
<sgnb> palomer: yes... and of ubuntu
<palomer> so I should simply upgrade?
<sgnb> karmic is pre-dh_ocaml era
<palomer> what's dh_ocaml?
<sgnb> I'm not sure it will solve your issue, though
<palomer> I needed this
<palomer> !
<palomer> ok, I'll upgrade
<sgnb> palomer: I say that because it means that backporting packages there might be non-trivial
<sgnb> (lfi
<sgnb> (things have been simplified)
<palomer> so if I wanted to build a debian package for something
<palomer> it's now much easier, right?
<palomer> something = ocaml
<sgnb> ocaml still needs work
<sgnb> but for a basic library, dependencies of binary packages can be automatically computed
<sgnb> (of course, you still have to specify build-dependencies)
<sgnb> and besides, coherence of interface assumptions are also checked
<palomer> ok, I'll upgrade and then get back to you guys
<palomer> brb
drunK has joined #ocaml
_unK has quit [Ping timeout: 248 seconds]
drunK is now known as _unK
M| has quit [Ping timeout: 265 seconds]
derdon has quit [Ping timeout: 264 seconds]
_andre has quit [Quit: Lost terminal]
M| has joined #ocaml
sdschulz` has left #ocaml []
sepp2k1 has quit [Quit: Leaving.]
metasyntax` has joined #ocaml
ikaros has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
fraggle_ has quit [Quit: -ENOBRAIN]
travisbrady has left #ocaml []
travisbrady has joined #ocaml
fraggle_ has joined #ocaml
LionMadeOfLions has joined #ocaml
Yoric has quit [Quit: Yoric]
ulfdoz has quit [Ping timeout: 240 seconds]
ttamttam has quit [Quit: Leaving.]
valross has joined #ocaml
oc13 has quit [Quit: oc13]
Submarine has quit [Ping timeout: 264 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
Tomcat_ has joined #ocaml
palomer has quit [Remote host closed the connection]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
boscop_ has quit [Client Quit]
boscop has joined #ocaml
Tomcat_ has quit [Quit: Leaving]
Tomcat_ has joined #ocaml
Modius has quit [Quit: I'm big in Japan]
<Tomcat_> hi
<Tomcat_> anyone write games in ocaml
<Tomcat_> ?
ccasin has quit [Quit: Leaving]
<travisbrady> When wrapping a library via external is everything in the same os thread?
thrasibule has joined #ocaml
_unK has quit [Remote host closed the connection]
palomer has joined #ocaml
<palomer> whew
<palomer> do you guys ever look back at your code and think: how the #*(& could I have written that?
<adrien> I think everybody does
<Tomcat_> It's a normal situation for every programmer
<adrien> thrasibule: well, there are bindings to sdl, opengl and others
<adrien> sorry thrasibule, tab-fail
* adrien -> bed
Tomcat_ has quit [Quit: Leaving]
<mfp> travisbrady: it's in the main thread the OCaml runtime runs on, unless you use caml_(enter|leave)_blocking_section
<travisbrady> mfp: ahh, thank you very much.
<travisbrady> Am I missing a path somewhere if I'm getting "Undefined symbols: "_CAMLreturn""?
<travisbrady> I've been using macros in mlvalues.h without trouble, but now I'm trying to use stuff in caml/memory.h and caml/alloc.h
<travisbrady> Woops, my fault, was missing an include.
Associat0r has quit [Ping timeout: 265 seconds]