Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
jeanbon has quit ["EOF"]
AxleLonghorn has joined #ocaml
Ched has quit [Read error: 60 (Operation timed out)]
rhar has quit [Read error: 60 (Operation timed out)]
xerxes_ has joined #ocaml
xerxes has quit [Read error: 60 (Operation timed out)]
Ched has joined #ocaml
AxleLonghorn has left #ocaml []
kaustuv has quit ["1"]
sgwizdak has joined #ocaml
xerxes_ is now known as Xerxes_on_Mepehd
Xerxes_on_Mepehd is now known as MepehdroneXerxes
MepehdroneXerxes is now known as Xerxes
tar_ has joined #ocaml
<tar_>
In my ml file I can say "module Context = Map.Make(String)" but is there a similar shortcut for my mli file, or do I need to reproduce the module signature long-hand?
<thelema>
? Map.make is a functor with an output signature
<tsuyoshi>
module Context: Map.S with key = String.t
<tsuyoshi>
or key = string
<tsuyoshi>
oh sorry
<tsuyoshi>
module Context: Map.S with type key = string
<tar_>
Oh, thank you
<tar_>
Okay, now I see that in the functor examples
jamii has joined #ocaml
jedai has quit [Read error: 60 (Operation timed out)]
jedai has joined #ocaml
tar_ has quit []
Xerxes has quit ["Ex-Chat"]
kaustuv has joined #ocaml
Camarade_Tux has joined #ocaml
Camarade_Tux_ has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux_ has quit ["Leaving"]
rhar has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
rhar has quit ["Leaving"]
s4tan has joined #ocaml
seafood_ has joined #ocaml
Skolem has quit [hubbard.freenode.net irc.freenode.net]
lutter has quit [hubbard.freenode.net irc.freenode.net]
bebui has quit [hubbard.freenode.net irc.freenode.net]
gl has quit [hubbard.freenode.net irc.freenode.net]
gl has joined #ocaml
Skolem has joined #ocaml
bebui has joined #ocaml
lutter has joined #ocaml
verte has joined #ocaml
s4tan has quit []
s4tan has joined #ocaml
komar_ has joined #ocaml
love-pingoo has joined #ocaml
rwmjones_ has joined #ocaml
_zack has joined #ocaml
hkBst has joined #ocaml
jeanbon has joined #ocaml
Camarade_Tux has joined #ocaml
<rwmjones_>
the Str.global_substitute function is annoyingly limited?
<rwmjones_>
you don't know which substring matched, so the 'subst' function can't do anything useful
<rwmjones_>
or am I missing something ...?
<mfp>
rwmjones_: you get it via another function
<mfp>
the API is quite ugly, as it uses global state
<mfp>
global_substitute gives you the string you matched against, and when passed to matched_string you get the matching fragment
<mfp>
it's really ugly
<mfp>
I suppose it's that way for perf., to avoid allocating stuff in each call to the subst function
<mfp>
but it could use at least something like type match = { ... record with mutable fields } val global_substitute : regexp -> ?match:match -> (match -> string) -> string -> string
<mfp>
so it just updates some offsets in the match record, no allocation or caml_modify needed, fast and reentrant
<mfp>
all of Str uses global state though :-|
<rwmjones_>
yes, it works
<rwmjones_>
I've got a self-imposed limitation of not using anything apart from stdli
<rwmjones_>
stdlib
<mfp>
quite a limitation that is... not even extlib?
<rwmjones_>
mfp, yeah, for libguestfs ... the C programmers will get frightened
gnuvince_ has quit [Read error: 113 (No route to host)]
<kaustuv>
isn't the pcre binding pervasive enough?
<kaustuv_>
I wonder if adding one more word to the headers of blocks and limiting constructors and records to have a maximum of 64 arguments/fields in exchange for unboxed native integers and floats would cause a riot.
<mrvn>
kaustuv_: how would you do that on 32bit?
<mrvn>
I'm assuming you want to add a bitfield tell what fields are boxed. On 32bit that would limit you to blocks of size 32 or add more words.
<robocop>
mrvn: what means "access members of the left hand side" ?
<mrvn>
robocop: let rec x = { x = x.x }
<robocop>
hum, okey.
<mrvn>
shouldn't matter with functions.
<mrvn>
kaustuv_: I would rather add a variable size bitmap to the end of the block instead of limiting the size of blocks.
<hcarty>
kaustuv_: If you have a working patch then it probably would cause loud grumbling as "OCaml 4.0"
<hcarty>
kaustuv_: I imagine something like this would cause some amount of cheers as well. What would this mean for arrays?
<mrvn>
hcarty: arrays already have a tag for the type of content.
<kaustuv_>
No, I don't have a patch, but I've been looking into the feasibility of it.
<robocop>
okey mrvn, but i don't understand why I've got this error with this code.
<mrvn>
kaustuv_: wouldn't that also give you untagged ints (int == nativeint)?
<mrvn>
robocop: I don't eigther.
<robocop>
I thinks it's because I use "let rec
<robocop>
*"let rec ... and ... and "
<mrvn>
robocop: but you do use recursion
<mrvn>
robocop: pull the nums out of the let rec and try it on its own.
<robocop>
mrvn: if I pull the nums and test nums, no problem