mikeX has quit [Read error: 110 (Connection timed out)]
fab__ has quit [Read error: 113 (No route to host)]
fab__ has joined #ocaml
chessguy2 has joined #ocaml
chessguy has quit [Connection timed out]
ramenboy has joined #ocaml
pango_ has joined #ocaml
pango has quit [Remote closed the connection]
jcreigh has joined #ocaml
beschmi has quit ["Leaving"]
chessguy2 is now known as chessguy
chessguy has quit [Client Quit]
shekmalhen has quit ["/me se regarde dans le mirroir et se compte... zzzzz"]
Smerdyakov has quit ["Leaving"]
Snark has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
_jol_ has joined #ocaml
Smirnov has quit [Remote closed the connection]
_velco has joined #ocaml
_jol_ has quit ["leaving"]
youknow365 has joined #ocaml
<youknow365>
i was just using some ML donkey that crap is slooow
_jol_ has joined #ocaml
<zvrba>
so go use something else and don't bother us
Wild_Cat has joined #ocaml
mnemonic_ has joined #ocaml
<youknow365>
no i like ocaml im wondering why its slow
_jol_ has quit [Read error: 113 (No route to host)]
mnemonic_ has quit [Client Quit]
<Wild_Cat>
slow? How so? Most benchmarks I've seen put Ocaml among the faster languages.
<ski>
('it' being MLDonkey, i take)
mnemonic has joined #ocaml
<mnemonic>
hi
<ski>
(or, rather, the gui part of it)
piggybox has left #ocaml []
mnemonic_ has joined #ocaml
mnemonic_ has quit [Client Quit]
zmdkrbou_ is now known as zmdkrbou
<youknow365>
yes mldonkey
mnemonic has quit [Read error: 60 (Operation timed out)]
<pango_>
youknow365: well, there's a #mldonkey channel on this network...
mnemonic_ has joined #ocaml
mnemonic_ has left #ocaml []
mnemonic has joined #ocaml
Wild_Cat has quit []
mikeX has joined #ocaml
mikeX has quit [Client Quit]
<youknow365>
pango_: yes i jus wondered why / how mldonkey was soo slow
<pango_>
youknow365: first, I not sure what you mean by mldonkey (mlgui, or mlnet ?), and second I'm not sure what you mean by slow, which is also polysemic. That's why I would prefer the discussion to go in a dedicated channel
<youknow365>
pango_: ooooooooooo so touchy
<TSC>
Is there a function in the standard library for overwriting an element in a list (and returning a new list)?
<pango_>
TSC: lists are immutable, you cannot overwrite an element
<TSC>
Yes, return a new list where all the elements are unchanged except the one I want to change
<pango_>
youknow365: it would be touchy if it wasn't constructive
<youknow365>
pango_: maybe its the mlgui that is slow i dunno
<flux__>
youknow365, have you tried profiling it?
<youknow365>
flux__: nope i was reading osme reviews about it
<flux__>
or maybe there are starvation issues, I understand mldonkey is heavily threaded
<pango_>
youknow365: that's easy to check, try the web interface, telnet interface, older versions of mlgui (gtk1 version), or another gui like sancho
<pango_>
flux__: mlnet is not "heavily threaded" at all
<pango_>
flux__: it's network engine is a classical big select (or poll) loop
<youknow365>
im using select for my im client
<pango_>
youknow365: you're about to handle one, maybe two connections at once
<pango_>
youknow365: select is more than suited for such cases
<youknow365>
one connection to a jabber server
<pango_>
youknow365: problems start when you enter the thousand
<youknow365>
i debated for a whole weeek re invent the wheel or modify another client
<pango_>
p2p clients are still below the thousand, so select design is still ok, I think
<pango_>
TSC: there's no standard library function for that, it's not an usual operation on lists
<youknow365>
i like recursive functions but for some reason i like loops more
<youknow365>
also does anyone know how OpenOffice incorporated QT into their app
* pango_
likes high order functions more
finelemon has quit [Read error: 110 (Connection timed out)]
<pango_>
actually, replacing poll to use ocaml-events (based on libevent) could improve efficiency... but that's out of my league
<youknow365>
hmmmmm
<youknow365>
i like that simpleXML parser thats for Ocaml
<youknow365>
really nice and handy
<TSC>
pango_: Yeah, I didn't think so, thanks
<TSC>
Maybe I should have used arrays (:
<pango_>
hard to tell without knowing the problem at hand :)
<pango_>
maybe you need a record of two lists, one containing "tail" elements, another containing "head" elements in reverse order, etc.
<pango_>
then you can "move" around you list and do local changes, yet keep your code style functional
<TSC>
That's a good idea
<TSC>
It's simple enough to write set_nth, and the lists are small enough that efficiency is not a problem
<pango_>
you could also have used a Map over ints (operations on Maps are a bit too limited for my taste however)
<pango_>
it really depends on the operations you need, and their complexity
mnemonic has quit ["leaving"]
<TSC>
Yeah, I considered that too
khaladan_ has joined #ocaml
f78 has quit ["Leaving"]
Revision17 has quit [Read error: 104 (Connection reset by peer)]
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan_ is now known as khaladan
Revision17 has joined #ocaml
dark_light has joined #ocaml
_jol_ has joined #ocaml
_jol_ has quit ["leaving"]
b00t has joined #ocaml
Smerdyakov has joined #ocaml
mnemonic_ has joined #ocaml
Purice has joined #ocaml
b00t has quit [Remote closed the connection]
love-pingoo has joined #ocaml
mnemonic_ has quit [Client Quit]
Purice has quit [Client Quit]
DRMacIver has joined #ocaml
DRMacIve1 has quit [Read error: 104 (Connection reset by peer)]
<zvrba>
it complains on (eval t1) with This expression has type tree -> int but is here used with type int
<Smerdyakov>
It seems you misunderstand what 'function' is.
<zvrba>
hmm, pattern matching?
<Smerdyakov>
Your 'eval' function is defined to take two arguments, where the first is ignored.
<zvrba>
ouch, yes :)
descender has quit [Remote closed the connection]
DRMacIve1 has joined #ocaml
descender has joined #ocaml
DRMacIver has quit [Read error: 104 (Connection reset by peer)]
<zvrba>
hm.. what's the best way to implement non-deterministic choice?
<zvrba>
i want to execute a certain function over all 2-combinations of elements from a list..
<Smerdyakov>
Continuations are usually helpful there.
<zvrba>
hm, but Ocaml doesn't have them
<zvrba>
not out of the box at least
<zvrba>
any suggestion how to implement them manually?
<Smerdyakov>
(but I definitely wouldn't call what you just described "non-determinism")
<Smerdyakov>
List.iter (fun x -> Lister.iter (f x) ls) ls
<zvrba>
ah, I was just referring to how I would implement it in prolog :)
<Smerdyakov>
s/Lister/List
DRMacIve1 has quit [Read error: 104 (Connection reset by peer)]
DRMacIver has joined #ocaml
<zvrba>
hm, excuse my ignorance.. what would f be ? :)
<Smerdyakov>
Your "certain function"
<zvrba>
ah :)
<zvrba>
ok, this is not a homework - i've done it in C, so the problem is solved :)
<zvrba>
i want to try it the "functional" way
<zvrba>
so.. choose 2 elements from the list (in all possible ways), replace them with their combination, and invoke the main function on the resulting list
<zvrba>
basically, i'm trying to construct all binary trees on certain number of external nodes
<Smerdyakov>
If you view what you just said as a prompt for further advice, be advised that I didn't read it that way.
<zvrba>
hm.. how did you read it then? :)
<Smerdyakov>
A span of text that certainly doesn't ask a specific question.
<zvrba>
ok. something specific: input is [a;b;c;d;..]
<zvrba>
i want to call function with e.g. [a * b; c; d; ...]
<zvrba>
for all nonrepeated combinations of list elements
finelemon has joined #ocaml
<zvrba>
so, the "new" list has a and b removed and substituted with a*b
<zvrba>
the rest is unchanged
<Smerdyakov>
I still haven't seen a question mark.
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different"]
<zvrba>
ah :)
<zvrba>
what is the "good" way to achieve that?
<zvrba>
it doesn't have to be lists..
<Smerdyakov>
Write a higher-order function to call another function with every pair of an element of a list and the list with that element removed.
<zvrba>
ok, i think I have an idea how to proceed :)
Snark has quit ["Leaving"]
f78 has joined #ocaml
Purice has joined #ocaml
chessguy has joined #ocaml
jcreigh has joined #ocaml
Purice has quit [Client Quit]
shawn_ is now known as shawn
chessguy has quit [Client Quit]
fab__ has quit []
Wild_Cat has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
_velco has quit ["I'm outta here ..."]
clog_ has joined #ocaml
clog has quit [Read error: 60 (Operation timed out)]