gl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list | http://icfpcontest.org/ !!
<CiscoKid> I'm doing a pattern match on assignment and I'm getting an error about the match not being exhaustive. I know it will be (list was already checked), but is there a better way to do this:
<CiscoKid> let command :: others = Array.to_list Sys.argv in
<CiscoKid> argv is ``cmd dest src [src...]''
<platypus> what does this : <> mean in ocaml ?
<CiscoKid> not equal
<CiscoKid> val (<>) : 'a -> 'a -> bool
<CiscoKid> Negation of Pervasives.(=).
<platypus> right
<platypus> thanks mate
<CiscoKid> np
reltuk has joined #ocaml
<Riastradh> CiscoKid, you could do something like this:
<Riastradh> let command = Sys.argv.(0) in
<Riastradh> let arg n = Sys.argv.(n+1) in ...
<Riastradh> which would allow for convenient argument extraction, although inconvenient manipulation of the argument vector.
<Riastradh> If you want to use it as a list, you should go ahead and convert it to a list.
<CiscoKid> I did, but the assignment match was complaining. Is it possible to do more than one assignment based on pattern matching?
<Riastradh> 'The assignment match was complaining?'
<Riastradh> Is it an _error_ or just a _warning_?
<Riastradh> If it's just a warning, ignore it.
<CiscoKid> It's a warning. I'd rather it not show up. :)
<Riastradh> Don't worry about it. It's harmless, since Sys.argv will never be empty.
<CiscoKid> Right, and in my case, it will always have enough stuff. It's more academic at this point. It's warning about a pattern match. Is it possible to express the assignment in such a way that I can avoid the warning? It let me do that style of assignment (thing::rest = something), but I'm not sure how I'd have a case for an empty list there.
<CiscoKid> I'm still completely amazed at the performance of this thing, though. Using my cdb API, I copied a reasonably large cdb (about 350MB) in 1:14. That's reading every key value pair and writing them to another file, indexing, and writing out the index. cp took 1:06 after my program had pulled it into cache.
<CiscoKid> ...and the best part, this is pretty much the entire code (the job of the program is to concatenate multiple cdbs into a single cdb): List.iter (Cdb.iter (Cdb.add destcdb)) srcs
<CiscoKid> The rest is argument handling, one line to open destcdb, and one line to close it.
buggs|afk has joined #ocaml
buggs^z has quit [Connection timed out]
monotonom has quit ["Don't talk to those who talk to themselves."]
fariseo has quit []
Herrchen has joined #ocaml
fariseo has joined #ocaml
cjohnson has quit ["Drawn beyond the lines of reason"]
CiscoKid has quit ["Leaving"]
reltuk has left #ocaml []
CiscoKid has joined #ocaml
sundeep has quit ["Client exiting"]
sundeep has joined #ocaml
Herrchen has quit [Read error: 60 (Operation timed out)]
cmeme has quit [Read error: 60 (Operation timed out)]
anyone has joined #ocaml
anyone has quit [Client Quit]
rox has quit [Operation timed out]
rox has joined #ocaml
anyone has joined #ocaml
rox has quit [Connection timed out]
rox has joined #ocaml
nyah has joined #ocaml
sundeep has quit ["Client exiting"]
<nyah> I have a clueless question (coming from a win32 background, I haven't had to deal with this previously) ... I'm using the MinGW standalone release of OCaml 3.0.7 and want to try out the http daemon from http://www.bononia.it/~zack/ocaml-http.en.html
<nyah> so i'm installing the other libraries that i need to build his stuff
<nyah> i just got findlib on, after applying a patch for the MinGW version of Ocaml
<nyah> but does it matter where in my fire hierarchy i built findlib?
<nyah> should I have put the findlib folder somewhere inside the OCaml lib directory or something?
<anyone> I am not sure, but I would try that first.
<nyah> fire = file, sorry :)
<anyone> Yes I understand.
* anyone has an error-correcting modem.
<nyah> ;)
<nyah> i'll give it a shot - thanks :)
Herrchen has joined #ocaml
sundeep has joined #ocaml
anyone has quit ["To understand recursion, you must first understand recursion."]
tea has quit [Remote closed the connection]
Khortl has joined #ocaml
Snark has joined #ocaml
Khortl has left #ocaml []
<nyah> hmm ... whatever i do w/findlib, only the browser seems to work
<nyah> ocamlfind list, forex doesn't do anything at all
<nyah> the patch to make findlib compile work for mingw ocaml is for findlib 0.8.1, an old version, but the release notes suggest that list and the other commands should still work
gim has joined #ocaml
smimou has joined #ocaml
CiscoKid has quit ["No windows for this server"]
nyah has quit ["ChatZilla 0.9.52B [Mozilla rv:1.6/20040113]"]
bk__ has joined #ocaml
bk__ is now known as bk_
<Snark> slt
<bk_> lut
vezenchio has joined #ocaml
_shawn has joined #ocaml
shawn has quit [Read error: 60 (Operation timed out)]
Shammah has joined #ocaml
sundeep has quit [Read error: 101 (Network is unreachable)]
sundeep_ has joined #ocaml
Zaius has joined #ocaml
noss has joined #ocaml
Shammah has quit ["Leaving"]
noss has quit ["Leaving"]
gim has quit ["++"]
gim has joined #ocaml
karryall has joined #ocaml
sawii has joined #ocaml
Boojum has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
Boojum has quit [Read error: 60 (Operation timed out)]
Boojum has joined #ocaml
Boojum is now known as Snark
Lemmih has joined #ocaml
tea has joined #ocaml
_fab has quit [Read error: 60 (Operation timed out)]
cmeme has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
Demitar has joined #ocaml
Zaius has quit ["Miranda IM! Smaller, Faster, Easier. http://miranda-im.org"]
karryall has quit ["go"]
CiscoKid has joined #ocaml
CiscoKid has quit ["ircII EPIC5-0.0.2 -- Are we there yet?"]
CiscoKid has joined #ocaml
maihem has joined #ocaml
buggs|afk is now known as buggs
<buggs> hmm those types with polymorphic mehtods is killing me
<buggs> method foldl : 'a. ('a -> #node -> 'a) -> 'a -> 'a -> 'a =
<buggs> fun f accu n ->
<buggs> List.fold_left
<buggs> (fun a (s,n) -> n#foldl f (f a n) n)
<buggs> accu self#transitions
<buggs> his method has type ('a -> node -> 'a) -> 'a -> 'a -> 'a
<buggs> which is less general than 'b. ('b -> node -> 'b) -> 'b -> 'b -> 'b
<buggs> i read the problem could be with named anonymous variables only
<buggs> but i don't see where i have to use _ instead of 'a
sawii has left #ocaml []
teratorn has left #ocaml []
teratorn has joined #ocaml
teratorn has left #ocaml []
teratorn has joined #ocaml
delta has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
buggs^z has joined #ocaml
buggs has quit [Operation timed out]
buggs^z is now known as buggs
reltuk has joined #ocaml
fab has joined #ocaml
<buggs> Fatal error: exception Assert_failure("typing/ctype.ml", 250, 30)
<Snark> good night
Snark has left #ocaml []
<buggs> this a ocaml bug ?
<bk_> :shrug:
delta has quit [Read error: 60 (Operation timed out)]
fab has quit ["brb"]
fab has joined #ocaml
fab is now known as _fab
platypus has quit [Nick collision from services.]
platypus_ has joined #ocaml
pattern has joined #ocaml
sundeep_ has quit [Client Quit]
sundeep has joined #ocaml
sundeep has quit [Client Quit]
sundeep has joined #ocaml
monotonom has joined #ocaml
sundeep has quit ["Client exiting"]
sundeep has joined #ocaml
sundeep has quit [Remote closed the connection]
sundeep has joined #ocaml
jcll has joined #ocaml
Khortl has joined #ocaml
CiscoKid has quit ["Leaving"]
jcll has quit ["Leaving"]
monotonom has quit ["Don't talk to those who talk to themselves."]
gim has quit ["chtit war3 time"]
<bk_> ocaml is a great language, it only has one problem, its practically non-existant community
<bk_> g'nite
bk_ has quit ["I'll be back"]
smimou has quit ["?"]
<buggs> the object type system sucks imho