urth^ has quit ["Everyone hates me because I'm paranoid."]
toadx has joined #ocaml
toadx has quit [Remote closed the connection]
bobov has joined #ocaml
merriam_ is now known as merriam
eivuokko has joined #ocaml
bobov has quit [Remote closed the connection]
thierry has joined #ocaml
<thierry>
yop there
bobov has joined #ocaml
<pnou>
yop
TachYon25 has joined #ocaml
Demitar has joined #ocaml
gl has joined #ocaml
<Demitar>
smkl: Is it just me or is WF irc down?
Yurik has joined #ocaml
<Yurik>
re
MegaWatS has joined #ocaml
<Yurik>
MegaWatS: hi
<MegaWatS>
hi
<Demitar>
Someone happend to know where I can find an efficient bucketed priority queue in ocaml? I'd be using it for pathfinding so sorting non-top buckets would be inefficient (which is the reason a bst would be equally inefficient).
<Demitar>
(Or perhaps I should simply clean my current implementation so it doesn't use List.sort anymore. ;-)
<xtrm>
is someone knows Unix.handle_unix_error ?
<pnou>
Demitar, i don't know what bucketed mean (i'm french) but i wrote a priority queue module using heap supporing min in O(1) and extract min in 0(lg n), are you interested?
<Demitar>
pnou: Sure. (Using buckets practically means partitioning the data into smaller groups and only sorting the group with highest priority. Efficient in the case of pathfinding since I always pop the topmost item and quite commonly never touch the lower priority ones.)
<pnou>
well in my implementation data are sorted when they are added to the structure
mrvn has quit [Read error: 110 (Connection timed out)]
gl has quit [Read error: 104 (Connection reset by peer)]
<Yurik>
guys,
gl has joined #ocaml
<Yurik>
if I'm making
<Yurik>
type el = { e : 'a . 'a };;
<Yurik>
and trying to fill it with something
<Yurik>
for example, { e = 1 }
<Yurik>
i'm getting "less general than"
<Yurik>
how should I do it? subtyping? how?
<pnou>
i think that type 'a el = { e : 'a }
<pnou>
is what you want
<Yurik>
but it doesn't allows me to make a list of 'e1's with different 'a
<Yurik>
like [{e=1};{e="a"}];;
<Yurik>
is it possible with polymorphic records?
<Demitar>
Yikes, how would that be matched?
<Yurik>
by the Obj.magic, for example
<Demitar>
Is it possible beyond using variants?
<pnou>
no it's not possible
<Yurik>
ah, ok
<Yurik>
then, is this possible with polymorphic variants?
<Demitar>
Obj.magic isn't something one should ever use (and even if you think you do, think again).
<Demitar>
Yes. [`int 1; `string "a";]
<pnou>
if you have a variant for each type it's possible
<Yurik>
ah, ok
<pnou>
but it would be the same with non polymorphic variants
<Yurik>
i see
<pnou>
maybe you need object an subtyping?
<Demitar>
Yes, but polymorphic ones are so neat. :) (Although I must admit I probably abuse them a bit.)
<pnou>
they are neat if you don't abuse of them :)
<Yurik>
i'm just thinking about what is the best way to represent namespaced s-expressions
<pnou>
what i dislike is that in pattern matching some errors are hidden with polymorphic variants
<Demitar>
I've noticed that classes are pretty nasty on the type-inference... (Wonder if I can build I nice widget lib using modules.)
<mrvn_>
You can make a base class with non polymorphic functions and inherit that in a polymorphic class. That way you can have a list of the base class.
<pnou>
classes are hard to understand, but not to be used
<Yurik>
btw, will Ensemble work perfect if instead of usual type I'll try to use classes?
<Demitar>
It could be that I've discovered the power of modules lately. :)
<mrvn_>
Yurik: Classes just means you can have methods, right?
<Demitar>
Anyone know a trick to get ocamldep data to be used by automake? (Add it manually to the Makefile.am atm.)
Yurik_ has joined #ocaml
Yurik has quit [Read error: 104 (Connection reset by peer)]
Yurik_ is now known as Yurik
<Yurik>
re
<Yurik>
so nobody tried to use Ensemble to send classes?
TachYon25 has quit [Remote closed the connection]
* Demitar
prefers well defined protocols... :) (Then again the things I hack on usually need it anyway.)
<pnou>
well defined protocols? what are you talking about?
<Demitar>
Well my domain is more often distributed (sometimes not even that) filtered simulations than distributed applications.
<Demitar>
Ensemble isn't exactly what I'd call portable (across languages and platforms).
<smkl>
Yurik: you cannot marshal objects in ocaml, if you mean that
<smkl>
i thought there were ensemble bindings for C/C++ and Java
<Demitar>
smkl: There are.
<Demitar>
Can one share data between an OCaml program and a C program?
<Demitar>
(Using ensemble I mean.)
<smkl>
probably not easier than using other low level protocols
<ocamlbot>
mes maitres sont dimitri@mutu.net ~tim@adsl-64-161-114-6.dsl.snfc21.pacbell.net
<pnou>
voui :)
<ocamlbot>
mes maitres sont dimitri@mutu.net ~tim@adsl-64-161-114-6.dsl.snfc21.pacbell.net
<pnou>
mouarf y a vieut bug
<ocamlbot>
mes maitres sont dimitri@mutu.net ~tim@adsl-64-161-114-6.dsl.snfc21.pacbell.net
ocamlbot has quit [Remote closed the connection]
<xtrm>
pnou: is irc protocol fully implemented ?
<pnou>
not at all :)
<pnou>
it parses irc lines as in the rfc but he doesn't understand all commands
<smkl>
which rfc do you use? new or old?
gene9 has quit ["Client Exiting"]
<pnou>
1459
<pnou>
is that the old version?
<xtrm>
what do you think about typing the protocol ?
<smkl>
yes, but i don't think any irc server cares about the new version
<xtrm>
type command = Nick of string | Pass of string ??
<pnou>
the problem is you will have to parse the line and then according to the number of the command choose the good type to put you information into
<pnou>
so your type will be very complicated
<pnou>
i parse the information in a generic type, and then i have accesors that i call depending on the type of the command that put information in more clever type
<xtrm>
but after developping irc pgm will be easier and safty
<pnou>
well if you have good ideas why not :)
<pnou>
and i can help you
ocamlbot has joined #ocaml
gl has quit [Remote closed the connection]
gl has joined #ocaml
TachYon25 has joined #ocaml
* gl
is away: I'm busy
eivuokko has quit ["."]
Sonarman has joined #ocaml
<Sonarman>
hi all!
Sonarman has quit ["Client Exiting"]
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
TachYon25 has joined #ocaml
owll has joined #ocaml
gl has quit [No route to host]
Yurik has quit [Read error: 104 (Connection reset by peer)]
malc has joined #ocaml
merriam has quit ["Client Exiting"]
merriam_ has joined #ocaml
merriam_ is now known as merriam
MegaWatS has quit ["We are at war with Eurasia. We have ALWAYS been at war with Eurasia. Goldstein is our enemy. To think any different that that]
tmcm has joined #ocaml
malc has quit [Read error: 110 (Connection timed out)]
owll has quit ["Client Exiting"]
gl has joined #ocaml
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
TachYon25 has joined #ocaml
gl has quit [No route to host]
xtrm_ has joined #ocaml
TachYon25 has quit [Remote closed the connection]
TachYon25 has joined #ocaml
TachYon25 has quit [Remote closed the connection]
TachYon25 has joined #ocaml
xtrm_ has quit [Read error: 110 (Connection timed out)]