phubuh has quit [Remote closed the connection]
brwill|work has quit [Connection timed out]
brwill|work has joined #ocaml
brwill|work is now known as brwill
<brwill> anyone here looked into xcaml (http://sf.net/projects/xcaml) ?
<Riastradh> What does it do?
<brwill> afaik it's a way of embedding ocaml in xhtml and/or serving ocaml via an apache module
<Riastradh> Does it support a Queinnec/CPS mechanism?
<brwill> not sure ;) I haven't actually used it before, wondering if it would be worth it
<Riastradh> If it doesn't, then I don't think I'll bother with it.
<Riastradh> And until it does, I'll stick with the PLT web server or SUnet.
<brwill> Riastradh: whats the best, in your opinion? I really ove ocaml, and would love to use it for web application in a way that suits its nature
<Riastradh> For web development?
<brwill> for ocaml web development, yes
<Riastradh> I don't know for OCaml, but for another functional language -- Scheme -- there is one of the best systems I can imagine.
<brwill> PLT, yes
<brwill> What I'd really like to do is write a templating engine similar to Amrita in Ruby
* Riastradh thinks Lisp is unparallel'd for XML generation.
* brwill nods
<Riastradh> XML, rather, is just a reinvention of s-expressions.
<Smerdyakov> Oh p-leeeeease.
<Riastradh> If your SML web thing can generate XML better than Lisp, and it supports a Queinnec/CPS mechanism, then I might consider using it.
<Smerdyakov> I am taking issue with your statement about XML being a reinvention of s-expressions.
<Riastradh> Defend yourself.
<Smerdyakov> I don't think LISP has anything truly analagous to DTD's.
<Riastradh> That is correct. But DTDs suck and are obsolete now.
<Smerdyakov> DTD's are a part of XML.
<Smerdyakov> So... you're wrong. :)
<Riastradh> They've been obsoleted by XML Schemas.
* brwill grabs a bag of popcorn
<Riastradh> XML Schemas are more advanced, more powerful, and more widely used than DTDs. There is _no_ reason why DTDs should still be used except for legacy junk.
<Smerdyakov> I don't know what XML Schemas are, so I withdraw from the discussion. :)
cjohnson has joined #ocaml
<cjohnson> I'm trying to match all strings that end with _tn.jpg in ocaml
<cjohnson> # let reg = Str.regexp "^.*_tn\.jpg$";;
<cjohnson> Warning: Illegal backslash escape in string
<cjohnson> Reference to undefined global `Str'
<cjohnson> firstly, if just do .jpg instead of \.jpg there, will it understand the '.' is literal?
<cjohnson> second, what's that crap about "Reference to undefined global 'Str'" ?
Kinners has joined #ocaml
Kinners has quit [Read error: 54 (Connection reset by peer)]
<skylan> cjohnson: Note: matching "^.*" isn't really doing you any favours. Drop that. "_tn\.jpg$" would be sufficient.
<cjohnson> it complains about \. though
<cjohnson> anyway, the way i found around that was [.] instead of \.
<cjohnson> and the reference to undefined global was me not linking with str.cma
<cjohnson> after that though, it worked
<cjohnson> if i get rid of ^.*, it doesn't work anymore
<cjohnson> but i'm using string_match
<cjohnson> if i used string_partial_match i think i wouldn't need the ^.*
<cjohnson> anyone know if there's any advantage from one to the other in terms of efficiency?
<skylan> *shrug*
brwill is now known as brwill|zzz
baader has joined #ocaml
liyang has quit [Remote closed the connection]
liyang has joined #ocaml
cjohnson has left #ocaml []
asquii has joined #ocaml
asqui has quit [Connection timed out]
asquii is now known as asqui
baader has quit ["I'll be back"]
baader has joined #ocaml
lus|wazze has joined #ocaml
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]
lus|wazze has joined #ocaml
systems has joined #ocaml
systems has quit [Read error: 60 (Operation timed out)]
m[kel[ has quit [Read error: 104 (Connection reset by peer)]
smklsmkl has joined #ocaml
phubuh has joined #ocaml
derfy has joined #ocaml
brwill|zzz is now known as brwill|work
phubuh has quit [Read error: 104 (Connection reset by peer)]
emu has quit [Read error: 60 (Operation timed out)]
sim-son has joined #ocaml
sim-son has left #ocaml []
derfy has quit []
mrvn_ has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
emu has joined #ocaml
baader has quit ["I'll be back"]
smklsmkl has quit [Remote closed the connection]
smklsmkl has joined #ocaml
m[kel[ has joined #ocaml
smklsmkl has quit [Read error: 104 (Connection reset by peer)]
phubuh has joined #ocaml
<mellum> Hm, I want to express List.map with List.fold_left, but it doesn't work, I guess it's obvious but I don't see it, what's wrong here: let my_map f l = List.fold_left (fun x l -> (f x) :: l) [] l;;
<lus|wazze> try this one instead: let my_map f l = List.fold_left (fun l x -> (f x) :: l) [] l
<lus|wazze> the arguments to the function passed to fold_left are given in the same order as they are given to fold itself
<mellum> Ah. Thanks.
<lus|wazze> but that will also reverse the list
<lus|wazze> so use fold_right instead
<mellum> Yes, probably... but it's for demonstration purposes, so I should probably use List.rev
<mellum> (and define rev with fold :)
<Riastradh> Yuck, why would you define rev with fold_left _and_ map with fold_left _and_ use rev after map? Why not just use fold_right?
<mellum> Riastradh: To impress chicks
docelic has joined #ocaml
docelic has quit ["l8r folks"]
mattam has joined #ocaml
mattam_ has quit [Read error: 110 (Connection timed out)]
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]