vezenchio has quit ["I thought what I'd do was, I'd pretend to be one of those deaf-mutes"]
Oejet has joined #ocaml
Oejet has left #ocaml []
Placain has joined #ocaml
jameson has joined #ocaml
<jameson>
Hi! Is it possible to have mually recursive 'type' and 'class' definition? (type foo = bar list and class bar = object val x:foo end;;)
<Smerdyakov>
It's unnecessary.
<Smerdyakov>
That's like asking "is it possible to have mutually recursive type and function definitions?".
<Smerdyakov>
Object typing is purely structural in OCaml.
<Smerdyakov>
Class definitions don't generate new types.
<jameson>
OK... but "type foo = bar and type bar = class quux = object val x:foo end;;" doesn't seem to work either...
<jameson>
(so 'class c = object...' only defines 'c' as the class constructor, then?)
<Smerdyakov>
type foo = bar and type bar = < x : foo >
<Smerdyakov>
Though that makes x a method, not a val.
<jameson>
I think I'm on the wrong track. You mentioned that class typing is purely structural, so I guess the correct type I should use would be something like < quux : 'a; ... >, where 'quux' is th emember function I use...
<Smerdyakov>
All val's are private.
<jameson>
Yes, but that's practically what I need. OK, that clarifies the issue. Thank you!
mrsolo_ has joined #ocaml
Placain has left #ocaml []
monochrom has joined #ocaml
GreyLensman has quit ["Leaving"]
monochrom has quit ["Don't talk to those who talk to themselves."]
Banana has quit [Remote closed the connection]
tewk__ has joined #ocaml
<tewk__>
So I'm compiling a ocaml app and I'm missing a symbol called failwith, any help ?
<kinners>
that's in the standard library (Pervasives module), so something must be going wrong
<kinners>
what system do you have and how did you install ocaml?
cjohnson has quit ["Leaving"]
<tewk__>
Running debian unstable trying to compile poy a phylogenetic app
<tewk__>
safememory.o(.text+0x30): In function `safe_malloc':
<tewk__>
: undefined reference to `failwith'
<tewk__>
is there a .h file that contains a definition for failwith ?
<kinners>
ah, ok
<kinners>
all the caml symbols are prefixed with caml_ now since ocaml 3.08 (caml_failwith)
<tewk__>
so just prefix failwith with caml_
<tewk__>
cool thanks
<kinners>
yes, or have compatibility.h included
<tewk__>
thats what I get for running debian unstable, but I sure learn a lot
<tewk__>
You've been very helpfull
<kinners>
np
<kinners>
I use godi under debian testing
<kinners>
but I would have got the same problem anyway :)
Nutssh has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo_ has joined #ocaml
<tewk__>
So how does godi work ?
<kinners>
It's based on netbsd's package system I think. It downloads and compiles ocaml + ocaml packages and installs them into the godi tree (I use ~/godi)
Nutssh has quit [sendak.freenode.net irc.freenode.net]
<tewk__>
cool
Nutssh has joined #ocaml
kinners has quit [Read error: 238 (Connection timed out)]
pango has joined #ocaml
buggs has quit [sendak.freenode.net irc.freenode.net]
gzl has quit [sendak.freenode.net irc.freenode.net]
mattam has quit [sendak.freenode.net irc.freenode.net]
rhw has quit [sendak.freenode.net irc.freenode.net]
Hipo has quit [sendak.freenode.net irc.freenode.net]
avn has quit [sendak.freenode.net irc.freenode.net]
skylan has quit [sendak.freenode.net irc.freenode.net]
Excedrin has quit [sendak.freenode.net irc.freenode.net]
rhw has joined #ocaml
skylan has joined #ocaml
mattam has joined #ocaml
Excedrin has joined #ocaml
Hipo has joined #ocaml
avn has joined #ocaml
det_ has joined #ocaml
gzl has joined #ocaml
det has quit [Connection reset by peer]
buggs has joined #ocaml
Lemmih__ is now known as Lemmih
_fab has joined #ocaml
Banana has joined #ocaml
Herrchen has joined #ocaml
pango has quit ["brb"]
pango has joined #ocaml
srv_ has quit [Read error: 232 (Connection reset by peer)]
kuribas has joined #ocaml
srv has joined #ocaml
maihem has joined #ocaml
det_ is now known as det
cjohnson has joined #ocaml
Lemmih_ has joined #ocaml
<dan2>
whats ~foo: "blah" arguments to functions used for
kuribas has quit ["Leaving"]
pango has quit ["Client exiting"]
pango has joined #ocaml
<pango>
dan2: that's called "labels" (named arguments)
<dan2>
pango: thanks
<dan2>
pango: in what case would you use one?
<pango>
dan2: when your functions have a lot of parameters... there's also a possibility to make some arguments optional, and to have default values that way