<zozozo>
neiluj: it's likely not what you're looking for (since `return` is a constant generator, meaning, that it always return the same element), however, using functions such as `map` it's easy to transforma tuple generator into a record generator
troydm has quit [Changing host]
troydm has joined #ocaml
<neiluj>
oh thanks, will do, saves me time :)
azimut has joined #ocaml
<neiluj>
ok, this worked!
<neiluj>
given a tuple of integers in range, how would you filter them so that they satisfy some relations with each other? like arg1 < arg2
<zozozo>
but, you can also use the bind operator: (>>=)
<zozozo>
hm.. after a bit of a read through the doc, the simpler would be to directly generate correct values, rather than filter after the fact
<zozozo>
e.g. `let ordered_tuple_gen = let open QCheck.Gen in int >>= fun arg1 -> pint >>= fun diff -> return (arg1, max (arg1 + diff) max_int)` would generate a pair of integers (arg1, arg2) such that arg1 <= arg2
<richardhuxton>
Have just started exploring ocaml. I'm a database guy really, so was looking at PostgreSQL libraries. Am I right in thinking there isn't anything out there that handles types "properly" - so a daterange from PG is just going to be text on the ocaml end and I have to parse it myself?
<neiluj>
many thanks zozozo, going to follow the simpler route you suggested!
bgs has joined #ocaml
<zozozo>
richardhuxton: I don't know about postgresql, but there are at least type-safe interfaces for sqlite (e.g. sqlexpr, sqlite3_utils, ...)
<richardhuxton>
Thanks zozozo - I'll take a look at those and see if there's anything useful in there.
zozozo has quit [Ping timeout: 248 seconds]
zozozo has joined #ocaml
<richardhuxton>
-+
alexherbo2 has quit [Remote host closed the connection]
mro has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexherbo2 has joined #ocaml
mro has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
SquidDev has quit [Quit: Bye!]
SquidDev has joined #ocaml
trev has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jao has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
ephaptic has joined #ocaml
rgrinberg has joined #ocaml
ephaptic has quit [Quit: WeeChat 3.7.1]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 260 seconds]
olle has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Quit: Leaving...]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
malc has joined #ocaml
alexherbo2 has quit [Ping timeout: 260 seconds]
motherfsck has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xd1le has quit [Quit: xd1le]
xgqt has quit [Ping timeout: 255 seconds]
xgqt has joined #ocaml
bartholin has joined #ocaml
olle has joined #ocaml
mbuf has quit [Quit: Leaving]
rgrinberg has joined #ocaml
ephaptic has joined #ocaml
wingsorc has joined #ocaml
neiluj has quit [Ping timeout: 252 seconds]
neiluj has joined #ocaml
waleee has quit [Quit: WeeChat 3.7.1]
fds has quit [Ping timeout: 268 seconds]
ephaptic has quit [Quit: WeeChat 3.7.1]
waleee has joined #ocaml
neiluj has quit [Read error: Connection reset by peer]
neiluj has joined #ocaml
mro has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro has joined #ocaml
fds has joined #ocaml
neiluj has quit [Ping timeout: 252 seconds]
olle has quit [Ping timeout: 268 seconds]
mro has quit [Quit: Leaving...]
bartholin has quit [Quit: Leaving]
keyboard has joined #ocaml
Guest84 has joined #ocaml
Guest84 has quit [Quit: Client closed]
keyboard has quit [Remote host closed the connection]