Banana changed the topic of #ocaml to: OCaml 3.08 "Bastille Day" Release available ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
pac_ is now known as pac_aw
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
pnou_ has quit ["au dodo !"]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
yauz_ has joined #ocaml
yauz has quit [Read error: 60 (Operation timed out)]
okhra has joined #ocaml
zigong has joined #ocaml
zigong has quit [Remote closed the connection]
cjohnson has quit [Connection timed out]
gl has left #ocaml []
gl has joined #ocaml
cjohnson has joined #ocaml
okhra has quit [Read error: 113 (No route to host)]
srv has quit [Read error: 60 (Operation timed out)]
CosmicRay has joined #ocaml
GreyLensman has quit ["Leaving"]
debona|r has left #ocaml []
debona|r has joined #ocaml
jdrake has joined #ocaml
CosmicRay has quit ["Leaving"]
kinners has joined #ocaml
Iter has joined #ocaml
chodapp has joined #ocaml
* chodapp just read about Ocaml somewhere by accident and curiosity alone has convinced him to give it a try . . .
Herrchen_ has joined #ocaml
gl has left #ocaml []
gl has joined #ocaml
cjohnson has quit [Remote closed the connection]
<jdrake> when I have "open Input;;" in my ml file, and Input being 'input.ml'. It gives no error there. When I try to use something in it, like a type constructor it says "Unbound constructor AString". I am not sure what to do with this case
Herrchen has quit [Read error: 60 (Operation timed out)]
<gl> (what does 'ocamlc input.cma youfile.ml' say ?)
<jdrake> File "GC1a.ml", line 10, characters 12-27:
<jdrake> Unbound constructor AString
<jdrake> which is:
<jdrake> let evaluate = function
<jdrake> | AString "Hello" ->
<jdrake> the second line obviously
chodapp has quit [Remote closed the connection]
<kinners> jdrake: and AString is in input.ml or not?
<jdrake> it is
<Riastradh> Is AString in input.mli?
<jdrake> this is my input.ml: http://rafb.net/paste/results/m5QxyS61.html
<Riastradh> Or is there no input.mli?
<gl> oh, the input module is your ...
<jdrake> ah, i must have forgotten the mli file
<Riastradh> No, I don't think you need it.
<jdrake> just for good measure, here is GC1a.ml: http://rafb.net/paste/results/wwcu6v82.html
<jdrake> it seems the mli file definitely needed
<gl> ocamlc -i input.ml > input.mli, then
<jdrake> already made one, but that command will help
<jdrake> that -i command inferred wrong
<jdrake> val prompt : string -> string list should be val prompt : string -> varied_type list
<kinners> have you changed the code since you pasted it? it gets inferred correctly for me
<jdrake> i will check
<jdrake> same code
<jdrake> it also doesn't list the type definition only the function
<jdrake> what version of ocaml do you have? (i am using 3.08)
<kinners> 3.07+2
<jdrake> for the main ml file I get this now: ""This expression has type string but is here used with type unit"" for line 20: http://rafb.net/paste/results/QIpS0343.html
<jdrake> this gets really hard to understand this stuff when it does this sort of thing
<jdrake> ok, found that problem
<jdrake> Arg! The implementation input.ml does not match the interface input.cmi: The field `varied_type' is required but not provided varied_type is in both the ml file and mli file and mli file was just compiled.
<jdrake> kinners, what is the mli file that is generated for you
kinners has quit [Nick collision from services.]
kinners has joined #ocaml
<jdrake> kinners, what is the mli file that is generated for you
<kinners> jdrake: what you would expect, varied_type list
<jdrake> does it have a definition for the varied_type?
<kinners> jdrake: but you're evaluate function returns unit because of the printf
<kinners> yes
<kinners> err.. 'your' :)
<jdrake> i just can't get this thing compiled for some reason
<jdrake> i fixed that printf problem
<jdrake> Anubis:~/Development/GC jdrake$ ocamlc -i input.ml
<jdrake> val prompt : string -> string list
<jdrake> 3.08 doesn't happen to be filled with bugs does it
<jdrake> when I paste input.ml into the top level it infers properly
<kinners> well I plan on updating to 3.08 right now...
<kinners> I'm trying out godi
<jdrake> i wouldn't mind seeing if it breaks on yours too
<jdrake> because it does on my cousin's windows machine at 3.08 too
<kinners> jdrake: try seperating convert out of the prompt function to see its type
<jdrake> interesting that fixes it
<jdrake> but it shouldn't should it?
<kinners> I can't see why it should
<kinners> jdrake: it appears to work fine for me
<jdrake> the original?
<jdrake> or the modification you suggested
<kinners> the original
pac_aw has quit ["leaving"]
<jdrake> this is too wierd
<jdrake> i was thinking on filing a bug
<Smerdyakov> I think your cousin is holding you back.
<jdrake> Smerdyakov, I thought I smelt something burning before you typed
<jdrake> Smerdyakov, and why would you say that
<Smerdyakov> I got an anonymous tip.
<kinners> jdrake: using http://rafb.net/paste/results/m5QxyS61.txt I get the correct mli file
<jdrake> Smerdyakov, congratulations - your comment is worthy of a +5 Insightful from slashdot
<jdrake> kinners, definitely wierd
ionOS has joined #ocaml
senko has quit ["Leaving"]
<lmbdwar> jdrake, your expl skills are failing at resolving ocaml simple problems ? ;)
<jdrake> 'expl'?
lam has quit [Read error: 110 (Connection timed out)]
<lmbdwar> jdrake, i was referring to older stuff, whatever, it was a joke
Lemmih has quit [Read error: 104 (Connection reset by peer)]
kinners has quit [Read error: 104 (Connection reset by peer)]
Lemmih has joined #ocaml
jdrake has quit [Read error: 110 (Connection timed out)]
skylan has quit [Remote closed the connection]
skylan has joined #ocaml
smimou has joined #ocaml
pnou_ has joined #ocaml
lmbdwar has quit ["Leaving"]
lmbdwr has joined #ocaml
Iter has quit ["Leaving"]
Lemmih has quit [Read error: 104 (Connection reset by peer)]
Lemmih has joined #ocaml
Iter has joined #ocaml
Nate75Sanders has joined #ocaml
Iter has quit [Read error: 110 (Connection timed out)]
not_me2 has quit [Remote closed the connection]
not_me2 has joined #ocaml
gim has joined #ocaml
Nate75Sanders has quit [Remote closed the connection]
Nate75Sanders has joined #ocaml
senko has joined #ocaml
<senko> can someone explain to me why this happens:
<senko> # Scanf.scanf "%i" (fun a -> a);; /types 3/ - : int = 3 # Scanf.scanf "%i" (fun a -> a);; Exception: Scanf.Scan_failure "scanf: bad input at char number 2: int_of_string".
<senko> ehh..
<senko> # Scanf.scanf "%i" (fun a -> a);;
<senko> sorry.. :/
<senko> again:
<senko> # Scanf.scanf "%i" (fun a -> a);;
<senko> /types 3/ - : int = 3
<senko> # Scanf.scanf "%i" (fun a -> a);;
<senko> Exception: Scanf.Scan_failure "scanf: bad input at char number 2: int_of_string".
Nate75Sanders has quit [Remote closed the connection]
<karryall> senko: WorksForMe (tm)
<senko> i think i found it..
<karryall> oh I see
<senko> i tries to convert " " to a number
<karryall> Scanf.Scanning.end_of_input Scanf.Scanning.stdib ;;
<karryall> don't mind that
<karryall> (wrong window)
<senko> ok.. thank you
<karryall> yeah you have to put a space before the %i
<karryall> meaning 'ignore leading whitespaces'
<karryall> because there is a newline in the input buffer
<senko> yes.. i did that at last.
<karryall> or smthg like hat
mamol has joined #ocaml
<mamol> hello
<mamol> Is there a number theory lib using Big_int ? (I need primality tests and generation and modular arithmetic)
<lmbdwr> mamol, libgmp
<lmbdwr> heh sorry
<lmbdwr> i must have forgotten the channel name during a second
<mamol> there is a binding between gmp and ocaml but ...
<mamol> i want to use the Num library
<mamol> (witch don't provide isprime, nextprime, and invert function)
ne1 has joined #ocaml
vezenchio has quit ["all that is necessary for the triumph of evil is for good men to do nothing"]
pnou_ has quit ["brb"]
Lemmih has quit [Remote closed the connection]
senko has quit ["Leaving"]
debona|r2 has joined #ocaml
debona|r has quit [Read error: 104 (Connection reset by peer)]
debona|r2 is now known as debona|r
grirgz has joined #ocaml
<grirgz> plop
<grirgz> someone alive ?
<Riastradh> Not unless you have a question.
<grirgz> i want to answer questions :p
pac_away has joined #ocaml
<Maddas> Zombies are undead, but yet not alive.
<Maddas> They say.
pac_away has left #ocaml []
<Smerdyakov> Maddas questions the Holy Canon. Death is the response.
<Maddas> Can an undead die without being alive? Hmm.
<Riastradh> No, to destroy an undead you have to heal it!
<Maddas> Ooh. Hmm.
Hadaka has quit [Remote closed the connection]
<Riastradh> Seen Jesus around? He's probably pretty good at destroying undead.
* Maddas eyes the channel
* Riastradh channels Maddas's eyes.
<Maddas> Aiie.
<mamol> you're crazy
<Riastradh> Who?
<mamol> both of you :)
<Riastradh> Oh. What else is new?
<mamol> me ? :)
<Riastradh> We've transmitted craziness to you as well?
mattam_ is now known as mattam
* mamol look for something crazy to say
* mamol burst
mamol has quit ["i'm dead of crasiness"]
samx has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
smimou has quit ["?"]
Naked has joined #ocaml
Naked is now known as Hadaka
senko has joined #ocaml
ionOS has quit ["Leaving"]
_fab has quit []
Lemmih has joined #ocaml
mattam_ is now known as mattam
debona|r has quit [Read error: 60 (Operation timed out)]
cm47 has left #ocaml []
Hipo has quit [Read error: 104 (Connection reset by peer)]
maihem has quit ["Read error: 54 (Connection reset by chocolate)"]
Demitar has quit [Remote closed the connection]
pattern has quit [Read error: 113 (No route to host)]
Demitar has joined #ocaml
pnou has quit ["brb"]
pnou has joined #ocaml
Iter has joined #ocaml
samx has quit [Remote closed the connection]
Lemmih has quit [Remote closed the connection]
pnou has quit ["brb"]
pnou has joined #ocaml
not_me2 has quit [Read error: 104 (Connection reset by peer)]
pnou has quit ["leaving"]
debona|r has joined #ocaml
pattern has joined #ocaml
not_me2 has joined #ocaml
not_me2 has quit [Read error: 104 (Connection reset by peer)]
not_me2 has joined #ocaml