mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
thrasibule has quit [Ping timeout: 276 seconds]
thrasibule has joined #ocaml
Amorphous has joined #ocaml
thrasibule has quit [Ping timeout: 260 seconds]
thrasibule has joined #ocaml
yakischloba has quit [Quit: Leaving.]
ccasin has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
srcerer has quit [Read error: Connection reset by peer]
srcerer has joined #ocaml
derdon has quit [Ping timeout: 240 seconds]
philtor has joined #ocaml
sepp2k1 has quit [Quit: Leaving.]
Zeneris has quit [Ping timeout: 276 seconds]
joewilliams is now known as joewilliams_away
jeddhaberstro has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
jeddhaberstro has quit [Remote host closed the connection]
jeddhaberstro has joined #ocaml
philtor has quit [Ping timeout: 276 seconds]
joewilliams_away is now known as joewilliams
yakischloba has joined #ocaml
grettke has joined #ocaml
grettke has quit []
sshc has joined #ocaml
grettke has joined #ocaml
sshc has quit [Quit: leaving]
joewilliams is now known as joewilliams_away
_unK has quit [Remote host closed the connection]
SEcki has quit [Read error: Connection reset by peer]
sealion has joined #ocaml
caligula_ has quit [Ping timeout: 240 seconds]
caligula_ has joined #ocaml
drk-sd has joined #ocaml
maskd has quit [Quit: leaving]
Shoggoth has joined #ocaml
thrasibule_ has joined #ocaml
thrasibule has quit [Ping timeout: 240 seconds]
grettke has quit []
bzzbzz has quit [Quit: leaving]
sshc has joined #ocaml
sshc has quit [Changing host]
sshc has joined #ocaml
thrasibule_ has quit [Ping timeout: 240 seconds]
drk-sd has quit [Quit: {'EXIT', drk-sd, "bye"}]
ccasin has quit [Quit: Leaving]
sealion has left #ocaml []
Shoggoth has quit [Quit: Ex-Chat]
<orbitz> hello
<orbitz> I'm trying to read lazily from a file. the problem is the file can have multiple records and the recrods can be more than i can fit in memory so I want to return a stream to read the file then for each record tha tis found a stream to read teh record, and when that stream runs out go back to the other stream for the next record. make sense? problem is it's getting ugly. suggestiosn?
jeddhaberstro has quit [Quit: jeddhaberstro]
schmx has quit [Read error: Operation timed out]
schmx has joined #ocaml
schmx has quit [Changing host]
schmx has joined #ocaml
yakischloba has quit [Quit: Leaving.]
ygrek has joined #ocaml
joewilliams_away is now known as joewilliams
tmaedaZ has quit [Ping timeout: 240 seconds]
joewilliams is now known as joewilliams_away
_zack has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
tmaedaZ has joined #ocaml
smimou has quit [Remote host closed the connection]
_zack has quit [Quit: Leaving.]
<flux> orbitz, so your data structure would be like type 'a t = Data of ('a * 'a Lazy.t) | End ?
humasect has joined #ocaml
ygrek has joined #ocaml
Snark has joined #ocaml
seafood has joined #ocaml
_unK has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Quit: Yoric]
ulfdoz has joined #ocaml
fschwidom has joined #ocaml
dark has quit [Remote host closed the connection]
fschwidom has quit [Remote host closed the connection]
drunK has joined #ocaml
_unK has quit [Ping timeout: 276 seconds]
drunK is now known as _unK
seafood has quit [Quit: seafood]
tmaedaZ has quit [Ping timeout: 258 seconds]
tmaedaZ has joined #ocaml
tmaedaZ has quit [Ping timeout: 264 seconds]
ikaros has joined #ocaml
humasect has quit [Quit: Leaving...]
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
sepp2k has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Quit: Associat0r]
maskd has joined #ocaml
boscop has joined #ocaml
Associat0r has joined #ocaml
sepp2k1 has joined #ocaml
drk-sd has joined #ocaml
sepp2k has quit [Ping timeout: 276 seconds]
Ronster has joined #ocaml
derdon has joined #ocaml
Ronster has left #ocaml []
Ronster has joined #ocaml
grettke has joined #ocaml
Ronster has left #ocaml []
thrasibule has joined #ocaml
thrasibule has quit [Ping timeout: 246 seconds]
Demitar has quit [Quit: Bubbles!]
ttamttam has joined #ocaml
Demitar has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
ttamttam has quit [Client Quit]
ccasin has joined #ocaml
thrasibule has joined #ocaml
thrasibule has quit [Remote host closed the connection]
thrasibule has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
mjonsson has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
<Camarade_Tux> I'm trying to use Format.printf but I have some problems: without using it, no problem: let rec print_x (i, c) = Format.open_vbox 1; print_int i; print_string ", "; may_print c; Format.close_box ()
<Camarade_Tux> but it's a bit verbose and I'd really like to use Format.printf, but I can't translate it =/
<Camarade_Tux> (not pasting the other parts of the code since they're pretty much ininteresting, only thing is: type x = int * x option )
thrasibule has quit [Read error: Operation timed out]
komar_ has joined #ocaml
komar_ has quit [Client Quit]
<orbitz> flux: I think it's more annoying than that. I'm reading fasta files which contain genomic data. So teh fasta file can be gigabytes and each fasta entry in it could be giagabytes as well so I want to be able to stream the entire contents out in a useful way
derdon has quit [Ping timeout: 245 seconds]
mutewit has joined #ocaml
<flux> orbitz, what kind of processing do you wish to do to it?
mjonsson has joined #ocaml
mutewit has quit [Quit: leaving]
<orbitz> flux: in some cases I'll be reading the sequence data in in other cases i'll just be reducing teh data down to statistics. I'd like it to be able to work on files that excede the memroy fo the machien
<flux> orbitz, how about if you provide a folding function for the dataset?
<orbitz> flux: i'd rather be able to make it a lazy stream that i can pass around rather than have to provide a function to a fold
<orbitz> flux: my adhoc solution right now is a lazy stream that returns a type fasta = Header of string | Sequence of string, and you can have mutlipel Sequence's after a Header. I'm not the biggest fan of it
yakischloba has joined #ocaml
<flux> orbitz, you could use that t like: type basic_element = int t type entry = basic_element t perhaps
thrasibule has joined #ocaml
<flux> if you want to have more strcture in your stream (or a big lazy object in this case)
komar_ has joined #ocaml
<flux> actually I did something similar (not for practical reasons but rather for PoC or fun) with threadpicker
maskd has quit [Ping timeout: 260 seconds]
<flux> (but it can seem slightly obfuscated perhaps given the task :-))
<flux> it parses the From-header, the key-value-pair headers and the body from a mail file in an online-fashion, so data gets parsed as you Lazy.force blocks from the data structure you get from Mail.of_enum
<orbitz> why do you parse mail lazily?
<flux> no real reason
<flux> other than I suppose mails could be big
<flux> (although not very big, usually < 8M or so)
<flux> mostly because I can?-)
komar_ has quit [Client Quit]
<flux> (also it demonstrates the use of Batteries' ParserCo.suspend which I implemented)
<orbitz> the specific problem I've having is a cannot keep the contents of a fasta file in memory and a fasta file can have multiple records in it which i probably can't keep in memory either. It would be easier if fasta files were indexed but like all bioinformatics theya ren't
<flux> ((mind you, it's only a few lines))
maskd has joined #ocaml
<flux> I think in principle it's the same problem, except in my case the problem doesn't really exist :)
<orbitz> hah
<flux> in any case, in theory running Mail.dump (Mail.of_enum (IO.chars_of stdin)) should not require more memory max(1024, longest field in the header)
grettke has quit []
<Camarade_Tux> well, still can't get Format to do what I want: here's a minimal case if someone wants to check it: http://vpaste.net/Rn99N?
pimmhogeling has joined #ocaml
krankkatze has joined #ocaml
joewilliams_away is now known as joewilliams
SEcki has joined #ocaml
joewilliams is now known as joewilliams_away
_zack has joined #ocaml
sfuentes has left #ocaml []
Yoric has joined #ocaml
cirwin has joined #ocaml
Yoric has quit [Quit: Yoric]
MrEvil has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Snark has quit [Ping timeout: 276 seconds]
<thelema> orbitz: It seems that File.lines_of would do a good job of streaming a fasta file
cirwin has left #ocaml []
<orbitz> thelema: since fasta files can be very large and their lines tend to eb veyr short I think I want to read in larger chunks than lines
Yoric has joined #ocaml
<flux> orbitz, you do eventually need to consider the individual lines, though?
<orbitz> no
<orbitz> i plan on reading the sequence in chunks and joining lines
<thelema> BatIO.chunks_of
<thelema> open_in file |> BatIO.chunks_of 1_000_000 |> ...
MrEvil has quit [Quit: This computer has gone to sleep]
<thelema> read 1Mb at a time, if you like
<orbitz> thanks
<flux> hey, that sounds thoughtful
<orbitz> is 1_000_000 really valid in Ocaml?
<flux> it is
<thelema> of course.
<flux> as is 1_0_00_000
<orbitz> why?
<flux> if you prefer fibonacci sequences
<orbitz> hah
<thelema> lol
<flux> for readability sake I imagine
<thelema> exactly.
<orbitz> interesting
<orbitz> a surprise around every corner
humasect has joined #ocaml
<orbitz> sadly i have to type a paper before I can do any more prgoramming
<flux> thelema, how recent version of batteries does godi have?
Anarchos has joined #ocaml
<thelema> very old
elehack has joined #ocaml
elehack is now known as elehack|afk
_zack has quit [Quit: Leaving.]
seafood has joined #ocaml
thieusoai has joined #ocaml
<flux> hmph.. quite surprising that CalendarLib would have issues compiling, given it's pure (?) ocaml code
<flux> godi on solaris has issues linking it
<flux> argh, and I failed teh apostrophe
<flux> and it's a pain to hack godi's packages - especially if you haven't done it for a while and need to figure out how :)
elehack|afk is now known as elehack
<Camarade_Tux> yeah, godi's version of batteries is maybe from last september or something like that
<Camarade_Tux> and I definitely agree that locally changing godi packages or anything like that is really annoying
<elehack> I've had decent luck patching packages by using LOCALPATCHES, but that doesn't patch the GODI build file and doesn't increment the version.
<thelema> hi elehack
<elehack> thelema: greetings
Yoric has quit [Ping timeout: 260 seconds]
Demitar has quit [Quit: Bubbles!]
komar_ has joined #ocaml
Demitar has joined #ocaml
komar_ has quit [Client Quit]
<flux> fun: Fatal error: exception Undefined_recursive_module("omake_node.ml", 435, 3)
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<flux> seems like it might be a bug in omake
<thelema> yup. what're you trying to do?
<flux> compile omake
<flux> trying with ocamlc 3.11.2 instead of the solaris one 3.08.x now, maybe it helps
<thelema> maybe 3.08 didn't have the recursive modules?
<flux> well, atleast it goes further this time
_unK has quit [Remote host closed the connection]
<flux> bah, undefined symbol caml_sync first references in file ../exec/exec.a(omake_exec.o)
<flux> methinks it's time for me to go asleep..
<flux> turns out ./src/exec/omake_exec.ml:external sync : unit -> unit = "caml_sync" is the only place that references to symbol caml_sync, so I guess it assumes it just exists in the ocaml build, but apparently in this case it doesn't..
seafood has quit [Quit: seafood]
seafood has joined #ocaml
<flux> great, omake installed!
<flux> batteries must be the only piece of software that didn't cause me trouble for compiling tonight :)
seafood has quit [Quit: seafood]
<thelema> yay. sorry about the dependency on omake - I'd be happy getting rid of it.
<elehack> thelema, as much as I like omake (after seeing it in Batteries, I've started using it for my own stuff and have been pleased), being buildable with ocamlbuild might be nice.
<elehack> I don't think Batteries has any particularly problematic parts of its build that should make an ocamlbuild conversion difficult.
ygrek has quit [Ping timeout: 245 seconds]
<thelema> Agreed. The big thing that I appreciate with omake is the really fast compiles
<thelema> I plan on revisiting it once 3.12 comes out, as it's got some planned improvements to ocamlbuild
<thelema> I dunno if they'll implement faster checking / parallel compiles
Mr_Awesome has joined #ocaml
<elehack> There might be benefits to maintaining compatibility with 3.11 though - the next Ubuntu LTS will ship with it.
ccasin has quit [Quit: Leaving]
ccasin has joined #ocaml
<thelema> I'd like to see actual demand - compatibility with 3.10 got dropped for batteries 1.0 and noone I know has complained
yakischloba has quit [Quit: Leaving.]
seafood has joined #ocaml
seafood has quit [Quit: seafood]
yakischloba has joined #ocaml
elehack has quit [Ping timeout: 276 seconds]
seafood has joined #ocaml
elehack has joined #ocaml
Associat0r has joined #ocaml
Amorphous has quit [Ping timeout: 246 seconds]
humasect has quit [Quit: Leaving...]