vect changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn, ICFP'03 http://www.icfpcontest.org/, A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/, A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
clam has quit [Read error: 60 (Operation timed out)]
reltuk has quit [SendQ exceeded]
reltuk has joined #ocaml
reltuk has quit [SendQ exceeded]
reltuk has joined #ocaml
reltuk has quit [Excess Flood]
reltuk has joined #ocaml
reltuk has quit [Excess Flood]
reltuk has joined #ocaml
polin8 has quit ["Lost terminal"]
polin8 has joined #ocaml
reltuk has quit [Excess Flood]
reltuk has joined #ocaml
Kinners has joined #ocaml
lus|wazze has joined #ocaml
jdmarshall has joined #ocaml
jdmarshall has quit [Read error: 60 (Operation timed out)]
jdmarshall has joined #ocaml
mattam has quit [Nick collision from services.]
mattam has joined #ocaml
Kinners has left #ocaml []
jdmarshall has quit ["ChatZilla 0.8.31 [Mozilla rv:1.4/20030624]"]
jedy has joined #ocaml
roar has joined #ocaml
roar has quit [Client Quit]
reltuk has quit [Read error: 60 (Operation timed out)]
foxster has quit [Client Quit]
two-face has joined #ocaml
systems has joined #ocaml
two-face has quit [Read error: 60 (Operation timed out)]
Kinners has joined #ocaml
pflanze has joined #ocaml
<Maddas> hm, do you know of any gentle introductions to genetical algorithms?
<Maddas> Not using Java :)
<vect> you want an example written in ocaml ?
<Maddas> Well, preferrably
<Maddas> Or Scheme, maybe C or something would be ok too if the code isn't complex - just something that I can follow :-)
<Maddas> Language-independent is fine too
<Maddas> But I don't have Java installed here, and I don't want to install it now most examples I find just use Java, which makes it harder to play around with settings and see the changes
mamuran is now known as iznerviran
<vect> well, I don't have such example here
systems has quit [Read error: 110 (Connection timed out)]
<vect> (I only have GA written in Java :/ )
<Maddas> :)
<Maddas> Oh well, it's not too important, I guess I can just try and implement my own simple GA from what I know
<Maddas> is caml.inria.fr down?
<Kinners> it is for me
<Maddas> hm, ok
iznerviran is now known as rox
<Kinners> anyone know about the (unfinished) ocaml eclipse plugin?
rox is now known as jure
jure is now known as rox
rox has quit ["Client exiting"]
<Maddas> uhm, ok, I'm stumped
<Maddas> I just get syntax error for this type declaraiton, I don't know where the problem is:
<Maddas> oh, never mind. Found it.
systems has joined #ocaml
buggs|afk has joined #ocaml
Xcal has joined #ocaml
Xcalibor has quit [Read error: 113 (No route to host)]
buggs has quit [Read error: 60 (Operation timed out)]
buggs|afk is now known as buggs
systems has quit [Connection timed out]
Kinners has left #ocaml []
two-face has joined #ocaml
<two-face> re
<vect> salut two-face
<two-face> salut vect
<Maddas> Hm, scanf is handy :)
<Maddas> (parsing simple things)
<two-face> scan uses Obj.magic!
<Maddas> Obj.magic?
* Maddas looks at it
brwill_ATL is now known as brwill
brwill is now known as brwill_wdw
owll has joined #ocaml
<Maddas> MM, I'm really starting to like O'Caml :)
<phubuh> :-)
<two-face> why?
<phubuh> is the httpd at caml.inria.fr down? :-/
<phubuh> Maddas, i started working on client-to-client communication last night, and i sort of got it working. now i just have to figure out which format the file lists are to be sent in :-)
<Maddas> cool phubuh!
<Maddas> two-face: the type system of O'Caml adapts very well to my needs
<Maddas> and with Scanf parsing what I need to parse is trivial, and things are just working now :)
<two-face> Maddas: ah
<phubuh> looks like i'm going to have to implement huffman coding... yay!
<Maddas> (e.g. having Something of type)
<Maddas> phubuh: hm, that's just using a binary tree, isn't it?
<phubuh> yup, sort of
<Maddas> sounds fun :)
<phubuh> start with n trees of 1 element each, every one containing a letter and its probability. then until there's only one tree, join the two trees with the lowest total probability
<Maddas> I still gotta do that
<Maddas> (I'm doing some SICP examples with O'Caml for practice, Huffman coding is one of the next)
<phubuh> ah, cool
<phubuh> SICP is awesome :)
<Maddas> it's quite nice so far :)
<Maddas> Although I'm not far at all ;)
<Maddas> I'm just parsing a file of football players and some values of them (it's form a online game) and I'm going to calculate which player fits best into which position
<Maddas> then I'll try to make a GA to calculate the best team it can figure out in a given amount of time ;)
<Maddas> from, even
<phubuh> neat!
<two-face> soccer's suckers
<phubuh> GA = genetic algorithm, right?
<phubuh> i remember impressing my biology teacher with one of those in sixth grade :-)
<phubuh> it was C though, yuck!
<Maddas> Heh
<Maddas> two-face: I hate soccer
<two-face> Maddas: :-)
<Maddas> this is from an online game though, and it sounds like a fun thing to try
<Maddas> you're basically a manager and have to try to get your team to win :)
<two-face> soccer is funny when it is a video game (like sensible soccer)
<Maddas> Yeah, I generally like video games more than the real-life sports counterpart
<Maddas> although icehockey can be entertaining :)
<phubuh> gah! why doesn't tuareg indent type declarations like this:
<phubuh> type foo = Bar
<phubuh> | Baz
<phubuh> (aligned | and =, like haskell-mode)
<two-face> tuareg is *configurable*
<phubuh> oh!
<phubuh> if i told you guys i find myself using a function `return' which is just the identity function, would you like to punch me in the face?
<Maddas> haha
<Maddas> phubuh: not really
<Maddas> I guess it can make things look clearer if you're not used to not returning things explicitely
<phubuh> i use it pretty seldom
<phubuh> mostly when a large block kind of overshadows the tiny little return expression, which looks ... unnatural
<Maddas> but then, I'm not in any way representative of normal O'Caml users, I guess
<phubuh> urgh, does anyone know of a mirror of htmlman?
systems has joined #ocaml
<Maddas> ack
<Maddas> Now, it is annoying that types overwrite last types with the same names :)
<Maddas> type defender = Normal | Defensive | Offensive | Towards_Middle | Extra_Forward | Extra_Inner_Midfield;; type winger = Normal | Defensive | Offensive | Towards_Middle | Extra_Forward | Extra_Central_Defender
<phubuh> heh
<karryall> use polymorphic variants
* Maddas reads up
<phubuh> use prefixes (D_normal) or polymorphic variants or separate modules
<phubuh> yeah, polymorphic variants would be best :)
<Maddas> Yeah, I don't like prefixes, makes it rather unnatural/unintuitive :)
<phubuh> yeah. reminds me of C :/
<Maddas> (especially as this solution is very intuitive, I can just say let setup = [| Goalkeeper; Defender(Normal); Defender(Offensive); ... |];; )
<Maddas> ack, caml.inria.fr still down :(
<phubuh> are you familiar with lisp or scheme?
<phubuh> polymorphic variants are kind of like their symbols
<Maddas> I wouldn't say that I'm familiar, no
<Maddas> I know very, very little Scheme :)
<Maddas> I'll see if the pdf I have locally mentions them
<phubuh> they're essentially interned strings. lisp weenies use them to emulate variant types :-)
<phubuh> since they're strings, they don't have to belong to some namespace
<systems> evil Riastradh loves lisp more then ocaml
<phubuh> i think Riastradh's more of a smug scheme weenie, no?
<phubuh> he's evil nonetheless.
<Maddas> Riastradh isn't evil!
two-face has quit [Read error: 110 (Connection timed out)]
Hipo has quit ["leaving"]
systems has quit [Connection timed out]
clam has joined #ocaml
<Maddas> hm
<Maddas> Where could I read about polymorphic invariants?
<karryall> Maddas: in the manual ;)
<Maddas> caml.inria.fr seems to be down still
<Maddas> or do I have any manual on my hard disk?
owll has left #ocaml []
<karryall> arhh yes
<Maddas> hm
<karryall> if you have the manual on your hard disk
<mellum> Maddas: Do you mean polymorphic variants?
<Maddas> err
<Maddas> yes, sorry mellum :)
<karryall> it's section 4.2
<Maddas> karryall: I mean, is the manual installed with o'caml by default? :-)
<Maddas> ah
<Maddas> I'll look in google cache, I found it when searching for 4.2
<karryall> usually yes
<Maddas> ok
<Maddas> ah, there we go, thanks!
<karryall> Maddas: see this paper also http://citeseer.nj.nec.com/garrigue00code.html
<karryall> (the syntax has changed a bit though)
<Maddas> Ok, thansk
<Maddas> Thanks
clam has quit [Read error: 60 (Operation timed out)]
systems has joined #ocaml
two-face has joined #ocaml
phubuh has quit [Remote closed the connection]
systems has quit ["Client Exiting"]
esb has quit []
phubuh has joined #ocaml
<phubuh> does anyone happen to have the ocaml library reference? :-/
<two-face> heh
lus|wazze has quit ["The Ogre philosopher Gnerdel believed the purpose of life was to live as high on the food chain as possible. She refused to e]
<karryall> what do you mean ?
<Smerdyakov> www.ocaml.org does.
<Smerdyakov> Is it down? :\
<phubuh> i think so :~(
* Smerdyakov cries.
<phubuh> no, it isn't!
<Smerdyakov> Ah.
<phubuh> it's just very, very slow
<Smerdyakov> I got it.
<Smerdyakov> Tehe
<phubuh> it just links to caml.inria.fr :/
<pflanze> Has anyone used ocaml for xml processing?
<karryall> pflanze: yes, a bit
<pflanze> What libraries did you use?
<karryall> several actually
<karryall> PXP
<karryall> the xml lexer that comes with lablgtk
<karryall> and xml-light
<phubuh> yay, thanks!
<karryall> there's an ocaml-expat too
<pflanze> xslt?
<karryall> hum, nothing in caml AFAIK
<phubuh> i can only use 7 bits of a char, right?
<karryall> ah yes great didn't known this one
<karryall> what do you mean "7 bits of a char" ?
<mattam> pflanze: yaxi :)
<mattam> XML, XPath and XSLT library. It is in dev but usable: http://mattam.ath.cx/soft/yaxi/yaxi.html
<pflanze> mattam: 404 error:
<pflanze> Pipeline not found
<pflanze> No pipeline was found for the request in request_pool # run
<mattam> lol
<phubuh> i want to be able to alter values in a Buffer
<phubuh> actually, i don't. never mind.
<pflanze> Cool.
<pflanze> BTW http://xduce.sourceforge.net/ sounds interesting as well.
<two-face> hey ===> www.cduce.org : Better
<mattam> cduce too
two-face has quit [Connection timed out]
jedy has quit ["Bye."]
<Maddas> hmm
<Maddas> hm, the o'caml manual isn't too bad if you don't start with it
<Maddas> (a bit hard IMO)
two-face has joined #ocaml
<Maddas> Hm
<Riastradh> Hm?
<Maddas> I'm getting a syntax error is the second line of this:
<Maddas> type defender = `Normal | `Defensive | `Offensive | `Towards_Middle | `Extra_Forward | `Extra_Inner_Midfield
<Maddas> type winger = `Normal | `Defensive | `Offensive | `Towards_Middle | `Extra_Forward | `Extra_Central_Defender
<Maddas> type midfield = `Normal | `Defensive | `Offensive | `Towards_Wing | `Extra_Forward | `Extra_Central_Defender
<Maddas> Am I using the polymorphic variants wrong?
<two-face> yes
<Maddas> oh, ok.
<Riastradh> You don't define polymorphic variants.
<Riastradh> The whole point of them is that you don't need to define them.
<two-face> [ `ee | `dfdf ]
<Maddas> hm, ok
<Maddas> ah, I think I see
<Maddas> Tahnks
<Maddas> Thanks
<Smerdyakov> Well, if you were defining a type in the first place, why do you want to use polymorphic variants?
<two-face> for polymorphism!
<phubuh> think about how well that definition would work if you removed all the `s
<phubuh> err, those definitions
<Maddas> Smerdyakov: I don't want to prefix my Constructors of the types
<Smerdyakov> Maddas, what?
<Maddas> well, if I just remove the backticks, the latter definitions will override the former
<Maddas> because the namespace is flat
<Smerdyakov> Oh. Sorry. I didn't read it carefully enough.
<Maddas> I don't really know the proper term for the elements of which a type consist :)
<phubuh> type constructor
<Maddas> ok
* Riastradh wishes OCaml had typeclasses.
<Riastradh> ...multi-parametre ones with fundeps; and rank-n polymorphism.
<Smerdyakov> And a partridge in a pair of Trees.
<phubuh> typeclasses would be totally awesome
systems has joined #ocaml
startdust has joined #ocaml
<startdust> is caml.inria.fr down?
<mattam> yep
<mattam> pauillac too
<Riastradh> They really need to work on making their server more stable.
<mattam> maybe its their dns, www.inria.fr is up
<startdust> it's not the same machine, is it?
<mattam> no, i don't think so
<startdust> so, do you know of any mirrors? i'd really like to have a look at the online tutorial list :)
<mattam> no, i'm not sure there are mirrors
<startdust> hmm
<startdust> google has the page cached =)
<Maddas> yup
<Maddas> www.ocaml.org is back up
<startdust> it was up for me, although very slow...
<Riastradh> Quick, make a mirror!
<startdust> lol
<Riastradh> ...oh, I guess if it's wicked slow you can't make a mirror that quickly.
<Maddas> haha
<startdust> how long did you guys took to get rid of "imperative thinking"? i've just started with ocaml this weekend, and i feel it's going to be hard...
<Smerdyakov> Not much time. How familiar are you with higher math?
<startdust> i'm not familiar with the term "higher math", at least not in english
<Smerdyakov> Math for mathematicians, as opposed to engineers.
<Smerdyakov> Proving theorems
<startdust> oh
<startdust> well, i'm an engineer :)
<Smerdyakov> So you've never taken a course that discussed, say, abstract algebra?
<startdust> yes
<Smerdyakov> Then it should take you about the same time it would take you to get comfortable with modern math, I guess.
<startdust> do you recommend that o'reilly book for learning?
<Maddas> Is functional programming really so close to maths?
<Maddas> in terms of the way you think about things
<Riastradh> Yes.
<Maddas> In that case I'm still writing very imperative code :-)
<Smerdyakov> startdust, no, but only because I've never read it. :D
Hipo has joined #ocaml
ult has joined #ocaml
systems has quit ["Client Exiting"]
Smerdyakov has quit [Read error: 60 (Operation timed out)]
<ult> what's the license on bignum?
<two-face> huh?
<ult> Is any of the stuff in the core O'Caml distribution non-GPL or non-QPL?
<ult> according to otherlibs/num/README, the bignum library is only usable non-commercially
<two-face> the runtime is LGPL modifed
<two-face> huh?
* two-face checks
<Maddas> ult: does that mean *usable*?
Smerdyakov has joined #ocaml
<Maddas> I think you're just not allowed to distribute the original code commercially...
<ult> Maddas: Loading into memory from disk is considered reproduction
<Maddas> Oh
<Maddas> Even when compiled?
<ult> The compiled code would be a derivative work
<Maddas> I see
<ult> and the license isn't included
<ult> i'm wondering if this is a matter of old documentation or ocaml including commercially-unusable code
Hipo has quit ["Da."]
<two-face> ult: it is problematic
<ult> oi
<two-face> but bignums/doc is no longer there
<ult> who would know the answer?
<two-face> the caml team
<ult> that looks to be the license talked about
<startdust> caml.inria.fr is back
<two-face> ult: not free
two-face has quit ["Client exiting"]
<ult> two-face: ?
<ult> two-face: I sent a message to caml-list but I'm not subscribed so I don't know if it went through
<ult> my email is acting up
<startdust> ult: i got it
<ult> ah, cool
* ult wonders how hard it would be to make a BigNum->GMP wrapper
themus_ has quit [Read error: 110 (Connection timed out)]
themus_ has joined #ocaml
ult has quit ["p00f"]
systems has joined #ocaml
__DL__ has joined #ocaml
__DL__ has quit [Remote closed the connection]
systems has quit ["Client Exiting"]
clam has joined #ocaml
systems has joined #ocaml