mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
DaveS has left #ocaml []
ikaros_ has quit [Quit: Leave the magic to Houdini]
ulfdoz has quit [Ping timeout: 245 seconds]
naufraghi has joined #ocaml
naufraghi has left #ocaml []
thrasibule has quit [Read error: Connection reset by peer]
thrasibule has joined #ocaml
pimmhogeling has quit [Ping timeout: 265 seconds]
joewilliams_away is now known as joewilliams
<mfp> Plouj: I'll look into your build pbs tomorrow
Drk-Sd has quit [Quit: {'EXIT', <Drk-Sd>, "dodo"}]
seafood has joined #ocaml
Associat0r has quit [Quit: Associat0r]
seafood has quit [Quit: seafood]
somnium has joined #ocaml
albacker has quit [Ping timeout: 260 seconds]
derdon has quit [Quit: derdon]
elehack|afk is now known as elehack
_unK has quit [Remote host closed the connection]
joewilliams is now known as joewilliams_away
mjonsson has joined #ocaml
cognizant-cog has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
yakischloba has quit [Quit: Leaving.]
cognizant-cog has quit [Quit: ChatZilla 0.9.86 [Firefox 3.5.8/20100214235838]]
threeve has quit [Quit: threeve]
threeve has joined #ocaml
yakischloba has joined #ocaml
smimou has quit [Ping timeout: 246 seconds]
elehack has quit [Quit: Goodbye...]
Modius_ has joined #ocaml
Modius__ has joined #ocaml
Modius has quit [Ping timeout: 276 seconds]
Modius has joined #ocaml
threeve has quit [Quit: threeve]
Modius_ has quit [Ping timeout: 276 seconds]
Modius_ has joined #ocaml
Modius__ has quit [Ping timeout: 252 seconds]
Modius has quit [Ping timeout: 240 seconds]
Modius__ has joined #ocaml
Modius_ has quit [Ping timeout: 268 seconds]
thrasibule has quit [Ping timeout: 272 seconds]
somnium has left #ocaml []
caligula__ has joined #ocaml
caligula_ has quit [Ping timeout: 252 seconds]
hugin has joined #ocaml
caligula_ has joined #ocaml
caligula__ has quit [Ping timeout: 246 seconds]
ikaros has joined #ocaml
CodeBlock has joined #ocaml
enthymene has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
CodeBlock has quit [Quit: Lost terminal]
CodeBlock` has joined #ocaml
CodeBlock` is now known as CodeBlock
enthymene has quit [Quit: router hop!]
yakischloba has quit [Quit: Leaving.]
enthymene has joined #ocaml
Submarine has joined #ocaml
dark has joined #ocaml
_zack has joined #ocaml
_zack has quit [Quit: Leaving.]
_zack has joined #ocaml
ulfdoz has joined #ocaml
pimmhogeling has joined #ocaml
Yoric has joined #ocaml
_zack has quit [Quit: Leaving.]
enthymene has quit [Quit: sleep!]
_zack has joined #ocaml
Drk-Sd has joined #ocaml
ttamttam has joined #ocaml
Yoric has quit [Quit: Yoric]
_unK has joined #ocaml
_zack has quit [Quit: Leaving.]
Yoric has joined #ocaml
mfp has quit [*.net *.split]
schme has quit [*.net *.split]
M|_ has quit [*.net *.split]
hcarty has quit [*.net *.split]
noj has quit [*.net *.split]
haelix has quit [*.net *.split]
noj has joined #ocaml
schme has joined #ocaml
schme has quit [Changing host]
schme has joined #ocaml
M| has joined #ocaml
haelix has joined #ocaml
monadic_kid has joined #ocaml
monadic_kid has left #ocaml []
mfp has joined #ocaml
boscop_ has joined #ocaml
boscop__ has joined #ocaml
boscop__ has quit [Read error: Connection reset by peer]
boscop__ has joined #ocaml
boscop__ has quit [Read error: Connection reset by peer]
boscop_ has quit [Read error: Connection reset by peer]
boscop__ has joined #ocaml
boscop has quit [Ping timeout: 248 seconds]
boscop__ has quit [Client Quit]
boscop__ has joined #ocaml
boscop__ has quit [Client Quit]
hcarty has joined #ocaml
oacle1 has joined #ocaml
oacle1 has left #ocaml []
oacle1 has joined #ocaml
oacle1 has quit [Client Quit]
smimou has joined #ocaml
Yoric has quit [Quit: Yoric]
spearalot has joined #ocaml
Yoric has joined #ocaml
spearalot has left #ocaml []
thrasibule has joined #ocaml
boscop has joined #ocaml
_zack has joined #ocaml
ulfdoz_ has joined #ocaml
quidnunc has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
ksson has joined #ocaml
tmaedaZ has quit [Ping timeout: 252 seconds]
tmaedaZ has joined #ocaml
rcv has joined #ocaml
smimou has quit [Quit: bli]
qwr has left #ocaml []
mjonsson has quit [Ping timeout: 245 seconds]
smimou has joined #ocaml
ikaros has joined #ocaml
quidnunc has quit [Ping timeout: 276 seconds]
Submarine has quit [Read error: Operation timed out]
Submarine has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
yakischloba has joined #ocaml
threeve has joined #ocaml
_unK has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 248 seconds]
_zack has quit [Ping timeout: 240 seconds]
rcv has left #ocaml []
Yoric has joined #ocaml
derdon has joined #ocaml
mutew has joined #ocaml
derdon has quit [Client Quit]
threeve has quit [Quit: threeve]
M| has quit [Read error: Operation timed out]
M| has joined #ocaml
_zack has joined #ocaml
mono__ has joined #ocaml
thrasibule has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Yoric]
mono__ has quit [Quit: Ex-Chat]
Yoric has joined #ocaml
pimmhogeling has quit [Ping timeout: 240 seconds]
mjonsson has joined #ocaml
<mutew> Is there a way to enumerate all the possible return values of String.compare without having to resort to an if-else ladder?
<Camarade_Tux> pattern matching ?
<mutew> Camarade_Tux: Something like match, but how do I handle a range of negative numbers with it?
<Camarade_Tux> well, currently compare will return -1
<Camarade_Tux> but you can maybe write : | min_int ... -1
jao has quit [Read error: Connection reset by peer]
<Camarade_Tux> not the good syntax
<Camarade_Tux> only works with characters it seems
<mrvn> match foo with x when x < 0 -> ... | 0 -> ... | _ ->
<mutew> Camarade_Tux: hmm, but if I resort to using an if-else ladder then I have to call String.compare atleast two times.
<mutew> mrvn: thanks, that looks good.
<mrvn> mutew: let res = String.compare in if res <0 then ...
<Camarade_Tux> right, doing too many things at once
<mutew> mrvn: That looks better.
pimmhogeling has joined #ocaml
threeve has joined #ocaml
<mutew> How do I end a match-expression in order to have nested matches?
ksson has quit [Ping timeout: 245 seconds]
<flux> use parenthesis to indicate scope
<flux> alternatively to ( )-pairs you can use begin end -pairs if you so wish
<mutew> flux: parenthesis seems to work just fine.
<mutew> I am working with the default ocaml package in the Ubuntu repositories and have this issue where I have to exit the interpreter to clear the top-loop
<mutew> Is there a faster way to do the same?
<flux> to start from a clean slate? nope, that's the way
<mutew> flux: (-_-)
thrasibule has joined #ocaml
_unK has joined #ocaml
enthymene has joined #ocaml
pimmhogeling has quit [Ping timeout: 256 seconds]
joewilliams_away is now known as joewilliams
ttamttam has quit [Quit: Leaving.]
Yoric has quit [Quit: Yoric]
pimmhogeling has joined #ocaml
ksson has joined #ocaml
ksson has quit [Quit: leaving]
Alpounet has quit [Ping timeout: 252 seconds]
hcarty has quit [Remote host closed the connection]
joewilliams is now known as joewilliams_away
<mutew> Now I'm confused... I am trying to think of an expression which could have the type: "('a -> 'b list) -> ('a -> 'b) list -> 'a -> 'b list" but am lost..
<Camarade_Tux> what is that for?
<mrvn> mutew: (('a -> 'b list) -> ('a -> 'b) list) -> 'a -> 'b I can think of
<Camarade_Tux> /win 7
<Camarade_Tux> fail :-)
ikaros has joined #ocaml
<mutew> mrvn: expression?
<mutew> Camarade_Tux: Working through some exercises for OCaml.
<mrvn> mutew: nothing that makes much sense.
<mrvn> ('a -> 'b list) -> ('b -> 'c) list -> 'a -> 'c makes more sense
Alpounet has joined #ocaml
<mutew> mrvn: According to the type there is no 'c
<mrvn> ('a -> 'b list) -> ('b -> 'c) list -> ('c list -> 'd) -> 'a -> 'd even more
Alpounet has quit [Read error: Connection reset by peer]
<mrvn> mutew: so what is your code and what should it be?
Alpounet has joined #ocaml
<mutew> mrvn: I have the type, I need to conjure up the code. :p
pimmhogeling has quit [Ping timeout: 256 seconds]
<mrvn> let f fn1 fn2 x = List.hd ((fn1 x) @ (List.map (fun fn -> fn x) fn2))
<mrvn> val f : ('a -> 'b list) -> ('a -> 'b) list -> 'a -> 'b = <fun>
quidnunc has joined #ocaml
<mutew> mrvn: Wow, that works but looks like overkill for something following an introduction to the ocaml type system.
<mrvn> it also makes no sense as it always returns the head
<mutew> Maybe there's an easier way to write it without using any modules.
<mrvn> you can write your own List.hd and List.map
<mrvn> Where did you get that type from?
<mutew> It was a question
<olegfink> I don't think you can get much sense out of 'a -> 'b list
Alpounet has quit [Ping timeout: 252 seconds]
<mrvn> olegfink: Given an input generate a list of perumatitions of the input.
<mrvn> or prime factors
<mrvn> or given a string return a list of chars
Alpounet has joined #ocaml
Yoric has joined #ocaml
<olegfink> indeed, I was thinking of a no less general type, but nevermind.
<mrvn> It is only general because it is the argument of a function. It isn't ('a . 'b . 'a -> 'b list)
<olegfink> right.
Yoric has quit [Quit: Yoric]
ksson has joined #ocaml
cgizmo has joined #ocaml
derdon has joined #ocaml
<cgizmo> hi everyone
<derdon> hi cgizmo
<cgizmo> I'm having a problem with some ocaml sources
<cgizmo> basically, I just put this in a file : http://paste.pocoo.org/show/180935/
<cgizmo> when I try to load it into an ocaml interpreter, it works great ( http://paste.pocoo.org/show/180938/ , here it is, if you wan't to see)
<cgizmo> but when I compile it, I just throws an error (compiled using ocamlbuild, here is the output : http://paste.pocoo.org/show/180936/ )
<cgizmo> I have no clue why it does this, do you have any idea ?
<derdon> why didn't you use ocamlc to compile tmp.ml ?
robocop has joined #ocaml
<cgizmo> well, this is actually an extract of a much bigger source file
<derdon> ok
<cgizmo> and to reproduce the bug, I used the same command
<cgizmo> do you think ocamlbuild generates the error ?
<quidnunc> Is there a way to view and set the library include directory paths at the toplevel with tuareg?
<derdon> cgizmo: don't know, find it out :)
<flux> cgizmo, you can't have '_a -types in a compiled ml-file
<cgizmo> what's the difference in between 'a and '_a types, flux ?
<flux> cgizmo, '_a needs to be fixed at some point in the same source file, it's not truly polymorphic
<flux> it's called the value restriction
<cgizmo> is there any way to make it fully polymorphic, thought ?
<flux> let int_al () = [( (=) 1, ('1', const ' '))] works
<cgizmo> so making int_al a function removes the problem ?
<flux> yes
<flux> it's returning a new list every time, of course
<flux> but maybe you can fix that '_a be of some type you know already, does it need to be polymorphic?
<cgizmo> it does, the point of the "int_al" here is jsut to provide a way to show int values in a board (for a chess game, for example)
<cgizmo> but I need to be able to give my "print_board" function any type of input, and any type of redering mechanism
<cgizmo> rendering*
alp__ has joined #ocaml
Alpounet has quit [Ping timeout: 260 seconds]
alp__ has quit [Read error: Connection reset by peer]
Alpounet has joined #ocaml
<cgizmo> well, thanks a lot flux
<flux> cgizmo, good luck :)
<cgizmo> thanks, and bye !
cgizmo has quit [Quit: Leaving.]
_zack has quit [Quit: Leaving.]
<quidnunc> Is there a way to view the library include paths at the toplevel?
<Plouj> mfp: thanks :)
seafood has joined #ocaml
Yoric has joined #ocaml
maskd- has joined #ocaml
maskd has quit [Disconnected by services]
maskd- is now known as maskd
seafood has quit [Quit: seafood]
jao has joined #ocaml
pimmhogeling has joined #ocaml
ksson has quit [Quit: leaving]
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
seafood has joined #ocaml
robocop has quit [Quit: Quitte]
pimmhogeling has quit [Remote host closed the connection]
mutew has quit [Ping timeout: 276 seconds]
dark has quit [Quit: Leaving]
seafood has quit [Quit: seafood]
quidnunc has quit [Ping timeout: 265 seconds]
Yoric has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 256 seconds]
Mr_Awesome has quit [Quit: Hilarity ensues.]
Plouj has left #ocaml []
derdon has quit [Quit: derdon]
pimmhogeling has joined #ocaml
Submarine has quit [Ping timeout: 264 seconds]
Amorphous has quit [Ping timeout: 260 seconds]
ikaros_ has joined #ocaml
Amorphous has joined #ocaml
ikaros has quit [Ping timeout: 245 seconds]
quidnunc has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
valross has joined #ocaml