mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
yakischloba has quit [Quit: Leaving.]
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 258 seconds]
yakischloba has joined #ocaml
slash_ has quit [Quit: Lost terminal]
tmaeda is now known as tmaedaZ
boscop has quit [Quit: Gxis revido!]
Mr_Awesome has quit [Ping timeout: 265 seconds]
dark has quit [Quit: Leaving]
delamarche has joined #ocaml
delamarche has quit [Client Quit]
avsm has joined #ocaml
avsm1 has quit [Ping timeout: 240 seconds]
_unK has quit [Remote host closed the connection]
caligula__ has quit [Ping timeout: 245 seconds]
dark has joined #ocaml
caligula has joined #ocaml
Submarine has quit [Ping timeout: 240 seconds]
mutewit has joined #ocaml
caligula has quit [Read error: Connection reset by peer]
caligula has joined #ocaml
npouillard has quit [K-Lined]
maskd has quit [Ping timeout: 260 seconds]
maskd has joined #ocaml
tmaedaZ is now known as tmaeda
Drk-Sd has quit [Quit: {'EXIT', Drk-Sd, "bye"}]
enthymene has quit [Quit: rcirc on GNU Emacs 23.1.1]
maskd has quit [Quit: leaving]
sshc_ has joined #ocaml
sshc has quit [Quit: Reconnecting]
WuJiang` has quit [Write error: Broken pipe]
WuJiang` has joined #ocaml
sshc_ is now known as sshc
enthymene has joined #ocaml
<orbitz> where is the documetantion on the camlp4 stream stuff?
jeddhaberstro has quit [Quit: jeddhaberstro]
tmaeda has quit [Ping timeout: 245 seconds]
mutewit has quit [Ping timeout: 264 seconds]
mutewit has joined #ocaml
tmaeda has joined #ocaml
mutewit has quit [Ping timeout: 258 seconds]
mutewit has joined #ocaml
mutewit has quit [Ping timeout: 264 seconds]
mutewit has joined #ocaml
threeve has quit [Quit: threeve]
joewilliams is now known as joewilliams_away
enthymene is now known as enth|walk
thrasibule has quit [Ping timeout: 248 seconds]
enth|walk is now known as enthymene
mutewit has quit [Quit: leaving]
jonafan_ has joined #ocaml
<orbitz> thanks
jonafan has quit [Ping timeout: 264 seconds]
Alpounet has quit [Ping timeout: 268 seconds]
gkelly has joined #ocaml
<gkelly> type a = One | Two;; type b = One | Three;; let c : a = One;;
<gkelly> How come I can't do that?
<flux> ocaml doesn't have ovearloading. One cannot refer to both a's constructor and b's constructor.
<flux> overloading even
<flux> workarounds: module A = struct type t = One | Two end module B = struct type t = One | Three end let c = A.One;;
<flux> actually a fellow has written a patch that allows the kind of behaviro you're suggesting but I don't think it's going to the main stream ocaml any soon..
<flux> another workaround is to use polymorphic variants: type a = [ `One | `Two ] type b = [ `One | `Three ] let c = `One
<flux> (but it has its drawbacks error-message-wise, I suggest reading the manual about those)
<gkelly> flux: Ah, I see! Thank you very much for clearing that up for me.
Snark has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
f[x] has joined #ocaml
ygrek has joined #ocaml
avsm1 has quit [Quit: Leaving.]
ikaros has joined #ocaml
ttamttam has joined #ocaml
maattd|away is now known as maattd
Submarine has joined #ocaml
Yoric has quit [Quit: Yoric]
enthymene has quit [Quit: rcirc on GNU Emacs 23.1.1]
maattd has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
npouillard has joined #ocaml
* Camarade_Tux starts writing an ocaml tar implementation
<Camarade_Tux> I'm sure it won't take long :P
<mrvn> From scratch or using libtar?
<Camarade_Tux> from scratch: I wanted to use tar on windows yesterday and couldn't find a working binary
<mrvn> gkelly: type a = One | Two;; let make_a_one () = One let make_a_two () = Two type b = One | Three let c = make_a_one ()
pimmhogeling has joined #ocaml
<flux> well, yes, but dealing with such values is a painful :)
<mrvn> gkelly: module A = struct type t = One | Two end module B = struct type t = One | Three end let c = A.One;;
<Camarade_Tux> msys tar works only in msys, mingw.org bsdtar creates corrupt archives, my own-compiled bsdtar has the same problem, gnu tar is a bitch to compile on windows...
<mrvn> gkelly: pick your poison
<mrvn> third option: type a = A_One | A_Two ...
<Camarade_Tux> I find that for simple cases, polymorphic values don't make error message worse and may actually improve them
<Camarade_Tux> for bigger codes however...
<mrvn> Or allows nice subtypes: http://paste.debian.net/61932/
<flux> mostly polymorphic variants don't cause difficult-to-understand errors if you annotate the types of your functions using them
<Camarade_Tux> lablgtk has been a bit annoying in this regard and I'm often lost in its API (but I imagine it could be worse)
<Camarade_Tux> (but I don't care, I'm writing an FRP layer to gtk next \o/ )
<mrvn> to make a bad thing worse?
<Camarade_Tux> yup :-)
<Camarade_Tux> I'm really after a functional interface to a graphical toolkit (actually to gtk or qt) and since there is none... well, I can at least try and see how it goes
<Camarade_Tux> I think it should be quite easy and quite fast to get a "first" version with very basic support, from then I can see if it could be worth it
avsm has joined #ocaml
<flux> any amazing examples of neat user side code for the lib-to-be?-)
<Camarade_Tux> not really, I haven't started it at all, I'll do it after I've completed my "ocaml-tar" (I don't need a full implementation of tar actually)
<Camarade_Tux> I could get something interesting by the end of the week, we'll see
<flux> but wasn't there some FRP-gtk-thingy around already or am I thinking something else?
<Camarade_Tux> the todo list starts with "ask on the mailing-list about already existing work" ;-)
<mrvn> I would like to see a GUI framework completly in ocaml. Not something put on top of something already messed up.
<Camarade_Tux> but it's a big daunting task =/
<mrvn> Start with completing Graphics.X11
<Camarade_Tux> enlightenment foundation libraries (for e17, maybe e16) looked quite nice, and I've seen them on win32, with a bunch of different rendering engines (gdi, some other win* api, opengl...) and perf was good and looked good too
<mrvn> Never used them
<Camarade_Tux> I haven't either, two concerns however: they're young and not complete yet (although almost) and it looks like they're suffering from some NIH syndrome (or maybe they want to provide the most consistent interfaces possible)
Submarine has quit [Read error: Operation timed out]
Alpounet has joined #ocaml
gim has quit [Remote host closed the connection]
<Camarade_Tux> actually, I may not write an ocaml tar implementation: I just fixed bsdtar: it wasn't opening files as binary so it defaulted to text with the corresponding end-of-line conversions on windows
* Camarade_Tux awards the most stupid bug of the year 2009 to bsdtar
* olegfink once had to implement tar -x in bash
<Camarade_Tux> at least it should be quite portable across different architectures :P
maskd has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
mal`` has quit [Quit: Coyote finally caught me]
mal`` has joined #ocaml
ztfw has joined #ocaml
_andre has joined #ocaml
<mrvn> "Remember about Noahs Ark? The unicorns missed the boat."
maskd has quit [Ping timeout: 252 seconds]
_zack has joined #ocaml
ygrek has joined #ocaml
smimou has quit [Ping timeout: 265 seconds]
smimou has joined #ocaml
_zack has quit [Quit: Leaving.]
_zack has joined #ocaml
maskd has joined #ocaml
<mrvn> Once again i find myself wishing for "cyclic" dependencies between modules and interfaces. A.ml depends on B.mli and B.ml on A.mli. Now I have to use a HUGE let rec f1 = ... and f2 = ... and f3 = ... and f4 = ... and f5 = ... ...
<mrvn> or let b_fn = ref (fun _ -> assert false) and let _ = A.b_fn <- fn
derdon has joined #ocaml
<_andre> you could pass b_fn as an argument to A's functions
<flux> use objects and object types :)
<mrvn> _andre: That would make the interface of A ugly. But it is a possibility.
<mrvn> flux: how do objcts help?
<flux> you put the class types into one module, and everything depensd on that module
<mrvn> flux: I think they would still require me to pass the B object to A.
fraggle_ has quit [Ping timeout: 276 seconds]
<mrvn> If it were only a dependency of the types then i could move just them into a common file.
<flux> ifaces.ml: class type a = object method get_b end and b = object method get_a end a.ml: class t : Ifaces.a = object method get_b : Iface.b end b.ml: class t : Ifaces.b = object method get_a : Iface.a end
<flux> and within a class you can refer to any method via self
<mrvn> flux: But not to A.obj and B.obj
<flux> hm, true, in the cases I've passed those I already have an object passed to me
<mrvn> That would be the same a passing B.fn to functions in A
<flux> so somewhere there is code: let a = new A.t b etc
<flux> yes, but you can do it in bundles :). like with records.
<mrvn> type iface = { fn1 : unit -> unit; fn2 : bool -> string; }
<mrvn> But I think I can narrow it down to exactly one function. If I break the cycle there then everything else can be sorted.
companion_cube has quit [Ping timeout: 256 seconds]
<mrvn> Another question. I need an enumerable universal container that has no runtime or memory overhead. I now have something like type key = A of int | B of int type entry = key * Obj.t let make_a i (a : A.t) = (A i, Obj.repr a) let get_a i = ((Obj.obj (find (A i)) : A.t)
<mrvn> But that is not really type safe.
<mrvn> Ideas how to make that saver without runtime cost?
companion_cube has joined #ocaml
dark has quit [Ping timeout: 260 seconds]
Snark has quit [Quit: Ex-Chat]
boscop has joined #ocaml
threeve has joined #ocaml
EliasAmaral has joined #ocaml
ztfw has quit [Remote host closed the connection]
Drk-Sd has joined #ocaml
jonafan_ is now known as jonafan
gildor has quit [Ping timeout: 276 seconds]
companion_cube has quit [Ping timeout: 265 seconds]
diml has quit [Ping timeout: 265 seconds]
gildor has joined #ocaml
companion_cube has joined #ocaml
diml has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ulfdoz has quit [Ping timeout: 260 seconds]
seanmcl has joined #ocaml
ulfdoz has joined #ocaml
ygrek has joined #ocaml
joewilliams_away is now known as joewilliams
jcaose has joined #ocaml
ztfw has joined #ocaml
tmaeda is now known as tmaedaZ
Drk-Sd has quit [Ping timeout: 256 seconds]
Drk-Sd has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
_unK has joined #ocaml
Gooffy has joined #ocaml
_unK has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
lokydor has joined #ocaml
Gooffy has quit [Quit: Leaving.]
ttamttam has quit [Quit: Leaving.]
f[x] has quit [Ping timeout: 260 seconds]
jcaose has quit [Ping timeout: 245 seconds]
<flux> are there any digital audio signal processing libraries for ocaml?
* julm only knows a small binding for ALSA
<flux> I'm trying to a) synchronize two similar audio streams, b) find segments with beeping from stream A c) find the same (time-wise) beeps from stream B
ikaros has joined #ocaml
<thelema> Liquidsoap may help...
<Camarade_Tux> bindings ok?
<flux> indeed liquidsoap has some related libs
<flux> camarade_tux, sure
<flux> that's interesting even if it wouldn't suite my problem
<flux> atleast I can use the bandpass filter
<Camarade_Tux> there's also libsndfile, you'd have to write the algorithm but it provides a single interface to read files of different format
<Camarade_Tux> bah, but I can't think right now actually, my mind is elsewhere =/
<flux> hmm, sndfile has official ocaml bindings apparently, but they don't come with ubuntu
<Camarade_Tux> libsndfile's author is Eric de Castro Lopo
<flux> hmm, where can I find the sources for these? http://www.mega-nerd.com/libsndfile/Ocaml/
<Camarade_Tux> the hump had linked me to http://www.mega-nerd.com/tmp/
<Camarade_Tux> I love temp folders which actually stay around for decades =)
<flux> :) thanks
<flux> what I'm actually doing is that there's a finnish tv-show that runs during the day and during the evening..
<flux> the day-time shows are bleeped
<flux> obviously I must collect all the bleeped parts automatically!
<flux> could make an annoying ringtone :P
hyperboreean has joined #ocaml
ttamttam has joined #ocaml
avsm has quit [Quit: Leaving.]
yakischloba has quit [Quit: Leaving.]
yakischloba has joined #ocaml
joewilliams is now known as joewilliams_away
pimmhogeling has quit [Ping timeout: 265 seconds]
yakischloba has quit [Quit: Leaving.]
yakischloba has joined #ocaml
yakischloba has quit [Ping timeout: 245 seconds]
companion_cube has quit [Quit: oups, reboot inopiné !]
jcaose has joined #ocaml
<mrvn> derdon: happens when you do a math error with floats
<derdon> mrvn: wow, clever boy ;)
<derdon> mrvn: is not restricted to floats: http://en.wikipedia.org/wiki/NaN
<mrvn> looks like it lost it timestamps
_Jedai_ has joined #ocaml
<Camarade_Tux> 0./.0. =)
|Jedai| has quit [Ping timeout: 245 seconds]
ztfw has quit [Remote host closed the connection]
<flux> it has been that way for years
<flux> annoying :)
ikaros has quit [Quit: Leave the magic to Houdini]
Yoric has joined #ocaml
<Camarade_Tux> the URL is still ok however
<Yoric> 'evening
_unK has joined #ocaml
<flux> good evening
yakischloba has joined #ocaml
<Camarade_Tux> hi Yoric :-)
Yoric has quit [Quit: Yoric]
<julm> dude, you killed KennYoric
<Camarade_Tux> ='(
pad has joined #ocaml
matthieu has joined #ocaml
slash_ has joined #ocaml
<mrvn> "I am a purist. I crave static."
Yoric has joined #ocaml
ttamttam has quit [Quit: Leaving.]
enthymene has joined #ocaml
Yoric has quit [Quit: Yoric]
Submarine has joined #ocaml
seanmcl has quit [Quit: seanmcl]
_zack has quit [Quit: Leaving.]
Drk-Sd has quit [Quit: foo]
jcaose has quit [Ping timeout: 245 seconds]
<flux> nice, the correlation-approach seems to work, albeit it's really slow to do for the whole input..
_andre has quit [Quit: Lost terminal]
ygrek has quit [Ping timeout: 245 seconds]
lokydor has quit [Ping timeout: 245 seconds]
lokydor has joined #ocaml
ztfw has joined #ocaml
joewilliams_away is now known as joewilliams
solistic has joined #ocaml
fraggle_ has joined #ocaml
demitar has quit [Quit: ChatSpace]
demitar has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 276 seconds]
yakischloba has quit [Quit: Leaving.]
pimmhogeling has joined #ocaml
fraggle_ has joined #ocaml
pad has quit [Remote host closed the connection]
solistic has quit [Quit: leaving]
fraggle_ has quit [Ping timeout: 276 seconds]
DaveS has joined #ocaml
<DaveS> What is meant by "continuous time-varying values"?
<DaveS> Isn't everything a computer does discrete?
<Camarade_Tux> DaveS: for FRP?
<DaveS> yeah
slash_ has quit [Quit: Lost terminal]
<Camarade_Tux> have you read http://caml.inria.fr/pub/ml-archives/caml-list/2009/12/5187bd254f179352c4d2d549f4516a26.en.html ? I found it a pretty nice intro to FRP
<Camarade_Tux> (still a complete beginner however)
<Camarade_Tux> as far as I understand it (that may be completely wrong), a signal/behaviour (what is called continuous) are values for which there is a value at any point in time (it cuold be the space left on a drive)
<DaveS> what do they mean by 'time'?
<Camarade_Tux> on the other hand, an event does not always have a meaningful value: for instance a keystroke
<Camarade_Tux> of course you could express events as signals with a value of None | Some 'a instead of an event of type 'a
<Camarade_Tux> as for time, can't say for sure (and I think there are different "definitions")
<DaveS> I'm guessing time refers to the current position in the event queue perhaps?
<DaveS> ok it's arbitrary
<Camarade_Tux> I don't think there's a "current" position, but you're already reaching the limits of my knowledge: I haven't started with FRP yet (should start later this week)
<DaveS> "You define what time means to you (e.g. it
<DaveS> could be the
<DaveS> sucession of server request, the sucession of mouse inputs, etc.)."
DaveS has quit [Quit: leaving]
dmarkey has joined #ocaml
lokydor has quit [Ping timeout: 245 seconds]
lokydor has joined #ocaml
ztfw` has joined #ocaml
Submarine has quit [Ping timeout: 276 seconds]
ztfw has quit [Ping timeout: 245 seconds]
pimmhogeling has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
lokydor has quit [Ping timeout: 245 seconds]
threeve has quit [Quit: threeve]
avsm has quit [Quit: Leaving.]
yakischloba has joined #ocaml
Pepe_ has quit [Quit: leaving]
Ppjet6 has joined #ocaml
ztfw` has quit [Remote host closed the connection]
Ppjet6 has quit [Client Quit]
Pepe_ has joined #ocaml
Amorphous has quit [Ping timeout: 245 seconds]
_unK has quit [Remote host closed the connection]
DaveS has joined #ocaml
Amorphous has joined #ocaml
thrasibule has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
boscop has quit [Ping timeout: 276 seconds]