<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)]