sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
malc_ has joined #ocaml
malc_ has quit ["leaving"]
bluestorm_ has quit ["Konversation terminated!"]
mbishop has joined #ocaml
buluca has joined #ocaml
Ken has joined #ocaml
Ken has left #ocaml []
zeeeee has joined #ocaml
<zeeeee> when i compile my main.ml that uses another module (hashSet.ml) i get "Error while linking main.cmo: Reference to undefined global `HashSet'"
<zeeeee> any hints? the module's from http://wwwteor.mi.infn.it/~pernici/ocaml/ocaml.html
<zeeeee> the only place i mention HashSet is on a line saying "open HashSet"
<zeeeee> i compile with "ocamlc main.ml hashSet.ml"
<zeeeee> (actually i also tried a billion other ways, like ocamlc -c hashSet.mli ... ocamlc hashSet.cmo main.cmo)
<Smerdyakov> Have you tried reversing the order of the two filenames in your first example command line?
<zeeeee> Smerdyakov: what the hell - that actually did the trick!
<Smerdyakov> It shouldn't be surprising. Most command-line compilation tools use argument order to determine linking order.
pants1 has quit [Read error: 110 (Connection timed out)]
<zeeeee> can i not serialize objects? http://paste.lisp.org/display/38001
<zeeeee> (the error i get is: Fatal error: exception Invalid_argument("output_value: functional value"))
<oscarh> Enyone good with GTK around?
<mbishop> good? no, but I've used it (lablgtk I assume)
<oscarh> Yeah
<oscarh> Well, hmm, I'm curious to find out what happends if a callback is blocked, in the threaded version
<oscarh> Is there any posibility to reschedule, since the main loop is blocked, and it's "thread aware"...
<oscarh> I'm having very weird lockups in my program. In one case it locks up on certain machines... In other cases, it happens after a while. A thread can stop executing and never be scheduled again, usually at the same places, such as signaling a condition...
<oscarh> But then again, if the GTK main loop was blocked, the UI would freeze right?
fluctus has joined #ocaml
neomage has joined #ocaml
<neomage> hi, i'm relatively new to Ocaml and had a quick syntax question. Would it be alright to ask it here or is there some other more appropriate forum?
zeeeee has left #ocaml []
<levi_home> neomage: It's usually best to just ask.
<neomage> k, thanks
<neomage> # let rec enum n =
<neomage> if n>0 then n::enum n-1 else [];;
<neomage> Characters 32-40:
<neomage> if n>0 then n::enum n-1 else [];;
<neomage> ^^^^^^^^
<neomage> This expression has type int but is here used with type int list
<neomage> basically, i was wondering why that piece of code spat up that error message? I was just playing around and wanted a function that returned a list of all ints less than n
<neomage> i guess i don't see why it thinks 'enum n-1' is an int. It looks lke an int list to me
<levi_home> Hmm.
<neomage> If there's a better way to code such a function i'm open to sugestions. I'm new and don't really know the language's idioms yet.
<levi_home> And I'm kind of rusty.
<neomage> lol, i know the feeling. i tried helping a friend w/ a simple pointer problem in C after a few years and was completely lost
<levi_home> Try this: let rec enum n = match n with 0 -> [] | x -> x :: enum (x - 1);;
<neomage> thanks levi, that worked perfectly
<neomage> just out of academic curiousity, do you know what was wrong with mine?
<levi_home> I believe using pattern matching for separating the base case from the inductive case in a recursive function is more idiomatic.
<levi_home> Not sure...
<neomage> ahh, that makes sense. maybe the compiler checks pattern matching more comprehensively than conditional controls.
<neomage> thanks a lot
<levi_home> Oh, it was that you needed parentheses around the expression which was your arg to the recursive call to enum.
<levi_home> It was being interpreted as (enum n) - 1, which would indeed have to be an int expression.
<neomage> wow. i feel stupid
<levi_home> Getting the precedence of function calls right bites me all the time, too.
<neomage> thanks. hopefully practice makes perfect
<levi_home> Glad I could help. I've only written a few Ocaml programs, so I'm far from being an expert.
<levi_home> And I've been programming more with other languages lately, so little details about Ocaml are starting to get flushed from my cache.
diffbavis has quit [Read error: 104 (Connection reset by peer)]
zeeeee has joined #ocaml
<zeeeee> why does, e.g., Set come as a parameterized module? why not infer/parameterize the type a la Hashtbl and pass in the comparator as an argument to Set's "constructor" functions?
<Smerdyakov> How would you enforce that two sets to union use the same comparator?
<zeeeee> Smerdyakov: ah, i see - so it's akin to making that comparator part of the 'type'
diffbavis has joined #ocaml
Smerdyakov has quit ["Leaving"]
pmdboi has quit ["This computer has gone to sleep"]
johnnowak has joined #ocaml
zeeeee has left #ocaml []
Mr_Awesome has joined #ocaml
Mr_Awesome has quit ["...and the Awesome level drops"]
diffbavis has quit [Read error: 104 (Connection reset by peer)]
pstickne has quit ["Leaving"]
pango has quit [Remote closed the connection]
neomage has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
_JusSx_ has joined #ocaml
mnemonic has joined #ocaml
<mnemonic> yo
Balakirev has joined #ocaml
smimou has joined #ocaml
b00t has joined #ocaml
bebui_ has quit [Remote closed the connection]
swater has joined #ocaml
love-pingoo has joined #ocaml
bluestorm_ has joined #ocaml
Balakirev has quit []
jlouis_ has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
diffbavis has joined #ocaml
Brian__ has joined #ocaml
Brian__ has quit ["Chatzilla 0.9.77 [Firefox 2.0.0.2/2007021917]"]
b00t has quit [Remote closed the connection]
pango has quit ["I shouldn't really be here - dircproxy 1.0.5"]
pango has joined #ocaml
jlouis has joined #ocaml
diffbavis has quit [Read error: 104 (Connection reset by peer)]
Smergo has quit [Read error: 110 (Connection timed out)]
ajhager has joined #ocaml
rickardg has joined #ocaml
ajhager has quit ["leaving"]
ajhager has joined #ocaml
diffbavis has joined #ocaml
bebui has joined #ocaml
mnemonic has quit ["leaving"]
diffbavis has quit [Read error: 104 (Connection reset by peer)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
diffbavis has joined #ocaml
bebui has quit [Remote closed the connection]
benny has joined #ocaml
Smerdyakov has joined #ocaml
slipstream-- has joined #ocaml
benny_ has quit [Read error: 110 (Connection timed out)]
slipstream has quit [Read error: 104 (Connection reset by peer)]
bebui has joined #ocaml
mbishop has quit [Remote closed the connection]
descender has joined #ocaml
Smergo has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
bluestorm_ has quit ["Konversation terminated!"]
slacker403 has joined #ocaml
_JusSx_ has quit [Client Quit]
swater has quit [Read error: 110 (Connection timed out)]
swater has joined #ocaml
pstickne has joined #ocaml
pstickne_ has joined #ocaml
pstickne_ has quit [Client Quit]
neomage has joined #ocaml
bluestorm_ has joined #ocaml
pstickne has quit [Read error: 110 (Connection timed out)]
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
pstickne has joined #ocaml
swater has quit ["Quat"]
malc_ has joined #ocaml
david_koontz has joined #ocaml
mbishop has joined #ocaml
jlouis has quit [Remote closed the connection]
smimou has quit ["bli"]
jlouis has joined #ocaml
smimou has joined #ocaml
fluctus has quit [Remote closed the connection]
rickardg has quit [Remote closed the connection]
mnemonic has joined #ocaml
<mnemonic> hi
malc_ has quit ["leaving"]
johnnowak_ has joined #ocaml
johnnowak has quit [Connection timed out]
johnnowak_ is now known as johnnowak
fluctus has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
threeve has joined #ocaml
slipstream has joined #ocaml
johnnowak has quit []
slipstream-- has quit [Read error: 110 (Connection timed out)]
pstickne has quit [Remote closed the connection]