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/
eikke has quit [Ping timeout: 248 seconds]
Neros has joined #ocaml
breakds has joined #ocaml
Neros has quit [Remote host closed the connection]
tane has quit [Quit: Verlassend]
Neros has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
darkf has joined #ocaml
walter|rtn has quit [Quit: This computer has gone to sleep]
q66 has quit [Remote host closed the connection]
Neros has quit [Remote host closed the connection]
Neros has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
Neros has joined #ocaml
ygrek has joined #ocaml
ontologiae_ has joined #ocaml
ontologiae_ has quit [Ping timeout: 256 seconds]
s4muel has left #ocaml []
Watcher7|off is now known as Watcher7
Watcher7 is now known as Watcher7|off
Watcher7|off is now known as Watcher7
<rgrinberg> gasche: i wonder how you avoid polymorphic comparison?
<rgrinberg> the only way i found it to be possible is to use core...
breakds has quit [Quit: Leaving]
dmitrymatveev has quit [Quit: ChatZilla 0.9.89 [SeaMonkey 2.17/20130521235516]]
Drup has quit [Ping timeout: 260 seconds]
wmeyer` has joined #ocaml
wmeyer has quit [Ping timeout: 256 seconds]
<wmeyer`> rgrinberg: so polymorphic equality or comparision is of course little bit problematic, but usually it's not a problem. Standard ML solved this by baking some of the operators overloaded. Haskell does it by definining type classes, which is the best as you can get. Hope that helps you.
<wmeyer`> that's said I don't think there is anything can be changed in OCaml, and I'm happy with polymoprhic operators :-)
<wmeyer`> adrien: ping. How are your cross patches, I welcome any good updates on this.
<rgrinberg> wmeyer`: in core every type defines its own `compare`. which isn't a solution to the problem perse but at least there's a type_conv to efficiently generate such a specialized `compare`
<wmeyer`> adrien: I will try to merge them, today. I hope you will have time to look at it. Thanks.
<rgrinberg> so you can at least avoid if you try really hard
<wmeyer`> rgrinberg: no sadly it's not a solution, but happens to be a good solution for majority of cases.
<wmeyer`> see, I have no idea, how it could be done better!
<wmeyer`> yes, but type_conv does also automated comparision
<wmeyer`> so it's the same problem
<wmeyer`> but of course you have much better control
<rgrinberg> i honestly find typeclasses to be the best "practical" solution
<wmeyer`> because you can define it, I have no doubts, you can't do better without serious changes to the type system
<rgrinberg> that's right :/
Neros has quit [Ping timeout: 248 seconds]
<wmeyer`> they are closest to the ideal mathematical notation
<wmeyer`> I'd welcome myself type classes in OCaml, and the operators defined in such way, that they share the same interface, but maybe in seamless way via. overloading.
<wmeyer`> I have no idea how to do this in principle at the moment. But Pierre Chambart has done a great prototype, and actually what I can tell, I felt inspired :-)
<wmeyer`> and I think OCamlpro is going to follow up on this topic.
<wmeyer`> ok rgrinberg time for espresso, first coffee in the morning :-)
<rgrinberg> enjoy!
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<wmeyer`> rgrinberg: thank you!
<wmeyer`> and thanks for the discussion rgrinberg :-)
<rgrinberg> likewise :D
osnr has quit [Quit: Leaving.]
ousado has quit [Remote host closed the connection]
Neros has joined #ocaml
ttamttam has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
Watcher7 is now known as Watcher7|off
Neros_ has joined #ocaml
Neros has quit [Ping timeout: 256 seconds]
ttamttam has left #ocaml []
<gasche> rgrinberg: I must note that Batteries also provides equality/comparison operators for datatypes
<gasche> and yes, my advice for now is to be careful and use those combinators to write comparison functions
<gasche> that makes a bit of boilerplate (compared to type-classes that would generate some of this boilerplate for you), but that's still reasonable
<gasche> I agree that type classes are a good answer to this
<gasche> avsm: would it be possible to have a git mirror of the OCaml documentation repository ( http://caml.inria.fr/cgi-bin/viewvc.cgi/ocamldoc/trunk/manual/ ) on github.com/ocaml ?
<gasche> I've been pointing out github.com/ocaml/ocaml as a "canonical" git-mirror to people, but it's much harder to find about the possibility to contribute to the OCaml manual instead
<gasche> while in practice more people may make pertinent enhancements to the documentation
wmeyer`` has joined #ocaml
wmeyer` has quit [Ping timeout: 245 seconds]
Neros_ has quit [Ping timeout: 246 seconds]
nvbee has joined #ocaml
Snark has joined #ocaml
Arsenik has joined #ocaml
ollehar has joined #ocaml
jbrown has joined #ocaml
tane has joined #ocaml
<adrien> wmeyer``: hmm, cross patches today is completely undoable :P
<adrien> I spent my available time on http://notk.org/~adrien/picker.php for mingw-w64's download page and it's finally working fine (needs theming but not much more)
<adrien> I'm going to try to think about when I can spend some time on them
<darkf> adrien: nice
<adrien> javascript is awful :P
<darkf> js_of_ocaml is awful
<adrien> I need to try it in order to compare "experiences"
<adrien> javascript is way too error-prone : function compare(a, b) { a - b }
<darkf> I want a compiler that directly translates ocaml to JS
<adrien> that's valid but unusable as a sort function: I've forgotten the "return" keyword
<gasche> adrien: your refusal to work on cross-compilation will be duly noted :-}
<adrien> and that bombs out silently
<darkf> adrien: that is not the least of JS' problems, nor is that really a problem
<adrien> gasche: heheh, it's not a refusal but rebasing is going to take quite some time :P
<adrien> darkf: agreed but I believe it's the sum of such small problems which end up making it particularly annoying
<darkf> adrien: I say that about Java but nobody wants to accept it :|
<adrien> heheh :P
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Guest98053 has joined #ocaml
Guest98053 is now known as enzoh
osnr has quit [Quit: Leaving.]
nvbee has quit [Ping timeout: 250 seconds]
justinfront_ has joined #ocaml
<justinfront_> how do i check the ocaml version running?
ttamttam has joined #ocaml
<adrien> "ocamlc -v" will give you some infos
UncleVasya has joined #ocaml
<justinfront_> I tried to complie from source so I have ocaml 4 but not working with making haxe ( and maybe it's not bootloaded right ) really I need to enable my previous macport ocaml at moment, how would I do that?
ttamttam has quit [Client Quit]
<justinfront_> is there some way to select between installed ocamls
<justinfront_> or where would I go to remove ocaml4 so that the macport one shows up again
<gasche> if you want to juggle between different versions of OCaml, opam is a convenient tool
<gasche> it should be able to recognize macport's ocaml as the "system" ocaml, and then help you install whichever version aside, and switch between them
<gasche> the question of how to recover macport's ocaml depend on where you installed your compiled-from-source version: it may or may not have rewritten the previous install files
<justinfront_> If I try to get a new one from macport will it overwrite the default
mantra has joined #ocaml
mantra has quit [Client Quit]
mantra has joined #ocaml
mantra has quit [Client Quit]
<gasche> justinfront_: probably
Anarchos has joined #ocaml
UncleVasya has quit [Quit: UncleVasya]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Kakadu has joined #ocaml
UncleVasya has joined #ocaml
osnr has quit [Quit: Leaving.]
eni has quit [Ping timeout: 246 seconds]
ttamttam has joined #ocaml
Normann has joined #ocaml
<Normann> Hi, in Maple I've got a list of numbers and I want Caml Light to build a tree that represent them
ggole has joined #ocaml
<gasche> Normann: the easiest way to proceed is to ask Maple to format them with the syntax of a Caml List, and then feed that in your Caml toplevel
<wmeyer``> Normann: a binary tree, or heap?
<gasche> (I assume you're using the Caml Light toplevel, because the places were teaching is still done with Caml Light rather than OCaml are also retarded enough to use the toplevel for everything)
<gasche> from the Caml list, you can implement a list-to-tree conversion in Caml
<Normann> is there a code available somewhere ?
<gasche> to do what?
<Normann> "to ask Maple to format them with the syntax of a Caml List, and then feed that in your Caml toplevel"
<gasche> ah
<gasche> I don't know much about Maple, so I don't know, but I think you should be able to implement that yourself
<Normann> no, i am a newbie
<gasche> do you know how to print an integer and another character somewhere, with Maple?
<gasche> (I don't)
<gasche> the code would be
<gasche> print "["
<gasche> then for any element in the list, print(elem); print ";"
<gasche> then print "]"
<gasche> that's it, you're done
q66 has joined #ocaml
<Normann> i did it, i need to "feed that in your Caml toplevel" now
<gasche> what do you use to run OCaml programs?
<gasche> OcamlWinPlus, or something related, or something else?
<gasche> scrap that, to run Caml Light programs
<wmeyer``> well Normann it's the easiest but important part right? :-)
* wmeyer`` taking espresso after 5KM run
<Normann> i use Caml light
<Normann> i am not allowed to use another versions
<wmeyer``> adrien: I remember, you can blame me for not pushing forward this :-)
<wmeyer``> I am going to look at it, today - my promise. It's been two or three good months, I have not done any work on this :(
Neros has joined #ocaml
<wmeyer``> I still have to look after ocamlbuild
<adrien> wmeyer``: don't worry, I know we're all busy and I count my own delays in years
<wmeyer``> adrien: yeah, thank you.
raichoo has joined #ocaml
<wmeyer``> adrien: the business it's not a problem, as long is goes in pair with good work.
<wmeyer``> but I'd like the ARM cross compilation to get work really too.
<rks> wmeyer``: that would be nice!
<gasche> Normann: what software are you using to invoke Caml Light?
<gasche> do you write code in a file, then call the compiler, or something different?
<wmeyer``> thanks rks =)
<Normann> i just write the code on the compiler
<wmeyer``> adrien did a great leap, to simplify the build system
<wmeyer``> I admit, that the patches might have gone out of sync at some point, but I will put my effort to port them again
raichoo has quit [Quit: leaving]
zpe has joined #ocaml
eikke has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
astertronistic has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
rossberg_ has quit [Ping timeout: 252 seconds]
ttamttam has quit [Quit: ttamttam]
enzoh has quit [Quit: Leaving]
rossberg_ has joined #ocaml
eikke has joined #ocaml
<gasche> Normann: sorry for the delay; can you not copy-paste the list you got from Maple into this place where you put your code?
<gasche> (I will be going away for a few hours now, so I won't be able to give further advice right now)
ontologiae_ has joined #ocaml
UncleVasya has quit [Read error: Connection reset by peer]
UncleVasya has joined #ocaml
ontologiae_ has quit [Ping timeout: 256 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<ollehar> how do I include another cmi when compiling an mli to cmi?
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ivan\ has joined #ocaml
osnr has quit [Ping timeout: 252 seconds]
eikke has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
eikke has joined #ocaml
<Kakadu> ollehar: what do u mean?
<ollehar> interdependency between modules :P
<ollehar> read on stackoverflow it's not possible
Arsenik has quit [Remote host closed the connection]
<ollehar> module A need types from B, B need func from A
<ollehar> only possible with recursive modules
<ollehar> right_
<ollehar> *?
<Kakadu> I don't know for sure
Drup has joined #ocaml
<ollehar> hm
ttamttam has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
thelema has joined #ocaml
ttamttam has quit [Client Quit]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 256 seconds]
speredenn has joined #ocaml
mattrepl has joined #ocaml
walter|r has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
speredenn has quit [Quit: Leaving]
osnr has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
ulfdoz has joined #ocaml
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
wmeyer``` has joined #ocaml
wmeyer`` has quit [Ping timeout: 256 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Ping timeout: 264 seconds]
<ggole> ollehar: pull the dependent bits out into another module :(
<ollehar> ggole: yes, that's an idea :)
<ggole> I'd really like a module level analogue of let ... and ...
darkf has quit [Quit: Leaving]
gasche has quit [Ping timeout: 256 seconds]
gasche has joined #ocaml
ttamttam has joined #ocaml
gasche has quit [Ping timeout: 240 seconds]
ttamttam has quit [Quit: ttamttam]
gasche has joined #ocaml
<ggole> Yes, but that doesn't work across files afaik
<ollehar> I would pressume not
<ggole> So it doesn't usually help when you are trying to work around mutual dependencies
Neros has quit [Ping timeout: 256 seconds]
ulfdoz has quit [Read error: Operation timed out]
Arsenik has joined #ocaml
tobiasBora has joined #ocaml
eni has joined #ocaml
justinfront_ has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
emmanuelux has joined #ocaml
Watcher7|off is now known as Watcher7
tane has quit [Quit: Verlassend]
yacks has quit [Quit: Leaving]
Drup has quit [Ping timeout: 256 seconds]
<gasche> I'm preparing a small change to the documentation of ocamldoc
<gasche> I think that's the kind of areas where people could easily contribute if they wanted to
<Anarchos> gasche just replace hash_variant by caml_hash_variant in the section of interfacing caml with C :)
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
iZsh has quit [Quit: Coyote finally caught me]
<rgrinberg> gasche: what was the reason for batteries getting rid of sexplib?
<gasche> what?
<gasche> rgrinberg: did batteries ever have a sexplib implementation?
<gasche> Anarchos: have you considered sending a patch for this?
<gasche> (or reporting a bug?)
<Anarchos> gasche not really : i just realized this improvement this week
<rgrinberg> gasche: I remember batteries having sexp_of_t and t_of_sexp functions in every module
<rgrinberg> although my memory could be hazy
<gasche> (Anarchos: I am working on other things now and I'm not sure I want to pay the cost of a context switch; I am not familiar with the OCaml-C interface and that would require me to learn about the problem to understand the change you're proposing. Why don't you do it yourself?)
<gasche> [4~[4~[4~[4~
<Anarchos> gasche the only improvement i propose is consistent naming, adding the caml_ prefix.
<gasche> rgrinberg: at some point Batteries was trimmed down, because the initial list of covered modules / included code was too ambitious
<gasche> but I don't recall any particular sexp_of_t function
<gasche> oh, my git history says you're right, they were some sexp_of_t before
eni has quit [Ping timeout: 256 seconds]
<gasche> rgrinberg: I would be happy to reintegrate something like that
<gasche> in fact companion_cube has been working on his "bidir" combinators that are related
tobiasBora has quit [Quit: Konversation terminated!]
<rgrinberg> I see, I always thought the sexplib was a more elegant solution than the printers we currently have
<gasche> I think you'll want both in the long run
<gasche> rgrinberg: it would be nice if this could be made without having all modules depend on a big Sexplib dependency
<rgrinberg> gasche: that's true but it would only be a dependency for batteries itself and not for any code that depends on batteries so it doesn't seem to be so bad
<gasche> I'm not sure
Kakadu has quit []
<gasche> if Array provides a to_sexp function, it depends on the type of s-expressions (not an issue), but also will probably also be implemented using convenience functions from the Sexplib module itself
<gasche> in any case
<gasche> I think we could add sexp support following the structure of Ord/Eq in batteries
<rgrinberg> probably, it's one of the biggest advantages that core has at the moment
<gasche> rgrinberg: I'm not convinced it is sexplib that makes the difference
<gasche> but whatever, contributions are always good :)
<gasche> maybe we should try to get companion_cube in the loop
<gasche> patch submitted on the bugtracker: http://caml.inria.fr/mantis/view.php?id=6021
<Anarchos> nobody used to use caml_c_thread_register ?
ontologiae_ has joined #ocaml
<gasche> Anarchos: you should probably consider asking on the caml-list
<gasche> there are some system-savvy OCaml users there
<gasche> (if that's still the problem you were having a few weeks ago)
ollehar has quit [Ping timeout: 245 seconds]
iZsh has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
UncleVasya has quit [Ping timeout: 264 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Feuerbach has joined #ocaml
<Feuerbach> Is there something similar to undefined in Haskell, that can be used as a non-working but compilable function definition?
<Feuerbach> (I discovered that let rec foo = foo doesn't work as I expected.)
<Anarchos> Feuerbach ocaml -rectypes ?
<Feuerbach> Anarchos: doesn't help. Here's my code - maybe something else is wrong with it? http://hpaste.org/88557
<Feuerbach> The error is: This kind of expression is not allowed as right-hand side of `let rec'
Zeev has joined #ocaml
<Anarchos> Feuerbach you can't defined such values cause their compilation will never stopped.
<Feuerbach> Anarchos: well, I don't insist on this particular definition - how do I make a compiler happy with the least amount of code here?
<Anarchos> Feuerbach for example yoçu can compile this one : let rec a() = a()
<Anarchos> but its execution runs into an infinite loop
<Feuerbach> that's fine - I want only to play with the type checker
wmeyer``` has quit [Ping timeout: 256 seconds]
<Feuerbach> I found on the internet that there is a standard Not_Found exception that I can throw to avoid implementing a function. But it's not in scope ("Unbound constructor Not_Found"). How do I import it?
<Anarchos> Feuerbach "Not_found"
<Anarchos> Feuerbach you can also use a reference on a dummy fonction, or just declare it abstract in your module
<Feuerbach> Anarchos: d'oh! Now it works, thanks
<Feuerbach> and what do you mean by "a reference on a dummy function"?
<Anarchos> Feuerbach let a = ref (fun () -> () )
<Feuerbach> but that wouldn't be polymorphic, would it? The compiler says it has type "(unit -> unit) ref"
ollehar has joined #ocaml
malc__ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
mattrepl has quit [Quit: mattrepl]
Zeev has quit [Disconnected by services]
Zeev has joined #ocaml
Nahra has quit [Quit: leaving]
ontologiae_ has quit [Ping timeout: 245 seconds]
<gasche> Feuerbach: assert false
eni has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
<Feuerbach> thanks gasche
Anarchos has joined #ocaml
<gasche> I was wondering what your pseudonym reminded me
<gasche> turns out it's not Feuerbach the philosopher (Ludwig) that I was thinking of, but the classic painter (Anselm)
<Feuerbach> :) in fact, it was inspired by the mathematician (Karl)
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
Kakadu has joined #ocaml
speredenn has joined #ocaml
Normann has quit []
yacks has joined #ocaml
Feuerbach has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
Snark has quit [Quit: leaving]
thelema_ has quit [Read error: No route to host]
Nahra has joined #ocaml
Nahra has quit [Client Quit]
thelema has joined #ocaml
Nahra has joined #ocaml
Nahra has quit [Changing host]
Nahra has joined #ocaml
Tobu has quit [Ping timeout: 256 seconds]
malc__ has quit [Quit: leaving]
Drup has joined #ocaml
ttamttam has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
quelu has joined #ocaml
quelu_ has joined #ocaml
quelu has quit [Quit: leaving]
quelu_ is now known as quelu
tane has joined #ocaml
tane has quit [Remote host closed the connection]
tane has joined #ocaml
walter|r has quit [Quit: This computer has gone to sleep]
Neros has joined #ocaml
Arsenik has quit [Remote host closed the connection]
Arsenik has joined #ocaml
Nahra_ has joined #ocaml
Nahra_ has quit [Client Quit]
ggole has quit []
Nahra_ has joined #ocaml
Nahra_ has quit [Client Quit]
Arsenik has quit [Remote host closed the connection]
rzm has joined #ocaml
daydreamt has joined #ocaml
osnr1 has joined #ocaml
Kakadu has quit []
osnr has quit [Ping timeout: 252 seconds]
tane has quit [Quit: Verlassend]
tane has joined #ocaml
scottj has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr1 has quit [Ping timeout: 252 seconds]
jbrown has quit [Ping timeout: 246 seconds]
Tobu has joined #ocaml
Nahra_ has joined #ocaml
Nahra_ has quit [Client Quit]
speredenn has quit [Quit: Leaving]
astertronistic has quit [Remote host closed the connection]
q66 has quit [Remote host closed the connection]