drz has quit [Read error: 145 (Connection timed out)]
bk_ has joined #ocaml
humasect has joined #ocaml
cjohnson has quit [Remote closed the connection]
dodecahedron has joined #ocaml
<dodecahedron>
Hello
ulfdoz has joined #ocaml
ulfdoz_ has quit [Read error: 145 (Connection timed out)]
Sonarman has quit ["leaving"]
Nutssh has joined #ocaml
dodecahedron has quit [Read error: 110 (Connection timed out)]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Snark has joined #ocaml
Submarine has joined #ocaml
b00t has joined #ocaml
<Snark>
slt
<ulfdoz>
re
pango has quit [Remote closed the connection]
Herrchen has joined #ocaml
Nutssh has quit ["Client exiting"]
b00t has quit ["离开"]
smimou has joined #ocaml
vodka-goo has joined #ocaml
mlh has quit [Client Quit]
bk_ has joined #ocaml
mlh has joined #ocaml
Submarine has quit ["Leaving"]
Herrchen has quit ["bye"]
Snark has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
Gueben has joined #ocaml
mikeX has joined #ocaml
mlh has quit [Client Quit]
karryall has joined #ocaml
Snark has joined #ocaml
Bonedigger has joined #ocaml
mrvn has joined #ocaml
mikeX has quit ["Leaving"]
Bonedigger has quit [Read error: 60 (Operation timed out)]
mrvn_ has quit [Read error: 110 (Connection timed out)]
vodka-goo has quit []
__DL__ has joined #ocaml
Submarine has joined #ocaml
angagon has joined #ocaml
Msandin has joined #ocaml
_JusSx_ has joined #ocaml
Msandin has quit [Read error: 110 (Connection timed out)]
karryall has quit [Remote closed the connection]
vodka-goo has joined #ocaml
<Snark>
good night
Snark has left #ocaml []
__DL__ has quit [Remote closed the connection]
pango has joined #ocaml
_JusSx_ has quit ["leaving"]
cjohnson has joined #ocaml
<ulfdoz>
cya
cjohnson has quit [Read error: 104 (Connection reset by peer)]
cjohnson has joined #ocaml
Zaius has joined #ocaml
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
andys has joined #ocaml
<andys>
if I have a series of objects, the majority of which will use one piece of functionality, but some of which will want to use custom functionality, how am I best off modelling this?
<andys>
in Java I would probably use classes, but I'm not sure if this is the best approach in Ocaml
<andys>
alternatively I guess I could do a union type that carries along a function for the abnormal case
<andys>
are there any suggestions for some sizable code bases to look at to see how they deal with various problems?
<vodka-goo>
depends on your problem, each solution could be good
<vodka-goo>
I don't understand the last one
<vodka-goo>
oh I see, not very comfortable
<vodka-goo>
andys: in savonet.sf.net, I use objets, but I rely a lot on inheritance (deep nesting on classes), which you may not need so much
<vodka-goo>
what are the objects of your serie ?
<andys>
yeah, I've done more Java and C++ in general
<andys>
well, the aim is basically a Prolog interpreter
<vodka-goo>
you can also use modules, if you don't mind higher-order-ness
<andys>
the basic problem is that at a particular case I want to look up a clause, and be able to hook custom lookup behaviour, custom unification behaviour and possibly custom evaluation behaviour
<vodka-goo>
ok
<andys>
so I can see about three different places where I want to customise it for builtins
<andys>
also I don't want to make any structures bigger than necessary, which is almost certainly optimising too early
<andys>
but I'm just getting a feel :)
humasect has quit ["Leaving.."]
<vodka-goo>
isn't it more about custom behaviours when looking up an atom ?
<andys>
well, I want to approach it by using structure copying
<andys>
so, basically the idea would be basically each function would have
<vodka-goo>
I don't see why you want different unification behaviours
<andys>
(([goals],[backunification]),fail)
<andys>
ahhh
<andys>
I guess it's because I want to try and avoid mutable state
<andys>
I'm playing I guess to some degree - I'd be fairly comfortable implementing it in Java
<vodka-goo>
try ocaml objects if you feel like using objects
<vodka-goo>
they're easy to use
<andys>
*nod* I was tempted too
<vodka-goo>
and OCaml is the right language for unification stuff, really
<andys>
well, I want to try it out
<andys>
I quite like the idea of learning Ocaml, and I want to use a mini prolog interpreter
<andys>
sort of been playing with it at work
<andys>
it's so nice having little prolog stuff around
<vodka-goo>
it was made for a proof assistant, symbolic computation is cool and safe with caml
<andys>
replaces XML and ini files with something that's just as readable, and you can do some incredibly cool stuff if you want to
<andys>
*nod*
<andys>
I think the biggest problem I've had is I haven't seen much other than toy examples
<andys>
also I'm probably trying too hard to structure what I do the "right way"
<andys>
rather than approaching it as a Javay person
<vodka-goo>
prolog replacing XML and ini ? I don't see how, but that's certainly more fun :)
<andys>
:D
<andys>
one of my coworkers has a quite nice way of doing it
<vodka-goo>
maybe start with a very simple interpreter, write dumb unification, and no custom behaviours
<vodka-goo>
i mean, if it's your first shot with ocaml...
<andys>
well, yeah, I might have too :p
<andys>
I'm always trying to run before I can walk
<vodka-goo>
good luck, then
<andys>
:)
<vodka-goo>
hope you can get a good project architecture with ocaml
<vodka-goo>
that's something I appreciate a lot
<andys>
I quite like the structure
<andys>
just being able to do maps and folds and the terseness
<andys>
as well as the power
<andys>
of being able to mess around with things nicely
<andys>
but it's a bit of a learning curve
<andys>
right, I am off to play. Thank you for your help