flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
kombinator has quit [Read error: 113 (No route to host)]
psnively has quit []
jeddhaberstro_ has joined #ocaml
jeddhaberstro has quit [Read error: 104 (Connection reset by peer)]
kombinator has joined #ocaml
rogo has joined #ocaml
CoffeeBuzz has quit [Nick collision from services.]
cfairles has joined #ocaml
kombinator has quit [Read error: 113 (No route to host)]
mfp_ has joined #ocaml
mfp has quit [Read error: 101 (Network is unreachable)]
jeddhaberstro_ has quit []
pantsd has joined #ocaml
pantsd has quit [Read error: 104 (Connection reset by peer)]
pantsd has joined #ocaml
pastasauce has joined #ocaml
pantsd has left #ocaml []
Submarine has joined #ocaml
ryosei has joined #ocaml
ryosei has left #ocaml []
threeve has joined #ocaml
pastasauce has quit []
<palomer> quick question
<palomer> how would you guys strip the file extension from a file name?
<thelema> Palace_Chan: hopefully I have a quick answer
<thelema> grr...
<thelema> I think the filename module has something for this...
<thelema> Filename.chop_extension
<palomer> cool!
<palomer> man, that's such a useful function
<palomer> not many programming languages implement it
<palomer> in the stdlib
Yoric[DT] has joined #ocaml
threeve has quit []
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Associat0r has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Associat0r has quit [Client Quit]
Associat0r has joined #ocaml
seafood has quit [Read error: 54 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Fullma has quit ["Quitte"]
gdmfsob has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 54 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Client Quit]
Palace_Chan has quit ["Palace goes to sleep"]
filp has joined #ocaml
rwmjones_ has joined #ocaml
jlouis has joined #ocaml
Submarine has quit [Read error: 110 (Connection timed out)]
petchema has quit [Read error: 104 (Connection reset by peer)]
petchema has joined #ocaml
Torment has quit [Read error: 110 (Connection timed out)]
rwmjones_ has quit [Remote closed the connection]
marmotine has joined #ocaml
Submarine has joined #ocaml
noj has joined #ocaml
Submarine has quit [Read error: 104 (Connection reset by peer)]
Submarine_ has joined #ocaml
Submarine_ is now known as Submarine
mbishop_ has joined #ocaml
OChameau has joined #ocaml
GustNG has joined #ocaml
hkBst has joined #ocaml
rwmjones_ has joined #ocaml
Submarine has quit [Read error: 110 (Connection timed out)]
Submarine has joined #ocaml
Snark has joined #ocaml
Submarine has quit ["Leaving"]
gdmfsob has quit [Read error: 131 (Connection reset by peer)]
mishok13 has joined #ocaml
Snark has quit [Read error: 113 (No route to host)]
Axioplase_ is now known as Axioplase
Yoric[DT] has joined #ocaml
electronx has joined #ocaml
rwmjones_ has quit ["Leaving"]
Snark has joined #ocaml
cfairles has quit []
CoffeeBuzz has joined #ocaml
kombinator has joined #ocaml
Snark has quit ["Ex-Chat"]
electronx has quit []
rby has joined #ocaml
_andre has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
dabd has joined #ocaml
Asmadeus_ is now known as Asmadeus
det has quit [Read error: 104 (Connection reset by peer)]
det has joined #ocaml
snhmib has joined #ocaml
rwmjones_ has joined #ocaml
munga has joined #ocaml
thelema has quit [Read error: 110 (Connection timed out)]
Fullma has joined #ocaml
kombinator has quit [Read error: 104 (Connection reset by peer)]
mishok13 has quit [Read error: 110 (Connection timed out)]
rby has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
mattam has quit ["Lost terminal"]
kombinator has joined #ocaml
mattam has joined #ocaml
Linktim has joined #ocaml
filp has quit ["Bye"]
mbishop has quit [Nick collision from services.]
mbishop_ is now known as mbishop
struktured_ has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
Proteus has joined #ocaml
OChameau has quit ["Leaving"]
Proteus has quit [Read error: 104 (Connection reset by peer)]
Proteus_ has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
hkBst has joined #ocaml
GustNG1 has joined #ocaml
itewsh has joined #ocaml
rwmjones_ has quit ["Closed connection"]
rmns has joined #ocaml
GustNG has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
Submarine has joined #ocaml
dabd has quit ["Ex-Chat"]
rby has joined #ocaml
Proteus_ has quit [Read error: 104 (Connection reset by peer)]
Proteus_ has joined #ocaml
Associat0r has quit []
struktured_ has quit [Read error: 110 (Connection timed out)]
struktured_ has joined #ocaml
beigebox has joined #ocaml
<beigebox> what's the problem with "print_int 3+3" ?
<Smerdyakov> Function application binds more tightly than binary operators.
beigebox has quit [Read error: 60 (Operation timed out)]
beigebox has joined #ocaml
<beigebox> i've lost my connection. anyone replied?
<Smerdyakov> Function application binds more tightly than binary operators.
struktured_ has quit [Read error: 110 (Connection timed out)]
<beigebox> eh right thanks
<beigebox> i'm still not used to that
GustNG1 has quit [Read error: 110 (Connection timed out)]
<beigebox> another thing, in the docs i'm reading there's no function mentioned for printing lists.. does it mean i have to manually iterate over the sequence and output the elements?
<Smerdyakov> Well, I agree with you that I don't know of any function in the standard library for printing lists. You can draw your own conclusions from that. :P
<Smerdyakov> It's possible that you don't actually want to be printing anything, though.
<Smerdyakov> Can you just evaluate an expression in the toplevel?
<beigebox> well what you mean? i'm learning ocaml and we'll like to check weather i'm doing some examples right, hence i'd like to print the results :)
struktured_ has joined #ocaml
<Smerdyakov> Just evaluate the expression whose value you care about.
<Smerdyakov> Every expression run in the toplevel leads to the printing of its result.
itewsh has quit ["KTHXBYE"]
<beigebox> well i'm not using the interpreter
<Smerdyakov> You should be using it, for testing.
<beigebox> this is anonying
<Smerdyakov> Hardly. Testing is much more pleasant with the toplevel than with testing harnesses that you hack together yourself each time.
<beigebox> well how could i paste something like 500 lines of code for example?
<Smerdyakov> Read the manual page for 'ocaml'. You want the [#use] directive.
<beigebox> there is no "use" directive mentioned, what exactly are you refering to?
<Smerdyakov> Which page are you reading?
<beigebox> man ocaml
rby has quit ["This computer has gone to sleep"]
<Smerdyakov> I meant the page within the HTML manual, which is found at http://caml.inria.fr/pub/docs/manual-ocaml/index.html .
rby has joined #ocaml
<Yoric[DT]> beigebox: hint: the man page is essentially useless.
Associat0r has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Yoric[DT] has joined #ocaml
Snark has quit ["Ex-Chat"]
Palace_Chan has joined #ocaml
<jonafan> let wrap v = let rec f a b = f (a + b) in f v;;
<jonafan> why can't i do that?
<olegfink> what's the type of f?
<palomer> anyone know of a prolog like language with functors?
<jonafan> it can't figure that out
<olegfink> neither can I.
rby has quit [No route to host]
<jonafan> okay granted it doesn't look like a very useful function, but that is just an example of what i am trying to do
<olegfink> it is declared as two-argument function but is called with one argument.
<jonafan> wrap is supposed to return a function that takes an integer and adds it to its running tally
<jonafan> so i'm calling f with one argument because i want to use currying
Amorphous has quit [Read error: 110 (Connection timed out)]
<jonafan> (my actual code wraps various types of data in the first argument and produces useful side effects when given a message and an integer)
<olegfink> you mean something like let wrap v = let f a b = a + b in f v, right?
<olegfink> I don't seen why do you need f to be recursive
Amorphous has joined #ocaml
<jonafan> no, i want to hide the first argument
<jonafan> the first argument is basically the state of a module
<jonafan> i want to feed in stuff, allow it to change its state, and return a new state
<jonafan> man, i swear i had this worked out once before
beigebox has quit [Read error: 110 (Connection timed out)]
<jonafan> let wrap v = let rec f a b = let newa = a + b in Printf.printf "%i\n" newa; f newa in f v;;
<jonafan> i'm not sure if i wrote that right! but here i've added the side effect of printing the new "a" value
hkBst has quit [Read error: 104 (Connection reset by peer)]
_andre has quit ["Lost terminal"]
<jonafan> if you call wrap 0 it should return a function that when given a number, adds the numbers together and keeps a total, while printing out the current total
<jonafan> btw, are you oleg as in "oleg is a freaking genius?"
<olegfink> no, I'm some other random oleg and don't do any haskell at all.
Linktim_ has joined #ocaml
<olegfink> hm, this declration is equivalent to yours, right?
<olegfink> let rec f a b = fun x -> f (a+b) x;;
<olegfink> but it clearly defines a function of three arguments, which is not what you want
<olegfink> jonafan: seems ocaml needs -rectypes for this
<olegfink> works for me with -rectypes
itewsh has joined #ocaml
<olegfink> the type for wrap is int -> (int -> 'a as 'a), which is quite understandable
<jonafan> i'm fairly sure i had this worked out before, but it was on another computer
<olegfink> well, it won't work with rectypes disabled (which is the default)
<jonafan> thanks for your help, i have to do other stuff now
guillem_ has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]
beigebox has joined #ocaml
rmns has left #ocaml []
Linktim has quit ["Quitte"]
Associat0r has quit []
Axioplase is now known as Axioplase_
struktured_ is now known as struktured
guillem_ has quit [Remote closed the connection]
itewsh has quit ["KTHXBYE"]
snegovik has joined #ocaml
snegovik has quit [Client Quit]
marmotine has quit ["mv marmotine Laurie"]
Proteus_ has quit [Read error: 113 (No route to host)]
<beigebox> could someone explain to me what's wrong with the following code http://rafb.net/p/83IitF91.html
jeddhaberstro has joined #ocaml
kombinator has quit [Read error: 113 (No route to host)]
beigebox has quit [Read error: 110 (Connection timed out)]
mfp_ is now known as mfp
CoffeeBuzz has quit []