<mfp>
just double-checked, no pb with 4.00.1 either
<MarcWeber>
I agree
<MarcWeber>
I added the type annotation to line 13 (your paste)
<MarcWeber>
And that failed
<MarcWeber>
I still don't understand why 'v is not causing problems (yet) - maybe later
<MarcWeber>
now such lines fail: let create cmp = { cmp = cmp; map = Empty }
<mfp>
right, cmp is not 'k. 'k -> 'k -> int
<mfp>
_but_
<mfp>
as I said above, you probably really want let create cmp = { cmp; map = Empty } and the field being declared as cmp : 'k -> 'k -> int (not polymorphic)
<MarcWeber>
So I'll hope that somebody has an answer on the mailinglist.
<mfp>
because there's no point in carrying cmp around if it's always going to be compare anyway (iow., if there's only on "empty" value)
<mfp>
what's the problem with > let create cmp = { cmp; map = Empty } and the field being declared as cmp : 'k -> 'k -> int (not polymorphic) ?
<MarcWeber>
unless you need "compare ignoring case" or such
<MarcWeber>
Eventually you're right.
<mfp>
oh I see, do you want something like let create ?(cmp=compare) () = { cmp; map = Empty } ?
<MarcWeber>
mfp: I want to know why the haxe.org compiler behaves differently when you compile it with ocamlc
<MarcWeber>
I want to find out by tracing each line which gets executed.
<mfp>
with ocamlc instead of ocamlopt?
<MarcWeber>
Now haxe depends on github.com/haxefoundation/ocamllibs which contains the code I have trouble with.
<MarcWeber>
mfp: Yes.
<MarcWeber>
I have the tracing for haxe, now I want the tracing for its dependencies (exception ocaml core libs)
<mfp>
one reason that comes to mind is the different evaluation order of function arguments
<MarcWeber>
mfp: People told me on this channel for days.
<MarcWeber>
But how to find out where this happens?
jbrown has joined #ocaml
<MarcWeber>
I know that it can be fixed by let x in ... probably.
<MarcWeber>
But I don't like guessing, and this may happen once and then again and again.
<Simn>
Couldn't you use ocamldebug to see what's going on?
<mfp>
hmm I guess you could build something atop camlp4 or ppx or something that finds nontrivial expressions passed as function arguments
<MarcWeber>
mfp: Maybe you have the skills, it would take me a couple of days probably.
<MarcWeber>
Simn: Of course you're right. But it this may happen again and again.
<Simn>
Sure, but the point is to find the reason why it happens, no?
<MarcWeber>
If you want to have a look at the traces I got I can provide a VNC server with all things installed
<Simn>
I've always wanted to find out why there are differences as well.
<MarcWeber>
Simn: The good news are: With tracing the same different behaviour appears.
<MarcWeber>
Simn: Uploading the files to my server which might take a while.
<Simn>
Well I'm about to head to bed. ;)
<MarcWeber>
Simn: There is plenty of time
<Simn>
But really curious about this, let me know if you find anything.
<MarcWeber>
Simn: ping me again tomorrow
<MarcWeber>
Or whenever you think you have time
UncleVasya has quit [Read error: Connection reset by peer]
pootler_ has quit [Quit: leaving]
Simn has quit [Quit: Leaving]
Neros has quit [Ping timeout: 246 seconds]
pootler has joined #ocaml
osnr has quit [Quit: Leaving.]
<Drup>
Ropes are so fast <3
<Drup>
Hum, I just crashed firefox because of a svg too big.
<whitequark>
Drup: chromium is really far better at handling SVGs
<whitequark>
I've successfully loaded a 120MB SVG once, I think
<whitequark>
it even scrolled quickly
<Drup>
interesting, but I'm very pissed of when a website ask me to go to another browser so I'm not going to rely on that :)
<whitequark>
oh.
<whitequark>
I was using svg as an output format for graphviz, when working on a deobfuscator
<Drup>
(beside the fact that, the less google I have, the better I feel)
<whitequark>
graphviz used to exhaust address space while trying to compose a png.
<whitequark>
Drup: chromium is google-free ;)
<Drup>
This time it worked ! It took a bit of time, but that's to be expected
pkrnj has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 248 seconds]
madroach has quit [Ping timeout: 248 seconds]
introom has joined #ocaml
madroach has joined #ocaml
Fnar has quit [Ping timeout: 276 seconds]
justdit has joined #ocaml
introom has quit [Remote host closed the connection]
introom has joined #ocaml
dtg has quit [Ping timeout: 268 seconds]
dtg has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
darkf has joined #ocaml
Yoric has joined #ocaml
ygrek has joined #ocaml
Drup has quit [Quit: Leaving.]
walter has joined #ocaml
walter|r has quit [Ping timeout: 268 seconds]
pootler has quit [Quit: leaving]
justdit has quit [Ping timeout: 246 seconds]
chrisdotcode has joined #ocaml
Watcher7 is now known as Watcher7|off
breakds has quit [Remote host closed the connection]
Fnar has joined #ocaml
derek_c has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
yacks has quit [Quit: Leaving]
osnr has quit [Quit: Leaving.]
patronus has quit [Quit: leaving]
patronus has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ttamttam has joined #ocaml
Watcher7|off is now known as Watcher7
ggole has joined #ocaml
patronus has quit [Quit: Lost terminal]
<whitequark>
ggole: pong
<whitequark>
*ping
<ggole>
pong
Patchou has joined #ocaml
Tamae has quit [Ping timeout: 248 seconds]
justdit has joined #ocaml
patronus has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
ttamttam has quit [Ping timeout: 264 seconds]
ttamttam has joined #ocaml
derek_c has quit [Quit: Lost terminal]
justdit_ has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
<adrien>
morning
osa1 has joined #ocaml
osnr1 has joined #ocaml
wmeyer` has joined #ocaml
deavidsedice has joined #ocaml
<gasche>
MarcWeber: did reusing Bisect not work out?
mehdid_ has joined #ocaml
Asmadeus_ has joined #ocaml
<gasche>
reading some part of yesterday's log made me think of writing a syntax extension that would transform the program to fix the evaluation order of all subexpressions
bacam_ has joined #ocaml
maxibolt has joined #ocaml
jdoles has quit [Ping timeout: 276 seconds]
ttamttam has quit [Ping timeout: 276 seconds]
ggole has quit [Ping timeout: 276 seconds]
osnr has quit [Ping timeout: 276 seconds]
wmeyer has quit [Ping timeout: 276 seconds]
thizanne has quit [Ping timeout: 276 seconds]
Asmadeus has quit [Ping timeout: 276 seconds]
bacam has quit [Ping timeout: 276 seconds]
brendan has quit [Ping timeout: 276 seconds]
tlockney has quit [Ping timeout: 276 seconds]
mehdid has quit [Ping timeout: 276 seconds]
deavid has quit [Ping timeout: 276 seconds]
<gasche>
(compiling to A-Normal Form basically)
ggole has joined #ocaml
brendan has joined #ocaml
tlockney has joined #ocaml
patronus has quit [Excess Flood]
<gasche>
MarcWeber: what was the result of the tracing on haxe?
patronus has joined #ocaml
jdoles has joined #ocaml
<gasche>
(I don't really see why that would not be enough to find where the problem is)
<gasche>
hm
<gasche>
I just saw your question on the ML
osnr1 has quit [Quit: Leaving.]
justdit_ has quit [Ping timeout: 248 seconds]
Watcher7 is now known as Watcher7|off
introom_ has joined #ocaml
introom has quit [Read error: Connection reset by peer]
<kaustuv>
OK, reloading `opam config env` fixes the errors.
ttamttam has joined #ocaml
justdit has quit [Ping timeout: 260 seconds]
ttamttam has left #ocaml []
<gasche>
ygrek: Thomas Leonard (the 0install guy) is asking OCaml questions on StackOverflow
<gasche>
do you know what he's planning to use OCaml for?
ontologiae_ has joined #ocaml
<kaustuv>
This is a crazy zsh bug: it doesn't register the effects of eval `opam config env` unless one of the variables is actually used (e.g., echoed).
ollehar has quit [Ping timeout: 252 seconds]
<kaustuv>
Scratch that, I'm just an idiot. (I was setting the variables manually later.)
ollehar has joined #ocaml
<orbitz>
kaustuv: I think opam has a specific -zsh setting for setting env
<kaustuv>
% (opam config env > a) && (opam config env --zsh > b) && diff a b && echo "is there a difference?"
<kaustuv>
is there a difference?
justdit has joined #ocaml
<ygrek>
gasche, there is a rewrite of 0install going
csakatoku has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 246 seconds]
Asmadeus_ is now known as Asmadeus
mcclurmc has quit [Ping timeout: 246 seconds]
breakds has joined #ocaml
kaustuv has left #ocaml []
Neros has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
<pippijn>
does ocamlfind have something like pkg-config --atleast-version?
justdit_ has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
ontologiae_ has quit [Ping timeout: 276 seconds]
maxibolt is now known as thizanne
ontologiae_ has joined #ocaml
mcclurmc has joined #ocaml
<wmeyer`>
pippijn: it has predicates
ontologiae_ has quit [Ping timeout: 240 seconds]
<gasche>
pippijn: I don't think so; but you can of course query the version of a package
<gasche>
in fact I think the "version" field of ocamlfind is free-form; so you cannot compare version information in general, it is mostly for user information
<gasche>
precise (processible) version information will be found in packaging information (from GODI, debian, OPAM, etc.), not in ocamlfind
<pippijn>
ok
Simn is now known as Simn|gone
emmanuelux has quit [Quit: emmanuelux]
ygrek has joined #ocaml
snearch has joined #ocaml
introom has quit [Remote host closed the connection]
Drup1 has joined #ocaml
JcGood has joined #ocaml
JcGood has quit [Client Quit]
kaustuv has joined #ocaml
mcclurmc has quit [Ping timeout: 268 seconds]
<kaustuv>
thelema, gasche: Just sent a pull request for batteries that makes it compilable on recent dev versions
kaustuv has left #ocaml []
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
justdit_ has quit [Read error: Connection reset by peer]
justdit has joined #ocaml
mcclurmc has joined #ocaml
justdit has quit [Ping timeout: 240 seconds]
justdit has joined #ocaml
Simn|gone is now known as Simn
ollehar has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
<dsheets>
What is this then? W: Field 'pkg_ospec_version_ge_0_3_0' is not set: Cannot satisfy version constraint on pkg_ospec: >= 0.3.0 (version: 0.2.1)
darkf has quit [Quit: Leaving]
Yoric has quit [Ping timeout: 264 seconds]
ontologiae_ has joined #ocaml
cjesp has joined #ocaml
<adrien>
oasis has support for that
<adrien>
but ocamlfind itself, I don't know
<adrien>
I mean, the tool
<avsm>
dsheets: you still see that? the ocamlfind version in the ospec0.3.0 release was wrongly set to 0.2.1
ollehar has joined #ocaml
Simn has quit [Quit: Leaving]
Simn has joined #ocaml
ontologiae_ has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Ping timeout: 246 seconds]
<dsheets>
avsm, nope, just responding to gasche but it looks like that's actually an oasis error (though oasis relies on findlib versions not being insane)
<avsm>
its an oasis error
<avsm>
that supports constraints too (on findlib packages)
<avsm>
not often used
<gasche>
I suppose Sylvain made the choice to assume that findlib package versions are in general as well-behaved as oasis'
<gasche>
(or at least not too terrible)
<avsm>
reasonable enough decision
<gasche>
avsm: I had another ocamlbuild idea recently that I thought I should run by you
<gasche>
having an "ocamlfind ocamlbuild" command that would (1) enable -use-ocamlfind (2) pass compilation units filtered by the "ocamlbuild,plugin" predicates as *dynamic plugins* to the ocamlbuild executable
<avsm>
gasche: i like that. by dynamic plugins, do you mean a dynlink that modifies ocamlbuild rules in the conventional way?
<gasche>
(one aspect I'm don't understand is how to support dynamic plugins that not only do side-effect on the myocamlbuild ruleset/tagset, but also depend on software libraries provided through findlib; I have little experience with dynlink)
<gasche>
avsm: yes
<gasche>
that said, other options are possible
<gasche>
this form of dynamic plugin would encourage people to distribute side-effectful compilation units for reuse of ocamlbuild logic, like it is currently done in Camlp4
<gasche>
but we may instead use ocamlfind to compile the myocamlbuild.ml file with additional libraries, which would allow to distribute side-effect-free libraries to be "activated" from myocamlbuild.ml
<gasche>
(or, of course, both at the same time)
justdit has quit [Read error: Connection reset by peer]
justdit has joined #ocaml
mcclurmc has joined #ocaml
<wmeyer`>
gasche: yes, I have though about findlib packages like: js_of_ocaml.ocamlbuild
<wmeyer`>
which would then install needed rules
emmanuelux has joined #ocaml
justdit has quit [Ping timeout: 268 seconds]
<gasche>
one thing I'm wondering about is how this relates to the proposal to turn ocamlbuild into a library instead of a program
<wmeyer`>
hm, probably currently not related if we want to keep the tooling in the same way. But the future would be able to make different clients using the ocamlbuild internals. I'd imagine oasis would benefit from that
<wmeyer`>
possibly reusing the dynlinking mechanism
<avsm>
hm, is it even possible to do output-obj via ocamlbuild?
<Drup>
wmeyer`: and yes, it doesn't output anything
<gasche>
avsm: but should -tag output_obj also support .obj, .dll and .c?
justdit has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
Neros has joined #ocaml
<avsm>
dunno about obj or dll, but it needs to support .c
<avsm>
i dont understand why it's a tag, though
<wmeyer`>
Drup: I think you have to allocate enough big string for that, the string will not grow, maybe you can use buffer for this.
<avsm>
%.byte.c makes more sense
<avsm>
%.native.c is invalid
<gasche>
avsm: indeed
<gasche>
as why "why it's a tag", well I'd suppose the .byte.c target would implicitly set the output_obj tag
<gasche>
and as you remarked, setting it cannot work unless we use one of those target names (that should set it implicitly)
pkrnj has joined #ocaml
<Drup>
wmeyer`: can I do something about this on the cairo side ? stroke more often ?
<Drup>
(ocaml-cairo*)
<gasche>
so
<wmeyer`>
Drup: probably you have a different way of specyfing output stream, specyfing string seems to be the simplest way, but buffer would be much better, so I'd expect it's there.
<wmeyer`>
buffer or channel, or even a Unix descriptor
<Drup>
it's already an ocaml chanel
<wmeyer`>
growable stream of asscii data in general
<wmeyer`>
not it's not, you do (output_string) right?
<wmeyer`>
you already convert it to a string
<Drup>
no, I give the surface constructor an output function (string -> unit)
<wmeyer`>
then yes, it should work then, ( I should look at the signature)
* adrien
also likes the idea of "ocamlfind ocamlbuild"
* wmeyer`
thinks he didn't highlight it very well at some point
<wmeyer`>
Drup: the interface is not hypercomplicated indeed
<wmeyer`>
try flushing the channel
ollehar has quit [Ping timeout: 264 seconds]
<wmeyer`>
it makes a big difference sometimes
<Drup>
I added a flush before the close and tried to stroke more often, the svg file is still empty
<Drup>
(And almost crashed my system when I tried to use Cairo.stroke_preserve, hello 4 Go allocated in RAM)
<Drup>
well, I will use my tyxml backend for svg then. I wanted to compare the two but ..
pkrnj has quit [Ping timeout: 240 seconds]
iZsh has quit [Quit: Coyote finally caught me]
iZsh has joined #ocaml
iZsh has quit [Excess Flood]
iZsh has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
<wmeyer`>
Drup: ping the author of ocaml-cairo
ttamttam has joined #ocaml
kaustuv has joined #ocaml
ttamttam has left #ocaml []
<kaustuv>
can GADTs be used to improve BatPervasives.dump?
<gasche>
kaustuv: your question is a tad too terse
<gasche>
Alain-style dynamic type representations can be used, indeed, to pretty-printing values in a much more satisfying way
<gasche>
but where do you get the dynamic type representation from?
<gasche>
(note that you don't need *G*ADTs for that, you could make do with a non-phantom-typed runtime representation of types; GADTs only provide some static assurance that the runtime type representation is not too off-base)
e98 has joined #ocaml
e98 has left #ocaml []
<kaustuv>
Hmm, OK. I guess my question is equivalent to asking if we have something similar to the Typable type class of Haskell in OCaml.
<gasche>
in that case, the answer is "yes, look at the ocaml-ty work of Grégoire Henry and Pierre Chambart"
<gasche>
"but it is a patch to the compiler, not an easy-to-deploy library; and the patch is in an experimental state"
ollehar has joined #ocaml
<kaustuv>
Ah. That makes sense.
<kaustuv>
I was trying to figure out how to get the equivalent of Haskell's typeOf :: Typeable a => a -> TypeRep
<gasche>
that's the "implicit" part
<kaustuv>
Thanks for the pointer to their work.
<gasche>
you may be interested in a bit of history
<gasche>
Alain Frisch has been using runtime type representations for some time in the OCaml variant he develops at Lexifi
<gasche>
he recently improved them to use GADTs for additional type safety
<gasche>
Pierre and Grégoire worked on how to generate them implicitly from ambiant type information (at points where they were explicitly needed); Alain uses some rather ugly hacks in that area
<gasche>
then they decided that not only runtime type values could be implicitly generated in a type-directed fashion, and extended their work to arbitrary "implicits" (with help from Didier Rémy)
<gasche>
Pierre then went to work at OcamlPro (on something else: optimizations in the OCaml compiler), and Grégoire went to Nagoya to discuss theoretical details of runtime type representations with Jacques Garrigue
<gasche>
now he is back in France, and is working on runtime type representations, implicitly generated; but *not* the wider "implicits" proposal
<gasche>
(the reason being that his work is funded by Lexifi, which is more interested in the former than the latter)
<kaustuv>
If I understand "implicits" right, I think that is not as clean as the "modular type classes" proposal from a while back by Chakravary, Dreyer, and Harper
<kaustuv>
(I might have the author list wrong.)
<gasche>
I don't remember all the details of this paper, but what I remember is mostly "hey, we can infer type-directed *module expressions* instead of simply term expressions"
<gasche>
"and that gives us associated types for free"
<gasche>
I'm not sure there is so much of a difference in presence of GADTs and/or first-class modules
<kaustuv>
Anyway, thanks for the background.
<gasche>
kaustuv: but in any case, right now nobody is pouring work into the "general implicits" part of the picture (module-based or term-based)
<gasche>
if you know people that would be interested in working on that, that could definitely help
<Drup>
wmeyer`: I looked at the real cairo tutorial, it says you should call Cairo.Surface.finish but this always segfault, I'm writing a mail with some examples.
<wmeyer`>
Drup: I must have remembered I had a similar problem. Don't remember how I resolve it.
<wmeyer`>
that's or other way, it should not seg fault
TaXules has quit [Ping timeout: 256 seconds]
<Drup>
for png and gtk surfaces, you don't really need Cairo.Surface.finish
<Drup>
so this is not really a problem
<wmeyer`>
you would think like this, or is it part of the manual?
<wmeyer`>
yes, they are dynamic
TaXules has joined #ocaml
<wmeyer`>
so you should not need it
<Drup>
not sure it's part of the manual, but empirically, I don't need it :D
darkf has joined #ocaml
<kaustuv>
If I have: type _ exp = IntExp of int -> int exp | BoolExp of bool -> bool exp | EqExp of 'a exp * 'a exp -> bool exp
<kaustuv>
then, in a match case of the form EqExp(a,b) -> what does OCaml know about the types of a and b?
<wmeyer`>
Drup: :-)
gautamc has quit [Read error: Connection reset by peer]
<Drup>
wmeyer`: the weird thing is that ocaml-cairo don't raise any error if I close the buffer and try to draw ..
<gasche>
kaustuv: they are classified by a shared existential variable
<kaustuv>
gasche: ah, so there are existential types in the implementation of GADTs then?
chrisdotcode has quit [Remote host closed the connection]
gautamc has joined #ocaml
<kaustuv>
that makes sense...
<gasche>
yes
chrisdotcode has joined #ocaml
<gasche>
they sometimes appear in error messages and make your life hell
<gasche>
with their nice names of the form "ex#<random integer>"
chrisdotcode has quit [Remote host closed the connection]
<gasche>
(the OCaml syntax provides no binding place to name them, continuing a long history of screwing up type variable binding syntax)
<avsm>
is there any way to determine exactly what tags a target has been compiled with?
<avsm>
-show-tags only shows the static ones, and verbose 99 doesnt show them either
<gasche>
the _log?
<gasche>
I wonder if -classic-display doesn't also show them
<gasche>
why did you choose to write your report in french? I believe non-french-speaking people may be interested in it as well
snearch has quit [Quit: Verlassend]
<wmeyer`>
gasche: it looks OK in my eyes, please feel free to commit and thanks for the fix avsm!
<gasche>
(ah, and "camlp4", not "ocamlp4")
zpe has joined #ocaml
<gasche>
Drup: that would make a good submission to the JFLA, I think; did you consider that?
<wmeyer`>
Drup: so now you want me to learn French :-)
<wmeyer`>
i have no objections and I'd like to, but I am afraid it will be a bit more than one evening.
<Drup>
because 1) I'm lazy and I would like to actually work instead of writing reports, and It's faster in french 2) I'm really not confortable with people taking this as a finished work, I have still more than 2 month left and I will write something (in english) when I'm actually done.