<thelema>
astory: 2-sat? You don't need a library - the algorithm is pretty trivial, and the work of converting your data structure to the form for the library would be the same as the work of solving 2-sat
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
ski has quit [Read error: Operation timed out]
arubin has quit [Quit: arubin]
ski has joined #ocaml
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 244 seconds]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<smango>
I can't figure out why ocaml is complaining "Unbound module Thread", I'm doing "open Thread" at the top
<thelema>
smango: you have to link with the thread runtime: ocamlc -thread
<smango>
oh sorry, what if I'm trying to load it in the toplevel with #use?
<thelema>
if you are using findlib, it has #threads, iirc
<thelema>
nope, #thread
<thelema>
There's probably a way to do it without findlib (#use "topfind"), but I don't know it.
<smango>
it doesn't seem to know what topfind is, is there soemething I have to install?
<thelema>
topfind is part of findlib, which also provides ocamlfind
<smango>
awesome, thanks
<thelema>
if you're not using findlib, you should be.
Associat0r has quit [Quit: Associat0r]
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
dnolen has quit [Quit: dnolen]
struktured has quit [Read error: Connection reset by peer]
struktured has joined #ocaml
ankit9 has joined #ocaml
imbric has quit [Quit: imbric]
imbric has joined #ocaml
imbric has quit [Client Quit]
dnolen has joined #ocaml
leoncamel has quit [Quit: leaving]
dnolen has quit [Quit: dnolen]
dsheets has quit [Ping timeout: 260 seconds]
ulfdoz has quit [Read error: Operation timed out]
fschwidom has joined #ocaml
musically_ut has quit [Read error: Operation timed out]
sebz has quit [Quit: Computer has gone to sleep.]
ttamttam has joined #ocaml
ygrek has joined #ocaml
sebz has joined #ocaml
sebz has quit [Ping timeout: 248 seconds]
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
ttamttam has quit [Remote host closed the connection]
sebz has joined #ocaml
maufred has joined #ocaml
Cyanure has joined #ocaml
ttamttam has joined #ocaml
Cyanure has quit [Ping timeout: 244 seconds]
ygrek has quit [Ping timeout: 248 seconds]
ttamttam has quit [Remote host closed the connection]
ikaros has joined #ocaml
Cyanure has joined #ocaml
merijn has joined #ocaml
ttamttam has joined #ocaml
hashar has joined #ocaml
hashar has quit [Changing host]
hashar has joined #ocaml
edwin has joined #ocaml
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
probst has joined #ocaml
raichoo has joined #ocaml
avsm has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
eikke has joined #ocaml
ttamttam has quit [Remote host closed the connection]
beckerb has joined #ocaml
ttamttam has joined #ocaml
<merijn>
Are there any functions to reverse strings/turn string into char lists that I'm somehow overlooking, or don't these exist in the stdlib?
avsm1 has quit [Ping timeout: 244 seconds]
<f[x]>
String.explode
<f[x]>
in extlib
<merijn>
f[x]: Thanks
merijn has quit [Quit: merijn]
ttamttam has quit [Remote host closed the connection]
larhat has joined #ocaml
_andre has joined #ocaml
destrius has quit [Quit: Leaving.]
ikaros has quit [Remote host closed the connection]
reynir has joined #ocaml
<reynir>
Hello!
beckerb has quit [Ping timeout: 252 seconds]
beckerb has joined #ocaml
hashar has quit [Quit: hashar]
edwin has quit [Ping timeout: 240 seconds]
joole_t has joined #ocaml
joole_t is now known as tommytom
edwin has joined #ocaml
ttamttam has joined #ocaml
tommytom has quit [Quit: leaving]
Boscop has joined #ocaml
hashar has joined #ocaml
hashar has quit [Changing host]
hashar has joined #ocaml
hto has quit [*.net *.split]
fschwidom has quit [*.net *.split]
emias has quit [*.net *.split]
explodus has quit [*.net *.split]
hto has joined #ocaml
fschwidom has joined #ocaml
emias has joined #ocaml
explodus has joined #ocaml
avsm has joined #ocaml
ttamttam has quit [Remote host closed the connection]
zorun has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
beckerb has quit [Remote host closed the connection]
beckerb has joined #ocaml
ttamttam has joined #ocaml
edwin has quit [Ping timeout: 276 seconds]
zorun has joined #ocaml
edwin has joined #ocaml
avsm has joined #ocaml
edwin1 has joined #ocaml
edwin has quit [Disconnected by services]
musically_ut has joined #ocaml
ikaros has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
hashar has quit [Ping timeout: 240 seconds]
hashar has joined #ocaml
hashar has quit [Changing host]
hashar has joined #ocaml
hashar_ has joined #ocaml
hashar_ has quit [Changing host]
hashar_ has joined #ocaml
The_third_man has quit [Ping timeout: 252 seconds]
hashar has quit [Ping timeout: 276 seconds]
hashar_ is now known as hashar
musically_ut has quit [Ping timeout: 248 seconds]
ttamttam has quit [Remote host closed the connection]
edwin has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
edwin1 has quit [Ping timeout: 240 seconds]
ikaros has quit [*.net *.split]
struktured has quit [*.net *.split]
ikaros has joined #ocaml
struktured has joined #ocaml
musically_ut has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
reynir has quit [Ping timeout: 240 seconds]
ikaros has quit [*.net *.split]
struktured has quit [*.net *.split]
ikaros has joined #ocaml
<f[x]>
gildor, ping
reynir has joined #ocaml
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
lopex has quit [Remote host closed the connection]
joewilliams has quit [Remote host closed the connection]
superbobry has quit [Remote host closed the connection]
gmcabrita has quit [Remote host closed the connection]
ganjahtronic has joined #ocaml
dnolen has joined #ocaml
dnolen has quit [Remote host closed the connection]
joewilliams has joined #ocaml
gmcabrita has joined #ocaml
avsm has joined #ocaml
lopex has joined #ocaml
struktured has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
raichoo has quit [Quit: leaving]
Cyanure has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
reynir has left #ocaml []
hashar has quit [Quit: hashar]
<gildor>
f[x]: pong
ikaros has quit [Quit: Ex-Chat]
<f[x]>
with current oasis ocamlbuild file.pp.ml doesn't work
<f[x]>
I am fixing it
<f[x]>
but I need to get the list of all ocamlfind packages used in current project
<f[x]>
is there an easy way?
<f[x]>
all ocamlfind packages installed on the machine is no good cause I need to run ocamlfind query on each of them
<f[x]>
and it will be too much overhead
<f[x]>
in parallel I will need to patch ocamlfind to run camlp4o directly with usual handling of -package options
hashar has joined #ocaml
hashar has quit [Changing host]
hashar has joined #ocaml
<f[x]>
but having this working with current ocamlfind is also needed
<gildor>
f[x]: you need to it from setup.ml or myocamlbuild.ml ?
<f[x]>
myocamlbuild
<gildor>
humm
<f[x]>
aha, maybe just adding some field to setup.data?
<gildor>
you should write something that dumps the package in setup.ml into a variable in setup.data and read it from myocamlbuild
<gildor>
f[x]: indee
<f[x]>
so, recursively, how to get the list of all ocamlfind packages in setup.ml? :)
<gildor>
and filter bs.bs_build_depends on FindlibPackage _ (you are not interested in InternalLibraries)
sebz has joined #ocaml
hashar_ has joined #ocaml
hashar has quit [Ping timeout: 276 seconds]
hashar_ is now known as hashar
<gildor>
f[x]: BTW, I am preparing upcoming oasis 0.2.1, hope to release next week, if you have bugs tell me now (on the BTS)
ganjahtronic has quit [Ping timeout: 260 seconds]
larhat has quit [Quit: Leaving.]
ikaros has joined #ocaml
graph012 has joined #ocaml
<thelema>
gildor: when using quickstart, which plugins should I use for a trivial library that depends on batteries?
<thelema>
(oasis quickstart)
<graph012>
try to install ocamlgraph but it doesnt find graph.cmxa
<thelema>
graph012: have you built graph.cmxa?
<thelema>
graph012: try `make opt`
<graph012>
instead of make install?
<thelema>
graph012: before make install
<gildor>
thelema: I use DevFiles, META
<thelema>
gildor: ok, thanks
<gildor>
DevFiles -> create Makefile + configure and META create src/META
<thelema>
gildor: ah, that helps a *lot*.
<thelema>
what's StdFiles?
<gildor>
AUTHORS.txt, README.txt and INSTALL.txt (AFAIR)
<thelema>
you're right.
<thelema>
I just found the section in the manual
<gildor>
e.g. INSTALL.txt will list the dependencies you need to install
<gildor>
for example if you use batteries (>= 1.0.0), it will write in INSTALL.txt that batteries (>= 1.0.0) is needed
* gildor
leaving
<graph012>
thelema: made make opt in the ocamlgraph folder, but i get an Assembler error in the file "src/delauny.ml"
<thelema>
graph012: what platform are you compiling on?
<graph012>
ubuntu 11.10
<thelema>
ocaml version?
<graph012>
3.12.0
<thelema>
any chance you can upgrade to 3.12.1?
<thelema>
That's what I'm using, and it compiles ocamlgraph-1.7 just fine under my ubuntu 11.10
milosn has quit [Ping timeout: 255 seconds]
<graph012>
thelema: how can i remove the ubuntu ocaml, before i compile 3.12.1?
ygrek has joined #ocaml
<thelema>
remove the ocaml-base package and everything that depends on it
<thelema>
err, ocaml, ocaml-base and ocaml-base-nox
<thelema>
that should suffice
ganjahtronic has joined #ocaml
hashar has quit [Quit: hashar]
metasyntax|work has quit [Quit: WeeChat [quit]]
ttamttam has joined #ocaml
eikke has quit [Ping timeout: 245 seconds]
Cyanure has joined #ocaml
<thelema>
My adaptation of the ideas (and much of the implementation) of criterion is now available as `bench` on odb and https://github.com/thelema/bench
<thelema>
(also my first real oasis package)
maufred has quit [Quit: leaving]
gmcabrita has left #ocaml []
ganjahtronic_ has joined #ocaml
ganjahtronic has quit [Ping timeout: 248 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
<graph012>
thelema: i just compiled the ocaml-3.12.1 but when i enter ocaml into the command line it says not installed
<Qrntzz>
graph012: possibly a silly question, but did you `sudo make install`?
ulfdoz has joined #ocaml
<graph012>
Qrntzz: i did sudo make install, had to set the Path manually now ocaml works fine, the problem now is that ./configure in the findlib doesnt find m4
raichoo has joined #ocaml
<graph012>
where do i get this m4?
Anarchos has joined #ocaml
<thelema>
graph012: the package name is simply `m4`
<graph012>
thelema: configure: m4 not in PATH; how can i fix this?
<thelema>
`sudo apt-get install m4`
<graph012>
thelema: is it better to do make all or make opt?
<thelema>
`make all` should be equivalent to `make byte opt`
<thelema>
so `make all` is better, unless you really don't want bytecode executables/libraries
sebz has joined #ocaml
everyonemines has joined #ocaml
<graph012>
thelema: if i try to install ocamlgraph it tells me /bin/sh: ocamlfind: not found, but which ocamlfind tells me /opt/ocaml-3.12.1/bin/ocamlfin
<graph012>
d
<thelema>
graph012: sounds like a path problem with your shell - I'm not sure how to solve it. brute force (logging out and then back in) will usually work
<thelema>
graph: did you put anything in your ~/.bashrc to add ocaml to the path?
<_habnabit>
great, thanks
ulfdoz has joined #ocaml
beckerb has quit [Remote host closed the connection]
Drakken has joined #ocaml
_andre has quit [Quit: leaving]
<_habnabit>
okay well before I do a bunch of dumb things, here's what I'm trying to do: via ocamlbuild/ocamlopt, pass some extra object files to the linker
<_habnabit>
but I'm not sure if there's an ocamlbuild command or flag or whatever for that, or if I should just do flag with -ccopt x.o
hashar has joined #ocaml
hashar has quit [Changing host]
hashar has joined #ocaml
<graph>
thelema: yes
<thelema>
using `export`?
<graph>
thelema: yes
<thelema>
_habnabit: ocamlfind ocamlopt -verbose ...I guess you could try running the command that fails within make at your command prompt
<_habnabit>
thelema, hm? nothing's failing
<thelema>
sorry, mixed messages up
<thelema>
graph: I guess you could try running the command that fails within make at your command prompt
<thelema>
_habnabit: ocamlbuild has -lflag that should add to linking flags.
<_habnabit>
oh, I guess I forgot to specify: I mean from within myocamlbuild
<graph>
thelema: how?
<thelema>
_habnabit: another way is to put some code in your myocamlbuild.ml with the "link" tag
<_habnabit>
ah
<thelema>
graph: make tells you the command that's failing - copy and paste it to the command line
<graph>
thelema: /bin/sh: ocamlfind: not found make: *** [install-findlib] Error 127
<thelema>
_habnabit: within myocamlbuild, `flag ["ocaml";"link"; "special-lib"] & S[A"-lspecial-lib"]`
<thelema>
graph: what's the command?
<_habnabit>
ah okay
<graph>
thelema: make install-findlib
<thelema>
yes, that's the make command, what's the ocamlfind command that's failing?
<thelema>
Drakken: I don't. are you working on batbench?
<Drakken>
thelema i've been looking for a plotting library, but for some inexplicable reason they all seem to support only one global plot at a time.
<thelema>
probably simplest to support. You're trying to do something like ggplot2's facets?
<Drakken>
Has no one in the sci-plot business hear of oop?
<Drakken>
I just thought it would be natural to wrap the plot in an object.
<_habnabit>
hmm. how do libraries like ocaml-gsl specify flags like -lgsl? -lgsl is coming from /somewhere/ but I can't find it
<thelema>
Drakken: it is; just it's not possible to combine multiple plot objects into a single image, I guess.
<_habnabit>
it's not in the META
<thelema>
_habnabit: ah, that's magically done in the .cmx, iirc
<_habnabit>
'in' it how?
<_habnabit>
brb, restarting
<thelema>
the ocaml compiler remembers what C libraries need to be linked with a ocaml module
sepp2k has joined #ocaml
<thelema>
_habnabit: "From the file x.ml, the ocamlopt compiler produces two files: x.o, containing native object code, and x.cmx, containing extra information for linking and optimization of the clients of the unit."
ttamttam has quit [Remote host closed the connection]
<Drakken>
thelema I wasn't even thinking of anything that fancy. I just thought the code would look like let plot1 = Plot.create_plot(...); plot2 = Plot.create_plot(...) instead of just Plot.create_plot(...).
ftrvxmtrx has quit [Read error: Connection reset by peer]
<Drakken>
I mean let plot2 = ...
ftrvxmtrx has joined #ocaml
<_habnabit>
thelema, aha
<thelema>
in order to store a plot in a variable, one must have an ORM-like representation of the plot, which requires a "grammar of graphics". ggplot2 is the only library I know of that is built in this way.
<Drakken>
And for the last one I mean Plot.init(); Plot.draw(...)
eikke has quit [Ping timeout: 260 seconds]
<thelema>
bbl
<Drakken>
Why aren't they *all* built that way? How many people know they'll *never* want to compare two or more plots against each other on the screen?
<flux>
meh, janet street core doesn't install in my debian unstable, nor does it compile, and lablqt depends on that
ikaros has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
Transformer has joined #ocaml
Transformer has quit [Excess Flood]
<yezariaely>
flux: this is created from the guys of jane street ?
<flux>
no
<yezariaely>
ah only dependency opk
eikke has joined #ocaml
ganjahtronic__ has quit [Ping timeout: 252 seconds]
<flux>
meh2, there is a 150 days old bug on libcore-ocaml-dev not being installable on debian unstable, and there's been 0 reaction to that
<flux>
and of course in the meanwhile the library source of debian libcore has gone rotten, so it won't anymore even build against the latest other libraries
<flux>
I guess I need to give in and not use packaging for that :)
Linus_ has quit [Quit: Page closed]
<Drakken>
thelema what did you have in mind for the batbench plot(s)?
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
sebz has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
sebz has joined #ocaml
ganjahtronic has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
waern has joined #ocaml
raichoo has quit [Quit: Lost terminal]
ganjahtronic has quit [Quit: Leaving]
scrappy_doo_ has joined #ocaml
Drakken has quit [Ping timeout: 260 seconds]
<thelema>
drat, just missed drakken
Cyanure has quit [Read error: Operation timed out]
<thelema>
well, looks like I wouldn't have got him with a message at the beginning of looking for bench plots
<thelema>
The density plots on this page are the next step for bench - computing KDEs for the sample data.
<thelema>
I've not worked out how to convert the sample data to a Kernel Density Estimate yet, so we can't do this at the moment
<thelema>
I'm looking for an example of the other plots that criterion does - just a simple bar chart with x axis = 1..n and y values = the time of run n
<thelema>
run_and_analyze returns the timings too, as part of a `results` record
<thelema>
so this would go in between `run_and_analyze` and `summarize` in `bench` and `bench_n`
fschwidom has quit [Remote host closed the connection]
<thelema>
I have a commented out field in the config record that is intended to hold output functions
<thelema>
CSV and JSON would be possible outputs, PNG another output for timings, also eventually PNG for KDE, and the current text output with summary another output
<thelema>
Drakken: will it interfere with what you're doing for me to reorganize some of the bench code to put in a simple output structure defaulting to [summarize]?
<thelema>
That's the bar plot I was thinking of, although if each bar was just a single pixel wide, maybe with a little ball at the top, it wouldn't be too bad.
<Drakken>
So the local variable samples in analyze_samples is an array of runtimes and the samples field in config is an integer.
<thelema>
the samples field in config is an integer indicating the number of samples to perform
<Drakken>
i.e. the length of the array
<thelema>
the variable samples in analyze_samples is an array of runtimes.
<thelema>
yes
<thelema>
although the `analyze_sample` code doesn't have access to config.samples, it just uses Array.length to get the number of samples
<Drakken>
So you don't want to pop the plot up onto the screen?
<thelema>
output to a file seems most useful to me; outputting to the screen is fine, but doesn't allow pretty blog posts. :)
<thelema>
also, screen output implies the need for some UI - at least a quit on <ESC> or <CR>
<thelema>
what do you think?
<Drakken>
How do you display CSV or JSON as plots?
<thelema>
those are text output, not as plots
<thelema>
text output to a file
<thelema>
so also on the todo list is main() function for bench that handles command-line arguments that instruct what output to produce
dsheets has joined #ocaml
<thelema>
(and to adjust each of the other config parameters)
<thelema>
If you're interested in this, I can recommend a good library for handling command-line arguments