dylan changed the topic of #ocaml to: OCaml 3.09.1 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
<marc> bye
marc has quit ["leaving"]
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
multani has joined #ocaml
<multani> hello there
Myrizio_ has quit ["Leaving"]
<multani> maybe someone could help me : i've got a class which inherits from two other classes :
<multani> - one which is a subject (like in the subject/observer design pattern), which is a parametric class
<multani> - and the other which is a normal class
<multani> when i try to compile the former class, the ocaml compiler complains that some "virtual method" aren't declared. But they are, in the "normal" class
<multani> can anyone give me any clues about that ?
* Smerdyakov is a staunch anti-OO advocate. :P
<mikeX> how so Smerdyakov ?
<Smerdyakov> mikeX, I think it hurts more than it helps in the great majority of applications.
<mikeX> can you elaborate (if it's no trouble)?
<Smerdyakov> The OO approach involves a number of conflated ideas, most of which are not used or useful in any given case. The extra conceptual baggage makes understanding code harder.
<mikeX> like ?
<Smerdyakov> Dynamic dispatch, inheritance, encapsulation, namespace management, ...
<mikeX> hmm
<multani> well, it would have a been a pleasure to teach trolling lessons in exchange for a solution to my problem
<mikeX> lol
<multani> however, i just figured I wasn't watching for the good line in my file
<shrimpx> watch for the good line in your file
<shrimpx> doh!
<multani> :D
<multani> wow, it works much better now, thanks everyone \o/
<Smerdyakov> multani, if you think I'm trolling, then I am sorry.
khaladan has quit [" HydraIRC -> http://www.hydrairc.com <- IRC with a difference"]
Thlayli_ has joined #ocaml
<multani> Smerdyakov, don't take it personnaly, I was just surprised how fast the discussion changes ;)
jcreigh has joined #ocaml
Thlayli has quit [Read error: 110 (Connection timed out)]
jcreigh has quit ["leaving"]
mauke has quit [Read error: 104 (Connection reset by peer)]
mauke has joined #ocaml
jcreigh has joined #ocaml
multani has quit [Remote closed the connection]
mauke has quit [Connection timed out]
mauke has joined #ocaml
jcreigh has quit ["leaving"]
Submarine has joined #ocaml
mikeX has quit ["zzz"]
Submarine has quit ["Leaving"]
Smerdyakov has quit ["Leaving"]
Submarine has joined #ocaml
Submarine has quit ["Leaving"]
ktne has joined #ocaml
khaladan has joined #ocaml
ktne has left #ocaml []
pango is now known as pangoafk
pangoafk is now known as pango
soupz has joined #ocaml
<soupz> can you call c++ code with ocaml?
<soupz> or just plain c code?
<ppsmimou> yes
<ppsmimou> but it's not so easy
<ppsmimou> there's a whole chapter about that in the caml manual
<soupz> ok ty
<mellum> It's also very error prone. You should avoid it at all costs.
ayrnieu has joined #ocaml
Revision17 has joined #ocaml
revision17__ has quit [Read error: 110 (Connection timed out)]
ramkrsna has quit [Remote closed the connection]
ramkrsna has joined #ocaml
<flux__> all costs being maybe rewriting the world in ocaml to avoid interfacing with c?-)
<flux__> it's a shame that interfacing with other, better environments, is equally difficult
<flux__> except maybe with the glaring exception of perl!
<flux__> if there was an effort to seamlessly integrate with ruby/python/haskell/java/perl, with arguably better semantics in their interfaces, it could be enough to write a wrapper in any of those languages..
<flux__> albeit it might not be quite as convenient as a native wrapper, but atleast it would be there
<pango> mono ? :)
<flux__> well, I was after a more native wrapping, not building a new p-code
<flux__> like perl4caml
<flux__> I haven't used it, though ;)
<flux__> (but maybe I will replace one piece of perl-rewritten-in-ocaml with my actual perl-module)
<pango> well, I wasn't thinking so much about p-code than using a common memory manager
<pango> using n memory managers looks similar to the n-bodies equations
<flux__> yeah, a common memory manager would be nice
<flux__> infact a common memory manager among the whole operating system would be nice ;)
<Thlayli_> i must thank you all! i just had my test (it was orally) and got a 1.7
<Thlayli_> that's between a and b in english grades i think
<Thlayli_> :D
Thlayli_ is now known as Thlayli
<pango> good
<Thlayli> i just talked and talked and talked about the functional programming paradigma
<Thlayli> had to write some small functions in ocaml
<Thlayli> went good :)
<Thlayli> i would have got a 1.0 if i had learned program verification better
<flux__> what course was that?
<Thlayli> that was informatics as we call it in germany
<Thlayli> you would call it computer-science
<Thlayli> it was an oral test for my diploma
<Thlayli> i study informatik and the course was also called informatik. it'
<Thlayli> s a mandatory course
pcc has joined #ocaml
<ayrnieu> fun.
<pcc> As in fun x -> x ?
<ayrnieu> no, but that is acceptable :-)
_shawn has quit [herbert.freenode.net irc.freenode.net]
_shawn has joined #ocaml
<soupz> are there any ocaml example programs that use the win32api?
YASP-Dima has joined #ocaml
<YASP-Dima> hi all
<YASP-Dima> anyone to help with install of cocanwiki ?
<soupz> ahhh I found one
Myrizio has joined #ocaml
<YASP-Dima> i see an error at compile time:
<YASP-Dima> File "lib/cocanwiki_date.ml", line 28, characters 4-12:
<YASP-Dima> Unbound constructor Date.Sun
<Myrizio> hi, what is the difference between the Unix and UnixLabel libraries? or String/StringLabel, etc
<ayrnieu> ah, fooled by google.
<flux__> myrizio, the Label ones, well, use labels :)
<flux__> nicer for currying (although I haven't given much use to those libraries)
<Myrizio> flux__: ah, ok, thanks :) sorry for my ignorance!
|Lupin| has joined #ocaml
<|Lupin|> Hello, there.
<|Lupin|> Are there Menhir users connected ?
<ppsmimou> yo |Lupin|
<|Lupin|> hello sam, ça gaze ?
<|Lupin|> oops, sorry.
<ppsmimou> heh
metaperl has quit ["KVIrc 3.2.1 Anomalies http://www.kvirc.net/"]
Schmurtz has joined #ocaml
mikeX has joined #ocaml
joshcryer has quit [Client Quit]
Tachyon76 has joined #ocaml
<Myrizio> is it possible ho have format function (like printf) as object methods? The compiler seams not to be happy about it...
<pango> printf is a special case hack
<Myrizio> mh, so i guess the anser is no...
<pango> well, it's source is available, maybe it can be recoded as a method
<pango> I haven't used OO yet
<Myrizio> ah, ok, i was just trying what can be done with 00 :)
<pango> not sure you want printf with objects anyway, as printf only supports some basic types
Myrizio has quit [Remote closed the connection]
<|Lupin|> bye
|Lupin| has left #ocaml []
Smerdyakov has joined #ocaml
khaladan has quit [Read error: 104 (Connection reset by peer)]
Tachyon76 has quit [Remote closed the connection]
Myrizio_ has joined #ocaml
smimou has joined #ocaml
Schmurtz has quit [Read error: 104 (Connection reset by peer)]
jomputin_ has quit ["f00"]
descender has joined #ocaml
<Myrizio_> hi, is it possible to have polymorphic methods (in objects)?
Snark has joined #ocaml
<Smerdyakov> No, only polymorphic objects.
<Smerdyakov> P.S., why are you using objects? :)
<Myrizio_> Smerdyakov: why not? :)
<Smerdyakov> Because they don't work well for most uses?
<Myrizio_> Smerdyakov: actually i'm learning ocaml, and i was just investigating what can be done and what cannot...
<Myrizio_> Smerdyakov: really? why?
<Smerdyakov> They just don't. Experience makes it clear that OO is largely ineffective.
<Smerdyakov> You will achieve more desirable code by using functions and modules.
<Myrizio_> uh, but aren't large ocaml applications (like mldonkey) largely based on 00?
<mikeX> Myrizio_: mldonkey for one is not
pcc has left #ocaml []
<Myrizio_> do you think that 00 could be improved or that it really do not fit well in ocaml?
<Smerdyakov> OO does not fit well anywhere.
<Smerdyakov> It is a collosal failure boyed up by ignorance and marketing.
<Smerdyakov> (buoyed, I guess :-)
<Myrizio_> Smerdyakov: maybe this is to much :)
<Myrizio_> just look at ruby
<mikeX> Myrizio_: in regard to your previous question about printf here is what i used in an OO wrapper around the buffer module:
<mikeX> method printf : 'a. ('a, Buffer.t, unit) format -> 'a =
<mikeX> fun fmt -> bprintf buf fmt
<Smerdyakov> Myrizio_, I don't accept any dynamic typing solution as successful.
<Myrizio_> mikeX: thanks!!!
<mikeX> Smerdyakov: did you continue your mini-flame with zhivago last night?
<Smerdyakov> mikeX, there was no flame. He was just talking nonsense.
<mikeX> :)
<Smerdyakov> mikeX, and there was no continuation.
<mikeX> i see
<mikeX> Myrizio_: in my example buf is an object attribute
<Myrizio_> mikeX: ok
<Myrizio_> mikeX: this is exactly what i was trying to do...
<Myrizio_> mikeX: but does it work? even if there can be no polymorphic method in objects?
<mikeX> yes it does
<Smerdyakov> Maybe I was wrong about my claim.
Quinthius has joined #ocaml
<mikeX> there's an explanation in the manual iirc
<Myrizio_> mikeX: yup, it works indeed! great!
<Myrizio_> ok, so this belongs to the set of things tha CAN be done in ocaml :) - thanks a lot.
<Smerdyakov> Myrizio_, again, I caution against using OO until you are already an ML expert.
<Myrizio_> Smerdyakov: thanks for the suggestion, of course i'm NOT an ML expert (as i started with ocaml less than a week ago :)
<mikeX> many ocaml programmers seem to feel strongly against OO
<Myrizio_> But i think that one of the best ways to learn a language is by investigating the nastiest features of the language...
<Myrizio_> mikeX: i see :)
<mikeX> but it's used extensively in the lablgtk library
<Smerdyakov> Myrizio_, what's your level of competence in functional programming?
<Myrizio_> mikeX: what is your opinion about it?
<mikeX> i'm still a novice programmer
<mikeX> it feels more natural in certain occasions however, that's why i made that OO wrapper for Buffer
<Myrizio_> Smerdyakov: eh, not that big, i just programmed a bit in haskell, and did a huge lot with c++ template metaprogramming (that is a functional language :)
<Smerdyakov> Myrizio_, the danger in learning a new language is to assume that it is too much like what you already know and try to program in the same way.
<mikeX> that's true
<Smerdyakov> Myrizio_, in fact, fundamentally different idioms are effective in ML, and it is a huge disadvantage that OO features are present in OCaml to confuse newcomers and lead them to try to "port" their OO design patterns literally.
<Myrizio_> mikeX: BTW, i wanted a printf method for a very similar reason, to associate an object with a connection.
<mikeX> that caused a lot of headaches when I started with ocaml, since I had no prior fp experience
<Myrizio_> Smerdyakov: ok, but anyway i realized immediately that ocaml was not like c++ with a sifferent syntax :)
<Myrizio_> Smerdyakov: BTW, i found ocaml really astonishing, from many points of view...
pango is now known as pangoafk
pangoafk is now known as pango
_JusSx_ has joined #ocaml
<soupz> anyone here ever do any win32 ocaml programming?
<soupz> is it stable?
* zmdkrbou .oO( ocaml, i don't know, but win32 ... )
<mikeX> lol
<ulfdoz> I don't know, why this doesn't pass type checking: http://www.rafb.net/paste/results/yWA0Lu63.html
<ulfdoz> as FdSet.elt = OrderedFunDep.t = fun_dep = attribute_set * attribute_set it is an restriction within 'a * 'b or what am I missing?
<smimou> what's the typing error ?
<ulfdoz> This expression has type FdSet.elt = OrderedFunDeps.t
<ulfdoz> but is here used with type 'a * 'b
<smimou> ah
<smimou> module OrderedFunDeps : OrderedType
<smimou> you cast it to OrderedType
<smimou> therefore t becomes opaque
<ulfdoz> slowly I get it. So I 've hidden the type with the abstraction of OrderedType.
<smimou> yes
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
kig has left #ocaml []
khaladan has joined #ocaml
Myrizio_ has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
_JusSx_ has quit ["leaving"]
exa has joined #ocaml
Submarine has joined #ocaml
pango is now known as pangoafk
Myrizio has joined #ocaml
smimou has quit ["bli"]
pangoafk is now known as pango
exa has quit [Remote closed the connection]
vitriol_ has joined #ocaml
<vitriol_> i get an error of the form 'The external function `blah` is not available' when i load a C wrapper library. is there any way to make the ocaml interpreter be more verbose?
vitriol_ has quit ["ircII EPIC4-2.2 -- Are we there yet?"]