vect changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn, ICFP'03 http://www.icfpcontest.org/, A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/, A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
g1m has quit [Read error: 104 (Connection reset by peer)]
drlion has joined #ocaml
clam has joined #ocaml
mimosa has quit ["I like core dumps"]
<det> (x : #myclass) is not sufficient why ?
clam has quit [Read error: 60 (Operation timed out)]
Vincenz has quit []
wrunt has quit [calvino.freenode.net irc.freenode.net]
wrunt has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
<phubuh> det: If the only public methods of myclass are `set' and `get', you could practically pass anything to it.
<phubuh> I might have a class `bag' and a class `set' whose interfaces are identical, but my function relies on the invariants of `set'.
<Smerdyakov> It's not like you can enforce invariants with user-provided class hierarchies.
<Smerdyakov> There's always an element of trust in users.
<phubuh> Yes, I suppose someone could subclass `set' and not follow the invariants.
<drlion> not necessarily, in, e.g., c++
<phubuh> True, but OCaml's methods are all virtual (using C++ terminology).
<drlion> also true
<Smerdyakov> drlion is just causing trouble in all the channels today!
<Smerdyakov> Why would we take what C++ does as normative, or even as a good idea, anyway? :P
Demitar has joined #ocaml
<phubuh> Well, it's silly to reject its ideas simply because they come from an otherwise shoddy language. :-)
<drlion> but at least you can assume that the author of the class knows about the invariants, because you can be sure that you are in fact talking about the same class
<Smerdyakov> Or you can not use OO and forget about it. :)
<phubuh> Problem solved!
<Riastradh> Go typeclasses!
<Riastradh> There you have even _more_ problems solved.
<Smerdyakov> Or functors, if you're using OCaml.
<Demitar> In ocaml my main reason for using classes is the neat syntax. ;-)
<drlion> always implement qsort; problem solved
<Smerdyakov> Demitar, seriously?
<Riastradh> Yuck. Typeclasses are more convenient for many things than functors.
<Smerdyakov> Riastradh, I agree.
<phubuh> Oleg wrote an article about how OO is supposedly broken because his silly code in which `set' is a subclass of `bag' was able to treat a set as a bag and break.
<Riastradh> What Oleg proves is not that OO is silly but just that sets shouldn't be subtypes of bags.
<drlion> ...in some cases
<Riastradh> No, in most cases. They're fundamentally different things.
<drlion> no, they both hold a bunch of objects
<phubuh> That's what I got from the article as well, but he shouldn't have linked it as "Critique" under his "OOP" section. :-)
<Riastradh> Um, duh.
<Demitar> Smerdyakov, I could do everything I do with classes using functions over abstract types. (Except one or two special cases but they are not directly related to my other class usage). (Thinking about a specific app in this case.)
<Demitar> Then again objects are very good model of what I
<Demitar> 'm doing in this case, but if I could get a shortcut for (M.f o) into something similar to o#f I'd probably use modules instead.
<Smerdyakov> Oh no, what a horrible extra finger-typing burden! ;D
<drlion> not really. most module names are usually only one character long, so it doesn't really matter
<Smerdyakov> drlion, I can't tell if you're being sarcastic or not.
<Smerdyakov> drlion, are you?
<phubuh> Ha-ha, only serious, I think. :-)
<drlion> haha yeah. i don't believe in dualistic sarcasm
lus|wazze has quit ["Copyright is a temporary loan from the public domain, not property"]
<Demitar> Smerdyakov, not only the module name but also splattering all those () in the code, especially when you notice it too late and need to move back to add the (. It won't kill anyone but such repetitive stress is no fun in the long run.
<Smerdyakov> Demitar, but you have to do extra work to treat methods are first-class values....
systems has joined #ocaml
<Demitar> Smerdyakov, since an abstract type would usually be passed as the first argument it mostly doesn't make a difference, and I'm in no way using classes everywhere but I do really prefer the syntax (and when I do use classes these days they really fit well, but if modules had a shorter syntax I'm not so sure what I'd use).
<Demitar> And lets make a guess: What's faster, a class hirearchy of 126 classes defining default values as members or 126 variations of a record being passed to a single class as default values? I found that the difference was a >2M .cmi for the class hirearchy compared to 36k for the record version, not to mention compilation and especially launch times.
<Demitar> But anyway, I should be sleeping now, night.
Demitar has quit [Read error: 104 (Connection reset by peer)]
<phubuh> I want an Ocaml wiki.
<Riastradh> Bah. Schwiki will be so much cooler than any OCaml wiki unless you copy my ideas.
<phubuh> I'm going to copy your ideas.
<Riastradh> Bastard!
<phubuh> Actually, I meant a wiki about Ocaml, not necessarily written in Ocaml. :-)
<phubuh> So I'm actually going to copy your whole program!
<Riastradh> Oh.
<phubuh> Or... I might just write a Wiki in Ocaml.
<phubuh> I want to get a feel for ocaml-postgres and mod_caml, any way.
systems has quit ["Client Exiting"]
<phubuh> Ooh, mod_caml 1.0.0. :-)
brwill has joined #ocaml
<det> phubuh: oh, yes, I think methods should be interface specific, english is too overloaded :)
<det> phubuh: functors or an approach as in described in http://caml.inria.fr/archives/200308/msg00268.html is what I advocate over ocaml classes (This also applies to haskell type classes, 'tis a shame the Show class uses the names show and read, they could be appropriate names for unrelated type classes. I would much prefer haskell require the type class and then the overloaded term, eg "Show.show 2")
<phubuh> Maybe we should all just use Lojban. :-)
<phubuh> Hmm:
<phubuh> ocamlc -c -thread -I +pcre ctWeb.ml
<phubuh> File "ctWeb.ml", line 25, characters 0-9:
<phubuh> Unbound module Pcre
<det> you are including the pcre directory bot not linking it
<det> (including the directory in the search path), I *think*
<det> oh, -c shouldnt care?
<phubuh> That's what I thought...
<det> I havent used ocamlc in a while
<det> I forget
<phubuh> Me neither :-)
<phubuh> This package uses OCamlMakefile, which I think would get it correctly.
<phubuh> But shouldn't it use ocamlfind?
<phubuh> Oh, it does, never mind.
<phubuh> Bah!
<det> you found the problem ?
<phubuh> No :-(
<phubuh> adding unix.cma to the compiler command doesn't fix anything.
<phubuh> Oh, hey, adding -I /path/to/pcre fixed it. :-)
<det> oh
<det> I was gonna say, I just tried with someone that used the unix module
<det> and with -c it worked
<det> without unix.cma
<det> what unix are you using ?
<phubuh> Gentoo Linux
<phubuh> I wonder if OCamlMakefile includes some hidden install target
<phubuh> Oh. Wrong directory. :-)
<phubuh> Hooray!
<det> maybe you should try Debian
<det> surely gentoo is the source of your problems
<det> it must be
<phubuh> Heathen!
<det> have you *seen* portage.py!
<phubuh> Thankfully, nope.
<det> hahaha
<phubuh> Agh! mod_caml's Makefile wants to use -ltermcap.
<det> vi `locate portage.py`
<phubuh> oh my, why did I do that
<det> phubuh: building ocaml libraries is not fun :(
<phubuh> :(
<det> phubuh: one of its biggest problems IMO
<phubuh> Apparently these cave men haven't ever heard of autoconf or automake
<det> well
<phubuh> And I say that in a most respectful way :-)
<det> those suck too, unless you are using C* :)
<det> python distutils is nice
<phubuh> Most languages seem to make their own build things nowadays
<Smerdyakov> Software configuration and distribution systems are generally barbaric today.
<phubuh> Ant, ASDF, distutils, etc
<det> Smerdyakov: distutils is nice!
<phubuh> # XXX apxs is basically broken under Apache 2.
<phubuh> Oops.
<phubuh> I guess I should use 1.3.
* det steps out for a few
<phubuh> What the hell!
<phubuh> It's as if this Makefile actually substitutes -ltermcap for -lcurses or -lncurses.
<phubuh> This is so -amazingly- frustrating.
<phubuh> BAH!
<phubuh> Oh. Emerging libtermcap-compat wasn't that hard. :-)
<det> phubuh: apt-get is even easier!
<phubuh> emerge has fewer characters.
<phubuh> I finally got all of mod_caml installed. :-)
Kinners has joined #ocaml
systems has joined #ocaml
<phubuh> Hmm.
<phubuh> When Apache tries to load mod_caml.so, it moans about the fact that unix_dup is unresolved.
systems has left #ocaml []
<phubuh> //usr/lib/ocaml/unix.a has unix_dup
<phubuh> /usr/lib/ocaml/unix.a has unix_dup
<Kinners> phubuh: do you have a stublibs/dllunix.so ?
<phubuh> Yup.
<Kinners> does that have it?
<phubuh> Yes.
<phubuh> Hmmmmm, unlink, wait, and write are also unresolved.
<phubuh> Actually, pretty much every function from glibc that it uses is unresolved...
<phubuh> YES!
<phubuh> NO!
<Kinners> I suppose dllunix would pull glibc in, I don't know if mod_caml should be directly linked to it
<phubuh> Bah, this is so annoying.
Kinners has left #ocaml []
brwill is now known as brwill_zzz
owll has joined #ocaml
owll has quit [Client Quit]
mimosa has joined #ocaml
g1m has joined #ocaml
srv has joined #ocaml
buggs|afk is now known as buggs
Kinners has joined #ocaml
buggs|afk has joined #ocaml
owll has joined #ocaml
buggs has quit [Connection timed out]
owll has left #ocaml []
buggs|afk is now known as buggs
mattam_ has joined #ocaml
<phubuh> [Fri Nov 7 13:19:29 2003] [error] Cannot remove module mod_caml_c.c: not found in module list
<phubuh> Hmm.
mattam has quit [Read error: 110 (Connection timed out)]
karryall has joined #ocaml
<Kinners> ouch, the bytecode interpreter is giving me wildly wrong floating point results from a function
<Kinners> the native code version appears to be fine
* Kinners stabs himself in the foot with a fork
<Kinners> nevermind, stupid oversight :)
<phubuh> :-)
* Riastradh stabs Kinners in the foot with a spoon.
<Kinners> there is no spoon
<karryall> hope for you there is no fork either
polin8 has joined #ocaml
<Riastradh> There is no Kinners, either, until you wake up and actually find him.
Kinners has left #ocaml []
<Riastradh> Zigackly.
<Riastradh> And now there is no Riastradh, either, because he is departing to attend the Scheme Workshop.
<Riastradh> Nyah, nyah, you OCaml foos!
<phubuh> Have fun! Heathen.
<Riastradh> If I don't exist, how can I be a heathen?
<Riastradh> Nyah, nyah!
g1m has quit ["week-end :) ++"]
Demitar has joined #ocaml
Hipo has joined #ocaml
karryall has quit ["."]
__DL__ has joined #ocaml
srv has quit ["leaving"]
lus|wazze has joined #ocaml
lus|wazze has quit ["Copyright is a temporary loan from the public domain, not property"]
lus|wazze has joined #ocaml
systems has joined #ocaml
systems has quit ["you are not the boss of me"]
<phubuh> Hmm.
<phubuh> I've got a bunch of cmo:s that I want to link into one cmo.
<phubuh> Because I have a lot of unresolved symbols that mod_caml will link in at runtime.
<phubuh> How do I do this?
<lus|wazze> why not simply link them into a .cma?
<phubuh> Oh, I suppose I could do that
<phubuh> I hope mod_caml can handle those :-)
<lus|wazze> I dobnt even know what mod_caml is so I cant say
<__DL__> otherwise there is the -pack otpion of ocamlc
<phubuh> It's an apache binding to OCaml, like mod_perl
<lus|wazze> i see
<phubuh> I used -pack to make it one large .cmo, but now mod_caml says it can't find an implementation for Parsing
<phubuh> It used to want WikiParsing, which is a module I made, but I don't know what Parsing is... maybe something ocamlyacc uses?
<__DL__> yes. Its a module of the stdlib
<__DL__> used by ocamlyacc generetated .ml
<phubuh> I see... there's no parsing.cm[ao]
<Demitar> When I try to run the debugger using a unix socket the program I try to debug dies with "cannot connect to debugger" any suggestions?
<Demitar> Aha, the thing I needed was "set loadingmode manual".
chris1 has joined #ocaml
__DL__ has quit [Remote closed the connection]
Demitar has quit ["Lämnar"]