<orbitz>
Since Batteries is trying to be a drop in replacement for stdlib, AFAIK, I don't think you'll find a nice naming convention since teh stdlib lacks one
letrec has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<sliquister>
there could be one in the modules were you don't have some compatibility constraints
sebz has joined #ocaml
<sliquister>
thelema: any opinion on the subject?
sliquister has quit [Quit: Page closed]
sebz has quit [Quit: Computer has gone to sleep.]
iago has quit [Quit: Leaving]
abdallah has joined #ocaml
lopex has quit [Read error: Connection reset by peer]
joewilliams has quit [Remote host closed the connection]
bobry has quit [Read error: Connection reset by peer]
tonyg has joined #ocaml
<tonyg>
Hi all - quick question - how can I get an out_channel that acts like a Buffer.t which accumulates the output sent to it for later extraction as a string?
<tonyg>
Google isn't helping me much :-/
<tonyg>
I mean I could write things to a temporary file and then suck that back in, but that seems... roundabout
<tonyg>
I am starting to believe that it can't be done with the standard library!
<tonyg>
How strange
brooksbp has joined #ocaml
fantasticsid has joined #ocaml
<orbitz>
tonyg: Like C, I don't think Ocaml has a string stream like object
<hcarty>
tonyg: I'm fairly certain Batteries provides the means to do what you're asking.
<hcarty>
tonyg: Which means that it can be done with the stdlib, but perhaps not in a line or two of code :-)
<_habnabit>
tonyg, Batteries has a thing
<_habnabit>
BatIO.output_string
<tonyg>
orbitz, hcarty, _habnabit: thanks! I'll check that out.
sebz has joined #ocaml
philtor has quit [Ping timeout: 240 seconds]
brooksbp has quit [Quit: Leaving]
bobry has joined #ocaml
abdallah has quit [Quit: Ex-Chat]
letrec has quit [Ping timeout: 252 seconds]
pilki has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
tonyg has left #ocaml []
Drup has quit [Quit: Leaving.]
pilki has quit [Quit: This computer has gone to sleep]
vivanov has quit [Quit: leaving]
vivanov has joined #ocaml
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 276 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
fantasti` has quit [Ping timeout: 255 seconds]
emmanuelux has quit [Remote host closed the connection]
wagle has quit [Read error: Operation timed out]
sebz has joined #ocaml
sebz has quit []
sebz has joined #ocaml
sebz has quit []
fantasticsid has joined #ocaml
buriedhead has joined #ocaml
ocp has joined #ocaml
milosn has quit [Ping timeout: 260 seconds]
milosn has joined #ocaml
ttamttam has joined #ocaml
Snark has joined #ocaml
Kakadu has joined #ocaml
buriedhead has quit [Ping timeout: 252 seconds]
milosn has quit [Ping timeout: 240 seconds]
edwin has joined #ocaml
bwright has quit [Ping timeout: 255 seconds]
buriedhead has joined #ocaml
milosn has joined #ocaml
ikaros has joined #ocaml
ttamttam has quit [Quit: ttamttam]
Submarine has joined #ocaml
bobry has quit [Remote host closed the connection]
<adrien>
NaCl: or in ocaml with lable! Hmmm I need a better name but these would be bindings to the enlightenment libraries
buriedhead has quit [Ping timeout: 240 seconds]
bobry has joined #ocaml
buriedhead has joined #ocaml
wagle has joined #ocaml
buriedhead has quit [Ping timeout: 240 seconds]
<Qrntzz>
adrien: where does the labl- naming originate from, anyway? it's something I've been wondering upon for a while.
<adrien>
Qrntzz: the label functionnality in ocaml as far as I understand; by Jacques Garrigue too
<adrien>
labels and optional arguments
<adrien>
if I look at lablgtk2's GWindow.window, there are 22 parameters, of which 21 are optional arguments (and therefore labelled)
<adrien>
so I can see their usefulness in such cases
<adrien>
but now, I think that no matter the bindings you want to do, people understand (labl)(foo) as being bindings to the GUI library named "foo"
buriedhead has joined #ocaml
buriedhead has quit [Read error: Connection reset by peer]
buriedhead has joined #ocaml
buriedhead has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Quit: kernel upgrade]
buriedhead has joined #ocaml
ulfdoz has joined #ocaml
buriedhead has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
lopex has joined #ocaml
buriedhead has joined #ocaml
buriedhead has quit [Ping timeout: 240 seconds]
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
letrec has joined #ocaml
buriedhead has joined #ocaml
buriedhead has quit [Ping timeout: 240 seconds]
ankit9 has quit [Quit: Leaving]
buriedhead has joined #ocaml
buriedhead has quit [Read error: Connection reset by peer]
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
buriedhead has joined #ocaml
buriedhead has quit [Ping timeout: 252 seconds]
buriedhead has joined #ocaml
emmanuelux has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
buriedhead has quit [Ping timeout: 252 seconds]
buriedhead has joined #ocaml
buriedhead has quit [Ping timeout: 276 seconds]
letrec has quit [Remote host closed the connection]
letrec has joined #ocaml
raichoo has joined #ocaml
ttamttam has joined #ocaml
raichoo has quit [Ping timeout: 252 seconds]
raichoo has joined #ocaml
<NaCl>
adrien: whoa
pilki has joined #ocaml
<Qrntzz>
adrien: ah, thanks for clarifying that
<bobry>
i wonder why oasis (finally) switched to batteries from extlib? why is it "dead"?
<adrien>
oasis was using extlib?
<thelema>
bobry: huh, oasis switched to batteries?
brooksbp has joined #ocaml
<bobry>
yup, check out the last commit in the darcs repo
<thelema>
extlib has had barely bugfixes over the last ... what, 3 years?
<thelema>
hcarty: maybe ocamlbrew could install git/darcs builds of batteries/oasis
<bobry>
well, it sure isn't "actively developed" :)
<adrien>
I had no idea oasis was using extlib
<adrien>
also, only uses a handful functions
ttamttam has quit [Remote host closed the connection]
<thelema>
hmm, bootstrapping... I guess it's not too bad that batteries can be built w/o oasis
<NaCl>
BatVect. Never leave the cave without it
<adrien>
thelema: well, if oasis depends on oasis for the build, that's first and biggest possible issue; I wouldn't bother with the dependency on batteries
<adrien>
plus everything is nicely duplicated/copied
<adrien>
I mean, batteries, oasis, ... are using DVCSes and have released tarballs which are available at a variety of locations
<thelema>
NaCl: :) it is nice.
<NaCl>
thelema: to append to it, am I supposed to put the Vect in a ref?
<NaCl>
to keep the same vect through iterative constructs
<thelema>
NaCl: yes, vect is functional, so appending to it returns a new vect
<thelema>
I have meny vects in refs, as well as a little mini-library that encapsulates this for accumulating values by index, but not necessarily in order
raichoo_ has joined #ocaml
<NaCl>
thelema: yay I'm not pulling a design pattern from space
raichoo has quit [Ping timeout: 252 seconds]
raichoo_ is now known as raichoo
<Drakken>
thelema I put that batbench plot up onto github
<thelema>
Drakken: ah, i was expecting a fork of bench
<Drakken>
thelema you forgot I'm a compleat nOOOb
<thelema>
well, along those lines: ';' goes at the end of the previous line
<thelema>
hmm, I'm tempted to leave this its own program, and to have it read the results of the last benchmark
<thelema>
I think I can still include it in bench, but have it an optional compile target
<Drakken>
whatever you want. Feel free to make up a wish list of whatever features you can think of.
<Drakken>
There's a few lines of code to automagically adjust the plot style, but I can rip that out if it's too much.
<thelema>
what's with the `set_default_width` function?
<Drakken>
you said the target width was about 600--700 pixels
<thelema>
yes
<Drakken>
I hard-coded that in as a default
<thelema>
yes, but why the function to modify default_width?
<Drakken>
in case you change your mind
<thelema>
default width can be changed directly
<Drakken>
okay, I'll take those set functions out
<thelema>
also, instead of `match xlabel with None -> () | Some v -> f v`, you can use BatOption.... oh, you're not using batteries
<thelema>
well, it may be nice to factor that out into its own function
lopex has quit []
<thelema>
let may f = function None -> () | Some v -> f v
Xizor has joined #ocaml
vivanov has quit [Quit: Lost terminal]
lopexx has joined #ocaml
<Drakken>
archimedes doesn't seem to have any options to adjust the color or thickness of the margin.
<Drakken>
thelema let me know if you want the plot in the bench project. That's what I was asking you about yesterday.
<thelema>
ah, I didn't understand...
raichoo has quit [Quit: Lost terminal]
buriedhead has joined #ocaml
<thelema>
nice examples, I like the switch bar -> impulse w/ ball -> impulse
<Drakken>
It looks like there's only one size of ball.
<thelema>
it doesn't look bad.
<Drakken>
It might be good to add a style option just in case.
pilki has quit [Quit: This computer has gone to sleep]
<thelema>
when making the executable, the .x extension is unusual
<Drakken>
I'm still learning the build system. I assume the entire makefile is unusual.
<thelema>
actually not so bad.
<thelema>
foo.ml usually produces foo as executable
<thelema>
also, no reason to depend on Unix for testplot
<thelema>
probably best to just have -package archimedes
EmmanuelOga has joined #ocaml
Drup has joined #ocaml
iago has joined #ocaml
lopexx has quit [Ping timeout: 252 seconds]
letrec has quit [Ping timeout: 240 seconds]
buriedhead has quit [Quit: Leaving.]
BiDOrD has quit [Read error: Operation timed out]
BiDOrD has joined #ocaml
oriba has joined #ocaml
<thelema>
hmm, I don't want to write even a CSV parser - what's the simplest way (except marshal) to write a float array to a file and read it back in?
<thelema>
(no batteries, too)
philtor has joined #ocaml
<thelema>
it's looking like I write one float per line and float_of_string (input_line ic)
<Drup>
why don't you want to write a CSV parser ? it's very simple with ocamllex/yacc
<thelema>
I'm trying to avoid even String.splitn
<Drup>
but i suposed you could write one float per line and use a special separator to end an array line
<thelema>
*very simple* implementation
<thelema>
ah, I'm back in C land - first line is number of lines following (to allocate the reader's array)
<thelema>
bah, I'm going to omit that and reverse the accumulator list and convert that to an array
zorun has quit [Ping timeout: 244 seconds]
<Drakken>
thelema okay, the plot has styles now
<thelema>
Drakken: shortly, you'll be able to make changes in the bench library (once I get this integrated)
<thelema>
once I get ocaml rebuilt on my laptop
lopexx has joined #ocaml
<thelema>
hcarty: oh yeah, as the ocaml configure script can't autodetect libX11 on ubuntu 11.10, this is one defect in obrew
<thelema>
grr to emacs for not following my OCAMLPATH set in bashrc
ocp1 has joined #ocaml
ocp has quit [Read error: Connection reset by peer]
ocp1 has quit [Client Quit]
ocp has joined #ocaml
ocp has quit [Client Quit]
ocp has joined #ocaml
lopexx has quit []
lopex has joined #ocaml
lopex has quit [Client Quit]
lopex has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
ankit9 has joined #ocaml
Snark has quit [Quit: Quitte]
<hcarty>
thelema: Yes, it works with trunk (and maybe version/3.12?) but not 3.12.1 sadly.
<hcarty>
thelema: Do you know which flags are required to get OCaml's configure to detect X11 and Tk under more recent Ubuntus?
Anarchos has joined #ocaml
<thelema>
I use ./configure --x11lib /usr/lib/x86_64-linux-gnu
<thelema>
that fixes x11, I don't use tk
<thelema>
so I don't care if it's broke
<hcarty>
I only use tk for the module browser GUI
<hcarty>
I would love a better way to access that information locally
<thelema>
I've gotten by with the ocaml and manual documentation and lots of tabs
<hcarty>
I mainly run into issues with locally written and installed modules, when "make doc && make install-doc" hasn't been run recently enough
<thelema>
ah, I just use the ones off various projects' websites
<hcarty>
I got a report that ocamlbrew works on OSX... so that's nice.
<hcarty>
It makes sense that it would, given that OCaml, findlib, and odb all do.
<thelema>
yup.
<thelema>
although no tests are run, so it could be totally bonkers
<hcarty>
I also added a list of recipes, including how to install trunk
<hcarty>
thelema: Quite true
emmanuelux has joined #ocaml
<adrien>
I've found ocamlbrowser terribly useful for lablgtk
<hcarty>
adrien: Yes, I have found the same. Although I haven't had to use/fight lablgtk much recently.
<thelema>
adrien: yes, lablgtk's documentation is particularly resistant to my techniques of finding what I need.
<adrien>
(it should be done, but how important is it?)
<hcarty>
adrien: Having a prominent link to the documentation would be helpful
<thelema>
hcarty: it's there
<hcarty>
thelema: I added a flag to ocamlbrew to allow you to pass configuration options to OCaml. Testing now, then I'll push.
<thelema>
hcarty: a couple lines above "Download"
<hcarty>
thelema: Oh right. Under the "ocamldoc generated documentation" text :-)
<thelema>
hcarty: thanks - this helps
<adrien>
_I_ have issues finding it actually
<hcarty>
adrien: Maybe a "<big text>Documentation</big text>" like you have for downloads
<thelema>
I just bookmark the top of the doc heirarchy
<adrien>
simple stuff would probably to group lablgtk*1* stuff together (probably on another page), move win32 stuff together and factor some of the descriptive text (lots of win32-related repetitions) and maybe have a dedicated page for older releases
<thelema>
still have a pointer from downloads to the win32 section
<adrien>
yes, definitely
<adrien>
do you tend to look at the "GTK documentation"?
<Drakken>
Just for the record, I didn't see any uninstall directions in the INRIA download, so when I installed godi, I manually deleted /usr/lib/ocaml and everything in /usr/local/bin that looked like it was related to ocaml.
<Drakken>
Who knows what I missed...
<Drakken>
I mean /usr/local/lib/ocaml
<Drakken>
same what?
<thelema>
well, try adding "true: use_unix" to examples/_tags
<Drakken>
where? top? bottom?
<thelema>
anywhere
<thelema>
_tags is unordered
<Drakken>
done
<Drakken>
what does "same +" mean?
<thelema>
"+ ocamlfind ..." was the command used by ocamlbuild for compilation
<thelema>
I was just asking if the compilation command was the same