<seth_>
Smerdyakov: I could isolate the dependencies, but then my encapsulation is not correct.
<Smerdyakov>
Are you using inheritance or dynamic method dispatch at all?
<seth_>
Smerdyakov: I am using inheritence but it isn't crucial to the design.
<Smerdyakov>
Well, if neither of the above is crucial, then why are you using classes?
<seth_>
Smerdyakov: because I may need dynamic dispatch in the future, and I like to write reusable code.
<Smerdyakov>
OK.
<Vincenz>
how would I do the following?
<Vincenz>
let al = {prev=al, next=al, 2};;
<Smerdyakov>
I'm guessing your problem goes away if you make what you're thinking of now as objects of two classes into two different abstract types in one module.
<seth_>
Smerdyakov: the two classes are in the same module. I don't see that an abstract type changes anything.
<Smerdyakov>
Well, you have mutually recursive types and functions within modules.
<c1am>
Vincenz: you change first occurance of ',' with ';'
<seth_>
Smerdyakov: it has the same effect on the encapsulation
<Vincenz>
ops :P
<Smerdyakov>
seth_, is that an answer to my last line?
<Vincenz>
let al = {prev=al; next=al; value=2};;
<Vincenz>
^^
<Vincenz>
Unbound value al
<c1am>
Vincenz: THINK
<Vincenz>
c1am: cool it
<seth_>
Smerdyakov: I don't see how eliminating the objects helps.
<Vincenz>
one: I'm new to fp, two I'm new to ocaml
<Vincenz>
I know, it's recursive
<Vincenz>
but I know there's a syntax to do that someway
<Vincenz>
I just don't know how
<Smerdyakov>
seth_, the whole problem seems to be that you can't have mutually recursive type and function groups span class definitions, no?
<Vincenz>
darnit
<Vincenz>
I want a linkedlist
<c1am>
gee.. why is this world so equiped with idiots, just like you guys
<Vincenz>
let rec works
<seth_>
Smerdyakov: Not exactly. Let me look at this and see if I can characterise it better.
<Vincenz>
c1am: if this were java or c++ I'd do it in a breeze
<Vincenz>
c1am: I bet if you talked in italian or dutch or french you'd sound like an idiot too
<Smerdyakov>
seth_, yes. A small example of the problem would be good.
<Vincenz>
c1am: it's not about dumbness, it's about lack of knowledge
<seth_>
c1am: hey, he sounds like an idiot in his native language
<seth_>
Vincenz: I mean c1am sounds like an idiot in his native language
<Vincenz>
seth_: yeah, trolling
<c1am>
seth_: you dont really know whou you think
<c1am>
as for danish... that would have been so cool... sounding like anything in dutch ought to be cool
<c1am>
Jeg snakke ikke dansk though
Kinners has joined #ocaml
<Smerdyakov>
seth_, ... have you given up on a concise example?
stepcut has quit [Remote closed the connection]
<seth_>
no, I had to take a phone call.
<emu>
what's wrong with [1;2;3;4] that's a linked list
<mellum>
emu: yes
<seth_>
that's a list, but not a linked list, is it?
<emu>
heh
<emu>
what other kind of list is there?
<emu>
ahem
<seth_>
the kind you just wrote
<mellum>
doubly linked ones
<emu>
1 :: 2 :: 3 :: 4 :: []
<seth_>
that's the same list
<Vincenz>
mellum: exactly
<emu>
seth_: guess what. it's not the syntax, it's the implemenetation
<emu>
what's a cons?
<emu>
item :: rest_of_list
* emu
curses Python for naming their vectors "lists"
<emu>
the fun thing about singly linked lists, in functional programming, is the structure sharing
<emu>
that's why they are so fundamental to fp
<seth_>
Smerdyakov: Looking at it closely I think I can isolate a data type and solve the problem.
<Vincenz>
emu: how do you mean about structure sharing?
<emu>
let foo = [2;3;4];;
<emu>
let bar = 1 :: foo;;
<Vincenz>
ah yes
<emu>
foo and bar share structure
<Vincenz>
pointers :)
<emu>
erase pointer
<emu>
s
<Vincenz>
that's handy cause they're immutable anyways
<emu>
bar is bound to a cons with 1 and [2;3;4]
<Vincenz>
yup
mattam has quit ["zZz"]
c1am has quit ["no reason"]
<seth_>
if I use a parameterized class, what is the syntax for specifying the parameter when the class is instantiated?
<Vincenz>
night folks
Vincenz has quit []
Jimzy has quit ["-=SysReset 2.53=-"]
Jimzy has joined #ocaml
lament has quit ["Support Darwin Awards! Join the military!"]
Jimzy has quit ["-=SysReset 2.53=-"]
Jimzy has joined #ocaml
skylan_ is now known as skylan
skylan has quit ["Reconnecting"]
skylan has joined #ocaml
baader has joined #ocaml
thedark has quit [Success]
baader has quit ["I'll be back"]
mattam has joined #ocaml
skylan has quit [Read error: 54 (Connection reset by peer)]
skylan has joined #ocaml
Kinners has quit [Remote closed the connection]
lament has joined #ocaml
Jimzy has quit [brunner.freenode.net irc.freenode.net]
polin8 has quit [brunner.freenode.net irc.freenode.net]
avn has quit [brunner.freenode.net irc.freenode.net]
seth_ has quit [brunner.freenode.net irc.freenode.net]
Jimzy has joined #ocaml
polin8 has joined #ocaml
seth_ has joined #ocaml
avn has joined #ocaml
seth_ has quit ["Client Exiting"]
lament has quit ["Support Darwin Awards! Join the military!"]
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
whee has quit ["Leaving"]
systems has joined #ocaml
systems has quit ["Client Exiting"]
_ has joined #ocaml
_ is now known as Vincenz
Vincenz is now known as _
<_>
ugh
_ is now known as Vincenz
chobit has joined #ocaml
Jimzy has quit [Read error: 54 (Connection reset by peer)]
mattam_ is now known as mattam
chobit has quit [Read error: 54 (Connection reset by peer)]
Jimzy has joined #ocaml
two-face has joined #ocaml
<two-face>
hi
<Vincenz>
hello two-face
<two-face>
there are more and more people in here
<Vincenz>
yup
<Vincenz>
I fell in love with ocaml
<Vincenz>
unfortunately it's always quiet in here
<two-face>
because people code :)
<two-face>
what are you doing with ocaml?
<Vincenz>
learning it
<two-face>
ok
<two-face>
tu parles français ?
<Vincenz>
oui
<two-face>
:)
<Vincenz>
praat je nederlands?
<two-face>
non désolé
<Vincenz>
italiano?
<two-face>
français
<Vincenz>
english?
<two-face>
oui bien sur
<two-face>
bon, je dois y aller
<two-face>
bye
two-face has left #ocaml []
<Vincenz>
salut
mellum has quit [Read error: 110 (Connection timed out)]
mellum has joined #ocaml
TachYon26 has joined #ocaml
TachYon26 has quit [Remote closed the connection]
shea has quit [Read error: 104 (Connection reset by peer)]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
two-face has joined #ocaml
two-face has quit ["Client Exiting"]
lament has joined #ocaml
shea has joined #ocaml
lament has quit ["Support Darwin Awards! Join the military!"]
TachYon has joined #ocaml
TachYon has quit ["Client Exiting"]
mrvn_ is now known as mrvn
TachYon has joined #ocaml
lament has joined #ocaml
TachYon has quit ["Client Exiting"]
smkl has quit [Remote closed the connection]
smklsmkl has joined #ocaml
shea has quit [Read error: 60 (Operation timed out)]