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