gl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , 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 | http://icfpcontest.org/ !!
phubuh has joined #ocaml
<phubuh> is there a somewhat easy way to print somewhat arbitrary values?
<phubuh> i looked in Toplevel, but its print_value takes a lot of strange arguments, that i don't know how to get ahold of
<tyler> how to avoid doing 2 lets in caml for multiple variable declarations ?
<tyler> let toto = 42;
<tyler> in
<tyler> let tata = 43;
<tyler> in
<tyler> does work.
<phubuh> let toto = 42 and tata = 43 in ...
<tyler> does NOT
<tyler> phubuh: does it work if variables have different types ?
<phubuh> yes
<tyler> can I declare a type and a function without opening a new let as well ? (using and)
<phubuh> nope
<tyler> printf "%u %u \n" toto tata(); does not work if let tata() = 43;
<tyler> ;<
<tyler> I need to remove the ()
<Smerdyakov> tyler, you've misundersood associativity.
<phubuh> that will pass () as yet another argument to printf
<phubuh> you need parens around tata ()
<phubuh> hi Smerdyakov, by the way
<tyler> phubuh: thx !
<tyler> Smerdyakov: I'm very new to caml, I dont know the syntax, I'm learning it
<tyler> hum, i have another stupid question :>
<tyler> is Node() a builtin constructor ?
<phubuh> i don't think so. at least i've never heard of it
<Smerdyakov> There are no built-in constructors. Just some syntactic sugar for lists and such.
<phubuh> oh, yeah, but it's not in the prelude or standard library either :)
<Smerdyakov> Well, OCaml may have built-in constructors. SML doesn't. :)
<tyler> I have : type 'a btree = Nil | Cons of 'a * 'a btree * 'a btree
<tyler> val empty : unit -> 'a btree
<tyler> let empty() = Nil; in (...)
<tyler> ocamlc -c binary_tree.ml -w A
<tyler> File "binary_tree.ml", line 8, characters 15-18:
<tyler> Unbound constructor Nil
<tyler> line 8 = let empty
<Smerdyakov> I have no idea what you are trying to say about what is in your file. Can you put the file on the web somewhere?
<tyler> i just mean, i declared the empty prototype, then I have the empty() declaration in the file, and when I compile it, thats the error I have
<tyler> let empty() = Nil;
<Smerdyakov> Are "prototypes" like that legal OCaml code? I've never seen one before.
<tyler> its in my .mli file
<tyler> but the code is in the .ml file
<Smerdyakov> Please just put the code up somewhere. It is too confusing.
<tyler> the code is changing every second man
<Smerdyakov> Pick some version that gives you that error.
<tyler> can I paste it to you in pvmsg ?
<Smerdyakov> Yes
CiscoKid has quit ["http://lice.codehack.com"]
noss has quit ["Leaving"]
tea has quit [Remote closed the connection]
karryall_ has joined #ocaml
karryall has quit [Read error: 104 (Connection reset by peer)]
<Lemmih> Is it possible to get raw (unsafe) access to pointers in OCaml?
<Riastradh> Sure, just use the C FFI.
<Riastradh> You can do some pretty scary stuff with it.
CiscoKid has joined #ocaml
monotonom has joined #ocaml
<Smerdyakov> OCaml has unsafe access to pointers with that wretched == operator.
<monotonom> How unsafe?
GreyLensman has quit ["Leaving"]
<Smerdyakov> It breaks referential transparency. I was only being semi-serious.
<Riastradh> It breaks referential transparency?
farizeo has quit [zelazny.freenode.net irc.freenode.net]
mmc has quit [zelazny.freenode.net irc.freenode.net]
simon- has quit [zelazny.freenode.net irc.freenode.net]
hf_ has quit [zelazny.freenode.net irc.freenode.net]
hf has joined #ocaml
simon- has joined #ocaml
fariseo has joined #ocaml
fariseo has quit [zelazny.freenode.net irc.freenode.net]
Etaoin has quit ["bland exit message"]
Herrchen has quit [Read error: 60 (Operation timed out)]
bk_ has quit ["leaving"]
Kinners has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
bk_ has joined #ocaml
mmc has joined #ocaml
bk_ has quit ["leaving"]
tyler has quit [Nick collision from services.]
tyl3r has joined #ocaml
Herrchen has joined #ocaml
tea has joined #ocaml
GMsoft has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
GMsoft has joined #ocaml
Demitar has quit [zelazny.freenode.net irc.freenode.net]
yella has quit [zelazny.freenode.net irc.freenode.net]
Dybbuk_ has quit [zelazny.freenode.net irc.freenode.net]
Dybbuk_ has joined #ocaml
Demitar has joined #ocaml
yella has joined #ocaml
CiscoKid has quit ["tired"]
GMsoft has quit [Client Quit]
GMsoft has joined #ocaml
karryall_ has quit [Read error: 60 (Operation timed out)]
Kinners has quit [Read error: 60 (Operation timed out)]
slashvar is now known as slashvar[lri]
malte has quit [Read error: 60 (Operation timed out)]
malte has joined #ocaml
fariseo has joined #ocaml
kosmikus|away is now known as kosmikus
platypus has quit [Read error: 54 (Connection reset by peer)]
Shammah has joined #ocaml
vezenchio has joined #ocaml
karryall has joined #ocaml
Kinners has joined #ocaml
Herrchen has quit [Read error: 110 (Connection timed out)]
Khortl has left #ocaml []
Kinners has quit ["leaving"]
platypus has joined #ocaml
smimou has joined #ocaml
Banana has quit [Remote closed the connection]
Banana has joined #ocaml
kosmikus is now known as kosmikus|away
bk_ has joined #ocaml
noss has joined #ocaml
pattern has quit [Read error: 104 (Connection reset by peer)]
Shammah has left #ocaml []
karryall has quit [Remote closed the connection]
lam has quit [Remote closed the connection]
lam has joined #ocaml
Lemmih has quit ["Download Gaim: http://gaim.sourceforge.net/"]
skylan has quit [Read error: 54 (Connection reset by peer)]
monotonom has joined #ocaml
Lemmih has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
mattam has joined #ocaml
bk_ is now known as bk_bbl
hf has quit [Nick collision from services.]
hf_ has joined #ocaml
pattern has joined #ocaml
bk_bbl is now known as bk_
smimou has quit ["?"]
smimou has joined #ocaml
lus|wats has joined #ocaml
vezenchio has quit [Read error: 60 (Operation timed out)]
Smerdyakov has quit ["gone for a few days"]
gim has quit ["changement de X :)"]
an9n has joined #ocaml
vezenchio has joined #ocaml
lus|wats has quit [Read error: 60 (Operation timed out)]
CiscoKid has joined #ocaml
* an9n is away: Auto-away after 30 mins idle (gone at 12th May, 22:47:42)
an9n is now known as an9n`afk
gim has joined #ocaml
gim has quit [Remote closed the connection]
<bk_> is there a way to access instance variables of classes directly or must i use accessor functions ?
<Demitar> Yes.
<bk_> yes as in 'need accessor functions' ?
<Demitar> You mean your question wasn't well stated? :) *snicker*
<Demitar> And yes, afaik you'll need accessors.
<bk_> heh yes
<bk_> thanks
malte has quit ["Leaving"]
vezenchio has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]
<CiscoKid> damn...31 bit ints strike again
mt99 has joined #ocaml
<mellum> CiscoKid: get a real computer ;-)
<CiscoKid> Heh
c_ray_c has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
an9n`afk has quit ["Gotta go..."]