adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
ulfdoz has quit [Ping timeout: 246 seconds]
ulfdoz has joined #ocaml
spacific has joined #ocaml
cdidd has quit [Remote host closed the connection]
spacific has quit [Remote host closed the connection]
spacific has joined #ocaml
spacific has quit [Remote host closed the connection]
lolcathost has joined #ocaml
destrius has joined #ocaml
sepp2k1 has quit [Remote host closed the connection]
mattrepl has joined #ocaml
NaCl has quit [Read error: Operation timed out]
mal`` has quit [Ping timeout: 252 seconds]
NaCl has joined #ocaml
mal`` has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
emmanuelux has quit [Quit: emmanuelux]
eikke has quit [Ping timeout: 264 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lolcathost has joined #ocaml
cross has quit [Quit: leaving]
eikke has joined #ocaml
walter|rtn has quit [Read error: Connection reset by peer]
walter|rtn has joined #ocaml
lolcathost has quit [Ping timeout: 260 seconds]
eikke has quit [Read error: Operation timed out]
justdit has joined #ocaml
justdit has quit [Quit: Lost terminal]
eikke has joined #ocaml
mye has quit [Ping timeout: 246 seconds]
walter|r has joined #ocaml
k0001 has quit [Ping timeout: 245 seconds]
walter|rtn has quit [Ping timeout: 245 seconds]
k0001 has joined #ocaml
mattrepl has quit [Quit: mattrepl]
eikke has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
ftrvxmtrx has quit [Read error: Operation timed out]
ftrvxmtrx has joined #ocaml
TDJACR_ has quit [Remote host closed the connection]
lolcathost has joined #ocaml
k0001_ has joined #ocaml
<cornihilio> is this right?: fold_left f 0 [1;2;3] = f (f (f (0 1) 2) 3) I saw it here: http://www.matt-mcdonnell.com/code/code_ocaml/ocaml_fold/ocaml_fold.html
<cornihilio> the initial f (0 1) 2 does not seem right to me
k0001 has quit [Ping timeout: 248 seconds]
<_habnabit> it is not right
<_habnabit> it's f (f (f 0 1) 2) 3
lolcathost has quit [Quit: lag]
<cornihilio> thank you!
Yoric has joined #ocaml
lolcathost has joined #ocaml
myx has joined #ocaml
lolcathost has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 250 seconds]
kba has quit [Ping timeout: 245 seconds]
kba has joined #ocaml
kba is now known as Guest91483
k0001_ has quit [Ping timeout: 246 seconds]
k0001 has joined #ocaml
answer_42 has joined #ocaml
<cornihilio> can anyone help me get this function for balancing red/black tree nodes?: https://gist.github.com/4146938
<cornihilio> it seems like the most convoluted thing; it works for red/black trees, but I don't get how it's protecting the binary invariant as well
<cornihilio> it's from p. 54 of http://files.metaprl.org/doc/ocaml-book.pdf
pango is now known as pangoafk
chambart has joined #ocaml
lolcathost has joined #ocaml
Kakadu has joined #ocaml
ankit9 has joined #ocaml
Snark has joined #ocaml
answer_42 has quit [Quit: WeeChat 0.3.9.2]
answer_42 has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Cyanure has joined #ocaml
groleo has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
gnuvince has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Ping timeout: 240 seconds]
cago has joined #ocaml
ftrvxmtrx has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
k0001_ has joined #ocaml
k0001 has quit [Ping timeout: 255 seconds]
<f[x]> flux, nope, it just unifies with first application, and explicit quantification doesn't change anything
rixed has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
lolcathost has quit [Ping timeout: 246 seconds]
k0001_ has quit [Ping timeout: 245 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
cago has quit [Ping timeout: 260 seconds]
hkBst has quit [Ping timeout: 240 seconds]
lolcathost has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
cago has joined #ocaml
Kakadu has quit []
ontologiae has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
eikke has joined #ocaml
ikaros has joined #ocaml
djcoin has joined #ocaml
andreypopp has joined #ocaml
andreypopp has quit [Client Quit]
Neros has joined #ocaml
beckerb has joined #ocaml
cornihilio has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
Neros_ has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
cdidd has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
larhat has quit [Quit: Leaving.]
fraggle_ has quit [Read error: Connection reset by peer]
destrius has quit [Quit: Leaving.]
Neros_ has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
Yoric has joined #ocaml
sepp2k has joined #ocaml
larhat has joined #ocaml
Neros has joined #ocaml
Neros_ has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
lolcathost has quit [Quit: Lost terminal]
lolcathost has joined #ocaml
Cyanure has quit [Remote host closed the connection]
mmajchrzak_ has joined #ocaml
ski_ has joined #ocaml
eikke_ has joined #ocaml
noj_ has joined #ocaml
ankit9 has quit [Ping timeout: 252 seconds]
dmilith has quit [Ping timeout: 252 seconds]
ski has quit [Ping timeout: 252 seconds]
eikke has quit [Ping timeout: 273 seconds]
cago has quit [Ping timeout: 295 seconds]
orbitz has quit [Ping timeout: 273 seconds]
jbrown__ has quit [Ping timeout: 295 seconds]
noj has quit [Ping timeout: 251 seconds]
jbrown__ has joined #ocaml
dmilith has joined #ocaml
cago has joined #ocaml
orbitz has joined #ocaml
everyonemines has joined #ocaml
ankit9 has joined #ocaml
everyonemines has quit [Quit: Leaving.]
mattrepl has joined #ocaml
hkBst has quit [Ping timeout: 240 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
cornihilio has joined #ocaml
ankit9 has quit [Ping timeout: 248 seconds]
metasyntax|work has joined #ocaml
Neros_ has quit [Ping timeout: 257 seconds]
ankit9 has joined #ocaml
mfill has joined #ocaml
hkBst has quit [Ping timeout: 240 seconds]
UncleVasya has joined #ocaml
vpm has quit [Ping timeout: 240 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
vpm has joined #ocaml
Kakadu has quit [Read error: Operation timed out]
Kakadu has joined #ocaml
mfill has quit [Quit: leaving]
hkBst has quit [Ping timeout: 240 seconds]
ankit9 has quit [Quit: Leaving]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
groleo has quit [Remote host closed the connection]
Submarine has joined #ocaml
Neros has joined #ocaml
tlockney has quit [Ping timeout: 240 seconds]
tlockney has joined #ocaml
mmajchrzak_ has quit [Quit: Leaving]
hkBst has quit [Ping timeout: 264 seconds]
hkBst has joined #ocaml
jamii has joined #ocaml
mattrepl has quit [Quit: mattrepl]
ftrvxmtrx has quit [Quit: Leaving]
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
Xizor has joined #ocaml
eikke_ has quit [Ping timeout: 264 seconds]
walter|r has quit [Read error: Connection reset by peer]
dwmw2_gone has joined #ocaml
walter|r has joined #ocaml
pangoafk is now known as pango
cago has left #ocaml []
hkBst has quit [Quit: Konversation terminated!]
<Qrntz> I have a C-side struct with a string value (one of a set that's known at compile-time) as one of its members. I plan on having a lot of structs at the same time where this value is the same. it is never mutated. how do I ensure that it's being shared across all the structs like OCaml's native string literals are?
<thelema> string or char*?
<thelema> if char*, the answer should be obvious
<Qrntz> OCaml string
<Qrntz> of type «value»
<Qrntz> do I just define a value* in the struct and have it point to a table entry so that I can call to C to retrieve the actual string from the struct?
<thelema> values are generally pointers; you should get this for free.
andreypopp has joined #ocaml
<thelema> string values *are* pointers
<thelema> so you don't need value*
<Qrntz> ah, I see.
<Qrntz> thanks, I was a bit confused
<thelema> no problem.
tac has joined #ocaml
walter|r has quit [Read error: Connection reset by peer]
walter has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
gnuvince has joined #ocaml
tane has joined #ocaml
cornihilio has quit [Ping timeout: 276 seconds]
k0001 has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9.1]
TDJACR has joined #ocaml
andreypopp has quit [Quit: sleep]
oriba has joined #ocaml
mattrepl has joined #ocaml
Cyanure has joined #ocaml
oriba has quit [Quit: oriba]
ontologiae has quit [Ping timeout: 264 seconds]
tane has quit [Quit: Verlassend]
larhat has quit [Quit: Leaving.]
_andre has quit [Quit: leaving]
pngl has joined #ocaml
<pngl> How do I import functions from a file (say a.ml) into b.ml so that functions from a.ml can be called using A.fn1, A.fn2, etc... ?
<thelema> pngl: have a.cmx in the current directory (or include path)
<thelema> when compiling b.ml
andreypopp has joined #ocaml
k0001 has quit [Ping timeout: 260 seconds]
<pngl> thelema: I would like to load b.ml using #use "b.ml" in the toplevel. Is that possible?
<thelema> better to compile b.ml and #load "b.cmo"
<pngl> thelema: ok, thanks!
<thelema> pngl: you're welcome
Kakadu has quit []
Yoric has joined #ocaml
pngl has quit [Ping timeout: 264 seconds]
Snark has quit [Quit: Quitte]
andreypopp has quit [Quit: sleep]
emmanuelux has joined #ocaml
andreypopp has joined #ocaml
BiDOrD_ has joined #ocaml
snarkyboojum_ has joined #ocaml
noj has joined #ocaml
BiDOrD has quit [Ping timeout: 264 seconds]
companion_square has joined #ocaml
andreypopp has quit [*.net *.split]
gnuvince has quit [*.net *.split]
metasyntax|work has quit [*.net *.split]
noj_ has quit [*.net *.split]
companion_cube has quit [*.net *.split]
snarkyboojum has quit [*.net *.split]
fraggle_ has quit [Ping timeout: 250 seconds]
UncleVasya has quit [Quit: UncleVasya]
gnuvince has joined #ocaml
metasyntax|work has joined #ocaml
ontologiae has joined #ocaml
eikke has joined #ocaml
answer_42 has quit [Quit: WeeChat 0.3.9.2]
mattrepl has quit [Ping timeout: 252 seconds]
chambart has joined #ocaml
ski_ is now known as ski
milosn has quit [Ping timeout: 246 seconds]
milosn has joined #ocaml
sepp2k1 has joined #ocaml
cornihilio has joined #ocaml
sepp2k has quit [Ping timeout: 264 seconds]
Pantoufle has quit [Ping timeout: 246 seconds]
Pantoufle has joined #ocaml
cornihilio has quit [Ping timeout: 264 seconds]
Yoric has quit [Quit: Instantbird 1.3a1pre -- http://www.instantbird.com]
cornihilio has joined #ocaml
Yoric has joined #ocaml
mye has joined #ocaml
Submarine has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
myx has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
mye has quit [Quit: mye]
mye has joined #ocaml
Tobu has quit [Ping timeout: 264 seconds]
larhat has joined #ocaml
Xizor has quit [Ping timeout: 260 seconds]
chambart has quit [Ping timeout: 246 seconds]
Xizor has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
tac has left #ocaml []
Cyanure has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
chambart has joined #ocaml
mye has quit [Quit: mye]
ikaros has joined #ocaml
Yoric has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
eikke has joined #ocaml
gnuvince has quit [Ping timeout: 246 seconds]
Yoric has quit [Ping timeout: 264 seconds]
Neros has quit [Read error: Connection reset by peer]
mye has joined #ocaml
Neros has joined #ocaml
jamii has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 256 seconds]
Xizor has quit [Remote host closed the connection]
Neros has quit [Read error: Connection reset by peer]
Neros has joined #ocaml
lolcathost is now known as Playground
mattrepl has joined #ocaml
mattrepl has quit [Client Quit]
k0001 has joined #ocaml
mildfate has joined #ocaml
<mildfate> Is it possible to concatenate strings without using the String module?
<_habnabit> mildfate, well, there's (^)
<_habnabit> mildfate, and the Printf module
<_habnabit> mildfate, why not the String module though?
<mildfate> _habnabit: ^ was exactly what I was looking for.
<mildfate> _habnabit: Do you know of an efficient way to "OR" multiple regexes together?
<_habnabit> mildfate, \| ?
<mildfate> But couldn't the | be misinterpreted between regexes
<mildfate> so as opposed to A|B being recognized
<_habnabit> I don't know what you mean
<mildfate> the machine interprets "some part of a (a|b) some part of b"
<_habnabit> maybe you should be more specific about what you want to accomplish
emmanuelux has quit [Quit: emmanuelux]
<mildfate> I have multiple possible types of strings represented each by a regex. If any regex matches, do an action
<mildfate> as opposed to having a huge series of if statements, I'm looking for a prettier way of oring them together
<_habnabit> sure
<_habnabit> and | is the best way to do that
<mildfate> But what if regex1 = "ab" and regex2="cd". If I do "ab|cd" won't strings "abd" and acd" be accepted?
<mildfate> when really I want strings "ab" and "cd" accepted
<_habnabit> then add ^ and $
<_habnabit> ^(ab|cd)$
<mildfate> I can't add $, because I'm only attempting to match the beginning of a string. Would ^ suffice?
<_habnabit> sure
<mildfate> so, do that in each?
<_habnabit> you only have to do that at the start
<_habnabit> ^(ab|cd)
<_habnabit> though ocaml's regexps require a \ before each (, ), |
<_habnabit> so it'd be more like "^\\(ab\\|cd\\)"
<mildfate> Str.string_match (Str.regexp("^(ab|cd)")) ("cd") 0;; returned false.
<_habnabit> see what i said
<mildfate> Why are so many backslashes required?
<_habnabit> just because it's a string literal
<_habnabit> the string has to be literally ^\(ab\|cd\) but in a string literal you have to represent a \ as \\
<mildfate> Str.string_match (Str.regexp "^\\(ab\\|cd\\)" ) ("abd") 0;; returned true.
<mildfate> oh, ab
<_habnabit> well, yes
<mildfate> Is it better to make multiple strings each representing a regex, then make the larger regex by adding ^ "|" in between each? Or making a regex for each type then somehow oring the actual regexes together?
<_habnabit> i've done the former before
<_habnabit> Printf.sprintf "\\(%s\\)" (String.concat "\\|" ["ab"; "cd"])
<mildfate> Without using the String module
<_habnabit> eh, why without the string module?
<mildfate> because that's the problem
<_habnabit> what is?
<mildfate> the problem is to do what I'm doing, without using the String module
<_habnabit> that seems like a silly requirement
chambart has quit [Ping timeout: 264 seconds]
<mildfate> _habnabit: definitely, but I have to abide by it
k0001 has quit [Ping timeout: 256 seconds]
larhat has quit [Quit: Leaving.]
mildfate1 has joined #ocaml
mildfate has quit [Read error: Connection reset by peer]
cross has joined #ocaml
emmanuelux has joined #ocaml