gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0+beta1 http://permalink.gmane.org/gmane.comp.lang.caml.inria/49168
emmanuelux has quit [Read error: Connection reset by peer]
seafood has quit [Quit: seafood]
alpounet has quit [Ping timeout: 240 seconds]
alp_ has joined #ocaml
alp_ is now known as alpounet
travisbrady has joined #ocaml
alexyk has joined #ocaml
derdon has quit [Ping timeout: 264 seconds]
patronus has quit [Read error: Connection reset by peer]
mbac has joined #ocaml
<mbac> hi?
<mbac> oh ok you have to register to talk :)
<mbac> how cool is that plasmafs release?
alexyk has quit [Quit: alexyk]
romildo has quit [Quit: Leaving]
alexyk has joined #ocaml
Associat0r has quit [Quit: Associat0r]
tmaedaZ has joined #ocaml
tmaedaZ is now known as tmaeda
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
tmaeda is now known as tmaedaZ
patronus has joined #ocaml
_unK has quit [Remote host closed the connection]
seafood has joined #ocaml
psnively has joined #ocaml
psnively has left #ocaml []
ulfdoz has joined #ocaml
psnively has joined #ocaml
psnively has quit [Quit: psnively]
Amorphous has quit [Ping timeout: 248 seconds]
alexyk has quit [Quit: alexyk]
seafood has quit [Ping timeout: 260 seconds]
psnively has joined #ocaml
psnively has quit [Client Quit]
Amorphous has joined #ocaml
tmaedaZ is now known as tmaeda
jakedouglas has quit [Quit: Leaving.]
travisbrady has quit [Quit: travisbrady]
Guest61720 has joined #ocaml
Guest61720 has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 260 seconds]
tmaeda is now known as tmaedaZ
Associat0r has joined #ocaml
itewsh has joined #ocaml
seafood has joined #ocaml
edlinde has joined #ocaml
<edlinde> I am actually going to do a functional programming subject next semester for which I think they use Standard ML
<edlinde> was wondering if you guys had any suggestions as to how I can get strated?
<edlinde> any good online tutorials?
<edlinde> is OcaML similar to Standard ML in any way?
<flux> it is similar, but dissimilar enough that ocaml material is unlikely to be helpful to you
<flux> however, if one masters ocaml I imagine it's simple to start writing sml, for the most parts
tmaedaZ is now known as tmaeda
<edlinde> the SML channel has only 32 members
<edlinde> so I was wondering if any of you guys has done SML as well?
<Associat0r> I suspect a lot of guys here yes
<edlinde> oh and also if someone could point me out to some good online resource to understand RECURSION better
<edlinde> that would be awesome
<edlinde> Associat0r: is there a definitive book or a good tutorial that beginners in SML use?
<Associat0r> edlinde: I'm no SML user so I can't recommend one
<edlinde> k
<edlinde> what about recursion?
<edlinde> I been looking around and couldn't find something that covered most of the types
<Associat0r> look at those links for a comparison of Ocaml and SML
<flux> recursion is best learned by writing recursive code.
<edlinde> I am looking
<Associat0r> yeah what flux said
<flux> ocaml-tutorial.org has some text on the subject, though: http://www.ocaml-tutorial.org/if_statements,_loops_and_recursion (dunno if it's any good)
<flux> the first recursive problem I have ever had might have been filling a continuous region in 2d bitmap with a color. maybe implementing that will be helpful.
<flux> or possibly constructing code that lists all the files in the filesystem.
<flux> these cases of recursion are a bit different from what one would usually do in ocaml, I guess
<edlinde> yeah to me it seems like most functional people know recursion pretty well
<edlinde> and use it like loops
<edlinde> :)
<edlinde> I had to recently do a tree implementation in C++ where I had to recurse and explore a n-ary tree.. was a bit of a challenge
<edlinde> I realised I needed to get more familiar with it
<edlinde> :)
<flux> easy peasy in ocaml. type 'a tree = Node of ('a * 'a tree list) :)
<flux> you could write iteration/mapping/folding functions for that structure for studying purposes as well :)
<adrien> tree operations in ml are usually really really nice
<edlinde> ok
edlinde has quit [Quit: edlinde]
ikaros has joined #ocaml
oriba has joined #ocaml
oriba_ has joined #ocaml
<theDroggl> Another noob question: I wonder why ">" is polymorphic (4 > 3, 4.0 > 3.0 both work) but "+" isnt (4 + 3 works but 4.0 + 3.0 does not)
oriba has quit [Ping timeout: 245 seconds]
<theDroggl> also, reading http://www.ocaml-tutorial.org/performance_and_profiling it seems to me that ocaml does more type checking during compile time that would be necessary in some situations, is that correct?
tmaeda is now known as tmaedaZ
<schmrkc> theDroggl: for the > and + I'd guess it is to bring greater speed without you actually having to give the compiler hints about what it is working with. and also safety :)
<schmrkc> theDroggl: Not sure what you mean with it doing too much type checking though.
<theDroggl> just a sec
<theDroggl> let max a b = if a > b then a else b in print_int (max 2 3);;
<theDroggl> in this code they say the call to max will be polymorphic and the argument types will be figured out at runtime
<theDroggl> although it is clear that max will only ever be used with integer arguments
<schmrkc> ok.. how does this == ocaml doing too much type checking at compile time?
<theDroggl> I don't know how old the information in that tutorial is though
<schmrkc> seems to be the opposite of that.
<schmrkc> me neither :)
<schmrkc> it would be *better* if it had figured that out at compile time. Which is why the tutorial suggests adding some hints
<theDroggl> oh sry yeah I meant "too much type checking at runtime"
<schmrkc> (a : int) (b : int)
<schmrkc> oh!
<theDroggl> yeah but it surprises me that the compiler can't find that out without the hints
<theDroggl> shouldnt be too hard
* schmrkc isn't a type check specialist...
* theDroggl neither
<schmrkc> the other type checking compiler I use now and then also likes them hints
<schmrkc> (steel banks common lisp)
<schmrkc> or it uses some generic version of "stuff" :)
<theDroggl> last change on that webpage was in 2005 btw
<schmrkc> ya.
<schmrkc> I really have no idea if this is still so or not.
<schmrkc> I guess one could check :)
* schmrkc has no ocaml available atm though.
<mfp> schmrkc: ocamlopt doens't monomorphize functions
<mfp> *doesn't
<theDroggl> is there a reasoning behind this?
<schmrkc> mfp: This makes perfect sense.
<mfp> theDroggl: keeping the compiler simple, I suppose
<theDroggl> ic
iratsu has quit [Ping timeout: 240 seconds]
edlinde has joined #ocaml
oriba__ has joined #ocaml
oriba_ has quit [Ping timeout: 240 seconds]
oriba__ has quit [Quit: Verlassend]
iratsu has joined #ocaml
emmanuelux has joined #ocaml
ikaros has quit [Ping timeout: 245 seconds]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
ikaros has joined #ocaml
derdon has joined #ocaml
hyperboreean has quit [Ping timeout: 248 seconds]
hyperboreean has joined #ocaml
ulfdoz has joined #ocaml
animist has quit [*.net *.split]
fabjan has quit [*.net *.split]
nejimban has quit [*.net *.split]
animist has joined #ocaml
fabjan has joined #ocaml
nejimban has joined #ocaml
coucou747 has quit [Quit: 0x2a]
edlinde has quit [Quit: edlinde]
emmanuelux has quit [Remote host closed the connection]
coucou747 has joined #ocaml
_unK has joined #ocaml
coucou747 has quit [Quit: 0x2a]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 265 seconds]
edlinde has joined #ocaml
tmaedaZ has quit [Ping timeout: 276 seconds]
tmaedaZ has joined #ocaml
boscop_ has left #ocaml []
boscop has joined #ocaml
tmaedaZ has quit [Ping timeout: 265 seconds]
travisbrady has joined #ocaml
alexyk has joined #ocaml
slash_ has joined #ocaml
ulfdoz_ has joined #ocaml
ttamttam has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
jakedouglas has joined #ocaml
coucou747 has joined #ocaml
travisbrady has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
ulfdoz_ has quit [Ping timeout: 240 seconds]
slash_ has quit [Remote host closed the connection]
slash_ has joined #ocaml
slash_ has quit [Ping timeout: 260 seconds]
krankkat1e has joined #ocaml
krankkat1e has quit [Client Quit]
Anarchos has joined #ocaml
ttamttam has quit [Quit: Leaving.]
jakedouglas has quit [Quit: Leaving.]
ikaros has quit [Quit: Leave the magic to Houdini]
elehack has joined #ocaml
_unK has quit [Remote host closed the connection]
palomer has joined #ocaml
<derdon> can anyone show me a simple example of using BatList.print ? Unfortunately, the Batteries' documentation is lacking of many examples
<palomer> I keep needlessly reparsing source files, can I serialize a source file so ocamlc doesn't have to reparse it every time?
<derdon> okay, I found it out by myself
<derdon> List.print (fun out -> Printf.fprintf out "%d") stdout [1;2;3];;
<alexyk> derdon: I wonder if you can limit it to say 10 first elements
<derdon> alexyk: why should I solve problems I don't have?
<alexyk> yeah :)
<alexyk> take prior to print will do it.
<alexyk> I mean this is dangerous since you can print a million things
<derdon> alexyk: I cannot use the BatPrint module cuz I can't use syntax extensions in my *.ml files (yet)
<derdon> this is problem is still not solved
_unK has joined #ocaml
<thelema> List.print Int.print stdout [1;2;3]
<thelema> as far as syntax extensions... I've done no more on that yet
<derdon> thelema: ah, good thing! thanks :)
<derdon> let print_int_list = List.print Int.print stdout
<derdon> hm. I think I need a book or a good tutorial to learn how to "think in YACC"
<derdon> can anyone say something about this source? http://plus.kaist.ac.kr/~shoh/ocaml/ocamllex-ocamlyacc/ocamlyacc-tutorial.pdf
<palomer> syntax extensions are cool
ttamttam has joined #ocaml
edlinde has quit [Quit: edlinde]
edlinde has joined #ocaml
edlinde has quit [Client Quit]
drk-sd has left #ocaml []
itewsh has quit [Quit: There are only 10 kinds of people: those who understand binary and those who don't]
emmanuelux has joined #ocaml
Anarchos has quit [Read error: No route to host]
ttamttam has quit [Quit: Leaving.]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
slash_ has joined #ocaml
ikaros has joined #ocaml
neorab has quit [Quit: naptime again]
derdon has quit [Read error: Operation timed out]