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>
let tata = 43;
<
phubuh>
let toto = 42 and tata = 43 in ...
<
tyler>
phubuh: does it work if variables have different types ?
<
tyler>
can I declare a type and a function without opening a new let as well ? (using and)
<
tyler>
printf "%u %u \n" toto tata(); does not work if let tata() = 43;
<
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 ?
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
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 ?
<
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.
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 ;-)
c_ray_c has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
an9n`afk has quit ["Gotta go..."]