sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
postalchris has quit ["Leaving."]
jlouis has joined #ocaml
malc__ has quit ["leaving"]
shawn has joined #ocaml
shawn has quit [Remote closed the connection]
shawn has joined #ocaml
<Submarine>
mbishop, I'd put two hashtables, but...
<Submarine>
or two maps
glen_quagmire has joined #ocaml
glen_quagmire has left #ocaml []
shawn has quit [Read error: 113 (No route to host)]
joshcryer has quit [Read error: 60 (Operation timed out)]
ulfdoz has quit [Read error: 60 (Operation timed out)]
<Mr_Awesome>
mbishop: if you want fast lookup both ways youll need to use 2 maps
<Mr_Awesome>
otherwise you can search one way, which is slow but uses less memory
<Mr_Awesome>
its a trade off
bhauth has joined #ocaml
bhauth has quit [Client Quit]
<pango_>
tsuyoshi, mbishop: Str regexpes are greedy, so replacing <.+> usually don't do what you want
<mbishop>
well in this case it does :P
<pango_>
say, if the text is "<b>some text</b>", the regexp will match the whole text
<pango_>
because it starts with < and ends with >
Submarine has quit ["Leaving"]
* mbishop
nods
<pango_>
and replacing <.+> with "" will leave you with the empty string
<mbishop>
this html is minimal however, and I really only use it to get rid of the few tags it has
<pango_>
better use <[^>]+>
<mbishop>
pango_: seems to work (although like I said, it was fine for this data)
<mbishop>
thanks though :)
<pango_>
np
b00t has joined #ocaml
johnnowak has joined #ocaml
gmh33 has joined #ocaml
johnnowak has quit []
diffbavis has quit [Read error: 54 (Connection reset by peer)]
ikaros has quit [Read error: 113 (No route to host)]
b00t has quit ["Leaving"]
gmh33 has left #ocaml []
Smerdyakov has quit ["Leaving"]
Mr_Awesome has quit ["...and the Awesome level drops"]
joshcryer has joined #ocaml
shawn has joined #ocaml
delamonpansie is now known as delamon
pstickne has quit ["sleep"]
shawn has quit [Read error: 145 (Connection timed out)]
shawn has joined #ocaml
bluestorm has joined #ocaml
bhauth has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
jlouis has quit [Remote closed the connection]
love-pingoo has joined #ocaml
love-pingoo is now known as zombie-pingoo
love-pingoo has joined #ocaml
zombie-pingoo has quit ["Leaving"]
bhauth has quit [Client Quit]
ramkrsna has joined #ocaml
ikaros has joined #ocaml
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
descender has quit [Read error: 110 (Connection timed out)]
<flux->
woo, sexplib supports polymorphic variants these days
malc_ has joined #ocaml
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
<flux->
reddit is down! argh! how can I do work for the rest of the day!
<flux->
(hm, s/do //)
<love-pingoo>
you mean (Str.global_replace (Str.regexp "do ") ""), I guess...
<flux->
not really, s///-expressions only replace the first matching substring unless the flag g is provided
<flux->
but in this case it is the same ;)
<flux->
also digits may be provided to indicate which of the matches will be replaced
<flux->
hm, actually no, it's a number, not a list of digits (which look the same, though ;))
<love-pingoo>
:)
<flux->
and a public friendly reminder: Str is evil! it's not thread safe, not even the parts that look like they are!
<love-pingoo>
perl is nice for that... too bad
<flux->
I suppose you could write a camlp4-extension for ocaml to do s-magic
love-pingoo has quit ["Connection reset by pear"]
descender has joined #ocaml
cypher23 has quit [Read error: 110 (Connection timed out)]
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
malc_ has quit ["leaving"]
Smerdyakov has joined #ocaml
smimp has joined #ocaml
glen_quagmire has joined #ocaml
pango_ has quit [Remote closed the connection]
slipstream-- has joined #ocaml
pango_ has joined #ocaml
diffbavis has joined #ocaml
flux- has quit [Remote closed the connection]
flux- has joined #ocaml
swater has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
postalchris has joined #ocaml
pango_ has quit [Remote closed the connection]
jlouis has joined #ocaml
pango_ has joined #ocaml
smimp has quit ["Lost terminal"]
glen_quagmire has quit ["leaving"]
Submarine has joined #ocaml
bohanlon has quit ["leaving"]
cypher23 has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
diffbavis has quit [Read error: 54 (Connection reset by peer)]
diffbavis has joined #ocaml
love-pingoo has joined #ocaml
david_koontz has left #ocaml []
postalchris has joined #ocaml
smimou has joined #ocaml
shawn has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
benny has joined #ocaml
<flux->
hmph, I see Weak hashtables aren't associate structures.. what was the suggested trick for doing 'upcasts' of objects?
<flux->
or am I misunderstanding it somehow
<flux->
I don't think I am :)
<flux->
hm, actually, downcast
<flux->
there is the obvious hashtable-trick, but that means the objects will stay in the hash forever, unless I explicitly tell them to leave
<flux->
weak reference arrays could be used, but the current interface apparently suggests I build an n-element array of weak references and then another with matching indices for the auxiliary data, but that isn't too pretty..
benny_ has quit [Read error: 110 (Connection timed out)]
<huyga>
i have to do a gra^hics programs with windows and buttons, with caml and our teacher told us that there is a sofware that do windows with caml.
<huyga>
ok cameleon likes good, thanks
<huyga>
it is for unix/linux ?
<bluestorm>
yes, it is
<bluestorm>
hum
<bluestorm>
but you could also use LablGTK
<bluestorm>
and Glade
<bluestorm>
(instead of Tk + Zoggy )
<bluestorm>
hmm
benny has quit [Read error: 60 (Operation timed out)]
<bluestorm>
seems Zoggy use lablgtk actually
<gunark>
yeah cameleon is a graphical IDE, LablGTK is the API you'll probably want to use for graphical stuff
<gunark>
for programming graphical interfaces, i mean
<huyga>
there is a version for Windows ?
<bluestorm>
hum
love-pingoo has quit ["Connection reset by pear"]
<huyga>
i have heart gtk for ocaml
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
<bluestorm>
huyga: gtk for ocaml should work on windows
<bluestorm>
altought it may be a bit difficult to compile
<bluestorm>
hum
<bluestorm>
like anything on windows actually :-°
ikaros_ has joined #ocaml
ikaros has quit [Read error: 113 (No route to host)]
ikaros_ is now known as ikaros
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]