flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
<mfp> but it doesn't seem that useful anyway
<mfp> since you'd want to have something like val empty : ('k -> 'k -> int) -> ('k, 'v) t I suppose
bkpt has quit [Quit: Leaving]
<MarcWeber> mfp: which ocaml version?
<mfp> 3.12.1
<mfp> give me a sec, I'll try on 4.00.1 (should work too)
q66 has quit [Quit: Leaving]
<MarcWeber> mfp: can you paste m.ml ?
<MarcWeber> k
<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]
bacam_ is now known as bacam
Yoric has quit [Ping timeout: 264 seconds]
zpe has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
zpe has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr1 has joined #ocaml
osnr has quit [Read error: Connection reset by peer]
osnr1 has quit [Client Quit]
kaustuv has joined #ocaml
introom_ has quit [Remote host closed the connection]
introom has joined #ocaml
ollehar has joined #ocaml
Simn has joined #ocaml
justdit has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
csakatoku has joined #ocaml
osa1_ has joined #ocaml
osa1 has quit [Ping timeout: 256 seconds]
q66 has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
justdit has quit [Ping timeout: 248 seconds]
beckerb has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
justdit has joined #ocaml
kaustuv_ has joined #ocaml
kaustuv has quit [Ping timeout: 246 seconds]
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
Yoric has joined #ocaml
kaustuv_ is now known as kaustuv
ollehar has quit [Ping timeout: 248 seconds]
<kaustuv> Anyone have working instructions for how to load core in the toplevel? The official directions ( http://janestreet.github.io/installation.html ) give me all kinds of dll errors ( http://pastebin.com/cZ6ADcpE ).
emmanuelux has joined #ocaml
ollehar has joined #ocaml
ygrek has joined #ocaml
<orbitz> kaustuv: did you install core via opam?
<kaustuv> yes
<orbitz> does the shell you are running the toplevel in have the opam env loaded?
<kaustuv> yes
<kaustuv> % env | grep -E 'OPAM|CAML'
<kaustuv> CAML_LD_LIBRARY_PATH=/home/kaustuv/.opam/4.00.1/lib/stublibs
<kaustuv> OCAML_TOPLEVEL_PATH=/home/kaustuv/.opam/4.00.1/lib/toplevel
<kaustuv> OPAMPREFIX=/home/kaustuv/.opam/4.02.0dev+trunk
<kaustuv> hmm
<kaustuv> that is weird
<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?
<avsm> ocamlbuild -tag output_obj -classic-display t.native
<avsm> The extension of the output file must be .o or .so
<avsm> Command exited with code 2.
<wmeyer`> not sure avsm; certainly i didn't even try
<avsm> there's an output-obj tag, but no flag
<avsm> so the tag can't be triggered afaict
<avsm> this would be very useful to fix in 4.1, as that's the last major thing that mirage needs to use vanilla ocamlbuild
<wmeyer`> I'd hope that it would work, and does not require to change anything
<avsm> i think it requires an extension
<wmeyer`> is there a mantis issue?
<avsm> i.e. %.native.o or %.byte.o
<avsm> no, i just noticed it
<avsm> i'll cook up a patch
<wmeyer`> I'd be grateful. Thanks.
<wmeyer`> gasche: it meant to be next step after -use-ocamlfind enabling by default in fact
<wmeyer`> however I never get to that point :-)
<wmeyer`> s/get/got/
<Drup1> does someone here have experience with the svg backend of cairo ?
Drup1 is now known as Drup
<wmeyer`> Drup: not with svg backend, but in general with cairo, Yes
<Drup> The gtk backend and the png backend works fine, but not the svg one.
<wmeyer`> how do you initalise svg backend?
<wmeyer`> I mean the cairo context
<wmeyer`> does not draw anything, just an empty drawing?
<gasche> avsm: the OCaml changelog for 3.11 says about -output-obj: "its extension must be one of .o/.obj, .so/.dll, or .c for the bytecode compiler
<gasche> "
<avsm> and for native
<avsm> so ocamlbuild is broken with it as it doesn't have a target ending in .o
<Drup> we
<avsm> i'm adding %.native.o and %.byte.o for the output-obj variants
<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> (in verbose mode at least)
<avsm> nope. grr.
<avsm> +rule "ocaml: cmo* -> byte.c"
<avsm> + ~tags:["ocaml"; "byte"; "link"; "output_obj" ]
<avsm> + ~prod:"%.byte.c"
<avsm> + ~dep:"%.cmo"
<avsm> + (Ocaml_compiler.byte_link "%.cmo" "%.byte.c");;
<avsm> looks like a sane rule
<avsm> but ocamlbuild t.byte.c doesnt add the output-obj
<avsm> byt ocamlbuild -tag output_obj t.byte.c does
<avsm> sigh
chrisdotcode has joined #ocaml
<gasche> avsm: the byte_link function has some tags-related logic
<gasche> it may be that it is the one that is respected, instead of the ~tags argument
<gasche> haha
<gasche> avsm: the documentation in signatures.mli says that the ~tags argument of the "rule" function is "deprecated, don't use it"
<avsm> *groan* you're right
<avsm> (fun tags -> tags++"ocaml"++"link"++"byte"++"program") in byte_link
<avsm> by deprecated, it means "utterly incorrect"
justdit has quit [Read error: Connection reset by peer]
<Drup> ( wmeyer`: here is the result with tyxml http://sulon.fr/trucs/dragon.svg :])
<wmeyer`> it is an attraktor or l-system?
<wmeyer`> Drup: Nice!
<Drup> Lsystem
<gasche> avsm: while you're at it, would you provide an other patch to remove the ~tags arguments from the ocaml_specific.ml file?
<avsm> gasche: that's probably better in trunk, no?
<avsm> gasche: i'm just cooking up a minimal patch for 4.1
<gasche> hm
<avsm> who knows if some of the rules use ~tags somehow from the environment...
<gasche> I'm only thinking of removing the useless ~tags argument *passed*, not changing the interface
<gasche> hm
<avsm> a few weeks before release, i'd leave it as it is
<avsm> and do all the churn in trunk
<gasche> I thought the ~tags argument was unused, but that is a good point
<gasche> (I mean I looked at Rule.call and indeed it doesn't use the "tags" field of the rule)
<gasche> but you're right that there may be hidden uses
<wmeyer`> Drup: Lsystems are very interesting, did you look at Context Free art too?
<Drup> not really, I'm just doing a small Lsystem library
<wmeyer`> keep me up to date!
<Drup> wmeyer`: https://github.com/Drup/LILiS it's still a bit rough
<Drup> in particular, the parser is terribly bad.
<gasche> Drup: is your internship report available somewhere?
<Drup> it is !
<Drup> well, at least, I will make it avaible, give me a sec
<wmeyer`> Ok, why parsing, not combinators?
<Drup> wmeyer`: that's a very good question
<Drup> because I was young and innocent when I started this ?
avsm has left #ocaml []
avsm has joined #ocaml
<wmeyer`> Drup: :-) one does not preclude other
<wmeyer`> you can always built combinators, and mocking up a full language is a good exercise anyway.
<gasche> avsm: why does your rule use link_gen instead of one of the compile* functions in ocaml_compiler.ml?
<avsm> cos output obj is the same as the final link, isnt it
<gasche> hm
<avsm> it does all the linking, but not the system link. that's the point of it
<gasche> yeah ok
<wmeyer`> Drup: I like your Dragon, in particular I like dragons. I even have t-shirt with a dragon.
<Drup> wmeyer`: I'm not sure how I would do combinators for L systems. And it's not really hard to build a Lsystem within ocaml anyway.
<Drup> gasche: http://sulon.fr/trucs/rapport.pdf but keep in mind it's far from finished !
<gasche> hm
<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.
<Drup> what's JFLA ?
<gasche> ...
<gasche> http://jfla.inria.fr/2014/ ; the submission deadline is next October, so you have some time
<gasche> (Journée Francophone des Langages Applicatifs; a rather interesting yearly french workshop on OCaml, Coq and related topics)
<wmeyer`> If I could read through this French :(
zpe has quit [Ping timeout: 248 seconds]
<Drup> gasche: hum, indeed, I will think about it, sounds like a good idea.
* wmeyer` going to take a short nap.
Watcher7|off is now known as Watcher7
malo has joined #ocaml
Sim_n has joined #ocaml
wmeyer` is now known as wmeyer
darkf has quit [Quit: Leaving]
dsheets has quit [Read error: Operation timed out]
Simn has quit [Ping timeout: 276 seconds]
gnuvince has quit [Remote host closed the connection]
<avsm> gasche: i'll add the tests after dinner
* avsm needs a break from RWO comment crushing
ttamttam has joined #ocaml
ollehar has quit [Ping timeout: 276 seconds]
ttamttam has left #ocaml []
tane has joined #ocaml
q66 has quit [Read error: Connection reset by peer]
pkrnj has joined #ocaml
q66 has joined #ocaml
ggole has quit []
mcclurmc has quit [Read error: Operation timed out]
oriba has joined #ocaml
Drup has quit [Quit: Leaving.]
UncleVasya has joined #ocaml
Drup has joined #ocaml
beckerb has quit [Ping timeout: 245 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
Sim_n is now known as Simn
yacks has joined #ocaml
osa1_ has quit [Ping timeout: 268 seconds]
Kakadu has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
LimitSupremum has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
demonimin has quit [Ping timeout: 264 seconds]
demonimin has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
UncleVasya has quit [Ping timeout: 246 seconds]
UncleVasya has joined #ocaml
cjesp has quit [Quit: Leaving]
Kakadu has joined #ocaml
Kakadu has quit []
osnr has quit [Quit: Leaving.]
LimitSupremum has quit [Ping timeout: 250 seconds]
Watcher7 is now known as Watcher7|off
pkrnj has joined #ocaml
zpe has joined #ocaml
Watcher7|off is now known as Watcher7
zpe has quit [Ping timeout: 256 seconds]
malo has quit [Quit: Leaving]
tane has quit [Quit: Verlassend]
kaustuv has left #ocaml []
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<whitequark> is there some builtin function for doing "let with_option opt f = match opt with None -> opt | Some x -> Some f x"?
<whitequark> Option.map_default
<whitequark> or .map
q66 has quit [Quit: Leaving]
oriba has quit [Quit: oriba]
lenstr has quit [Ping timeout: 246 seconds]
gautamc has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]