systems 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| Early releases of OCamlBDB and OCamlGettext are available | Caml Weekly news http://pauillac.inria.fr/~aschmitt/cwn/
docelic is now known as docelic|sleepo
mattam has quit ["zZz"]
tyler has joined #ocaml
<tyler> Any recommendations for someone wanting to learn O'Caml? Background is strong in Python and PHP, a bit of C knowledge
* Riastradh points at ocaml.org -> the OCaml manual -> the first section
<tyler> Mainly I'm looking for something that combines (some) of Pythons flexibility, string handling, etc, with C's main advatages, the ability to be compiled and run at 'full speed'
<tyler> From what little I've seen so far, only thing that really rubs me wrong is the syntax
<Smerdyakov> Ah, and if you ever wise up, it's the syntax you're used to that will rub you wrong. =)
<tyler> Smerdyakov: I dunno, Python is pretty elegant.
<Smerdyakov> *snicker*
<Smerdyakov> I think you won't find many here who agree.
<tyler> Perhaps.
* Riastradh snickers at tyler, too, for finding Python's syntax elegant, but also agrees that OCaml's syntax is disgusting to a level of barfulousness.
<tyler> the double ; seems espically...weird.
<Riastradh> It took me four tries to start learning OCaml; the syntax deterred me every time.
<Smerdyakov> ;; isn't found in "real programs," right, fellas?
<Smerdyakov> I think it's just a separator between batches of code sent to the interactive environment.
<mellum> Well, you don't really need ';;' normally
<Riastradh> ;; is only for the interpreter.
<tyler> ahh, okay
<tyler> well, that helps.
<tyler> let is also kinda...out there.
* tyler has flash backs to mid-80'sish BASICs
<Smerdyakov> That's because you don't know functional languages yet.
<Smerdyakov> You probably don't really grasp what let is in ML.
<tyler> Probably not.
<tyler> Lemme work through the first section of the manual.
<Smerdyakov> Why not the book someone gave you a link to?
<tyler> Then see how much I still feel like complaining about *g*
<tyler> Had to pick one ;)
<Smerdyakov> Well, manuals and books are different things.
<tyler> yea, true
<jao> i think the manual is not easy reading for a begginer.
<Smerdyakov> I don't know if the manual is meant to be a first introduction to functional programming....
<tyler> Okay, I'll read the book then *g*
<Riastradh> I found the introduction in the manual useful, but I was already acquainted in a prior manner to other functional languages.
jao has quit [calvino.freenode.net irc.freenode.net]
jao has joined #ocaml
* tyler prepares to do his weeekly cleanup of ~
tyler has quit ["Lost terminal"]
systems has joined #ocaml
tyler has joined #ocaml
<tyler> Are there any major differences between the 2.04 discussed in the book, and the current 3.0x series?
<jao> there's an appendix in the book describing them. not really until you lean more, i think
<tyler> ok
<tyler> I know different langs have different criteria for bumping the major version.
<tyler> For instance, when Python 2 came, practically all 1.0x code works, where as with Perl or PHP...
<jao> i'd say ocaml is more like python in this respect
<tyler> k
<systems> tyler, on ocaml.org there is a txt file with the changes i recommend you read it
<systems> will definitly make readin the book less cryptic
<systems> i am also readin that book, and i am thinkin to drop it for the doc
<systems> is there a french version of the doc ?
<systems> i looked but didnt find any, kinda weird since the project is basically french
systems has quit ["Client Exiting"]
<reltuk> can ocaml be programmed purely functionally?
<Riastradh> Certainly.
<reltuk> Riastradh : Are you familiar with the O'Reilly book linked to in the title?
<Riastradh> reltuk, I've heard of it, but I haven't got it and I've never read it.
<reltuk> ahh, ok...I couldn't help notice how dramattically different their example of a calulator is than one I would create in an imperative language
<reltuk> but I guess that's functional programmin' for ya
<reltuk> one of the cool things about ocaml is that it's just as fast as C for most things...would you loose that speed if you used it for writing pure functional applications?
<Riastradh> I doubt it.
lament has joined #ocaml
Kinners has joined #ocaml
__DL__ has quit [Remote closed the connection]
polin8 has quit [Read error: 104 (Connection reset by peer)]
Kinners has left #ocaml []
polin8 has joined #ocaml
foxster has quit []
tyler has quit ["leaving"]
polin8 has quit [Read error: 104 (Connection reset by peer)]
polin8 has joined #ocaml
jao_ has joined #ocaml
jao has quit [Read error: 104 (Connection reset by peer)]
<reltuk> how well suited would ocaml be to writing an rpg...something like a mud?
smklsmkl is now known as smkl
mattam has joined #ocaml
foxster has joined #ocaml
lament has quit ["I AM NOT A LICENSED HAIRSTYLIST"]
jao_ has quit ["leaving"]
gene9 has joined #ocaml
__DL__ has joined #ocaml
Vincenz has joined #ocaml
docelic|sleepo is now known as docelic
systems has joined #ocaml
systems has quit [Client Quit]
smklsmkl has joined #ocaml
reltuk has quit [calvino.freenode.net irc.freenode.net]
wax- has quit [calvino.freenode.net irc.freenode.net]
docelic has quit [calvino.freenode.net irc.freenode.net]
smkl has quit [calvino.freenode.net irc.freenode.net]
reltuk has joined #ocaml
wax- has joined #ocaml
gene9 has quit []
wax- has quit [Killed (hardy.freenode.net (niven.freenode.net <- asimov.freenode.net))]
docelic has joined #ocaml
smkl has joined #ocaml
wax- has joined #ocaml
wax- has quit [Read error: 104 (Connection reset by peer)]
axolotl has joined #ocaml
docelic has quit [Connection timed out]
smkl has quit [No route to host]
docelic has joined #ocaml
phubuh_ has joined #ocaml
<phubuh_> what the hell
<phubuh_> phubuh@igloo tiles $ ocamlcp -c -thread -unsafe -I +threads -I +sdl -I . -I src src/landscapeFragment.ml
<phubuh_> /usr/bin/ocamlprof: unknown option `-thread'.
<phubuh_> why does it run ocamlprof instead of ocamlcp?!
<phubuh_> oh. there's no way to profile programs that use threads? =(
phubuh_ has quit ["dammit"]
<reltuk> how would ocaml fair in making an rpg type game...like a mud?
<Smerdyakov> Just as well as any other reasonable programming language.... and probably better, for the usual reasons static functional programming is better. :-)
<reltuk> interesting...XMLLight looks nicely clean for a small xml parser
stefp has quit [Read error: 104 (Connection reset by peer)]
stefp has joined #ocaml
_AndyA_ has joined #ocaml
lus|wazze has joined #ocaml
smklsmkl is now known as smkl
mattam_ has joined #ocaml
_AndyA_ has quit [Read error: 104 (Connection reset by peer)]
mattam has quit [Read error: 110 (Connection timed out)]
<Riastradh> Grr. Does -anyone- here know why exceptions can't take type parametres?
<Riastradh> I searched on caml-list and found nothing relevant.
<Smerdyakov> What would that _mean_?
<Smerdyakov> There is only one exception type.....
<Riastradh> I find it very annoying that I can only put values with types that take no parametres in exceptions.
<Smerdyakov> Oh, really? You can't put a list of integers?
<Riastradh> For example, the Not_found exception is almost useless -- it doesn't give any information about the list in which nothing was found, or what was being searched for -- because you can't say 'exception 'a Not_found of 'a list * 'a' or anything.
liyang has quit [calvino.freenode.net irc.freenode.net]
<Smerdyakov> Of course you can't! How would you know what the types were at runtime?
<Riastradh> You have to put 'int list' (a type which no longer takes type parametres) in there or something.
<Smerdyakov> See above.....
lus|wazze has quit [calvino.freenode.net irc.freenode.net]
docelic has quit [calvino.freenode.net irc.freenode.net]
__DL__ has quit [calvino.freenode.net irc.freenode.net]
<Smerdyakov> I think you have been corrupted by Scheme.
<Smerdyakov> No language extension is valid here if it requires you to manipulate values of unknown type in type-dependent ways.
<Riastradh> Maybe, but do you not agree that it's almost useless to not be able to raise an exception with polymorphic type parametres?
<Smerdyakov> No, I don't.
<Riastradh> What would you use?
<Smerdyakov> Exceptions with this use are _exceptional_. You should be catching them in places where they can occur and handling them appropriately. You'll know what types were involved from context.
lus|wazze has joined #ocaml
<Riastradh> No, not necessarily in the context from which they were raised.
liyang has joined #ocaml
docelic has joined #ocaml
__DL__ has joined #ocaml
jao has joined #ocaml
two-face has joined #ocaml
<Riastradh> Is there anything like Haskell's typeclass constraint system in OCaml? -- i.e., f : Num 'a => 'a -> 'a says f is a function that takes a value of the type of any 'a that satisfies the Num typeclass and returns a value of the type of 'a.
<Riastradh> s/i\.e\./e\.g\./1
<lus|wazze> nope
<Riastradh> Damn.
* Riastradh supposes he'll just have to use OCaml's object system.
two-face has quit ["Client exiting"]
TachYon has joined #ocaml
TachYon has quit [Client Quit]
<Riastradh> Is there a standard modulo function somewhere?
<pnou> # (mod);;
<pnou> - : int -> int -> int = <fun>
<Riastradh> OK, thanks.
polin8 has quit [Read error: 104 (Connection reset by peer)]
polin8 has joined #ocaml
clam has joined #ocaml
lus|wazze has quit ["\o/ www.minibosses.com \o/"]
MegaWatS has joined #ocaml
MegaWatS has quit ["\o/ www.minibosses.com \o/"]
Vincenz has quit ["slee"]
clam has quit ["no reason"]