<thelema>
You may need to double-escape \ (once for ocaml's string, once for PCRE)
<thelema>
yes, it's a zero-width assertion.
* palomer
goes nuts with double escapings!
<palomer>
I'm entering my regular expressions directly into ocaml through gtk
<thelema>
gtk?
<palomer>
yeah
<palomer>
a text entry
<palomer>
so I enter my regexp in a text entry
<palomer>
what I want to match in a text entry
<palomer>
and then my little application tells me if it's matched
<thelema>
sounds like fun.
<palomer>
((?!foo).)* <-- seems to work
<palomer>
(((\\\\)*\\<)|[^<])* <--doesn't work
<thelema>
hmmm...
<thelema>
it matches \\\\<?
<palomer>
it matches \< and \\< and \\\< and \\\\<
<thelema>
ah, you need to exclude \ as well...
<thelema>
try (((\\\\)*\\<)|[^\\<])*
<thelema>
but then you need to put \ back in, so...
<palomer>
that's match <, no?
<palomer>
seems to work
<thelema>
try (((\\\\)*\\<)|(\[^<])|[^\\<])*
<palomer>
but it works!
<thelema>
without the extra bit, it'll fail on \3
<palomer>
oh, righto
<palomer>
whew
<thelema>
try (((\\\\)*\\<)|(\\[^<])|[^\\<])* (need one more \ to stay consistent on my single-escaping
<palomer>
maybe it's easier with ?! ?
<thelema>
easier with dfa.
<thelema>
nice easy states to manage.
<thelema>
anyway, good job and good night.
<palomer>
night!
<palomer>
what a tough problem
<vixey>
what's all this regex for
<palomer>
I'm lexing an html file
<vixey>
wow interesting choice of tool
<palomer>
to lex an html file?
<palomer>
do you have any better suggestions??!
<vixey>
to use regex to do that
<vixey>
well, why are you lexing HTML?
<palomer>
for kicks
<vixey>
then regex is fine :p
<palomer>
too see how it's done
<palomer>
seems like it's really hard
<vixey>
I would use camllex
<palomer>
I've developed a parser generator
<palomer>
and I'm testing it out
palomer has quit [Remote closed the connection]
palomer has joined #ocaml
<palomer>
hah
<palomer>
looks like you can't escape < in html
<palomer>
wicked!
<vixey>
<
<palomer>
yeah
palomer has quit [Remote closed the connection]
Mr_Awesome has quit ["aunt jemima is the devil!"]
LeeKnux has quit ["Adios Amigos!"]
bohanlon has quit [Remote closed the connection]
bohanlon has joined #ocaml
filp has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
TheLittlePrince has quit [Client Quit]
petchema_ has joined #ocaml
rwmjones has joined #ocaml
petchema has quit [Read error: 110 (Connection timed out)]
<gildor_>
rwmjones: i release ocaml-gettext 0.3.2, based on your patch yesterday
seafood_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
<rwmjones>
gildor_, yes just saw it, thanks!
rwmjones has quit ["Closed connection"]
hkBst has joined #ocaml
authentic has quit [Read error: 110 (Connection timed out)]
authentic has joined #ocaml
Yoric[DT] has joined #ocaml
Demitar has joined #ocaml
munga has joined #ocaml
^authentic has joined #ocaml
Demitar has quit [leguin.freenode.net irc.freenode.net]
petchema_ has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
rhar has quit [leguin.freenode.net irc.freenode.net]
sporkmonger has quit [leguin.freenode.net irc.freenode.net]
im_a_man has quit [leguin.freenode.net irc.freenode.net]
vixey has quit [leguin.freenode.net irc.freenode.net]
rhar has joined #ocaml
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
vixey has joined #ocaml
sporkmonger has joined #ocaml
shortcircuit has joined #ocaml
petchema_ has joined #ocaml
Demitar has joined #ocaml
im_a_man has joined #ocaml
bluestorm has joined #ocaml
authentic has quit [Remote closed the connection]
jlouis has quit ["Leaving"]
authentic has joined #ocaml
rwmjones has joined #ocaml
Snark_ has joined #ocaml
Snark_ is now known as Snark
sporkmonger has quit []
LordMetroid has joined #ocaml
rwmjones has quit ["Closed connection"]
rwmjones has joined #ocaml
LordMetroid has quit [Read error: 104 (Connection reset by peer)]
LordMetroid has joined #ocaml
RobertFischer has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
sporkmonger has joined #ocaml
sporkmonger has quit [Read error: 104 (Connection reset by peer)]
<flux>
at times it would be useful if tuples could be converted into compatible records and vice versa
<flux>
I suppose very rarely, though :)
<RobertFischer>
They can be converted.
<RobertFischer>
You have to write the conversion, but they can be converted just fine.
<flux>
yes :)
<flux>
I was thinking of a way that didn't involve writing anything :)
<bluestorm>
(and you can have a camlp4 extension puking conversion functions from records in about 10 minutes)
<flux>
and would work like %identity. but isn't not possible to statically determine the arity of a record
petchema_ has quit [Read error: 110 (Connection timed out)]
<flux>
of course, the record should not have any mutable fields
<flux>
it's too bad that all the conversion function generation need to be put to the definition site of the record
<flux>
because camlp4 cannot access the type-level information, or other information defined in other modules
<bluestorm>
i quite like the "with to_tuple" pa_type_conv way of enriching type definitions
<flux>
while it's nice, I don't think it really is the right place to put the stuff
<flux>
how about if you wanted to extend Unix.stats? no can do..
<flux>
unless you modify the Unix module
<flux>
hm, not extend, but derive the functions
<flux>
but that's the way it must go at present
<bluestorm>
you may be able to use
<bluestorm>
type foo = Unix.foo = { ... }
<bluestorm>
with ...
qwr has quit [Remote closed the connection]
<bluestorm>
i'm not sure type-conv handle the re-exportation case right now, but it would be quite easy to add, and solve your problem in a limited way
<bluestorm>
(but it involves a bit of code copying)
filp has quit ["Bye"]
qwr has joined #ocaml
authentic has quit [Remote closed the connection]
LordMetroid has quit [Connection timed out]
m3ga has joined #ocaml
authentic has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
LordMetroid has joined #ocaml
RobertFischer has quit []
marmotine has joined #ocaml
gaja has quit ["leaving"]
struk_atwork is now known as struk|busy
lordmetroid_ has joined #ocaml
lordmetroid_ has quit [Client Quit]
lordmetroid_ has joined #ocaml
ygrek has quit [Remote closed the connection]
LordMetroid has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
ygrek has joined #ocaml
vixey has quit ["* I'm too lame to read BitchX.doc *"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
rwmjones has quit [Read error: 110 (Connection timed out)]
^authentic has joined #ocaml
seafood has quit []
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
authentic has quit [Remote closed the connection]
Linktim has joined #ocaml
Linktim has quit [Remote closed the connection]
smimou has quit ["bli"]
Linktim has joined #ocaml
RobertFischer has joined #ocaml
lordmetroid__ has joined #ocaml
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
det has joined #ocaml
lordmetroid_ has quit [Connection timed out]
LordMetroid has joined #ocaml
rwmjones has joined #ocaml
lordmetroid_ has joined #ocaml
lordmetroid__ has quit [Read error: 110 (Connection timed out)]
LordMetroid has quit [Connection timed out]
lordmetroid__ has joined #ocaml
guillem has joined #ocaml
Snark has quit ["Ex-Chat"]
rhar has quit ["Leaving"]
lordmetroid_ has quit [Read error: 110 (Connection timed out)]
lordmetroid_ has joined #ocaml
jarimatti has joined #ocaml
munga has quit ["Ex-Chat"]
postalchris has joined #ocaml
lordmetroid__ has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
filp has joined #ocaml
rwmjones has quit [Read error: 104 (Connection reset by peer)]
jarimatti has quit []
lordmetroid_ has quit [Read error: 110 (Connection timed out)]
filp has quit ["Bye"]
LordMetroid has joined #ocaml
bohanlon has quit [Remote closed the connection]
lordmetroid_ has joined #ocaml
lordmetroid_ has quit [Client Quit]
bohanlon has joined #ocaml
lordmetroid_ has joined #ocaml
LordMetroid has quit [Read error: 110 (Connection timed out)]
lordmetroid_ is now known as LordMetroid
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
ygrek has quit [Remote closed the connection]
thelema has quit [Read error: 110 (Connection timed out)]
rwmjones has joined #ocaml
ulfdoz has quit [Remote closed the connection]
ulfdoz has joined #ocaml
lordmetroid_ has joined #ocaml
marmotine has quit ["Quitte"]
LordMetroid has quit [Connection timed out]
vbmithr_ has quit ["zz"]
guillem has quit [Remote closed the connection]
bluestorm has quit [Read error: 113 (No route to host)]
lordmetroid_ has quit [Read error: 110 (Connection timed out)]
Linktim has quit [Remote closed the connection]
shortcircuit_ has joined #ocaml
shortcircuit_ has quit [Client Quit]
tomh has joined #ocaml
dabd has joined #ocaml
postalchris has quit [Read error: 113 (No route to host)]