voglerr_ has quit [Remote host closed the connection]
voglerr has joined #ocaml
nullcat has joined #ocaml
nullcat has quit [Read error: Connection reset by peer]
yomimono has joined #ocaml
Kakadu has joined #ocaml
<flux>
so, I've been reading about type provider, and it would seem to me that they are implementable without compiler change. is someone working on that?-)
octachron has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 244 seconds]
<orbitz>
companion_cube: 1) I just finished playing the Portal series, very good. 2) <3 qcheck 3) do you have any thoughts on how to quickcheck a regex engine? So far the best I can do is generate random patterns and verify they don't crash the engine.
<companion_cube>
you could do several things, I think
<companion_cube>
compare the regex engine with a "trusted" one on random inputs
<companion_cube>
or generate strings from the regex randomly (not easy) and check that they match
<orbitz>
Yeah, so far that is what I've come down on :(
<flux>
orbitz, also check code coverage, your tests should result in 100% code coverage and perhaps a high number in branch coverage?
<orbitz>
companion_cube: Also, any thoughts on adding statistics to QCheck? In eqc you can do things like "collect" paths and then get how often you hit that path, useful if you want to ensure you're getting a fair distribution of outcomes
<companion_cube>
eqc?
<orbitz>
erlang quickcheck, quviq's
<companion_cube>
ok
<companion_cube>
honestly the random generation part of QCheck is pretty naive right now
<orbitz>
In this sense though it's not modifying the random generation, it's more like giving the developer feedback.
<companion_cube>
if it's paths in the code (rather than in random generator choice points) you need some form of instrumentation
<companion_cube>
I don't know how bisect works, but it's probably a good source of inspiration for that
<orbitz>
For example, I generate a random pattern, then I validate the pattern, then I try to match the pattern. If validation fails I just skip the test. I want to ensure that I'm not hittign > 50% validation failing
keep_learning has joined #ocaml
<orbitz>
flux: how do you collect coverage information in Ocaml?
<companion_cube>
if you use assertions, then each test displays the number of skipped tests
<flux>
orbitz, bisect seems to be the tool for that
<orbitz>
companion_cube: in EQC it's pretty brute force, on a path I'm interested in I just "collect(x_happened)" then at the end of the run it says "x_happened: 50%, y_happened: 50%" etc
<companion_cube>
orbitz: contributions are welcome in any case
<orbitz>
Ohh exciting, qcheck found a vicious failing pattern. Yaay
<companion_cube>
\o/
<orbitz>
companion_cube: I'll see if I can can come up with something!
<companion_cube>
please do! :)
<orbitz>
I just have to figure out why this is failing: "Z8J(KAWy.yHozCaiY6qn8Sf2(Hs]z$cIEk)x4qq-w3[J3KY1oW6IpIQuok=v1Q$t8i^tmA]5%o.[z3.", "[k^av-]3"
<orbitz>
:)
<orbitz>
first is search string second is pattern
<orbitz>
Laundry, bbs
noze has joined #ocaml
<companion_cube>
if you give a size function, it will also try to return smaller counterexamples
<orbitz>
oh cool
<yomimono>
I use opam and merlin and it's annoying that I have to specify dependencies in both places. Also manually #require'ing them in utop is irritating. Is there already a solution for this somewhere?
_whitelogger___ has joined #ocaml
AltGr has left #ocaml [#ocaml]
maufred has joined #ocaml
gustav___ has joined #ocaml
_whitelogger__ has quit [Ping timeout: 240 seconds]
S11001001 has quit [Ping timeout: 240 seconds]
emmanueloga has quit [Ping timeout: 240 seconds]
strmpnk has quit [Ping timeout: 240 seconds]
maufred_ has quit [Ping timeout: 240 seconds]
keen__________32 has quit [Ping timeout: 240 seconds]
CissWit has quit [Ping timeout: 240 seconds]
c74d has quit [Ping timeout: 240 seconds]
gustav__1 has quit [Ping timeout: 240 seconds]
reynir has quit [Ping timeout: 240 seconds]
S11001001_ is now known as S11001001
hannes has quit [Ping timeout: 240 seconds]
emmanueloga_ is now known as emmanueloga
keen__________32 has joined #ocaml
CissWit has joined #ocaml
<flux>
orbitz, I shared your slightly comical issue and this was mentioned as a debugging aid: http://regexper.com
strmpnk_ is now known as strmpnk
<flux>
orbitz, though I don't know what your issue was :)
manud has joined #ocaml
<orbitz>
flux: haha
<orbitz>
I'm actually implementign lua patterns, but that is pretty handy
<orbitz>
Pretty powerful but much simpler than regex
<Drup>
Ah, scanf.
<Drup>
That should be quite easy to implement on top of Re
keen__________32 has quit [Read error: Connection reset by peer]
<orbitz>
Drup: I don't think this is scanf? But implementing it on top of re would defeat the purpose
keen__________32 has joined #ocaml
<Drup>
Why, you think you can be faster ? :p
<orbitz>
My goal isn't speed, it's simplicity.
<Drup>
ok
tokik has quit [Quit: leaving]
tokik has joined #ocaml
<orbitz>
And littl pattern engines are kind of fun :)
<Drup>
right :p
<orbitz>
this simple fuzz checking with qcheck has been much more fruitful than I thought it would
_andre has joined #ocaml
grouzen has joined #ocaml
zpe_ has joined #ocaml
zpe__ has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
rand000 has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
zpe_ has quit [Ping timeout: 240 seconds]
<flux>
hmm, does using camlp4o extensions with ocamlbuild still mean that I need to use myocamlbuild.ml?
<flux>
..in the case the said extensions are available via findlib
manud has joined #ocaml
<flux>
oh, syntax(camlp4o) works just fine, it was the code using it that was wrong :)
Bhavya has joined #ocaml
BitPuffin|osx has joined #ocaml
_whitelogger___ has joined #ocaml
xificurC has joined #ocaml
tmtwd has quit [Ping timeout: 246 seconds]
zpe__ has quit [Read error: Connection reset by peer]
tennix has quit [Ping timeout: 240 seconds]
noze has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
hannes` is now known as hannes
rgrinberg has joined #ocaml
manud has quit [Quit: manud]
lordkryss has quit [Quit: Connection closed for inactivity]
rgrinberg has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
mcclurmc has joined #ocaml
cdidd has joined #ocaml
Tamae has joined #ocaml
mcclurmc has quit [Ping timeout: 272 seconds]
Bhavya has quit [Quit: Quit the channel]
<orbitz>
flux: sweet, 94% code coverage
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
MercurialAlchemi has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
badkins has joined #ocaml
zpe_ has quit [Remote host closed the connection]
kushal has quit [Quit: Leaving]
ceryo has joined #ocaml
mcclurmc has joined #ocaml
zpe has joined #ocaml
tennix has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Remote host closed the connection]
curiosity has joined #ocaml
Denommus` is now known as Denommus
<curiosity>
how can i call an executable from within my program and read the output, like let version = ... ./bin --version
tennix has quit [Quit: WeeChat 1.2]
<companion_cube>
Unix.open_process_in, probably
<adrien_znc>
reading a non-small output is more annoying however
<adrien_znc>
iirc lwt has stuff for that
jonludlam has quit [Read error: Connection reset by peer]
<curiosity>
its just the version number i am interested in
tennix has joined #ocaml
obadz- has joined #ocaml
zozozo has quit [Remote host closed the connection]
obadz has quit [Ping timeout: 240 seconds]
zozozo has joined #ocaml
NingaLeaf has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
moei has joined #ocaml
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 264 seconds]
Akshay_ has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
kaepora has joined #ocaml
<kaepora>
Hi, how can I compare two lists of strings to make sure they're equal?
tennix has quit [Ping timeout: 256 seconds]
<dsheets>
kaepora, List.for_all2 (fun x y -> 0 = String.compare x y)
<dsheets>
you'll want to check that they're the same length before that, though
<dsheets>
which isn't the most efficient way
<flux>
well, for this particular case also this works: x = y, no?
<dsheets>
yes, but i try to avoid polymorphic equal
<dsheets>
List.for_all2 (=) is the simplest
tennix has joined #ocaml
<ggole>
Just call (=) and be happy
<ggole>
You can replace it later if it turns out to be slow.
<dsheets>
it's not so much slow as non-parametric...
<ggole>
Doesn't really matter for lists of strings
mcclurmc has joined #ocaml
<ggole>
In polymorphic code (=) is a lot nastier
<dsheets>
that is true, though i think the habit of avoiding (=) is healthy to prevent slip ups where it does matter
<ggole>
Hmm, guess I can understand that
BitPuffin|osx has joined #ocaml
<dsheets>
"i know this type is just an abstract string!" ... years pass... "oh, they changed the type to be a record of a string and a function... :-("
<dsheets>
you are right, though, that it's probably not something to bother new users with
<ggole>
Well, we're really missing the necessary machinery to make it pleasant to do the right thing
tennix has quit [Ping timeout: 265 seconds]
<dsheets>
definitely... here's hoping modular implicits makes it in soon
mcclurmc has quit [Ping timeout: 255 seconds]
<dsheets>
though that will still be more verbose than something global like type classes :-/
keep_learning has quit [Quit: Page closed]
tennix has joined #ocaml
kushal has joined #ocaml
nullcat_ has joined #ocaml
<nullcat_>
where is the documentation of "compiler-libs.common"?
tennix has quit [Ping timeout: 260 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
linman32 has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
<Drup>
in the .mlis
MrScout has joined #ocaml
tennix has joined #ocaml
mcclurmc has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
linman16 has joined #ocaml
tennix has joined #ocaml
jao has joined #ocaml
linman32 has quit [Ping timeout: 272 seconds]
linman16 has quit [Quit: Leaving]
tennix has quit [Ping timeout: 250 seconds]
darkf has quit [Quit: Leaving]
tennix has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
tennix has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
jeffmo has joined #ocaml
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
tennix has quit [Ping timeout: 255 seconds]
obadz has joined #ocaml
tennix has joined #ocaml
tennix has joined #ocaml
obadz- has quit [Ping timeout: 244 seconds]
tennix has quit [Ping timeout: 240 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
psy has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
<flux>
dsheets, I think though that learning ocaml is not a singular event, it's a journey.. ;)
voglerr_ has joined #ocaml
<flux>
you must admit that the initial solution has a blow-up factor of 50 compared to the 'regular' solution
voglerr_ has quit [Remote host closed the connection]
<flux>
too bad List doesn't come with 'compare', that would have been at least a bit more succinct
<flux>
ie. List.compare String.compare x y =
<flux>
0
voglerr has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
<flux>
(of course, ie. Batteries has it)
<flux>
maybe modular implicits will finally bring sane polymorphic compare to ocaml?
tennix has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
obadz- has joined #ocaml
obadz has quit [Ping timeout: 256 seconds]
tennix has joined #ocaml
tennix has quit [Ping timeout: 265 seconds]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tennix has joined #ocaml
tennix has joined #ocaml
obadz- has quit [Ping timeout: 256 seconds]
ncthom91 has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
ncthom91 has quit [Ping timeout: 240 seconds]
obadz has joined #ocaml
tennix has joined #ocaml
Akshay_ has quit [Quit: Leaving]
tennix has quit [Ping timeout: 244 seconds]
ncthom91 has joined #ocaml
ygrek has joined #ocaml
MrScout has joined #ocaml
octachron has quit [Quit: Leaving]
zpe has joined #ocaml
tennix has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
tennix has quit [Ping timeout: 250 seconds]
struktured has joined #ocaml
tennix has joined #ocaml
obadz- has joined #ocaml
obadz has quit [Ping timeout: 246 seconds]
tennix has quit [Ping timeout: 272 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
nullcat_ has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
tennix has joined #ocaml
toomuchtvrotsurb has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
Anarchos has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
creichert has joined #ocaml
struktured has joined #ocaml
grouzen has quit [Ping timeout: 240 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Drup>
and there is a jsoo entry in jst's camlp4 to ppx transformer
<Drup>
so it can be done automatically
<Drup>
(and the tool should be solid)
<Drup>
smondet: do you have remarks on the syntax ?
<Drup>
linman32: go read RWO intro, everything will sort out itself, instead of us trying to patch errors as they come ;)
<linman32>
Drup dmbaturin: thanks both for the help :)
<smondet>
Drup: ok cool. For me it works well, I use the syntax very little (always wrap in higher-level functions when I need something Js-low-level), just switched the whole project to joo.ppx in a few minutes.
<Drup>
nice
<smondet>
Drup: I think forcing people to differentiate `##` Vs `##.` is good long term, and the precedence rules at least make sense once and for all (joo.syntax kept always surprising me)
<Drup>
yeah ...
<Drup>
This is born out of necessity, but I feel it's a good choice in the long run
<Drup>
The only issue is that partial application doesn't work, but it's not obvious syntactically
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 260 seconds]
<smondet>
Drup: it's “obvious” I you think 2-sharps → javascript abyss → I'm screwed I should get back to OCaml ASAP
<Drup>
x)
voglerr has joined #ocaml
voglerr has quit [Ping timeout: 272 seconds]
jeffmo has quit [Quit: jeffmo]
Stany has joined #ocaml
apache2_ has quit [Remote host closed the connection]
apache2 has joined #ocaml
Tamae has quit [Ping timeout: 244 seconds]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]