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
lamawithonel has quit [Read error: Connection reset by peer]
arubin has joined #ocaml
malc_ has quit [Quit: leaving]
lamawithonel has joined #ocaml
sepp2k has joined #ocaml
lopex has quit []
groovy2shoes has quit [Read error: Connection reset by peer]
groovy2shoes has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
joewilliams_away is now known as joewilliams
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
sepp2k has quit [Quit: Leaving.]
groovy2shoes has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
NaCl has joined #ocaml
groovy2shoes has quit [Read error: Connection reset by peer]
agarwal1975 has quit [Quit: agarwal1975]
groovy2shoes has joined #ocaml
lamawithonel has quit [Ping timeout: 255 seconds]
groovy2shoes has quit [Client Quit]
lamawithonel has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
arubin has quit [Quit: arubin]
wtetzner has joined #ocaml
wtetzner has quit [Quit: Leaving]
othiym23 has quit [Quit: Leaving...]
joewilliams is now known as joewilliams_away
othiym23 has joined #ocaml
StepanKuzmin has joined #ocaml
krktz has quit [Ping timeout: 240 seconds]
krktz has joined #ocaml
othiym23 has quit [Quit: Leaving...]
zzing has joined #ocaml
zzing has left #ocaml []
drunK has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
dnolen has quit [Quit: dnolen]
bobry1 has quit [Ping timeout: 258 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
bobry1 has joined #ocaml
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
othiym23 has joined #ocaml
bobry1 has quit [Quit: Leaving.]
bobry1 has joined #ocaml
bobry1 has quit [Ping timeout: 258 seconds]
ankit9 has quit [Quit: Leaving]
thomasga has joined #ocaml
larhat has joined #ocaml
othiym23 has quit [Ping timeout: 252 seconds]
bobry has quit [Quit: Leaving.]
bobry has joined #ocaml
ankit9 has joined #ocaml
Cyanure has joined #ocaml
munga has joined #ocaml
eikke has joined #ocaml
larhat has quit [Quit: Leaving.]
Julien_T has quit [Ping timeout: 255 seconds]
larhat has joined #ocaml
edwin has joined #ocaml
Poet_ has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 240 seconds]
alfa_y_omega has quit [Ping timeout: 250 seconds]
ikaros has joined #ocaml
alfa_y_omega has joined #ocaml
Snark has joined #ocaml
alfa_y_omega has quit [Ping timeout: 240 seconds]
alfa_y_omega has joined #ocaml
Amorphous has quit [Ping timeout: 255 seconds]
ftrvxmtrx has joined #ocaml
Amorphous has joined #ocaml
lopex has joined #ocaml
avsm has joined #ocaml
malc_ has joined #ocaml
alfa_y_omega has quit [Ping timeout: 252 seconds]
alfa_y_omega has joined #ocaml
Anarchos has joined #ocaml
bobry1 has joined #ocaml
bobry has quit [Read error: Connection reset by peer]
mattam has joined #ocaml
bobry1 has quit [Ping timeout: 240 seconds]
bobry has joined #ocaml
malc_ has quit [Quit: leaving]
munga has quit [Ping timeout: 260 seconds]
_andre has joined #ocaml
lamawithonel_ has joined #ocaml
lamawithonel has quit [Ping timeout: 255 seconds]
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
Ptival has joined #ocaml
* rwmjones wonders why you can't hide public methods in subclasses (in OCaml)
ztfw has quit [Read error: Connection reset by peer]
munga has joined #ocaml
alfa_y_omega is now known as betta_y_omega
<kerneis> rwmjones: what do you mean by "hidding something public"?
<kerneis> oh, you mean that a subclass would "remove" a method from a superclass?
<Ptival> I think
<kerneis> "Be aware that subtyping and inheritance are not related. Inheritance is a syntactic relation between classes while subtyping is a semantic relation between types."
<kerneis> but indeed, it would be nice to be able to use coercion in a class definition
munga has quit [Ping timeout: 264 seconds]
munga has joined #ocaml
Julien_Tz has joined #ocaml
Julien_Tz is now known as Julien_T
bobry has quit [Quit: Leaving.]
bobry has joined #ocaml
munga has quit [Ping timeout: 260 seconds]
munga has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
iratsu has quit [Ping timeout: 255 seconds]
dnolen_ has joined #ocaml
betta_y_omega has quit [Ping timeout: 252 seconds]
spearalot has joined #ocaml
alfa_y_omega has joined #ocaml
iratsu has joined #ocaml
spearalot has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
joewilliams_away is now known as joewilliams
ftrvxmtrx has quit [Read error: Connection reset by peer]
Snark_ has joined #ocaml
Snark_ has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
ankit9 has quit [Quit: Leaving]
dnolen_ has quit [Read error: Connection reset by peer]
dnolen_ has joined #ocaml
yezariaely has joined #ocaml
yezariaely has left #ocaml []
dnolen_ has quit [Quit: dnolen_]
cthuluh has quit [Ping timeout: 264 seconds]
mattam has quit [Read error: Connection reset by peer]
mattam_ has joined #ocaml
Ptival has quit [Quit: Leaving]
Cyanure has quit [Ping timeout: 240 seconds]
joewilliams is now known as joewilliams_away
cthuluh has joined #ocaml
larhat has quit [Quit: Leaving.]
joewilliams_away is now known as joewilliams
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
junsuijin has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 260 seconds]
othiym23 has joined #ocaml
othiym23 has quit [Client Quit]
avsm1 has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 260 seconds]
bobry has quit [Ping timeout: 255 seconds]
ankit9 has joined #ocaml
Ptival has joined #ocaml
Ptival has quit [Client Quit]
Ptival has joined #ocaml
Ptival has quit [Client Quit]
Ptival has joined #ocaml
iratsu has quit [Ping timeout: 255 seconds]
iratsu has joined #ocaml
bobry has joined #ocaml
othiym23 has joined #ocaml
thomasga has quit [Quit: Leaving.]
munga has quit [Quit: Ex-Chat]
chrissbx has quit [Ping timeout: 264 seconds]
ankit9 has quit [Quit: Leaving]
ulfdoz has joined #ocaml
StepanKuzmin has quit [Read error: Connection reset by peer]
StepanKuzmin has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
Poet_ has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
joewilliams is now known as joewilliams_away
ygrek has joined #ocaml
eikke has joined #ocaml
othiym23 has quit [Quit: Linkinus - http://linkinus.com]
<_habnabit> wooooo, finally convinced my boss to let me use batteries.
<_habnabit> now to go through and remove the various shims I added to cope.
<flux> finally you can use laptop at in a wireless fashion?
<thelema> flux: batteries included
<adrien> flux: =P
ranma42 has joined #ocaml
<ranma42> is ocamldebug the best debugger for ocaml applications? I would love something able to do tab-completion...
eikke has quit [Ping timeout: 240 seconds]
edwin has quit [Remote host closed the connection]
lopex has quit [Ping timeout: 252 seconds]
joewilliams_away is now known as joewilliams
_andre has quit [Quit: *poof*]
iratsu has quit [Remote host closed the connection]
<thelema> ranma42: doesn't exist, afaik
ftrvxmtrx has joined #ocaml
bobry has quit [Ping timeout: 258 seconds]
Snark has quit [Quit: Quitte]
ftrvxmtrx has quit [Quit: Leaving]
Snark has joined #ocaml
Snark has quit [Remote host closed the connection]
avsm has joined #ocaml
Anarchos has joined #ocaml
Cyanure has joined #ocaml
avsm has quit [Quit: Leaving.]
alfa_y_omega has quit [Ping timeout: 252 seconds]
alfa_y_omega has joined #ocaml
eikke has joined #ocaml
othiym23 has joined #ocaml
bobry has joined #ocaml
ulfdoz has quit [Ping timeout: 250 seconds]
chrissbx has joined #ocaml
Smerdyakov has joined #ocaml
bobry has quit [Ping timeout: 252 seconds]
<_habnabit> if I've done `open Batteries`, is there a way to access the original ocaml modules at all?
<thelema> yes, they're available under Legacy.Foo
<_habnabit> aha.
<_habnabit> and is there a function that's the same as (fun f g a -> f (g a)) that's not -| ? it kind of looks bad.
<thelema> -| looks bad?
<_habnabit> it does to me!
<_habnabit> not an objective thing. I was doing `let compose ...` in my code before.
<thelema> I find I use |- and |> more often
<_habnabit> ah.
<thelema> f1 x |> f2 or f1 |- f2
<thelema> depending on if I have x or if I need (fun x -> ...)
Cyanure has quit [Remote host closed the connection]
<_habnabit> here's some code in question; just curious how you'd write this then
<_habnabit> (compose
<_habnabit> (function '-' | '?' -> false | _ -> true)
<_habnabit> (String.get seq)))))
<_habnabit> (context: it's the parameter to a call to Array.init
<_habnabit> )
<thelema> you want to get each character of a string and ...
<thelema> ok, so you're mapping from one string to an array of booleans?
<_habnabit> yes.
<thelema> String.enum seq |> map (function '-' | .... -> true) |> Array.of_enum
<_habnabit> haha, well, that makes more sense if I'm going to battery-ize the code anyway.
<thelema> or Array.init (String.get seq |- (function ...)
<thelema> )
ygrek has quit [Ping timeout: 250 seconds]
<_habnabit> hmmm, it's a shame we're still not using ocaml 3.12, or I could use local opens. :C
<thelema> Array.init (fun i -> match seq.[i] with '-' | '?' -> false | _ -> true)
<Smerdyakov> You don't have an array map function in batteries?
<thelema> Smerdyakov: input is a string, not an array
<_habnabit> yeah, I've been staying sane writing ocaml at this job by trying to minimize my usage of fun
<_habnabit> (to keep my brain alive)
<thelema> (and yes, of course there's an Array.map function in batteries)
<Smerdyakov> OK. In SML, strings are vectors (immutable arrays), so it's natural to use standard mapping functions on them.
<thelema> Smerdyakov: ocaml strings have a different internal representation (one byte per entry) vs. the one word per entry of arrays, thus two sets of functions to handle them.
<Smerdyakov> Ah. SML has a module signature for vectors, which may be implemented in different ways, including using whatever packing scheme you like.
<thelema> this said, they broke this when they special-cased float vectors, which are always 64-bit per entry, so the right solution is to add the necessary magic to have arrays with 3 layouts instead of 2 layouts
<thelema> s/float vectors/float arrays/
<Smerdyakov> I don't know. I like SML's solution of hiding such details behind module abstraction.
<Smerdyakov> That does force you to reference special module names explicitly when using array operations.
<Smerdyakov> But the compiler is treating the few built-in array/vector modules specially, for optimization purposes.
eikke has quit [Ping timeout: 260 seconds]
<thelema> can the SML module abstraction compile efficiently in OCaml with its non-free functors?
<Smerdyakov> I don't know. I don't think functors are involved anywhere in the standard treatment of arrays and vectors in SML, though.
* Smerdyakov goes AWAY.
<hcarty> thelema: Is it possible to install Camomile with odb, placing the data files somewhere other than /usr?
<_habnabit> am I missing some obvious alternate way of doing it, or is there no map2 on enums?
<hcarty> thelema: Never mind - we had this conversation before. The option doesn't exist yet to install packages with more than an OCaml library outside of ~/.odb without using sudo.
<hcarty> All that said - once it is setup, utop is quite nice! Probably even a bit better than lwt-toplevel.
<thelema> _habnabit: correct, no map2 on enums - generally, map2 doesn't want to produce an enum, but if you really want, use Enum.combine to make one enum of pairs
<thelema> _habnabit: or contribute Enum.map2
<thelema> hcarty: I just saw the posting - maybe we can get it installable via odb?
<hcarty> I was going to try and upload the packages
<hcarty> There are three required, aside from Camomile
<hcarty> And Lwt... and React
<hcarty> Maybe not yet
<hcarty> I think React is the only major missing piece from odb
<hcarty> Or, oasis-db technically I suppose
<hcarty> thelema: The other packages involved (zed and lambda-term and utop) already use oasis
<thelema> yay
<hcarty> React shouldn't be too hard to oasis-ify, but I don't think I'll have time for a while
<_habnabit> thelema, well, I'm basically trying to do: map2 (||) bool_arr1 bool_arr2
<_habnabit> except that this is in a fold, so it's more like fold (map2 (||))
<_habnabit> actually, it doesn't need to be a fold at all. basically all I want is: reduce (f |- map2 (||))
<_habnabit> (for some f)
<_habnabit> oh, never mind. there's Array.map2.
<_habnabit> that works.
nejimban has quit [Remote host closed the connection]
nejimban has joined #ocaml
nejimban has quit [Client Quit]
othiym69 has joined #ocaml
<_habnabit> http://paste.pound-python.org/show/10195/ <- well, here's what batteries hath wraught.
<_habnabit> I'm pretty okay with it.
<thelema> better to put in a variable name, methinks
<_habnabit> which it?
<_habnabit> er, I misparsed what you said.
<_habnabit> you mean `mask_of_enum enum = ...` ?
<thelema> or use iter and mutate your initial_mask
iratsu has joined #ocaml
<_habnabit> it's reused; I just need some initial value.
<_habnabit> I mean, mutation doesn't help here. but I'll add the parameter.
dnolen has joined #ocaml
junsuijin1 has joined #ocaml
<thelema> let m = Array.copy initial_mask in String.iteri (fun i c -> if c<>'-' && c<>'?' then m.(i) <- true); m
junsuijin has quit [Ping timeout: 240 seconds]
othiym23 has quit [Quit: Linkinus - http://linkinus.com]
othiym69 is now known as othiym23
<_habnabit> heh.
<_habnabit> but that's so boring!
eikke has joined #ocaml
othiym23 has quit [Quit: leaving]
<thelema> _habnabit: it gets the job done.
othiym23 has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
eikke has quit [Ping timeout: 260 seconds]