smkl changed the topic of #ocaml to: http://icfpcontest.cse.ogi.edu/ -- OCaml wins | http://www.ocaml.org/ | http://caml.inria.fr/oreilly-book/ | http://icfp2002.cs.brown.edu/ | SWIG now supports OCaml
systems has joined #ocaml
vaibhav has quit [Read error: 110 (Connection timed out)]
whee has joined #ocaml
systems has left #ocaml []
skylan_ has joined #ocaml
skylan has quit [Killed (NickServ (Ghost: skylan_!sjh@Riverview97.tbaytel.net))]
skylan_ is now known as skylan
merriam has quit [card.freenode.net irc.freenode.net]
merriam has joined #ocaml
mr_bubbs has quit [Read error: 110 (Connection timed out)]
cleverdra has joined #ocaml
ayrnieu has joined #ocaml
cleverdra has quit [Read error: 113 (No route to host)]
mr_bubbs has joined #ocaml
cleverdra has joined #ocaml
graydon has quit ["xchat exiting.."]
cleverdra has quit [Read error: 104 (Connection reset by peer)]
ayrnieu has quit [Read error: 110 (Connection timed out)]
teeku has joined #ocaml
teeku has quit ["ircII2.8.2-EPIC3.004+Kasi --- Bloatware at its finest."]
karlm has joined #ocaml
<karlm> is it possible to have recursive metods in ocaml?
<karlm> teh interpreter isn't liking "method rec digest str = ..."
malc has joined #ocaml
karlm has quit [Read error: 110 (Connection timed out)]
<mrvn_> karlm: yes, but not like that.
malc has quit [Read error: 110 (Connection timed out)]
<mrvn_> class foo = object (self) method bla = function 0 -> 1 | x -> x * (self#bla (x - 1)) end
<mrvn_> ups, hes gone.
<mrvn_> impatient :)
mrvn_ is now known as mrvn
karryall_ has joined #ocaml
karryall has quit [Remote closed the connection]
karlm has joined #ocaml
TachYon25 has joined #ocaml
karlm has quit [Read error: 110 (Connection timed out)]
systems has joined #ocaml
karlm has joined #ocaml
systems has quit ["Client Exiting"]
yangsx has joined #ocaml
karlm has quit [Read error: 110 (Connection timed out)]
malc has joined #ocaml
yangsx has quit ["Client Exiting"]
cleverdra has joined #ocaml
ColeMarcus has joined #ocaml
malc has quit ["no reason"]
karlm has joined #ocaml
ayrnieu has joined #ocaml
cleverdra has quit [Read error: 110 (Connection timed out)]
karlm has quit [Read error: 110 (Connection timed out)]
karlm has joined #ocaml
<karlm> ~
<mrvn> karlm: you can write recursive methods.
<mrvn> class foo = object (self) method bla = function 0 -> 1 | x -> x * (self#bla (x - 1)) end
<mrvn> iirc immernoch in /etc/
<mrvn> ups
smkl has quit ["bbl"]
smkl has joined #ocaml
xtrm has quit [card.freenode.net irc.freenode.net]
physarum has quit [card.freenode.net irc.freenode.net]
TachYon25 has quit [card.freenode.net irc.freenode.net]
karryall_ has quit [card.freenode.net irc.freenode.net]
merriam has quit [card.freenode.net irc.freenode.net]
xtrm has joined #ocaml
physarum has joined #ocaml
TachYon25 has joined #ocaml
karryall_ has joined #ocaml
merriam has joined #ocaml
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
gl has joined #ocaml
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
graydon has joined #ocaml
karlm has quit [Read error: 110 (Connection timed out)]
Segora has quit ["brb"]
Segora has joined #ocaml
<Segora> re
ColeMarcus has quit [Read error: 54 (Connection reset by peer)]
karlm has joined #ocaml
<karlm> mrun : thanks for your help earlier... I was away from my machine but got it.
cleverdra has joined #ocaml
karlm has quit [Read error: 110 (Connection timed out)]
ayrnieu has quit [Read error: 110 (Connection timed out)]
<whee> these java/c++ courses I'm taking have ruined my thinking :((
<cleverdra> how so?
<whee> they've gone and stressed OO so much that I'm having problems thinking otherwise
ayrnieu has joined #ocaml
cleverdra has quit [Read error: 104 (Connection reset by peer)]
taw has joined #ocaml
<taw> what algorithm does ocaml use to find out types of expressions ?
<whee> it's a Hindley/Milner system
<whee> not sure if there any modifications to that
<taw> thanks, i'll check that out
<ayrnieu> it's modified to have weak types
<taw> weak types in ocaml ? where ? (you mean objects and such ?)
<mrvn> whee: class gun = object method shoot person = person#die end; let gun = new gun in gun#shoot java_teacher;;
<mrvn> taw: polymorphic functions maybe.
<whee> heh
<whee> I'm attempting to get myself thinking in terms of modules
<taw> polymorphic functions don't work with Hindley/Milner ?
<taw> isn't that the whole point of type inference to allow that ?
<mrvn> By the way, why does a function become polymorphic when you put it into its own file?
<whee> the types of some functions aren't immediately obvious to the system at first
<mrvn> e.g: let id = fun x -> x let _ = id 1 let _ = id 1.0
<whee> and they get figured out at the first invocation
<mrvn> If thats in one file it fails, if id is in its own file it works.
<taw> # let id = fun x -> x;;
<taw> val id : 'a -> 'a = <fun>
<taw> # id 1;;
<taw> - : int = 1
<taw> # id 1.0;;
<taw> - : float = 1.
<mrvn> Hmm, hey, too simple example.
<taw> oops ^_^
<taw> accidental press of enter ^_^
<mrvn> Damn, I should have kept the case where ocaml infered a type to a function that was to specific.
<mrvn> # let rec id x = x and bla x = 1 + (id x);;
<mrvn> val id : int -> int = <fun>
<mrvn> val bla : int -> int = <fun>
<mrvn> There it is. Got it.
<mrvn> Why does it say id takes an int? Its still 'a -> 'a
<taw> well, this declaration is theoretically wrong
<taw> id doesn't depend on bla
<whee> id would have to return an int in order to be used in bla
<mrvn> # let id x = x;;
<mrvn> val id : 'a -> 'a = <fun>
<mrvn> # let bla x = 1 + (id x);;
<mrvn> val bla : int -> int = <fun>
<taw> so this didn't work just because it was too heave abuse of semantics
<taw> let id x = x;; let bla x = 1 + (id x);; is more correct
<mrvn> Sometimes you can't write it that way because of another dependency-
<taw> that woulid be very interesting if you had some example ... it's a bit hard to imagine for me
<mrvn> I can't find a better example then the one above. The "let rec" was neccessary for some reason.
karlm has joined #ocaml
gl has quit [Read error: 113 (No route to host)]
<taw> it seems to me (because of dependency graph) that this problem only happens when you state more dependency than actually exist. but i might be wrong ...
mrvn_ has joined #ocaml
karlm has left #ocaml []
<mrvn_> re
<taw> re ^_^
mrvn has quit [Read error: 110 (Connection timed out)]
clog has quit [^C]
clog has joined #ocaml
ayrnieu has quit [Read error: 110 (Connection timed out)]
gl has joined #ocaml
taw has quit ["Client Exiting"]
malc has joined #ocaml
<whee> if I have a module sig, do I ever have to specify that something I'm creating abides by that sig?
<malc> whee: can you rephrase
<whee> I'm using a module sig as more of an interface that other modules will implement; do I need to do something in these modules that says they implement that specific sig
<whee> or does it just figure that out itself
<whee> or should I be using functors :|
<malc> you dont need to do anything
<whee> now if only I had a vim syntax file for the revised syntax
malc has quit ["no reason"]
<whee> haha that's just wrong
<whee> when I can write an entire file's worth of code and it runs once I get it past the compiler, something is wrong :(