gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
sebz has joined #ocaml
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
letrec_ has joined #ocaml
letrec has quit [Read error: Connection reset by peer]
letrec_ has quit [Remote host closed the connection]
Tobu has quit [Ping timeout: 252 seconds]
philtor has joined #ocaml
Drup has quit [Quit: Leaving.]
Tobu has joined #ocaml
everyonemines has joined #ocaml
everyonemines has left #ocaml []
everyonemines has joined #ocaml
iago has quit [Quit: Leaving]
philtor has quit [Ping timeout: 248 seconds]
philtor has joined #ocaml
letrec has joined #ocaml
Tobu has quit [Ping timeout: 252 seconds]
Tobu has joined #ocaml
philtor has quit [Ping timeout: 244 seconds]
<tautologico> anyone who uses caml-mode (instead of tuareg-mode) in emacs?
everyonemines has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
malouin has quit [Ping timeout: 252 seconds]
malouin has joined #ocaml
sebz has joined #ocaml
Tobu has quit [Ping timeout: 252 seconds]
Tobu has joined #ocaml
ski has joined #ocaml
ak0s has joined #ocaml
philtor has joined #ocaml
ak0s has quit [Quit: Leaving]
sebz has quit [Quit: Computer has gone to sleep.]
philtor has quit [Ping timeout: 252 seconds]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz_ has joined #ocaml
sebz_ has quit [Client Quit]
Snark has joined #ocaml
pangoafk is now known as pango
letrec has quit [Ping timeout: 244 seconds]
ikaros has joined #ocaml
Cyanure has joined #ocaml
mfp has quit [Ping timeout: 248 seconds]
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 245 seconds]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
silver has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
antegallya has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
Cyanure has quit [Remote host closed the connection]
pilki has joined #ocaml
ikaros has joined #ocaml
Drup has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
Tobu has quit [Ping timeout: 248 seconds]
pilki has quit [Quit: This computer has gone to sleep]
oriba has joined #ocaml
raichoo has joined #ocaml
ttamttam has joined #ocaml
pilki has joined #ocaml
pilki has quit [Client Quit]
pilki has joined #ocaml
pilki has quit [Quit: This computer has gone to sleep]
Tobu has joined #ocaml
iago has joined #ocaml
pilki has joined #ocaml
ttamttam has left #ocaml []
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
silver has quit [Remote host closed the connection]
Drakken has joined #ocaml
avsm has joined #ocaml
letrec has joined #ocaml
letrec has quit [Ping timeout: 252 seconds]
<flux> is there clock_gettime available elsewhere than in Jane Street Core?
Tobu has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
<thelema> flux: you need a more accurate clock than Unix.gettimeofday()?
Julien_T has joined #ocaml
<thelema> or do you need monotonic time?
<flux> monotonic
brendan has quit [Ping timeout: 245 seconds]
<thelema> ah. Then it's core for you, or take just their binding.
<flux> maybe I'll just make-do with Unix.gettimeofday and assume clock never varies :)
<thelema> that'll do you for 99% of uses.
<thelema> even my benchmark suite just does that.
<flux> well, that's for benchmarking
<thelema> That said, it has pretty good anomoly detection, so...
<flux> this is for a daemon with timeouts
<flux> and timeouts are nice to declare as now + n seconds
<thelema> what's the worst that'll happen - a timeout takes an hour longer than expected?
<flux> could be that the system clock has been a year off in the first place..
<flux> but in practice what you suggested is the 'normal' worst case
<flux> once a year
<flux> actually, not, because at least I'm using UTC time :)
<thelema> ok, so not really that much a problem, except for people changing their system clock
<flux> but in ocaml we like things robust :)
<Drakken> about this monad blog post: https://ocaml.janestreet.com/?q=node/23
<Drakken> Why does the example need all those nested functions?
<flux> drakken, when dealing with monads, nested functions get used a lot
<flux> drakken, it could be thought of as a sequence of callbacks
<Drakken> why can't you just define a maybe_add function and feed partial applications of that to bind?
<Drakken> let (>>?=) opt f = match opt with None -> None | Some x -> f x
<Drakken> let (+?) opt x = match opt with None -> None | Some y -> Some (x + y)
<Drakken> let optsum3 opt1 opt2 opt3 = opt1 >>?= ((+?) opt2) >>?= ((+?) opt3)
<flux> drakken, but that is just an example. to handle the general case, you would need tons and tons of such helpers.
<tomprince> You can.
<Drakken> flux how is the blog example more general?
<flux> for example I have this in the code I'm currently writing:
<flux> MC.list_switches mc >>= fun switches ->
<flux> Lwt_util.map Switch.info switches >>= fun info ->
<flux> return ...
<flux> how would your general functions help there?
<flux> (or actually, special)
<flux> and if they indeed do help there, do they make the code more or less readable?
<flux> I would welcome the syntax enhancement proposed on the list, let.M a = b in .. -> M.bind b (fun a -> ..)
<thelema> flux: what about pa_monad?
<flux> well, that's very nice as well
<flux> but for some reason tuareg doesn't seem to find proper error locations when I'm using syntax extensions :)
<flux> I've used pa_monad earlier
<flux> ..but I guess I could just use it, as I already use PGOCaml for one of my modules..
ikaros has quit [Quit: Ex-Chat]
Crumbz has joined #ocaml
<Crumbz> is there any way to get ocamls to produce pic?
<Crumbz> is there any way to get ocamlc* to produce pic?
<thelema> Crumbz: camlc produces bytecode, you mean camlopt
<thelema> err, ocamlopt
<Crumbz> yes
<Crumbz> ok
<Crumbz> sorry
<Crumbz> i know nothign about ocaml lol
<thelema> -fPIC
<Crumbz> i just have one application compiled in it
<thelema> only works on amd64 architecture
<Crumbz> ahh.. shit..
<thelema> and is the default
<Crumbz> why not 32bit?
<Crumbz> well that's my plan buggered. thanks. :)
<thelema> don't know.
<Drakken> flux you're supposed to use monads with monad functions. If your example is a list monad, then info should return a list.
<flux> drakken, it uses the Lwt.t monad
<flux> well, semimonad I suppose..
<tautologico> so, anyone here uses caml-mode instead of tuareg-mode?
<NaCl> I don't
<tautologico> just wondering if people use funcions like caml-help, caml-complete and caml-types-show-type
<tautologico> features that tuareg doesn't have
<Drakken> flux bind still takes a function that returns a monad. like this:
<Drakken> let (>>--=) = Lwt.bind;; switches >>--= (Lwt.return |- Lwt_util.map Switch.info)
<thelema> tautologico: tuareg has a show-type
<thelema> tautologico: and I just use the M-/ for completion
<tautologico> hm, I can't see it in the code... tuareg does use the show-type (and caml-help and caml-complete) from caml-mode if present
<thelema> tautologico: then I guess I'm using tuareg + caml-mode
<tautologico> thelema:
<thelema> although afaik, I don't use -help or -complete
<tautologico> thelema: does it work well?
<tautologico> it seems to be based on -annot output from the compiler
<thelema> tautologico: well enough for me.
<thelema> yes, the type completion is based on -annot
<thelema> and sometimes, I have to remember to turn it on, but as I use ocamlbuild for just about everything, this is just putting "true: annot" in the _tags file
<tautologico> cool
<tautologico> I was testing ocamlbrew yesterday, worked very well with odb... the only step missing to get a working configuration for me would be the emacs setup
<tautologico> fortunately there's a tuareg-mode package in the marmalade repo for emacs
<thelema> tautologico: it's been a *long* time since I messed with tuareg, I don't even remember how I got it set up right
<tautologico> with a recent emacs, if you have the marmalade repo configured, you can just do M-x package-install and then type tuareg
<tautologico> this doesn't install caml-mode though
<thelema> ha, nice.
<thelema> bah.
<thelema> if you use ocamlbrew, you have a copy of the ocaml source tree, just grab it out of the emacs/ dir
<Drakken> flux oops. I mean (Lwt_util.map Switch.info |- Lwt.return)
<tautologico> thelema: yes, I know... it's just the convenience
<flux> drakken, where would the part I had '...' go in your code?
<tautologico> I was testing ocamlbrew in a virtual machine, to take a look at utop without installing a lot of stuff in my devel machines
<thelema> tautologico: linux?
<tautologico> thelema: yes, xubuntu 11.10
<thelema> tautologico: ok, be warned that the Graphics module is probably not compiled; ocaml doesn't detect x11 on newer linuxes.
<tautologico> I believe I can use an ocamlbrew installation for day-to-day development instead of GODI, most of the time
<thelema> tautologico: good to have more confirmation of things working
<tautologico> this is great to get people using ocaml with additional libraries
Tobu has quit [Ping timeout: 272 seconds]
<thelema> tautologico: that's the hope - by making it easy to install libraries, the ocaml community will be able reuse code more efficiently
Julien_T has quit [Ping timeout: 252 seconds]
<thelema> tautologico: sadly, the other part of the equation (using the installed code) is still a bit ugly, although ocamlbuild and -use-findlib helps a bunch
<thelema> this may help with the code-rot problem that ocaml has - a ton of great ocaml code has been written, but it sits unused, rotting.
<thelema> (well, except by its author)
<tautologico> yes
<thelema> :(, bisect takes a long time to run on batteries.
<tautologico> testing coverage?
<thelema> yup
<tautologico> btw, is there a way to specify -use-findlib in _tags instead of always specifying it in the command line?
<flux> drakken, here's another example: http://ocaml.nopaste.dk/p4619 - would that require another kind of combinator?
<thelema> tautologico: not that I know.
raichoo has quit [Quit: leaving]
<thelema> tautologico: I'm in the habit of using a makefile to drive ocamlbuild anyway, so...
<Drakken> flux maybe it's just a bad example in the blog. The real issue isn't bind, it's "do" syntax.
<thelema> tautologico: the equivalent of -use-findlib can be specified in your myocamlbuild.ml, which is what I still do.
<tautologico> thelema: I see
<flux> drakken, what "do" syntax?
<Drakken> flux much better example.
<flux> drakken, you mean the one like 'perform' in the blog post?
<Drakken> flux perform is the OCaml version of "do" in Haskell.
<flux> yes, well ocaml doesn't really have one, unless you use pa_monad (or pa_lwt)
<Drakken> Okay, that's fine. I think that's what we're really talking about.
<flux> so the blog post was primarily about that it's possible to write tolerable code without using a syntax extension
<flux> for some values of tolerable :)
ikaros has joined #ocaml
<Drakken> flux right. this looks like something out of a million Haskell monad tutorials :)
<flux> hmm, so I'm trying to use first class modules for the first time
<flux> I was thinking I could somehow package a module into a value (works), and then package a value of some type of that module into a value as well (failing)
<flux> in principle, I imagine this is what I need if I want to do OOPy things with modules?
<flux> so I have module type T = sig type t val foo : unit -> t end, and then I can have type t = { m : (module T) }
<flux> but how do I package the T.foo's return value into that record as well?
<flux> ..the First-class modules and composable signatures in Objective Caml 3.12 whitepaper uses objects to do that..
<flux> so perhaps it's a fool errand to emulate objects with first class modules, I need objects to do that :)
<flux> (+'s)
<thelema> flux: yes, objects are the best objects
sebz has joined #ocaml
Cyanure has joined #ocaml
philtor has joined #ocaml
blinky-- has joined #ocaml
raichoo has joined #ocaml
philtor has quit [Ping timeout: 252 seconds]
antegallya has quit [Ping timeout: 245 seconds]
Tobu has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
brendan has joined #ocaml
Snark has quit [Quit: Quitte]
dsheets has quit [Ping timeout: 248 seconds]
dsheets has joined #ocaml
<thelema> Help batteries get to 100% code coverage; write a test.
<flux> what, no at least 100% decision coverage?
<flux> next up, 100% path coverage
antegallya has joined #ocaml
<thelema> does bisect do path coverage? wow, that'd be a lot of bookkeeping.
dsheets has quit [Ping timeout: 244 seconds]
<thelema> flux: we'll be satisfied for a while with reaching 100% on the current coverage metric
<flux> well, it could be sparse.. but as at worst you need to still keep track of 50% of the paths, it'd still consume all the memory :)
dsheets has joined #ocaml
blinky-- has quit [Quit: Quitte]
sebz has joined #ocaml
Crumbz has quit [Quit: Leaving]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
pilki has quit [Quit: This computer has gone to sleep]
<tautologico> where's libosvm from?
ftrvxmtrx has quit [Ping timeout: 252 seconds]
ftrvxmtrx has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
silver has joined #ocaml
arpd is now known as ath
sebz has joined #ocaml
lamawithonel has joined #ocaml
avsm has quit [Quit: Leaving.]
silver has quit [Remote host closed the connection]
lamawithonel_ has joined #ocaml
lamawithonel has quit [Ping timeout: 240 seconds]
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
Cyanure has quit [Ping timeout: 252 seconds]
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
Tobu has quit [Remote host closed the connection]
philtor has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
Tobu has joined #ocaml
Drup has quit [Quit: Leaving.]
philtor has quit [Ping timeout: 255 seconds]
lamawithonel__ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
raichoo has quit [Quit: leaving]
lamawithonel__ has quit [Ping timeout: 240 seconds]
lamawithonel__ has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
lamawithonel__ has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
lamawithonel__ has joined #ocaml
lamawithonel__ has quit [Ping timeout: 240 seconds]
lamawithonel__ has joined #ocaml
sebz has joined #ocaml
mfp has joined #ocaml
lamawithonel__ has quit [Ping timeout: 240 seconds]
<dsheets> Do I have to use ocamlbuildflags to tell ocamlbuild to use -use-ocamlfind?
<dsheets> If so, how do I set ocamlbuildflags? OASIS' setup.data is regenerated from configure
milosn has quit [Ping timeout: 252 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
companion_cube has quit [Read error: Operation timed out]
companion_cube has joined #ocaml
iago has quit [Quit: Leaving]
lamawithonel__ has joined #ocaml
philtor has joined #ocaml
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 260 seconds]
sebz has joined #ocaml
oriba_ has quit [Quit: oriba_]
sebz has quit [Client Quit]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz_ is now known as ulfdoz
sebz has joined #ocaml