Iter has quit [Read error: 110 (Connection timed out)]
kinners has joined #ocaml
Nutssh has quit ["Client exiting"]
kinners_ has joined #ocaml
bk_ has joined #ocaml
avlondono has quit ["Leaving"]
kinners has quit [Read error: 110 (Connection timed out)]
buggs^z has joined #ocaml
buggs has quit [Connection timed out]
buggs|afk has joined #ocaml
GreyLensman has joined #ocaml
buggs^z has quit [Read error: 110 (Connection timed out)]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
bk_ has joined #ocaml
larsr has quit [Read error: 104 (Connection reset by peer)]
cjohnson has quit [Remote closed the connection]
larsr has joined #ocaml
GreyLensman has quit ["drawn by an Ant magnet."]
__DL__ has quit ["Bye Bye"]
kinners_ has quit ["leaving"]
vezenchio has joined #ocaml
larsr has quit [Remote closed the connection]
buggs|afk has quit [calvino.freenode.net irc.freenode.net]
Hipo has quit [calvino.freenode.net irc.freenode.net]
wolfman8k has quit [calvino.freenode.net irc.freenode.net]
Lor has quit [calvino.freenode.net irc.freenode.net]
cmeme has quit [calvino.freenode.net irc.freenode.net]
_fab has quit [calvino.freenode.net irc.freenode.net]
Godeke has quit [calvino.freenode.net irc.freenode.net]
_shawn has quit [calvino.freenode.net irc.freenode.net]
mij has quit [calvino.freenode.net irc.freenode.net]
Smerdyakov has quit [calvino.freenode.net irc.freenode.net]
Banana has quit [calvino.freenode.net irc.freenode.net]
pattern has quit [calvino.freenode.net irc.freenode.net]
skylan has quit [calvino.freenode.net irc.freenode.net]
mellum has quit [calvino.freenode.net irc.freenode.net]
rox has quit [calvino.freenode.net irc.freenode.net]
Lemmih has quit [calvino.freenode.net irc.freenode.net]
kosmikus|away has quit [calvino.freenode.net irc.freenode.net]
karryall has quit [calvino.freenode.net irc.freenode.net]
lam has quit [calvino.freenode.net irc.freenode.net]
yella has quit [calvino.freenode.net irc.freenode.net]
vezenchio has quit [calvino.freenode.net irc.freenode.net]
srv has quit [calvino.freenode.net irc.freenode.net]
mmc has quit [calvino.freenode.net irc.freenode.net]
gl has quit [calvino.freenode.net irc.freenode.net]
bk_ has quit [calvino.freenode.net irc.freenode.net]
smkl has quit [calvino.freenode.net irc.freenode.net]
vezenchio has joined #ocaml
bk_ has joined #ocaml
buggs|afk has joined #ocaml
Hipo has joined #ocaml
Lemmih has joined #ocaml
mij has joined #ocaml
Godeke has joined #ocaml
_fab has joined #ocaml
pattern has joined #ocaml
Smerdyakov has joined #ocaml
wolfman8k has joined #ocaml
Lor has joined #ocaml
_shawn has joined #ocaml
gl has joined #ocaml
cmeme has joined #ocaml
skylan has joined #ocaml
kosmikus|away has joined #ocaml
srv has joined #ocaml
mmc has joined #ocaml
smkl has joined #ocaml
mellum has joined #ocaml
Banana has joined #ocaml
rox has joined #ocaml
srv has quit [calvino.freenode.net irc.freenode.net]
vezenchio has quit [calvino.freenode.net irc.freenode.net]
gl has quit [calvino.freenode.net irc.freenode.net]
mmc has quit [calvino.freenode.net irc.freenode.net]
bk_ has quit [calvino.freenode.net irc.freenode.net]
vezenchio has joined #ocaml
gl has joined #ocaml
mmc has joined #ocaml
srv has joined #ocaml
karryall has joined #ocaml
lam has joined #ocaml
yella has joined #ocaml
bk_ has joined #ocaml
Snark has joined #ocaml
<Snark>
slt
<det>
hello
buggs|afk has quit ["maybe it crashed"]
karryall has quit ["go"]
Iter has joined #ocaml
gim has joined #ocaml
mayhem has joined #ocaml
Snark has quit ["Parti"]
karryall has joined #ocaml
Snark has joined #ocaml
det has quit [Remote closed the connection]
det has joined #ocaml
rox has quit ["Client exiting"]
fariseo has joined #ocaml
Axioplase has joined #ocaml
<Axioplase>
Chat Lu!
mmc is now known as mmc_away
mmc_away is now known as mmc
cjohnson has joined #ocaml
Axioplase is now known as Axio|Fac
Iter has quit ["Leaving"]
buggs has joined #ocaml
slashvar has joined #ocaml
<slashvar>
Yop
mayhem has quit [Read error: 54 (Connection reset by peer)]
mij has quit [Read error: 110 (Connection timed out)]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
bk_ has joined #ocaml
monotonom has joined #ocaml
mij has joined #ocaml
<buggs>
i tried ocaml for the contest and i must say i'm rather pleased with language
<buggs>
the objects could be a lot more user friendly though
<buggs>
what somehow need was something like a Nil object
<buggs>
+i needed
Axio|Fac is now known as Axioplase
<monotonom>
That opens a can of worms, doesn't it
<buggs>
you end up making virtual classes, subclassing it by one real class and it's corresponding Nil one
<buggs>
i'm trying to get ppl to tell me how to work without
<buggs>
then i find my self writing a lot of:
<buggs>
val mutable x = foo
<buggs>
method x = x
<buggs>
method set_x y = x <- y
<buggs>
is there a better way ?
<monotonom>
Yes. Records.
<buggs>
inst#rec.x or is ther better ?
<buggs>
is the way with the nil object above ok or is there also a better way to that ?
<monotonom>
What is a "nil object"?
<buggs>
like for the contest task i have a virtual ant_t, and subclasses ant and no_ant
<buggs>
no_ant is what i call nil object
<monotonom>
No wonder I have never heard of "nil object".
<buggs>
say in the above x shall not be initialized how do i do that ?
<buggs>
val mutable x = nil
<buggs>
later
<buggs>
inst#set_x (new Ant)
<monotonom>
In my opinion the only time in OOP you want to leave a field uninitialized is when you use the singleton pattern with postponed creation, and that case is already covered elegantly by the Some type. The Some type is ugly for other cases, but there are no other cases.
<Smerdyakov>
monotonom, the option type
<monotonom>
Yeah, s/Some/option/
<buggs>
ya but there was a map that contained cells and my cells had a method get_ant that returned an IF there was one
<buggs>
now on initalizing the cell i wanted the ant to be nil
<buggs>
only when an ant steped on it the cell had an ant
<buggs>
so i did the above with the virtual class and the two subclasses
<buggs>
i saw that in other code too but i wonder if there is another way
<monotonom>
Can there be many ants on the same cell? I would use the option type if at most one ant can be on a cell, or a set if any number of ants can be on a cell.
<monotonom>
Alternatively if global_number_of_ants << map_size, I would use a sparse representation of the map and sidestep the issue altogether.
<buggs>
only one ant at a cell at a time
<buggs>
but it seemed classes coudn't be used as types
<buggs>
maybe i did that wrong
<buggs>
let y : foo option = new foo;;
<buggs>
doesn't work
kosmikus|away has quit [Read error: 60 (Operation timed out)]
kosmikus|away has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
<monotonom>
let y : foo option = Some (new foo);;
<monotonom>
let y : foo option = None;;
karryall has quit [Read error: 54 (Connection reset by peer)]
karryall has joined #ocaml
murl has joined #ocaml
murl has quit [Killed by lilo ()]
mattam_ has joined #ocaml
Godeke has quit ["Leaving"]
Snark has quit ["Parti"]
mattam has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
Phreaze has joined #ocaml
vezenchio has quit ["According to [a processor for game design], you statistically have a better chance of becoming a rock star than you do of suc]
Axioplase has quit [Nick collision from services.]
Phreaze is now known as Axioplase
wolfman8k has quit ["Leaving"]
Lemmih has quit [Read error: 54 (Connection reset by peer)]
Lemmih has joined #ocaml
wolfman8k has joined #ocaml
mattam_ is now known as mattam
rox has joined #ocaml
cjohnson has quit [Operation timed out]
<Snark>
good night
Snark has left #ocaml []
cjohnson has joined #ocaml
larsr has joined #ocaml
Nutssh has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
larsr has left #ocaml []
jao has joined #ocaml
jao has quit ["ERC Version 4.0 $Revision: 1.600 $ (IRC client for Emacs)"]
sundeep has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
demitar_ has joined #ocaml
jao has joined #ocaml
Nutssh has quit ["Client exiting"]
kosmikus|away is now known as kosmikus
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
jao has quit [Remote closed the connection]
_shawn is now known as shawn
sundeep has quit [calvino.freenode.net irc.freenode.net]
Axioplase has quit [calvino.freenode.net irc.freenode.net]
Banana has quit [calvino.freenode.net irc.freenode.net]
Smerdyakov has quit [calvino.freenode.net irc.freenode.net]