awwaiid has quit [Read error: 104 (Connection reset by peer)]
awwaiid has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
debona|r has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
mrsolo has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
shawn_ has quit [Read error: 104 (Connection reset by peer)]
shawn_ has joined #ocaml
mrsolo has joined #ocaml
_shawn has joined #ocaml
shawn_ has quit [Connection reset by peer]
Nutssh has joined #ocaml
debona|r has left #ocaml []
Riastrad1 has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastrad1 is now known as Riastradh
xolution has joined #ocaml
awwaiid has quit [Read error: 104 (Connection reset by peer)]
Nutssh has quit ["Client exiting"]
vezenchio has quit ["I thought what I'd do was, I'd pretend I was one of those deaf-mutes ^_^"]
awwaiid has joined #ocaml
xolution has quit [Read error: 110 (Connection timed out)]
Hadaka has quit [Read error: 54 (Connection reset by peer)]
Hadaka has joined #ocaml
pnou has quit [Remote closed the connection]
pnou has joined #ocaml
Riastrad1 has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastrad1 is now known as Riastradh
cjohnson has quit ["Leaving"]
debona|r has joined #ocaml
Riastrad1 has joined #ocaml
Riastradh has quit [Read error: 110 (Connection timed out)]
jason_ has joined #ocaml
<
jason_>
Currying is so friggen cool.
<
jason_>
I ran into a problem that it completely blew apart! Muwhaaha.
monochrom has joined #ocaml
awwaiid has quit [Read error: 104 (Connection reset by peer)]
awwaiid has joined #ocaml
Riastrad1 has quit [Read error: 110 (Connection timed out)]
jason_ has quit [Remote closed the connection]
Riastradh has joined #ocaml
<
mflux>
sometimes I would hope though that it wouldn't be implicit, but I guess it has its downsides too ;)
<
mflux>
s/has/would have/
awwaiid has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
awwaiid has joined #ocaml
awwaiid has quit [Read error: 104 (Connection reset by peer)]
karryall has joined #ocaml
slashvar has joined #ocaml
slashvar is now known as slashvar[lri]
awwaiid has joined #ocaml
awwaiid has quit [Read error: 104 (Connection reset by peer)]
gl has quit ["BitchX: your way, right away"]
gl has joined #ocaml
awwaiid has joined #ocaml
awwaiid has quit [Read error: 104 (Connection reset by peer)]
awwaiid has joined #ocaml
leolio has joined #ocaml
yakker has joined #ocaml
yakker has quit [Read error: 113 (No route to host)]
yaccker has joined #ocaml
<
yaccker>
how does one end an inner 'match' in nested pattern matchings?
<
karryall>
wrap it in a begin..end
<
leolio>
or use parenthesis
vezenchio has joined #ocaml
thomas001 has joined #ocaml
<
thomas001>
hi,does ocaml support continuations like scheme or ruby?
<
thomas001>
thx ronwalf
<
ronwalf>
People keep pointing at partial continuations, but I don't know if ocaml is moving there or not
whee has joined #ocaml
<
thomas001>
hmm then i'll to it with threads...
awwaiid has quit [niven.freenode.net irc.freenode.net]
Riastradh has quit [niven.freenode.net irc.freenode.net]
monochrom has quit [niven.freenode.net irc.freenode.net]
debona|r has quit [niven.freenode.net irc.freenode.net]
gim has quit [niven.freenode.net irc.freenode.net]
mflux has quit [niven.freenode.net irc.freenode.net]
TheDracle has quit [niven.freenode.net irc.freenode.net]
j_n has quit [niven.freenode.net irc.freenode.net]
vezenchio has quit [niven.freenode.net irc.freenode.net]
pnou has quit [niven.freenode.net irc.freenode.net]
Lemmih has quit [niven.freenode.net irc.freenode.net]
avn has quit [niven.freenode.net irc.freenode.net]
Hipo has quit [niven.freenode.net irc.freenode.net]
karryall has quit [niven.freenode.net irc.freenode.net]
det has quit [niven.freenode.net irc.freenode.net]
jourdechance has quit [niven.freenode.net irc.freenode.net]
whee has quit [niven.freenode.net irc.freenode.net]
slashvar[lri] has quit [niven.freenode.net irc.freenode.net]
whee has joined #ocaml
vezenchio has joined #ocaml
awwaiid has joined #ocaml
slashvar[lri] has joined #ocaml
karryall has joined #ocaml
Riastradh has joined #ocaml
monochrom has joined #ocaml
debona|r has joined #ocaml
pnou has joined #ocaml
gim has joined #ocaml
j_n has joined #ocaml
mflux has joined #ocaml
TheDracle has joined #ocaml
Lemmih has joined #ocaml
jourdechance has joined #ocaml
det has joined #ocaml
Hipo has joined #ocaml
avn has joined #ocaml
<
mattam>
ruby has call/cc ?
<
yaccker>
if (str != "") doesn't seem to check for an empty string... is there another way of doing it?
<
thomas001>
yaccker: if(!*str)
<
leolio>
!= checks for physical equalité
<
leolio>
whereas <> checks if the values match
<
thomas001>
leolio: == does ;)
<
thomas001>
i shopuld switch less often to #C
<
Hadaka>
is there any way to make a single file which could contain a lexer, a parser and the program to run those?
<
leolio>
Hadaka, i think i would be possible if you append the .ml created by ocamlyacc to the one created by ocamllex
<
leolio>
but you would have to remove some "open"
<
Hadaka>
leolio: mmh, right, I was hoping to keep the actual source there
<
Hadaka>
but yeah, I can see how ocamllex and ocamlyacc are quite separate utilities from everything
yaccker has quit ["Leaving"]
leolio has quit ["Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC."]
monochrom has quit ["Don't talk to those who talk to themselves."]
det has quit [Read error: 54 (Connection reset by peer)]
awwaiid has quit [Read error: 104 (Connection reset by peer)]
whee has joined #ocaml
awwaiid has joined #ocaml
leolio has joined #ocaml
det has joined #ocaml
mwb has joined #ocaml
mwb is now known as kuz
Lemmih has quit ["Leaving"]
cjohnson has joined #ocaml
Xolution has joined #ocaml
cjohnson has quit [Read error: 104 (Connection reset by peer)]
Lemmih has joined #ocaml
slashvar[lri] has quit [Read error: 104 (Connection reset by peer)]
Xolution has quit [Read error: 54 (Connection reset by peer)]
Xolution has joined #ocaml
Xolution has quit [Read error: 110 (Connection timed out)]
Xolution has joined #ocaml
slashvar[lri] has joined #ocaml
sb98052 has joined #ocaml
awwaiid has quit [Read error: 104 (Connection reset by peer)]
awwaiid has joined #ocaml
<
Hadaka>
can I somehow use camlp4 in scripts for the toplevel?
awwaiid has quit [Read error: 104 (Connection reset by peer)]
awwaiid has joined #ocaml
<
Hadaka>
okay, a really stupid ocaml question - how do I make a string of a char?
<
Hadaka>
or rather even, how do I create a new string which is the concatenation of a string and a char
<
Riastradh>
Just as you would create any string with any length and fill it with a single character.
<
leolio>
String.make 1 c
<
Hadaka>
so, str ^^ (String.make 1 c)?
<
awwaiid>
yeah. thats why those 'extra' libraries all implement string_of_char
<
awwaiid>
let string_of_char c = String.make 1 c
<
thomas001>
let string_of_char = String.make 1 ?
<
awwaiid>
even better
<
awwaiid>
though less self-documenting perhaps
gim has quit [Read error: 104 (Connection reset by peer)]
gim has joined #ocaml
<
sic->
woah, what's '?' ?
<
Riastradh>
A question mark.
<
sic->
not ocaml code?
<
Riastradh>
The OCaml code is:
<
Riastradh>
let string_of_char = String.make 1
<
Riastradh>
The '?' signified a question.
<
sic->
how popular is the revised syntax?
<
Riastradh>
The revised syntax?
<
sic->
camlp4 stuff
<
Riastradh>
It looks just as ugly as the current OCaml syntax to me.
<
mellum>
Except that it is more annoying to use imperative style with it.
<
Hadaka>
a stream question: is it somehow possible to match an empty stream?
awwaiid has quit [Read error: 104 (Connection reset by peer)]
awwaiid has joined #ocaml
awwaiid has quit ["Client Exiting"]
Riastradh has quit [Remote closed the connection]
Riastradh has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastradh has joined #ocaml
whee has joined #ocaml
sb98052 has quit [Read error: 110 (Connection timed out)]
thomas001 has quit [Read error: 113 (No route to host)]
leolio has quit [Read error: 54 (Connection reset by peer)]
karryall has quit [Ping timeout: 14400 seconds]
karryall has joined #ocaml
<
Hadaka>
hrm, is there a string replace function in the standard library somewhere?
<
Hadaka>
well, I'd rather do without str.cma, but even from there I couldn't find anything but regexp replaces
<
Riastradh>
You didn't look very hard, then.
<
Hadaka>
I still can't find it - only Str.regexp_string and then replacing by regexp
<
Riastradh>
...oh, I misread your request.
<
Hadaka>
okay, how would you guys write a trivial xml escape fun? eg. '<' -> "<", '&' -> "&", '"' -> """?
<
ronwalf>
You need to escape the quotes?
cjohnson has joined #ocaml
<
Hadaka>
performance matters very little
<
Hadaka>
inside attributes, yes
<
ronwalf>
Are you sure it's not just < and &?
<
Hadaka>
if one is really minimal, then '<' only inside tags and '"' only inside attributes, but it doesn't hurt to do both in both
<
ronwalf>
Well, you also need \n in attributes
<
Hadaka>
do you? I never knew...
<
ronwalf>
So I'd consider the cases completely seperate
<
karryall>
ronwalf: no, they're not
<
karryall>
same rules for attributes
<
ronwalf>
The only similarity is &
<
Hadaka>
I don't think XML even has a standard entity for newline
<
ronwalf>
No, but you can always use the unicode
<
karryall>
why yes, 

<
Hadaka>
I really doubt \n needed escaping, this needs checking
<
karryall>
Hadaka: it doesn't
cjohnson has quit [Client Quit]
Xolution has quit ["Leaving"]
<
mattam>
Hadaka: you could use a buffer and simply fill it as you walk the string
<
Hadaka>
mattam: I think that's what I'm going to do - buffer and String.iter
<
ronwalf>
ok, libxml2 likes it, at any rate
<
Hadaka>
xmllint likes it as well
<
ronwalf>
So it's valid, but not normalized
<
Hadaka>
right, but it is the xml processors responsibility to normalize
<
ronwalf>
Yes, but it's going to be a pain to read for a human
<
ronwalf>
If there is xml in an attribute with newlines, it's going to look like a typo
<
karryall>
ronwalf: arf, xml already is a pain to read
* ronwalf
reads rdf for a living, thinks xml isn't so bad
<
Hadaka>
are there any cool rdf toolkits for ocaml?
<
ronwalf>
Hadaka: Nope
<
Hadaka>
these files are all machine processed and it's a trivial hack anyway, so it matters very little here
<
karryall>
Hadaka: not that I know of
<
ronwalf>
The closest I've found was an RSS parser
<
Hadaka>
well, unless that rss parser builds an abstract rdf model, it's not going to help much
<
ronwalf>
I've looked at making ocaml bindings for Redland
smimou has quit ["?"]
<
Hadaka>
mmh, didn't redland already use SWIG or something?
<
ronwalf>
It may be enough to make a thin shell on top of the swig generated bindings to control when items are garbage collected
<
Hadaka>
yeah, and to make the swig generated types be somewhat easier to handle
<
Hadaka>
as I remember it, swig generated rather horrid representation in ocaml, especially for C structs
<
ronwalf>
Fortunately, all of redland's structs are private
<
ronwalf>
So you just get pointers to blobs that get passed to functions
<
Hadaka>
yes, it might be quite doable
<
Hadaka>
whee, now this xml validates
<
ronwalf>
Hadaka: What are you using RDF for?
<
Hadaka>
ronwalf: a lot of things, in a while - using python for that stuff now
karryall has quit ["bya"]
<
Hadaka>
hrm, too bad pa_ocamllex is unmaintained...
cjohnson has joined #ocaml
cjohnson has quit [Read error: 104 (Connection reset by peer)]
cjohnson has joined #ocaml
_fab has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
avlondono has joined #ocaml
GreyLensman has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
monochrom has joined #ocaml