<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"
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?