<aantron>
yeah, i was thinking of something like that. next step, make a web UI over it :) without forgetting to mention on the page its written in OCaml.
<aantron>
though markup.ml is going to need a performance upgrade eventually
<Algebr``>
why doesn't this say anything? http://pastebin.com/8KkSrPbV (I thought that something was lazy so added that signals/pretty_print thinking that it would force some computation)
<aantron>
pretty_print just gives you a lazy signal stream
<aantron>
you need to either iter over it using signal_to_string to see the signals
<aantron>
or do |> write_html |> to_string
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<aantron>
in fact that code does no computation (iirc) beyond composing the functions :)
<Algebr``>
okay, at least I had the right intuition
<aantron>
in markup.ml functions that result in streams typically dont do anything immediately, while functions that result in values force their stream arguments
<aantron>
other values*
<Algebr``>
yep, works
<Algebr``>
now looking to get string or info out hte Markup.location
<aantron>
its just an int pair, but if all you need to do is print it with the error message, you can pass it as ~location to Error.to_string
<Algebr``>
ah, dummy, didn't see the ~location
aantron has quit [Quit: Leaving...]
aantron has joined #ocaml
teknozulu has joined #ocaml
ollehar1 has quit [Quit: ollehar1]
Reshi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
hxegon is now known as hxegon_AFK
Emmanuel`_ has joined #ocaml
d0nn1e has quit [Ping timeout: 252 seconds]
Vintila has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 268 seconds]
hxegon_AFK is now known as hxegon
d0nn1e has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
<Reshi>
Hi, I am trying to use Tuareg-mode in emacs, trying to load my file into the toplevel: My foo.ml file has a line: module B = Bar, and I have a bar.ml & bar.mli file in the same directory. When I load foo.ml into the toplevel I get an Error: Reference to undefined global `Bar'.
<Algebr``>
can do: #use "bar.ml";;
Emmanuel`_ has joined #ocaml
<Reshi>
Algebr``: I did, it loads the contents of bar.ml, but the reference to the Module name Bar in foo is still listed as undefined.
<Algebr``>
when you say top level do you mean plain ocaml or utop
jeffmo has quit [Quit: jeffmo]
<Reshi>
plain ocaml
<Algebr``>
hmm, it might be easier to just use utop in emacs instead, I have all the elisp you need posted here to make an awesome emacs ocaml coding experience http://hyegar.com/2015/10/20/so-youre-learning-ocaml/
d0nn1e has quit [Ping timeout: 248 seconds]
<Algebr``>
(sorry I don't know how to fix the problem you're having)
<Reshi>
When a file `bar.ml' exists and has some types and all defined in it, but has no .mli file, and no module declaration, is that file considered as a Module Bar?
d0nn1e has joined #ocaml
<Algebr``>
bar.ml makes a module Bar
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<seangrove>
aantron: The html ppx extension stuff is still several weeks away for tyxml, right?
<aantron>
seangrove: i think this depends mostly on Drup at this point. i have to fix a few bugs i know about, but otherwise Drup needs time to review it
<aantron>
i think he has a busy schedule at the moment, though i heard march 16 mentioned as a starting point once :)
* seangrove
waves a hand slow at Drup
<seangrove>
"You are not busy, you have nothing else to do..."
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Reshi has quit [Ping timeout: 264 seconds]
Reshi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
ggole has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
dsheets has quit [Remote host closed the connection]
<flux>
can the ctypes foreign stuff be used to describe a C structure partially?
<flux>
I was thinking of using the stub generator system, I suppose in that case I might get away with only partial list of fields?
<mrvn>
flux: c structs are basically row types. just get the start right.
<mrvn>
allocating them will blow up in your face, only use pointers.
dsheets has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
malc_ has quit [Remote host closed the connection]
Emmanuel`_ has joined #ocaml
seangrove has joined #ocaml
Algebr` has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
Reshi has joined #ocaml
<flux>
so if I want to get the last field of AVCodecContext, I need to put 219 fields in my ocaml code?
Emmanuel`_ has quit [Quit: Konversation terminated!]
ollehar has joined #ocaml
Emmanuel`_ has joined #ocaml
<mrvn>
or enough padding or access it with an offset or make a C stub that returns it.
<ollehar>
is there a type-system out there that combines effects (koka) and type-states (no example?)?
<flux>
I was hoping to just say the struct and the field and ctypes would deal with the rest of it,s afely :)
<mrvn>
ollehar: so that a function can have the effect of latering a type?
<mrvn>
flux: structure members are just offsets. No way to figure them out through dlopen()
<flux>
mrvn, but I'm talking about the new stuff that generates C code
<flux>
well, I don't know if it's new, it's new to me :)
<mrvn>
flux: oh, then "make a C stub that returns it"
<flux>
yes. can ctypes generate said c-stub for me?
<flux>
I guess I will need to experiment :)
<mrvn>
flux: I looked at it briefly. As far as I understood you have a special pass that generates C code from your input, then you copile that and link it to the ml code.
<flux>
yep
<mrvn>
Should be able to output C code that does return AVCodecContext.foo;
<mrvn>
flux: do you have a smallish example that works with oasis?
<flux>
mrvn, no, I have nothing :)
<flux>
except hand-written bindings
<flux>
but perhaps I could augment those with this ctypes-based stuff
<flux>
perhaps even replace
<mrvn>
I was hoping to use it to bind c++ classes.
jimt has quit [Remote host closed the connection]
<mrvn>
couldn't get oasis to cooperate
<ollehar>
mrvn: ehm, no, just that it has effect types, and also type-states for other types.
<ollehar>
doesn't have to be type-states for effects.
<flux>
c++ support for ctypes would be interesting (in particular of course objects and templates)
<mrvn>
flux: Would require generating code for at least templates but ctypes now has that.
<mrvn>
ollehar: is type-states enough to say that Unix.close is destructive to the FD?
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<ollehar>
mrvn: yes, that's the classic example. also, that the program won't compile without closing the fd.
<mrvn>
flux: would be really cool if I could use ctypes to generate the stus for QT5 widgets all from the ml code.
<mrvn>
ollehar: I want that. :)
Haudegen has joined #ocaml
<ollehar>
mrvn: we all do...
<ollehar>
you can do something like it with phantom types.
<flux>
mrvn, and it might not be that different from what a colleague now needs to do (for a Windows library: explicitly instantiate templates in the library implementation
<flux>
mrvn, well the Qt5 case is certainly different, but in general the template usage that is :-)
<mrvn>
ollehar: no you can't.
<mrvn>
flux: Qt5 doesn't need tamplates itself but the bindings need tempates so they can inherit overrides to virtual functions of the Qt objects.
<ollehar>
mrvn: well, if you wrap it in a monad.
<flux>
you know what would be great, once we get modular implicits
<flux>
a report of what types were used
<mrvn>
ollehar: let fd_monad = Unix.open .... close fd_monad ... write fd_monad ...
<flux>
so you could generate corresponding C++ bindings
<mrvn>
ollehar: can't give a type error
<flux>
in principle it should be simple to implement as well
<flux>
well, the type retrieval part
<ollehar>
mrvn: yes, monad + phantom types. wait, there's a stackoverflow question about that...
<mrvn>
modular implicits?
<flux>
mrvn, you're saying you haven't heard of modular implicits?!
<mrvn>
ollehar: the close function can't change the type of the monad so the following write can't give a type error. No matter what you use.
<flux>
mrvn, well yes, but I think the interface would be more akin to: run_With_file_in "/tmp/foo" ( .. )
<thizanne>
LL is included in LR, PigDude
<PigDude>
ah ok, thanks, i'm still new to this :)
<mrvn>
flux: that certainly works. But you wouldn't need monads for that
<flux>
mrvn, really? how do you hide the file handle without monads?
<mrvn>
flux: e.g. a stream
<mrvn>
object with on_read
aantron has joined #ocaml
<flux>
objectd that. you can assign to a reference?
<mrvn>
flux: the object would get called with the data read, not the fd. The object comes from the user.
dsheets has quit [Remote host closed the connection]
<flux>
I'm not sure if that's not just a monad with clumsier syntax ;)
Emmanuel`_ has quit [Quit: Konversation terminated!]
<mrvn>
or simple: val with_file : string -> (string -> unit) -> unit
Emmanuel`_ has joined #ocaml
<flux>
but you get only one operation on it
<mrvn>
flux: or multiple.
<flux>
so let's say we add seeking to that interface
<mrvn>
then you have a problem
dsheets has joined #ocaml
ollehar has left #ocaml [#ocaml]
<mrvn>
flux: problem I see with the monad approach is that you can't open the file, read a bit and then suspend operations for later. Without the close added you can't run.
<mrvn>
I think suspending needs a way to capture the monad for later use and then the whole thing breaks down.
<mrvn>
anyway, moands are a whole different programming style. Not a solution I want to use.
<mrvn>
flux: if you get something working with Ctypes stubs let me know.
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
hxegon has joined #ocaml
<Algebr`>
one day a champion will rise and clean ocaml.org of ocamlnet and all these hacks
<flux>
ok :)
<mrvn>
flux: modular implicits sound great
<flux>
clean of ocamlnet? ocamlnet is a great piece of library
<flux>
I'm expecting a renaissance of ocamlnet once ocaml multicore gets in and ocaml threads once again become usable ;)
<rks`>
« once again » ?
<flux>
also another renaissance of people finding out that their Str-based code is broken
<flux>
rks`, well, at time there were no other options ;)
<companion_cube>
with_file is a good API
<companion_cube>
(I'm a bit late)
<mrvn>
flux: still waiting for BigArray.Unix.read
<flux>
and I too have written a program based on the Threads and the only problem was the performance
<companion_cube>
oh yeah
<flux>
mrvn, I bet that code is already written, but not in OCaml proper..
<mrvn>
flux: it's in extunix
<flux>
mrvn, so the problem is..?-)
<mrvn>
flux: it should be in stdlib.
leyyin has joined #ocaml
<mrvn>
Note to self: add runtime lock to Qt5 bindings *shiver*
<flux>
well it would be nicer, yes, but there's no must
Algebr`` has joined #ocaml
Algebr has quit [Remote host closed the connection]
Algebr` has quit [Ping timeout: 244 seconds]
hxegon has quit [Ping timeout: 252 seconds]
struk|desk|away is now known as struk|desk
hxegon has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
abbiya has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 276 seconds]
malc_ has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 276 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
axiles has joined #ocaml
Emmanuel`_ has joined #ocaml
hxegon has joined #ocaml
pierpa has joined #ocaml
abbiya has joined #ocaml
jeffmo has joined #ocaml
seangrove has joined #ocaml
struk|desk is now known as struk|desk|away
Algebr``` has joined #ocaml
<seangrove>
Algebr``: I might beat you re: the ec2 script ;)
Algebr`` has quit [Ping timeout: 248 seconds]
Sorella has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<seangrove>
Ah, didn't meant to scare Algebr``` off....
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Algebr``` has quit [Ping timeout: 260 seconds]
hxegon has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 244 seconds]
shinnya has joined #ocaml
Algebr has joined #ocaml
<Algebr>
seangrove: not a bad thing :)
malc_ has quit [Remote host closed the connection]
<edwin>
companion_cube: how is containers wrt to portability, I see there is no Obj.magic (except in comments and examples), would it work in js_of_ocaml or 32-bit architectures?
<companion_cube>
edwin: it should work pretty much everywhere
<companion_cube>
if it doesn't work on js_of_ocaml or 32bits, that's considered a bug
<edwin>
k
<companion_cube>
theer are no Obj.magic remaining apparently \o/
<edwin>
and the 0.x version just means that the API is still changing, or are there some limitations I should be aware of?
<companion_cube>
well, the API is still changing, but I try to break compatibility as little as possible
<companion_cube>
I have lots of code depending on containers, so it's also in my interest :)
<companion_cube>
look at the changelog and see if the amount of 'breaking' is too frightening for you
<companion_cube>
(it's mostly deprecations, and changing a bit some signatures)
<companion_cube>
there are some modules that are flagged "unstable/experimental" in containers.data though
<companion_cube>
I also ask people their opinion before breaking something non trivial
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
FreeBird_ has joined #ocaml
<edwin>
well I'll probably just start using some simple things, I got tired of writing List.rev_map |> List.rev all the time :)
FreeBird_ has quit [Remote host closed the connection]
<Algebr>
edwin: wow
FreeBirdLjj has quit [Ping timeout: 246 seconds]
<pierpa>
Really one must use Obj.magic to implement *a stack*? "not encouraging" is the understatement of the millennium
Emmanuel`_ has quit [Client Quit]
Emmanuel`_ has joined #ocaml
hxegon has joined #ocaml
<edwin>
companion_cube: also bit confused about qtest vs qcheck, the former has quickcheck with shrinking support, the latter doesn't. which one should I use?
<companion_cube>
wow, the core bug...
<companion_cube>
edwin: if you like in-comment tests, then qtest
<companion_cube>
someone else asked the same question a few days ago
<companion_cube>
and, well, I have the plan of merging qtest and qcheck :3
<edwin>
I tried to be nice, bugs happen, although from the package descriptions I'd expect the unsafe Stack to be in core_extended which has 'not as closely vetted or as stable' stuff
<companion_cube>
(i.e. making qcheck the backend for qtest, so it's usable without qtest itself)
<edwin>
rather than in core_kernel which I expected is the portable, stable, well-tested code
<companion_cube>
yeah, there are bugs in containers too (although I don't think I use Obj)
<companion_cube>
also, in CCList, a non-tailrec function should be considered a bug
<edwin>
not really a fan of tests in comments, doesn't play nice with syntax highlighting, although I probably wouldn't mind a ppx
<pierpa>
edwin: yes, bugs happen, and for this reason there's no need to go searching new creative ways to intruduce new, more exciting kinds of them
<companion_cube>
yeah, a ppx would be nice, but I need compat with < 4.02
<companion_cube>
so, for the time being, comments are better
<companion_cube>
edwin: so, now, `merge qtest quickcheck` is much higher on my todolist
<edwin>
not sure if emacs could be convinced to highlight the test comments the same way it does for ocaml
<companion_cube>
I'll try to do it in the next few days
<rks`>
companion_cube: why do you need compat with < 4.02 ?
<companion_cube>
rks`: because not everyone uses 4.02
<companion_cube>
not every distribution, not every OS
<edwin>
could 4.01 just ignore the tests?
<companion_cube>
in a few years I'll ask for 4.02
<companion_cube>
edwin: code using ppx does not *parse* in 4.01
<companion_cube>
that's the issue
<edwin>
hmm yeah and if you put them into a separate file then its no point to have 'inline' tests
<companion_cube>
exactly
<companion_cube>
I used to have separate tests
<companion_cube>
but it's much easier to keep tests next to the function
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
PigDude has quit [Quit: PigDude]
shinnya has quit [Ping timeout: 240 seconds]
thegameg has quit [Quit: Bye bye.]
thegameg has joined #ocaml
Reshi has quit [Quit: WeeChat 1.4]
th5 has joined #ocaml
slash^ has joined #ocaml
d0nn1e has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
abbiya has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 260 seconds]
fraggle_ has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
ontologiae has quit [Client Quit]
Emmanuel`_ has joined #ocaml
ontologiae has joined #ocaml
pierpa has quit [Ping timeout: 248 seconds]
fraggle_ has joined #ocaml
dhil has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
ggole has quit []
Algebr has quit [Ping timeout: 244 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
<larhat>
opam install publish=0.3.1 offers downgrade of dozens of packages, is there a way to dodge this?
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
yunxing has joined #ocaml
tane has quit [Quit: Verlassend]
TheLemonMan has joined #ocaml
j0sh has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
th5 has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 246 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
th5 has joined #ocaml
th5 has quit [Client Quit]
AlexRussia has joined #ocaml
mettekou has joined #ocaml
larhat has joined #ocaml
GeorgeHahn has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
dhil has quit [Quit: Leaving]
Emmanuel`_ has joined #ocaml
Kakadu has joined #ocaml
butts_butts has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
dsheets has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
dsheets has joined #ocaml
Emmanuel`_ has joined #ocaml
<flux>
mrvn, indeed Cstubs_structs is able to generate code such as printf(" let f = {ftype; fname; foffset = %zu} in \n", offsetof(struct AVCodecContext, codec));
dsheets has quit [Ping timeout: 240 seconds]
<flux>
nice that the expected work flow is writing ocaml (basically inferring it from the C header file, could be generated..) that generates C that generates OCaml.
<flux>
when I advertise this to non-ocamlers I think I'll just say "yes, ctypes provides access to named fields in C structs, no need to write C" and don't go to the specifics.. :)
Haudegen has joined #ocaml
igoroliveira has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
lokien has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
lokien has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
theo has quit [Ping timeout: 248 seconds]
hxegon is now known as hxegon_AFK
darkf has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
mettekou has quit [Ping timeout: 240 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
dsheets has joined #ocaml
sveri has joined #ocaml
<sveri>
Hi, what is the "standard" build tool nowadays?
<companion_cube>
I'd say ocamlbuild
<adrien>
oasis
<adrien>
which sits on top of ocamlbuild
<companion_cube>
for many projects, ocamlbuild is sufficient
hxegon_AFK has quit [Quit: BRB]
<sveri>
Ok, the more recent manual says that ocamlbuilds support for parallelization is disappointing, which sounds not to promising, tbh, especially for a statically compiled language. Is that still true?
<companion_cube>
depends, do you intend to build >100,000 loc?
<companion_cube>
it's not perfect but if that's the biggest issue you have with a build system, then you're lucky
<sveri>
Nope, just want to try the basics
<companion_cube>
especially since OCaml compiles very fast
<sveri>
So I will try oasis now, thank you both :-)
Emmanuel`_ has quit [Quit: Konversation terminated!]
slash^ has quit [Read error: Connection reset by peer]
Emmanuel`_ has joined #ocaml
deko-pyon has quit [Quit: cleanup]
deko-pyon has joined #ocaml
therac25 has joined #ocaml
pierpa has joined #ocaml
govg has joined #ocaml
dsheets has quit [Remote host closed the connection]
Anarchos has joined #ocaml
hxegon has joined #ocaml
therac25 has quit [Read error: Connection reset by peer]
Anarchos has quit [Excess Flood]
Anarchos has joined #ocaml
therac25 has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
manizzle has quit [Remote host closed the connection]
mettekou has joined #ocaml
<companion_cube>
Leonidas, edwin: I'm in the process of merging qtest and qcheck
<Leonidas>
companion_cube: what will be the result?
<companion_cube>
the plan is that qcheck moves into qtest; qtest exports a library (called qcheck) and a tool that generates tests based on qcheck
<Leonidas>
companion_cube: I really like how quickly you got to the bottom of your todo list, thanks :-)
<companion_cube>
so if you want the lib, you get it; if you want comment-based tests they also use the lib
<companion_cube>
well it's been popped all the way up, by popular demand ;)
<Leonidas>
companion_cube: very nice, much in favor of this solution.
<edwin>
thanks, that sounds just what I need
<edwin>
companion_cube: what will be the license of qcheck-inside-qtest? GPL-3 makes people look at me with worried eyes ...
<companion_cube>
oh, I need to check with vhugot; it *should* be LGPL
<companion_cube>
the current quickcheck.ml looks like it's already LGPL
<companion_cube>
but I want to make this clear, indeed
hxegon has quit [Ping timeout: 260 seconds]
<companion_cube>
LGPL should be fine since you just link the library (and, besides, in tests)
_andre has quit [Quit: leaving]
Emmanuel`_ has quit [Quit: Konversation terminated!]
<edwin>
yeah anything that doesn't change the license after linking is fine by me
<companion_cube>
ok
<edwin>
with qtest its a bit more problematic since the tests are inline with the regular code
<edwin>
but then its just comments :)
<companion_cube>
well it's your tests
<companion_cube>
not a derivative work of qtest
sepp2k has quit [Quit: Leaving.]
Emmanuel`_ has joined #ocaml
<edwin>
yeah, I'll worry about it when I actually use it. Most of the code that I write is, or will become open source eventually
<edwin>
so in general its not a problem at all
<companion_cube>
even then, it's important to have a clear licensng
<edwin>
definetely
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<edwin>
have you found the shrinking to be useful in practice? I used qcheck only for a few small things and the testcases it generated were sometimes quite large and hard to follow
<companion_cube>
yes, it's very useful
<companion_cube>
qcheck has a workaround where you can define the "size" of a test case
<companion_cube>
and it will take the smallest coutner-example if size is defined
<companion_cube>
but shrinking is way better
<edwin>
cool
<Leonidas>
I haven't found shrinking to be that useful, but that's just me.
<companion_cube>
I suppose it depends on what you test
<companion_cube>
I read some cool stuff about quickcheck in Erlang (where they apparently have very good tools), and shrinking was super important
<companion_cube>
they w ould generate lists of events and see if properties would hold after processing the events
<companion_cube>
anyway Leonidas, you won't have to worry about shrinking if you don't care, it's optional
<companion_cube>
although it's provided for most builtin combinators
<edwin>
there's also smartcheck that is supposed to be better at producing counterexamples, have you looked at it?
<edwin>
(at least haskell's is built on top of quickcheck)
<companion_cube>
it seems to require quite a lot of magic
<companion_cube>
even lazy smallcheck uses haskell's laziness thoroughly
<companion_cube>
so, for the time being, I'll stick with a pretty naive quickcheck..
<companion_cube>
it's not perfect but it's hard to do fancy stuff without typeclasses anyway
<edwin>
k, speaking of smallcheck I haven't found enumerating small values to produce any interesting failures that qcheck wouldn't catch, although perhaps it would be useful if I could enumerate some edge cases (max_int, min_int, denormal/NaN floats, )
<edwin>
could I fit this into my tests when using qcheck?
Haudegen has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
<companion_cube>
qtest has a generator with special cases
<companion_cube>
yeah, but it's a detail that can be solved later
<edwin>
sure, maybe I'll send you a PR to do that :)
<companion_cube>
seems like oasis doesn't allow to specify several licenses
<mfp>
companion_cube: if you're doing LGPL, make sure you don't get the static linking exception clause wrong ;-)
<companion_cube>
I couldn't find the proper header for LGPL :s
<companion_cube>
it's annoying
<mfp>
it was an off-by-one error in the reference to the conditions for release of the modified version
<companion_cube>
?
<mfp>
IIRC the typoed static linking clause referenced the one following the correct one (like 3 when it was 2 or such)
<mfp>
the static linking exn was like: "if you've made a modified version and published according to the conditions set in X in the LGPL, you can link against it and release the whole under the license of your choice"
mettekou has quit [Read error: Connection reset by peer]
<mfp>
somewhere (the stdlib? don't remember) got X wrong (referring to section N+1 of the LGPL when it should be N)
<companion_cube>
gah, why don'tthey provide a header
<mfp>
everybody copy-pasted the exception with the typo, making the license... legally dubious
<companion_cube>
do you have a good header?
<mfp>
let me look for it, I know I have used LGPL at some point (with the correct ref :)...