mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
svenl has quit [Read error: 104 (Connection reset by peer)]
psnively has joined #ocaml
svenl has joined #ocaml
zmdkrbou_ is now known as zmdkrbou
Gabriell has joined #ocaml
Ycros has quit [Remote closed the connection]
TaXules has joined #ocaml
TaXules has quit [Remote closed the connection]
Gabriell_ has joined #ocaml
Gabriell has quit [Read error: 104 (Connection reset by peer)]
Ycros has joined #ocaml
smimram has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
Gabriell_ has quit [Remote closed the connection]
Gabriell has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
Gabriell has quit [Read error: 104 (Connection reset by peer)]
TaXules has joined #ocaml
<noteventime> Could someone help me come up with an example how closures could be useful in a game, I'm trying to explain them to a C/C++ programmer friend who only seems to understand imperative game programming
<Smerdyakov> List.iter makeItDoSomething listOfMonsters
<Smerdyakov> Or even
<noteventime> He'll only say that that'd be possible with a function pointer :-/
<Smerdyakov> List.iter (makeItDoSomethingWith yourMom) listOfMonsters
<noteventime> Ahh
<noteventime> That's perfect, thanks :-D
buluca has quit ["Leaving."]
psnively has quit []
<mbishop> kinky
buluca has joined #ocaml
<slack101> from reading the speed of your program really determines how well you program
TaXules has quit [Remote closed the connection]
Gabriell has joined #ocaml
Gabriell has quit [Remote closed the connection]
Gabriell has joined #ocaml
TaXules has joined #ocaml
smimram has quit ["bli"]
TaXules has quit [Remote closed the connection]
Gabriell has quit [Remote closed the connection]
TaXules has joined #ocaml
Gabriell has joined #ocaml
TaXules has quit [Remote closed the connection]
TaXules has joined #ocaml
Ycros has quit [Read error: 110 (Connection timed out)]
Gabriell has quit [Read error: 104 (Connection reset by peer)]
Gabriell has joined #ocaml
Ycros has joined #ocaml
G has quit [Read error: 110 (Connection timed out)]
ampex has joined #ocaml
noteventime has quit ["Leaving"]
jeremiah has joined #ocaml
pantsd has joined #ocaml
hsfb has joined #ocaml
<hsfb> good nite folks... anyone knows what is happening when i try to Hashtbl.create and get this error: "The type of this expression, ('_a, '_b) Hashtbl.t,
<hsfb> contains type variables that cannot be generalized" ?
<hsfb> when i eval interactively its ok, but when i try to ocamlopt it wont work
<Smerdyakov> Recent ocaml-beginners post deals with it
<hsfb> tks
buluca has quit [Read error: 113 (No route to host)]
mbishop has quit [Excess Flood]
mbishop has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
hsfb has quit [Remote closed the connection]
joshcryer has quit [Read error: 104 (Connection reset by peer)]
joshcryer has joined #ocaml
ygrek has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
G has joined #ocaml
test1234 has joined #ocaml
test12345 has joined #ocaml
Mr_Awesome has quit ["time to impregnate a moth"]
test1234 has quit [Read error: 110 (Connection timed out)]
G has quit [Read error: 110 (Connection timed out)]
test12345 has quit [Read error: 110 (Connection timed out)]
test1234 has joined #ocaml
xavierbot has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
smimou has joined #ocaml
shawn has quit ["Leaving"]
bluestorm_ has joined #ocaml
Submarine has quit ["in Soviet Russia, Céline Dion owns you"]
Hadaka has quit [Read error: 60 (Operation timed out)]
test12345 has joined #ocaml
test1234 has quit [Read error: 104 (Connection reset by peer)]
eroyf has quit [Read error: 104 (Connection reset by peer)]
eroyf has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
bluestorm_ has joined #ocaml
buluca has joined #ocaml
noteventime has joined #ocaml
lunatico has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
lunatico_ has joined #ocaml
<lunatico_> !let hello () = print_endline "hello, world";;
<xavierbot> Characters 30-44:
<xavierbot> Parse error: "in" expected after [binding] (in [expr])
<xavierbot> !let hello () = print_endline "hello, world";;
<xavierbot> ^^^^^^^^^^^^^^
<lunatico_> let hello () = print_endline "hello, world";;
<xavierbot> val hello : unit -> unit = <fun>
<lunatico_> hello ()
<lunatico_> hello () ;;
<xavierbot> hello, world
<xavierbot> - : unit = ()
<lunatico_> help ;;
<xavierbot> Characters 1-5:
<xavierbot> help ;;
<xavierbot> ^^^^
<xavierbot> Unbound value help
<lunatico_> xavierbot, help
<xavierbot> hello lunatico_, I am xavierbot 0.7, an OCaml toplevel
<xavierbot> expr ;; evaluate expr in toplevel and print result
<xavierbot> help help message
<xavierbot> restart restart the toplevel
<xavierbot> sleep go to sleep
<xavierbot> wake wake me up from sleep
<lunatico_> xavierbot, restart
<xavierbot> Objective Caml version 3.10.0
<xavierbot> Camlp4 Parsing version 3.10.0
<rwmjones> !let hello () = print_endline "hello, world" in ref "123";;
<xavierbot> Characters 5-44:
<xavierbot> !let hello () = print_endline "hello, world" in ref "123";;
<xavierbot> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<xavierbot> Warning Y: unused variable hello.
<xavierbot> - : string = "123"
<rwmjones> !let hello () = print_endline "hello, world" in ref (hello ());;
<xavierbot> hello, world
<xavierbot> - : unit = ()
<lunatico_> xavierbot, hello () ;;
<xavierbot> Characters 1-10:
<xavierbot> xavierbot, hello () ;;
<xavierbot> ^^^^^^^^^
<xavierbot> Unbound value xavierbot
<lunatico_> hello () ;;
<xavierbot> Characters 1-6:
<xavierbot> hello () ;;
<xavierbot> ^^^^^
<xavierbot> Unbound value hello
<lunatico_> let hello () = print_endline "hello, world";;
<xavierbot> val hello : unit -> unit = <fun>
<lunatico_> hello () ;;
<xavierbot> hello, world
<xavierbot> - : unit = ()
lunatico_ has quit ["Leaving"]
lunatico has left #ocaml []
Naked has joined #ocaml
Naked is now known as Hadaka
smkl has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
test12345 has quit [Read error: 110 (Connection timed out)]
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
leo037 has joined #ocaml
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
<fremo> When I do a ocamlopt on my test program, I have this:
<fremo> /usr/local/lib/ocaml/site-lib/libevent/libmlevent.a(event_stubs.o): In function `oc_event_init':
<fremo> event_stubs.c:(.text+0xe9): undefined reference to `event_init'
<fremo> Is this something trivial to fix ?
pantsd has joined #ocaml
<fremo> event_init is in /usr/lib/libevent.so
<fremo> it works well in byte code...
leo037 has quit ["hop"]
pango_ has quit [Remote closed the connection]
love-pingoo has quit ["Connection reset by pear"]
pango_ has joined #ocaml
teclas has joined #ocaml
<teclas> hi there
<teclas> is there any "Date" manipulation module in OCaml ?
<teclas> oh, i've found this "calendar" module
<teclas> lets see...
<teclas> doesn't work
<teclas> is godi good ?
<rwmjones> teclas, yes use the Calendar module
<rwmjones> godi - it depends what you need it for :-)
<rwmjones> what operating system are you using?
test1234 has joined #ocaml
<rwmjones> fremo, sounds like a linking problem, what OS etc?
<teclas> im using gentoo
test12345 has joined #ocaml
<teclas> i can't find the calendar module
<rwmjones> don't know if it's packaged for gentoo however
<rwmjones> in fact, I don't really know what the state of ocaml & gentoo is, so perhaps godi is what you are looking for
<teclas> hmm
<rwmjones> godi is a build system which builds everything from source
<rwmjones> I have used it briefly to build stuff on mac os x, and it certainly works
<teclas> # open Calendar;;
<teclas> Unbound module Calendar
<teclas> something must have gone wrong
<teclas> can't i use it on the toplevel ?
<fremo> rwmjones: ocaml-event-0.5.0 on linux (ubuntu) but I built ocaml-3.10.0 from tarballs
<fremo> I tried all sort of things but I didn't understood all :/
<rwmjones> teclas, I don't know exactly how you built it, so that's not very useful. Did you 'make install'? Do you see it under `ocamlc -where`/calendar ?
<rwmjones> fremo, may be a packaging problem with that package
<rwmjones> `ocamlc -where`/calendar/calendar.cmi should exist
<teclas> yes ive cheked
<teclas> Installed /usr/lib/ocaml/site-packages/calendar/calendar.cmi
<fremo> I built all from scratch, I tried to rewrite a Makefile with OCamlMakefile but same problem, I added linkopts = "-cclib -levent" in META
<rwmjones> teclas, try:
<rwmjones> #directory "+calendar"
<rwmjones> or ocaml -I +calendar
<fremo> or maybe ocaml -I +site-lib/calendar
<rwmjones> fremo, you probably won't be able to mix hand-built ocaml & ocaml-* packages
<rwmjones> because they won't link properly
<fremo> I have no ubuntu package
<fremo> all hand-built
<teclas> ocamlfind query calendar
<teclas> /usr/lib/ocaml/site-packages/calendar
<teclas> hmm ok
rwmjones is now known as rwmjones_afk
<fremo> ocaml -I +site-packages/calendar
<rwmjones_afk> teclas, try #use "topfind"
<rwmjones_afk> then #require "ocaml-event" (or whatever the pkg is called)
* rwmjones_afk goes
<fremo> rwmjones_afk: thank you ...
buluca has joined #ocaml
test1234 has quit [Connection timed out]
<teclas> # #list;;
<teclas> bigarray (version: [distributed with Ocaml])
<teclas> calendar (version: 1.10)
<teclas> maybe its not loaded with open, but with load ?
robyonrails has joined #ocaml
<teclas> # open Calendar;;
<teclas> Unbound module Calendar
<rwmjones_afk> open doesn't load things
<rwmjones_afk> open is more like #include
<teclas> # #require "calendar";;
<teclas> /usr/lib/ocaml/unix.cma: loaded
<teclas> /usr/lib/ocaml/str.cma: loaded
<teclas> /usr/lib/ocaml/site-packages/calendar: added to search path
<teclas> /usr/lib/ocaml/site-packages/calendar/calendar.cma: loaded
<teclas> # open Calendar;;
<teclas> #
<teclas> now it worked
<teclas> :)
<rwmjones_afk> you still need to link on the command line or using #load in the toplevel
<teclas> ahh okok
screwt8 has quit [Remote closed the connection]
buluca has quit [Read error: 110 (Connection timed out)]
screwt8 has joined #ocaml
xristos has joined #ocaml
xristos has left #ocaml []
<teclas> very nice good :)
Jaak has joined #ocaml
screwt8 has quit [Read error: 104 (Connection reset by peer)]
Submarine has joined #ocaml
slack101 has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
screwt8 has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
teclas has quit ["Leaving"]
hcarty has joined #ocaml
slipstream has quit ["leaving"]
slipstream has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
rwmjones has joined #ocaml
buluca has joined #ocaml
<Ober> where does one get the Unix module?
<Ober> ok I see it's there with ocamlfind in the browser, ust not sure if there is a compile time include
<mbishop> include unix.cm(a|xa)
<mbishop> depending on if you use ocamlc or ocamlopt
Mr_Awesome has joined #ocaml
<Ober> ahh I was doing #load "unix.cm";;
<xavierbot> Characters 1-4:
<xavierbot> ahh I was doing #load "unix.cm";;
<xavierbot> ^^^
<xavierbot> Unbound value ahh
<Ober> ok I see on the compile time
<Smerdyakov> rwmjones, can you stop that bot from giving these annoying errors about lines that aren't all code?
* Ober ponders a fork bomb for the bot :P
<Smerdyakov> rwmjones, how about changing it only to evaluate code prefixed with "xavierbot, "?
<pango_> or automatically go to sleep after an idle timeout ?
<mbishop> or prefixed with > or # or something
piggybox has joined #ocaml
shawn has joined #ocaml
leo037 has joined #ocaml
rwmjones has quit ["This computer has gone to sleep"]
<Ober> ocamlopt -o bench bench.ml /usr/lib/ocaml/3.09.2/unix.cmx
<Ober> No implementations provided for the following modules:
<Ober> Unix referenced from bench.cmx
<mbishop> ocamlopt uses .cmxa files
rwmjones has joined #ocaml
<Ober> tried that too
<mbishop> at least, if I remember right
<Ober> same error
<mbishop> why are you giving it the full path, anyway?
<pango_> order matters
<pango_> if Bench uses Unix, put Unix first in arguments
ygrek has quit []
<Ober> ok thanks pango
<Ober> hmmm no unix.o
<Ober> ok got it thanks
Hadaka has quit [Read error: 60 (Operation timed out)]
<rwmjones> Smerdyakov, it should certainly deal better with 'xavierbot: ...' prefixes
<rwmjones> and also handle /msg
<rwmjones> xavierbot, help
<xavierbot> hello rwmjones, I am xavierbot 0.7, an OCaml toplevel
<xavierbot> expr ;; evaluate expr in toplevel and print result
<xavierbot> help help message
<xavierbot> restart restart the toplevel
<xavierbot> sleep go to sleep
<xavierbot> wake wake me up from sleep
<rwmjones> xavierbot, go to sleep
<xavierbot> xavierbot goes to sleep (do 'xavierbot wake' to wake)
rwmjones has quit ["Leaving"]
buluca is now known as _calcife1
_calcife1 is now known as buluca
Jaak has quit ["leaving"]
<bluestorm_> hm
<bluestorm_> looks like interesting
<mbishop> Yeah, which is why I put it on reddit :P
<mbishop> but of course it's not lisp or haskell, so it was voted down :(
oxylin has joined #ocaml
hcarty has quit ["leaving"]
* Ober ponders how long it takes to get ocaml down pat.
<Ober> seems a lot easier than C was
<bluestorm_> "down pat" ?
<bluestorm_> hm mbishop
<bluestorm_> the haskell community is rather strong on reddit
<bluestorm_> do you know where this come from ?
<bluestorm_> (of course they have a nice language and the haskell community is bigger than the ocaml one, but does it make a so huge difference ?)
leo037 has quit ["Leaving"]
oxylin has quit ["Ex-Chat"]
slipstream has quit [Remote closed the connection]
<mbishop> yeah, haskell is nice, not sure why there is such a trend for upvotes to haskell and downvotes to sml/ocaml/prolog/erlang
<jlouis> different reasons. But Haskell is enjoying a large following
<jlouis> and so is Common Lisp
<mbishop> typically anything Lisp gets voted up, which is nice if you ask me
<mbishop> but it's sad that ML stuff gets voted down usually, aside from Haskell
<jlouis> ML stuff is "boring" because it can't show your new fancy applicative functor arrow arrow phantom type monad
<jlouis> (Not entirely true, I've used phantom types on more than one occasion in ML)
<jlouis> I also think the great amount of blog posts does it
<jlouis> Which is sad. I like ML variants. Any will do.
Demitar has quit [Read error: 110 (Connection timed out)]
shawn has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
test12345 has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
laynor has joined #ocaml