ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
ptolomy has joined #ocaml
m3ga has joined #ocaml
beschmi has joined #ocaml
smimou has quit ["?"]
y6cmE has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
ecc has quit ["Client exiting"]
y6cmE has quit ["KVIrc 3.2.0 'Realia'"]
aegray has joined #ocaml
Svrog has joined #ocaml
Svrog is now known as Svarog
Svarog is now known as Svrog
Svrog has quit [Client Quit]
pango_ has joined #ocaml
vezenchio has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
UziMonkey has joined #ocaml
__DL__ has joined #ocaml
UziMonkey has quit [Remote closed the connection]
Snark has joined #ocaml
__DL__ has quit ["Bye Bye"]
Skal has joined #ocaml
lightstep has quit ["leaving"]
Revision17 has joined #ocaml
ski has joined #ocaml
revision17_ has quit [Read error: 110 (Connection timed out)]
_JusSx_ has joined #ocaml
Gueben has joined #ocaml
Msandin has joined #ocaml
<oracle1> is it a good idea to remove the first and last element of a list (to get a new list) like that:
<oracle1> (List.rev (List.tl (List.rev (List.tl list))))
<ski> no
<ski> that makes an intermediate copy of the list
<ski> better to just make one copy
<ski> (maybe better still, to use a more suitable datastructure)
<oracle1> ok
mellum has joined #ocaml
<mellum> Is there some efficient way to do "unsigned less than" for two integers?
* Demitar wonders what kind of evil inner loop mellum is using for that to even matter... :)
Msandin has quit [Read error: 110 (Connection timed out)]
Banana_ has joined #ocaml
Banana has quit [Read error: 104 (Connection reset by peer)]
y6cmE has joined #ocaml
Hadaka has quit [Remote closed the connection]
Naked has joined #ocaml
Naked is now known as Hadaka
Tachyon76 has joined #ocaml
smimou has joined #ocaml
Tachyon76 has quit ["Leaving"]
Hadaka has quit [Read error: 104 (Connection reset by peer)]
chs has joined #ocaml
Schmurtz has quit [Read error: 113 (No route to host)]
Snark has quit ["Leaving"]
<chs> It seems that the only handily available implementation of imperative sets is Hashtbl with replace as insert and fold for element extraction. Is that true?
Snark has joined #ocaml
<chs> Oh, I found Garrigue's Oset but that does not seem to be in wide use, eg not packaged by Debian.
Schmurtz has joined #ocaml
<Demitar> chs, look in extlib.
Naked has joined #ocaml
Naked is now known as Hadaka
<chs> I did, but all it has is functions (exists & keys) which make Hashtbl's use as destructive set more palatable.
<chs> Anyway, it works. It's just not where you would look for such a functionality in the beginning.
<Smerdyakov> Wrap it with a functor?
y6cmE has quit [Read error: 110 (Connection timed out)]
<chs> Sure I could wrap it (altho I don't see why that would be a functor and not a regular module), but I'm only asking about this because I'm amazed that these very basic data types don't seem to be commonly available.
<Smerdyakov> Oh, you're using the polymorphic Hashtbl?
<chs> Ok, maybe I don't understand, but Hashtbl.t is polymorphic and it's the only thing provided by (Ext)Hashtbl, iirc.
<Smerdyakov> Look at the part labeled "functorial interface" in the Hashtbl docs.
<chs> Hmm, why would I use that unless I really care about performance or have a special kind of equality requirement?
<chs> Anyway, you're right. I overlooked that interface.
<Smerdyakov> Because polymorphic hashing is hacky?
lightstep has joined #ocaml
mikeX has joined #ocaml
<lightstep> i have a problem with optional parameters: http://rafb.net/paste/results/r7kENG68.html
<lightstep> (this is a simplified program. the original contained objects and other things)
<lightstep> why aren't optional labeled parameters unified with required labeled parameters, like in c++?
<Smerdyakov> C++ has labeled parameters?
<lightstep> kinda
<lightstep> anyway, is there a way to get by without anotating the types of a lot of parameters?
<mfurr> c++ has unification?
<lightstep> type signatures can match or mismatch
<mikeX> section 4.1.2
<lightstep> so it isn't possible. but why is it so? why isn't (?l:a->b) a subtype of (~l:a->b)?
<mikeX> beats me
<mikeX> but type inference is quite limited when it comes to optional arguments and classes...
<beschmi> lightstep: perhaps because (?l:a -> b) is implemented as (~l: (a -> b) option)
<lightstep> implementation choices hardly seem like a good reason especially when other languages (even c++) uses the caller-decides convention successfully)
aegray has left #ocaml []
<Smerdyakov> Currying makes things fundamentally more interesting.
Schmurtz has quit ["Dodo !"]
Banana_ has quit [Read error: 104 (Connection reset by peer)]
Banana has joined #ocaml
mikeX has quit ["Leaving"]
<lightstep> one solution is to have different syntax for optional and required parameters
<ski> hm, possibly (a -> ?l:b -> c) could be a subtype of (a -> ~l:b -> c) and (a -> c) .. ?
<ski> different syntax, how ?
<lightstep> f ~l:v vs. f ~?l:v
<beschmi> lightstep: let f g = g ?p:(Some "hello") .. works without the type annotation
<beschmi> should be possible to implement ~?l:v => ?l:(Some v) with camlp4
<lightstep> thanks, i didn't see this in the manual
Gueben has quit [Remote closed the connection]
Schmurtz has joined #ocaml
faigo has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
pnou has quit ["leaving"]
<lightstep> macro systems are really cool
faigo has quit [Remote closed the connection]
Gueben has joined #ocaml
threeve has joined #ocaml
_JusSx__ has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
<beschmi> http://rafb.net/paste/results/f26kV338.html another version that uses ~?l:v instead of replacing ?l:v
mattam has joined #ocaml
Gueben has quit [Remote closed the connection]
Gueben has joined #ocaml
Gueben has quit [Remote closed the connection]
pnou has joined #ocaml
vodka-goo has joined #ocaml
Snark has quit ["Leaving"]
vezenchio has quit [""The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and t]
_JusSx__ has quit [Read error: 104 (Connection reset by peer)]
_JusSx_ has joined #ocaml
KrispyKringle has joined #ocaml
m3ga has quit [Read error: 110 (Connection timed out)]
m3ga has joined #ocaml
UziMonkey has joined #ocaml
ahdme has joined #ocaml
<ahdme> Hey, I have a question
<ahdme> I made a chatroom, how do I become a mod of it?
<ahdme> Is anyone here?
<ahdme> hello?
ahdme has quit ["Chatzilla 0.9.68 [Firefox 1.0.2/20050317]"]
joe_ has joined #ocaml
joe_ has left #ocaml []
smimou has quit ["?"]
_JusSx_ has quit ["leaving"]
Submarine has quit ["Leaving"]
Skal has quit [Remote closed the connection]