<adrien>
bluh, it seems pretty much everything ported to windows from the unix world is buggy with an all-time favorite being opening in text mode when binary mode is required and vice-versa
myu2 has joined #ocaml
rks has quit [Read error: Connection reset by peer]
rks has joined #ocaml
oriba has joined #ocaml
drunK has quit [Remote host closed the connection]
myu2 has quit [Remote host closed the connection]
oriba has quit [Quit: Verlassend]
ymasory has joined #ocaml
Amorphous has quit [Ping timeout: 272 seconds]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
Amorphous has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Client Quit]
noisymouse has quit [Remote host closed the connection]
ymasory has quit [Ping timeout: 240 seconds]
wormphlegm has joined #ocaml
ymasory has joined #ocaml
wormphlegm has quit [Remote host closed the connection]
edwin1 has quit [Remote host closed the connection]
al-maisan is now known as almaisan-away
ftrvxmtrx has joined #ocaml
almaisan-away is now known as al-maisan
munga has quit [Remote host closed the connection]
myu2 has joined #ocaml
edwin has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
al-maisan is now known as almaisan-away
BiDOrD has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
fabjan has joined #ocaml
alexyk has joined #ocaml
WonTu has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
WonTu has left #ocaml []
alexyk has joined #ocaml
oriba has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
drunK has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
almaisan-away is now known as al-maisan
jamii_ has joined #ocaml
<jamii_>
im confused by the types for first class modules
<jamii_>
I'm porting quickcheck and I want to use first class modules for creating generators
<jamii_>
This works fine with simple types
<jamii_>
eg val of_numeric : (module Number.Numeric with type t = 'a) -> 'a t
alexyk has joined #ocaml
<jamii_>
but I cant figure out how to type this correctly:
<jamii_>
val of_enumerable : (module Enum.Enumerable with type enumerable = e) -> 'a t -> 'a e t
al-maisan is now known as almaisan-away
middayc has joined #ocaml
fabjan has quit [Quit: Changing server]
fabjan has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
ccasin has joined #ocaml
<thelema>
jamii_: can't be expressed in ocaml's type system
rixed has quit [Quit: reboot]
<jamii_>
thelema: was starting to suspect so
<jamii_>
seems like a fairly fundamental limitation for first class modules
<jamii_>
since i would be able to do it with a record
<jamii_>
or would I? hang on...
<mrvn>
jamii_: you need to use ('a, e) t or similar.
middayc is now known as refaktor
<mrvn>
Problem with allowing 'a 'b t types is what is 'a in: int list array t? Is it int or int list? You quickly run into cases where multiple cases are valid and then which type do you pick?
alexyk has joined #ocaml
<thelema>
just like you can't parameterize this sumint : int 'a -> ('c -> 'b -> 'c -> 'b 'a -> 'c) -> int
alexyk has quit [Read error: Connection reset by peer]
<thelema>
so there's a bunch of people who've had the same idea, to varying degrees of success
elehack|out is now known as elehack
alexyk has joined #ocaml
<jamii_>
Kaptt is pretty extensive but I think I'm still going to have to be all NIH
<jamii_>
reading through the papers for quickcheck and smallcheck there are a lot of subtle details that go into making good generators
<thelema>
jamii_: if you don't mind me making a design requirement, a test harness will be easier to include with batteries if it's a single file.
alexyk has quit [Read error: Connection reset by peer]
<jamii_>
i was going to have a single file exporting all the modules. so i guess just dumping them all into one file has the same effect
<jamii_>
developing it that way would be a pain in the ass but I can export a version like that
<thelema>
good enough
<jamii_>
would be nice to make it compatible with ounit but ill worry about that later
alexyk has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<jamii_>
thelema: Big_int doesnt match Numeric
alexyk has quit [Read error: Connection reset by peer]
<jamii_>
although it has an operations value which matches Numeric.operations
<jamii_>
the float functions are misnamed
<jamii_>
# Big_int.operations.of_float 1.0 works
<jamii_>
Big_int.of_float 1.0 doesnt
<thelema>
jamii_: curious... neither works for me...
<thelema>
well, the of_float is just a mistake in the .mli
alexyk has joined #ocaml
<jamii_>
thelema: you have to open Number for the first one to work
<jamii_>
to get the record definition
<jamii_>
i forget i had that open already
<jamii_>
similarly, Hashtbl doesnt have a type 'a enumerable
<jamii_>
although, yeah, that wouldnt work for the top level
<jamii_>
sometimes i get urges for dynamic typing
<thelema>
am I crazy, or is there a camomile 0.8.2?
<adrien>
I think there should be one
<thelema>
camomile.sf.net only shows 0.8.1
alexyk has quit [Read error: Connection reset by peer]
jamii_ has quit [Read error: Connection reset by peer]
jamii_ has joined #ocaml
<jamii_>
the handle fell off my cup of tea :(
<thelema>
hopefully not catastrophically
<jamii_>
or rather, the cup of tea fell of the handle. on to my laptop
<jamii_>
i think it will be ok
<jamii_>
but ill leave it to dry and work on my netbook for now
<jamii_>
but i was about to say that batteries doesnt build with camomil 0.8.2
<jamii_>
*camomile
<thelema>
"make camomile82" first
<jamii_>
i did that - no make target. using batteries 1.2.2, not head, so i guess thats why
<thelema>
ah, yes...
<thelema>
sorry, need to release again
<jamii_>
aaarrghh, even with functors this doesnt work
<jamii_>
module Enumerable (E : Enum.Enumerable) =
<jamii_>
struct
<jamii_>
let rand rand_elem size =
<jamii_>
E.of_enum (enum rand_elem size)
<jamii_>
end
<jamii_>
let list = let module R = Enumerable (List) in R.rand
<jamii_>
val list : (int -> '_a) -> int -> '_a Batteries.List.enumerable
<jamii_>
sulk
<jamii_>
but this works:
<jamii_>
module List_rand = Enumerable (List)
<jamii_>
let list = List_rand.rand
<jamii_>
I think I'm going to stay away from the first class modules until I understand how they work
eye-scuzzy has quit [Quit: leaving]
avsm has quit [Quit: Leaving.]
bzzbzz has quit [Read error: Connection reset by peer]
<thelema>
jamii_: that one is easy - just eta expand your first list: let list gen_elem size = let module R = Enumerable (List) in R.rand gen_elem size
<thelema>
jamii_: the way I remember this is that if you don't have the parameters, [list] isn't a function, so it can't be polymorphic as you want
<jamii_>
thelema: thanks. that does make things easier to understand
<jamii_>
so local modules can only contain concrete types?
<jamii_>
adding the rand means that the module isn't instantiated until 'a become concrete
<jamii_>
s/rand/gen_elem
<thelema>
yes
<thelema>
that's how polymorphism is guaranteed
<thelema>
otherwise you'd be able to do non-polymorphic things in R
<jamii_>
ok. makes sense
<thelema>
back in a bit
oriba has quit [Quit: Verlassend]
ymasory has joined #ocaml
ttamttam has quit [Remote host closed the connection]
drunK has quit [Remote host closed the connection]
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
bzzbzz has joined #ocaml
<jamii_>
thelema: does the batteries development mostly happen on github?
<thelema>
rwmjones: I was able to provoke a segfault from ocaml_bitstring_extract_fastpath_int16_be_unsigned, I'll post to the google group about it once you accept my request to join
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
<mrvn>
range overflow?
alexyk has joined #ocaml
smerz has joined #ocaml
ygrek has joined #ocaml
<rwmjones>
ok
_andre has quit [Quit: leaving]
Snark has quit [Quit: Ex-Chat]
ftrvxmtrx has joined #ocaml
lpereira has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
LeNsTR_ has joined #ocaml
LeNsTR_ has quit [Changing host]
LeNsTR_ has joined #ocaml
LeNsTR has quit [Disconnected by services]
LeNsTR_ is now known as LeNsTR
LeNsTR has quit [Quit: LeNsTR]
ygrek has quit [Ping timeout: 240 seconds]
krktz has left #ocaml []
ymasory_ has joined #ocaml
ccasin has quit [Quit: Leaving]
ikaros has quit [Quit: Leave the magic to Houdini]
alexyk has quit [Quit: alexyk]
Yoric has joined #ocaml
ftrvxmtrx has joined #ocaml
oriba has joined #ocaml
edwin has quit [Remote host closed the connection]