gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz_ is now known as ulfdoz
smerz has quit [Remote host closed the connection]
danblick has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
jamii has quit [Read error: Operation timed out]
kolera has joined #ocaml
tmaedaZ has quit [Ping timeout: 256 seconds]
tmaedaZ has joined #ocaml
<taruti> Is there no source repository for plasma fs?
<thelema> hmm, you're right...
<thelema> not even a svn tree here: https://godirepo.camlcity.org/openapps/svnindex.cgi
bjorkintosh has quit [Read error: No route to host]
emmanuelux has quit [Ping timeout: 264 seconds]
kolera has quit [Quit: Ex-Chat]
ulfdoz has quit [Ping timeout: 248 seconds]
<adrien> it's served over plasmafs itself :-)
danblick has quit [Ping timeout: 256 seconds]
nosuni has quit [Quit: Lost terminal]
manu3000 has quit [Quit: manu3000]
danblick has joined #ocaml
danblick has quit [Client Quit]
danblick has joined #ocaml
danblick has left #ocaml []
tmaedaZ has quit [Ping timeout: 248 seconds]
tmaedaZ has joined #ocaml
yroeht has quit [Read error: Connection reset by peer]
fpz has quit [Read error: Connection reset by peer]
fpz has joined #ocaml
Snark has joined #ocaml
pango is now known as pangoafk
tmaedaZ has quit [Ping timeout: 260 seconds]
fpz has quit [Ping timeout: 245 seconds]
fpz has joined #ocaml
tmaedaZ has joined #ocaml
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
ankit9 has joined #ocaml
Yoric has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
ocp has joined #ocaml
testcocoon has joined #ocaml
djcoin has joined #ocaml
srcerer_ has joined #ocaml
sivoais_ has joined #ocaml
srcerer has quit [Ping timeout: 245 seconds]
sivoais has quit [Remote host closed the connection]
ggherdov has quit [Ping timeout: 245 seconds]
tomprince has quit [Ping timeout: 245 seconds]
pippijn has quit [Ping timeout: 245 seconds]
bobry has quit [Ping timeout: 245 seconds]
pippijn has joined #ocaml
Sablier has joined #ocaml
Sablier_ has joined #ocaml
thomasga has joined #ocaml
tomprince has joined #ocaml
Sablier_ has quit [Quit: Quitte]
bobry has joined #ocaml
cyphase has quit [Ping timeout: 245 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
ocp has quit [Ping timeout: 240 seconds]
<taruti> Is there no markdown/textile/asciidoc/... to html library in ocaml?
mika1 has joined #ocaml
testcocoon has joined #ocaml
<Drakken> taruti hevea converts from latex.
cyphase has joined #ocaml
<Yoric> taruti: There's also ant, in a different category.
cago has joined #ocaml
tmaedaZ has quit [Ping timeout: 252 seconds]
avsm has joined #ocaml
<taruti> that is not quite what I am looking either (pondering on formatted comments in a webapp scenario)
ankit9 has quit [Ping timeout: 240 seconds]
tmaedaZ has joined #ocaml
<Drakken> yep
tmaedaZ has quit [Ping timeout: 246 seconds]
mjmt has quit [Quit: Classen's law -- usefulness = log(technology)]
tmaedaZ has joined #ocaml
rossberg has joined #ocaml
ftrvxmtrx has joined #ocaml
avsm has quit [Quit: Leaving.]
cataska has joined #ocaml
snearch has joined #ocaml
ankit9 has joined #ocaml
ousado has quit [Ping timeout: 276 seconds]
mcstar has joined #ocaml
<mcstar> im reading Think Ocaml, and id like help to understand something
<mcstar> the guy says, that order of definition of functions in a file doesnt matter
<mcstar> but thats clearly not the case when i try to run the example
<mcstar> what am i missing?
<_habnabit> mcstar, he's incorrect
ousado has joined #ocaml
<mcstar> ah great, thanks
<_habnabit> lexical order in files matters
<mcstar> he must be confused with haskell
<_habnabit> I could be wrong, but I have _never_ seen anything that suggests you could reorder the statements like is stated here
<mfp> this is just wrong (and not grammatical?) -> "In Ocaml, so you can define a function after you call it, so long as it is called and defined in the same script"
<_habnabit> yeah, that grammar is funky
<f[x]> wtf really
<mfp> maybe the author was testing this in the toplevel and just picked up earlier definitions when trying with different orders
<mcstar> :S
<f[x]> good excuse for the _book_ author
<mcstar> The sequence point is actually an operator, like +. It takes a unit on the left and anything on the right and returns the right
eni has joined #ocaml
<mcstar> he is explaining ;
<mcstar> but if its a normal operator, like (+), why cant i print its type?
osa1 has joined #ocaml
<_habnabit> i wouldn't say it's 'like +'
<_habnabit> if anything, it's like :: -- they're both ostensibly operators, but are implemented as syntax
silver has joined #ocaml
<_habnabit> you can't get their value and you can't reassign to their value
<mcstar> and the 'unit' type is not enforced, it gives only a warning, if the left expression actually returns anything else but unit
<_habnabit> right
ankit9 has quit [Read error: Operation timed out]
<mcstar> and its weird, that he suggests to "#use "printf.ml";;", and not "open Printf;;", he never mentions 'open' in the book, afaics
<_habnabit> could be a bad book
eni has quit [Quit: Leaving]
<mcstar> is there a reason, that the ocaml prompt # would change to >>> ?
<mcstar> multi-line input maybe?
f[x] has quit [Quit: Leaving]
<mcstar> >>> michael = 1
<mcstar> >>> print_twice michael
f[x] has joined #ocaml
<mcstar> oh
<mcstar> i get it
<mcstar> he just edited the Python version of the book
<mcstar> Think like a computer scientist is in Python originally
ankit9 has joined #ocaml
<mcstar> ok, theres another error, he forgot to use "" instead of '', and the example gives wrong output
<mcstar> i wont bother you guys again with that book
ankit9 has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
<mcstar> (maybe except when i see some serious errors)
<mcstar> i read some bad reviews of Practical Ocaml
<mcstar> what is the most recommended guide to ocaml nowadays?
Gurrag has joined #ocaml
Gurrag has left #ocaml []
Hussaind has joined #ocaml
Hussaind has left #ocaml []
ousado has quit [Ping timeout: 240 seconds]
<mcstar> turns out i have that already
<mcstar> thanks, ill read that one
ankit9 has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
Hussaind has joined #ocaml
ousado has joined #ocaml
Hussaind has left #ocaml []
ousado has quit [Changing host]
ousado has joined #ocaml
alxbl has quit [Ping timeout: 248 seconds]
alxbl has joined #ocaml
avsm has quit [Quit: Leaving.]
emmanuelux has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
ocp has joined #ocaml
silver has quit [Quit: I put on my robe and wizard hat]
_andre has joined #ocaml
jonafan has quit [Ping timeout: 260 seconds]
tlockney has quit [Ping timeout: 240 seconds]
tlockney has joined #ocaml
mcstar has left #ocaml []
milosn has quit [Ping timeout: 240 seconds]
milosn has joined #ocaml
jonafan has joined #ocaml
cdidd has joined #ocaml
avsm has joined #ocaml
rixed has quit [Ping timeout: 248 seconds]
avsm has quit [Quit: Leaving.]
silver has joined #ocaml
gnuvince has quit [Ping timeout: 250 seconds]
eikke has joined #ocaml
<eikke> I think using Unix.select can easily result in memory corruption issues
<adrien> http://pragprog.com/the-pragmatic-programmer/extracts/tips , look for "select" in the page
<adrien> while perfectly possible, you'll have to show a very good test case
Yoric has joined #ocaml
<eikke> adrien: I got a case but it only proves something goes wrong thanks to strace, it doesnt die
<eikke> but when reading the library code, it seems obvious things will fail
<eikke> basically, whenever you pass an FD >= 1024 in the FD list, and FD_SETSIZE is 1024 on the system (like it is on most by default)
<adrien> how can you pass such an fd?
avsm has joined #ocaml
<eikke> adrien: by opening more than 1024 files first? :)
<eikke> ?
<eikke> wrong window, sorry
ankit9 has quit [*.net *.split]
tmaedaZ has quit [*.net *.split]
alex-hu has quit [*.net *.split]
kaustuv has quit [*.net *.split]
bacam has quit [*.net *.split]
alex-hu has joined #ocaml
snearch has quit [Quit: Verlassend]
ankit9 has joined #ocaml
tmaedaZ has joined #ocaml
kaustuv has joined #ocaml
bacam has joined #ocaml
smondet has joined #ocaml
jamii has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
osa1 has joined #ocaml
avsm1 has quit [Quit: Leaving.]
avsm has joined #ocaml
BiDOrD_ has joined #ocaml
ski has quit [Read error: Operation timed out]
BiDOrD has quit [Ping timeout: 260 seconds]
rixed has joined #ocaml
gnuvince has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
<dca> how can i pattern match over records?
<dca> i have this: type point = {x: int; y: int}
<dca> how can i decompose it in pattern matching?
<mrvn> # let foo x = match x with { x = x; } -> x;;
<mrvn> val foo : point -> int = <fun>
<pippijn> or { x }
<mrvn> personaly I find r.x much simpler.
<mrvn> right, if the label and binding/value are the same you can skip it.
<pippijn> also
<pippijn> let foo { x } = x
<dca> thank you
<dca> one more question: where can i find effective sorting routines for arrays?
<pippijn> I think there is an Array.sort
<mrvn> otherwise of_list (List.sort (to_list))
<mrvn> or write your own.
avsm1 has quit [Quit: Leaving.]
<jaxtr> ahh it's a wonderful day
<Hodapp> gawd, I sort of wish Scala's compiler didn't dim my lights when it starts
<Hodapp> I didn't use OCaml much but I don't remember that happening.
<fasta> Hodapp: dim your lights? lol
ftrvxmtrx has quit [Quit: Leaving]
<fasta> Does it need a nuclear reactor to run?
<Hodapp> I tried running it on my G4 too. Compilation of "hello world" took about 2 minutes.
<Hodapp> whereas ocamlc seemed to run plenty fast on the same box.
Sablier has quit [Ping timeout: 256 seconds]
<Qrntz> sadly, it's a common tendency among today's languages
<Qrntz> haskell is outright painful on a single core
<Hodapp> eeep
<Hodapp> I haven't used Haskell
<Hodapp> Scala does seem to have some big overhead both to compile and to run, though I don't know how much of that is just Java
<adrien> Qrntz: are you going to tell us that C++ is almost quick to compile?
<Qrntz> no. :-)
<fasta> Forth doesn't require a good CPU :)
<Hodapp> bahhhh
mika1 has quit [Quit: Leaving.]
cago has quit [Quit: Leaving.]
<Qrntz> Sun Apr 29 01:48:54 2012 >>> dev-lang/ghc-7.4.1-r1 merge time: 1 hour, 32 minutes and 56 seconds.
<Qrntz> (single-core low-load server)
<Qrntz> still not claiming that as greatly exceptional, of course
<adrien> what is that?
<Hodapp> Qrntz: what operation is that?
<Qrntz> emerging on gentoo
<Qrntz> i. e. compilation from source
<adrien> :P
<adrien> my laptop builds GCC with almost all languages enabled in 2 hours
<Hodapp> GHC is written in, what, Haskell and C?
<adrien> and my laptop is not very fast
<Qrntz> ghc is largely self-hosting
<Qrntz> so yeah, a big chunk of that is just haskell
<Hodapp> adrien: I remember trying to build GCC on a Pentium so that I could get Objective C support which my distro's version lacked
<Hodapp> this was a weekend-long affair
<fasta> Doctor, it hurts when I compile GHC.
<fasta> Don't do it then.
<Qrntz> the average merge time for it on my dual-core desktop is about 32 minutes
<adrien> my quad builds everything in 33 minutes, that includes extracting sources and configures
<adrien> =)
<fasta> Doctor, I only run Gentoo to impress my geek friends, but still it hurts.
<fasta> Don't do it then.
<fasta> Build openoffice for even more fun.
<adrien> build openoffice on windows
<Hodapp> build it? hell, try RUNNING it on that same Pentium.
<Qrntz> I have binary packages for openoffice, compiling that is largely a waste of time
<fasta> Be sure to do your part in the Kyoto treaty.
<Hodapp> oh, it'll run. sort of.
<Qrntz> oh, and of course
<Hodapp> openoffice for me was usually in the category of "need MS Office support, don't want to reboot / rebooting won't help me"
err404 has joined #ocaml
ankit9 has quit [Ping timeout: 240 seconds]
Sablier has joined #ocaml
ski has joined #ocaml
<Yoric> Anyway, migrate to LibreOffice, now :)
djcoin has quit [Quit: WeeChat 0.3.2]
<Hodapp> bah
<Hodapp> I am just not a fan of WYSIWYG office tools sometimes :-/
ankit9 has joined #ocaml
ski has quit [Ping timeout: 244 seconds]
Kakadu has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
oriba has joined #ocaml
eikke has quit [Read error: Operation timed out]
Kakadu has quit [Read error: Connection reset by peer]
jamii has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
emmanuelux has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
sivoais_ has quit [Quit: leaving]
fpz has quit [Ping timeout: 246 seconds]
fpz has joined #ocaml
jamii has joined #ocaml
ocp has quit [Ping timeout: 245 seconds]
sivoais has joined #ocaml
silver has quit [Remote host closed the connection]
<wmeyer``> hi
osa1 has quit [Quit: Konversation terminated!]
srcerer_ is now known as srcerer
ski has joined #ocaml
mathieui_ has joined #ocaml
mathieui has quit [Read error: Operation timed out]
mathieui_ is now known as mathieui
ftrvxmtrx has joined #ocaml
hto has joined #ocaml
pangoafk is now known as pango
<ssbr_> OK I may have found the most useless error message ever
<_habnabit> ssbr_, delete all of your .cmx{a,} files and try again
<ssbr_> Apparently this means "recompile Buddy"
<ssbr_> (works now)
eikke has joined #ocaml
<gnuvince> Can anyone explain to me the signature mismatch in the following code, and how to possibly fix it? http://ideone.com/n7Q5t
jamii has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
ankit9 has quit [Quit: Leaving]
eikke has quit [Ping timeout: 244 seconds]
oriba_ has joined #ocaml
oriba has quit [Read error: Operation timed out]
<ssbr_> I suppose there is no way to debug code that is compiled to machine code, right? Only bytecode?
<ssbr_> this project has makefiles I have a hard time editing. :<
<ssbr_> (so making it output bytecode seems.. difficult)
<Hodapp> Sometimes with Makefiles you can find a variable used globally that dictates what line it compiles with
<_habnabit> ssbr_, 'debug' how
<ssbr_> _habnabit: with a debugger.
<_habnabit> ocamldebug?
<ssbr_> I want to play with a variable at a certain step in the program
<ssbr_> _habnabit: I think so
<_habnabit> ha ha, good luck
<ssbr_> :(
<Qrntz> ssbr_, a patch that allows for debugging native ocaml code with gdb is ported to svn trunk and will be released in 3.13 (aka 4.0)
<Qrntz> still, «Reading and writing OCaml values is not supported; however, it is possible to read OCaml values (when you know its address) using the mlvalues.py script from ygrek»
<ssbr_> Uh
<ssbr_> What do you do then? just step through without seeing anything?
<Qrntz> the description sums it up.
<ssbr_> It says "debug", but I'm not sure what that means.
<ssbr_> Well, anyway, it's no use to me for now. But thank you.
<Qrntz> you're welcome
<gnuvince> Can anyone explain to me the signature mismatch in the following code, and how to possibly fix it? http://ideone.com/n7Q5t
eikke has joined #ocaml
<Ptival> there is probably some need for a variance annotation of a "with ..." annotation, but I'm not an expert enough :)
<Ptival> s/of/or/
Sablier has quit [Ping timeout: 260 seconds]
kolera has joined #ocaml
kolera_ has joined #ocaml
kolera_ has quit [Read error: Connection reset by peer]
kolera has quit [Client Quit]
kolera has joined #ocaml
kolera_ has joined #ocaml
kolera_ has quit [Client Quit]
kolera has quit [Client Quit]
kolera has joined #ocaml
<Ptival> module AssocList : DICTIONARY with type 'a t = (string * 'a) list
<Ptival> fixes the problem but does not look quite cool
<Ptival> gnuvince: I think I can sort of explain the problem
<Ptival> when you write "module AssocList : DICTIONARY", you say to the external world "you may only assume that AssocList satisfies DICTIONARY"
kolera has quit [Client Quit]
<Ptival> In particular, the DICTIONARY sig is abstracted over t
<Ptival> so when you "include AssocList" in AssocListPlus, you don't really include is as a "textual" include, but rather as part of the outside world, that does not know more than what DICTIONARY tells
<Ptival> so, the fix is to tell more
Sablier has joined #ocaml
kolera has joined #ocaml
<Ptival> this is often referred to as a "sharing constraint"
Yoric has quit [Ping timeout: 264 seconds]
eikke has quit [Ping timeout: 265 seconds]
<gnuvince> Ptival: thanks
<gnuvince> And indeed, it's kinda ugly with the "with type ..." part :)
Snark has quit [Quit: Quitte]
jamii has joined #ocaml
amness4 has joined #ocaml
amness4 has left #ocaml []
mcstar has joined #ocaml
<mcstar> how come (-) is polymorphic? i.e. it accepts ints and floats? jason hickey says you need -. for floats
<_habnabit> mcstar, it isn't polymorphic
<_habnabit> it also doesn't accept ints and floats
<mcstar> so - in -5 is not a unary operator?
<_habnabit> the unary operator is (~-), not (-)
<_habnabit> ocaml just allows it to be written as - sometimes
<mrvn> -5 is a int literal -5 instead of (-) 5
<mcstar> he was pretty thorough in listing the operators, he should have mentioned this there
<_habnabit> is this still the same book? it doesn't seem very good
<mcstar> btw, i found an error in his assoc function
<mcstar> _habnabit: no, this is the one someone suggested here
<mcstar> bt mpf
<mcstar> by*
snearch has joined #ocaml
<mcstar> http://imgur.com/TlyjZ clearly, 'x' should be 'key'
<Ptival> yes
_andre has quit [Quit: leaving]
Yoric has joined #ocaml
<mcstar> surprise 1 + + + + 1;;
<mcstar> wth is going on?
<_habnabit> + is a unary operator too
<_habnabit> so that's ((+) 1 ((~+) 1)) etc.
<mcstar> i see
<mcstar> can there be user defined unary operators?
<_habnabit> sure
<_habnabit> unary operators all start with ~
<_habnabit> (except (!))
<mrvn> Imho that shouldn't parse.
Reventlov has quit [Ping timeout: 245 seconds]
<mcstar> so in 1 + + + + 1;; the first + is binary, the others are unary?
<_habnabit> yes
<mrvn> why does the grammar allow multiple unary operators?
Kakadu has left #ocaml []
<_habnabit> why not?
<mrvn> because that makes no sense
Yoric has quit [Ping timeout: 260 seconds]
<_habnabit> it could, if you define your own unary operator
<mcstar> _habnabit: what troubles me, is that you dont have to put ~ in front of them
<_habnabit> # let (~++) = succ in 1 + ~++ ~++ ~++ ~++ 2;;
<_habnabit> - : int = 7
<_habnabit> etc.
<Ptival> multiple unary operators sometimes make sense
<Ptival> I'm thinking ~ ~ P in logic
<mcstar> _habnabit: no, i mean in my exmaple, + is automatically made into a unary operator ~+
<mcstar> if i unerstand correclty
<_habnabit> mcstar, yes, I know
<_habnabit> mcstar, that was not for you
<mcstar> k
<mcstar> _habnabit: can you help me understand why an eta expansion alleviated monomorphism?
<mcstar> s*
Reventlov has joined #ocaml
<_habnabit> mcstar, ocaml only allows polymorphism in function parameters
emmanuelux has joined #ocaml
snearch has quit [Quit: Verlassend]
<mcstar> _habnabit: how is this different from haskell's polymorphism?
thomasga has quit [Quit: Leaving.]
<_habnabit> I don't know haskell
<mcstar> in haskell, id id :: a -> a
<mcstar> while in ocaml, id id : '_a -> '_a
<mrvn> mcstar: '_a means you forgot to set the type contravariant.
<mrvn> iirc
<mcstar> i never heard it desribed that way
<mcstar> it becomes basically an existential type, in haskell lingo i think
<mrvn> '_a means "one of something but I don't yet know what" while you want "anything"
<mcstar> yes
<mcstar> i dont 'want', im just asking about the differences between the 2 type systems
<mrvn> # let f x = (id id) x;;
<mrvn> val f : 'a -> 'a = <fun>
<mcstar> yes
<mrvn> ik, not a contravariant problem, a value restriction problem
<mrvn> ok
<mcstar> the book argues, that this behavior is necessary, because ocaml is impure, and there are mutable types
<mcstar> but unfortunately either im dump, or it isnt explained very well
<mcstar> dumb*
<mrvn> I don't think one would put it like that but I think that is essentially true. The value restriction comes into play so that you can't mess up the type in mutables.
<jonafan> doesn't haskell have similar problems with typeclasses?
<Ptival> I don't think they are "similar"
<mrvn> Basically consider: let x = ref [] let () = x := [1] let () = x := ["s"]
<jonafan> yeah i guess not
Yoric has joined #ocaml
osa1 has joined #ocaml
manu3000 has joined #ocaml
<mcstar> mrvn: well, in haskell that kind of thing 'ref []' would just create an action, and that wouldnt get evaluted, and you could use it many times, while in ocaml that really allocates, and mutates state
<mcstar> so it is understandable, that the 'a list needs to be specialized
andreypopp has joined #ocaml
<mcstar> also, this specific example seems to be not working in haskell
<mcstar> ill probably harrass #haskell
gnuvince has quit [Ping timeout: 245 seconds]
Yoric has quit [Remote host closed the connection]
ggherdov has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
ftrvxmtrx has quit [Ping timeout: 272 seconds]
err404 has quit [Quit: Ex-Chat]
jamii has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
gnuvince has joined #ocaml
andreypopp has quit [Quit: Computer has gone to sleep.]
<alex-hu> /join #haskell
<alex-hu> /join #haskell
<alex-hu> sorry
<Hodapp> NO!
<mcstar> haha a convert
<alex-hu> Somehow xchat only accepts join in the server window :-\
<_habnabit> you had a leading space
<mcstar> alex-hu: space
<alex-hu> mcstar, How could that thing (asked on #haskell) be done in ocaml?
<alex-hu> mcstar, as for "what's wrong", actually, nothing --- I prefer ocaml for any practical projects, but I'm also learning haskell
<mcstar> alex-hu: memory mapped files?
<alex-hu> yes
<alex-hu> I know it's done with bigarray module, but it doesn't resolve the dilemma I have.
<mcstar> im know more haskell than ocaml, but not very much either
<alex-hu> Unless the array itself were put in a separate file, which is not always practical.
<mcstar> btw im hungarian too
<alex-hu> The question I have is how could I access data (array of doubles) from a memory-mapped file with header (specifying some meta-data) without reading the whole array into memory?
<alex-hu> The array itself is quite big (more than ram available).
Sablier has quit [Read error: Connection reset by peer]
<alex-hu> mcstar, I think this problem is easier to solve in haskell, btw
<mfp> alex-hu: the file being mmaped doesn't mean that it's actually read from disk
<alex-hu> mfp, I understand very well how mmap() works.
<mfp> there's no pb with it being larger than the RAM you have as long as your address space is large enough (i.e. 64-bit) and your *working set* fits
<mfp> sorry then, it seems I misunderstood this > without reading the whole array into memory?
<alex-hu> mfp, But how could I do what I want (accessing values in an array which is a part of a binary data file with header) in ocaml?
<mfp> alex-hu: this might help > http://code.google.com/p/bitstring/
<alex-hu> You could ignore the "without reading..." part --- I just didn't see how could I approach this problem without reading from stream, which is lame.
<mfp> I don't know if bitstring allows to work on mmap'ed files, though
<alex-hu> i think it doesn't
<alex-hu> I checked it out once. A good thing, actually.
<mcstar> alex-hu: "The optional pos parameter is the byte offset in the file of the data being mapped;" from the bigarray doc
<mcstar> so if you have a header in that file, you could set pos to that size i believe
<alex-hu> mcstar, but how would I access the file to parse the header before that? Just use an ordinary stream interface?
<mcstar> probably, id do that
<alex-hu> mcstar, Ok, that might work. Thx.
<alex-hu> mcstar, what about a more complex problem: we need to map multiple arrays in a single file?
<mcstar> alex-hu: im sure you know about the tools available to ocaml more than me, i was just giving some general advice
<alex-hu> mcstar, In principle, I could use the same handle and different offsets, right?
<mcstar> know more*
<mcstar> depends on the layout of the array
emmanuelux has quit [Read error: No route to host]