<Drakken>
literal filenames don't have angle brackets around them, but I didn't notice the quotation marks.
rixed has joined #ocaml
<Drakken>
Speaking of poor error messages, it's hard to get useful information out of "syntax still wrong" and "lexing: empty token".
<Drakken>
f[x] thank you for trying, but I don't see why you had to be so vague.
<Drakken>
but thank you anyway. I guess that's better than nothing.
<Drakken>
btw, I don't see anything about quotation marks in the user manual.
<Drakken>
thelema thank you, that worked. My original version also works as long as the literal names are quoted.
<f[x]>
Drakken, that's intentional. I prefer to find and give the url to the manual, than to type the verbose answer by hand :)
<Drakken>
f[x] "quote filenames" is no more verbose than "syntax still wrong".
<Drakken>
I've already read the manual, so unfortunately, your comment was not helpful to me.
<Drakken>
If you really want to avoid verbosity, just type "RTFM".
<f[x]>
Drakken, that was my first thought :)
<Drakken>
f[x] please go with your first thought next time. That would be better.
* rwmjones
is surprised .. no pa-do in Debian?
* f[x]
is surprised - rwmjones uses debian??
* orbitz
is just usually surprised
roha has joined #ocaml
<Drakken>
thelema did you see my posts from late last night? There'a a comment about the file format and links to a plot and a first draft of the plotting code.
* rwmjones
is looking to see if debian have already fixed this bug or not
<f[x]>
rwmjones, I guess all camlp4 extensions packaged can be found with `aptitude search camlp4`
<thelema>
yes, I found that - would it be useful for you if I integrated that into the benchplot tool?
<adrien>
thelema: I was expecting the module name clash to make it fail (but I haven't tried yet)
<Drakken>
thelema archimedes doesn't seem to support auto-log scaling. We'll have to roll our own.
<thelema>
adrien: batdep might have a whitelist that it doesn't include in deps
<adrien>
hmmm, ok, I'll try and see how that goes
<thelema>
Drakken: yes, my rule of thumb is that if the max x-value is >100* the min x-value, log-scale
<thelema>
adrien: ocamlbuild gets deps from it, iirc
<adrien>
btw, for archimedes, it might have changed since then, but last summer, I hacked x/y axis labels by specifying what to write on the x and y scales
<adrien>
instead of writing the actual biggest value, I wrote the axis label
<Drakken>
thelema I mean we'll have to write our own displaying tic marks of x instead of log x.
<Drakken>
deciding whether or not to convert to logs is NBD
<thelema>
Drakken: oh... :(
<Drakken>
it's not too hard as long as I can figure out the lower-level API.
<thelema>
I'm about to commit the new format, as you wanted.
<thelema>
you were right about "rev rev_map" being a problem
<Drakken>
:)
sebz has joined #ocaml
<thelema>
changes pushed, you should be able to generate the new format output from listmap.native
<thelema>
gotta run
<Drakken>
thelema about integration, how do you want to use the plots?
<Drakken>
Wait!
<Drakken>
separate executable for multiplot?
<Drakken>
that mostly affects you as the user, right?
<Drakken>
oh well, that's not really urgent. no hurry
<Qrntzz>
Kakadu: good evening
<Qrntzz>
Kakadu: sorry, was in the city all day long
oriba has joined #ocaml
<Kakadu>
Qrntzz: ok
ttamttam has joined #ocaml
as has joined #ocaml
as has quit [Client Quit]
ttamttam has left #ocaml []
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<thelema>
Drakken: I think we can auto-detect what type of file is being read and produce the right plot from that
<thelema>
I'd rather not have two plotting executables
<thelema>
This 2d plot is for compression - one color for each testing function, slightly lighter colors for the high/low (or a background band would be great)
<thelema>
s/compression/comprehension/
<thelema>
or even comparison
<Drakken>
thelema for some reason archimedes doesn't seem to support the floating backround for uneven xs, at least not easily. There's a ~base arg for even xs (benchplot), but I couldn't get it to work (and it's not in the ocamldoc) for user-supplied xs.
<Drakken>
the base is the bottom of the fill zone. the plotting functions are Archimedes.Array.y for even xs and Archimedes.Array.xy for user xs.
<thelema>
ok
ttamttam has joined #ocaml
ttamttam has left #ocaml []
_andre has quit [Quit: leaving]
iago has joined #ocaml
Julien_T has joined #ocaml
mdelaney has joined #ocaml
<adrien>
wrote C stubs which compiled without any warning at first try
<adrien>
40 lines of code, I think I can safely say that I'll have at least 3 bugs in them
thomasga has quit [Quit: Leaving.]
<maufred>
Hello, I have a hashtbl of size one million. In the table, on each binding there is a set of size 100000. Is this too much ? (I have an out of memory issue but I suspect it is because I have a non tail rec function)
<maufred>
The set contains only int
<thelema>
depends on if the sets have any shared components
<maufred>
they don't
<thelema>
1m * 100K ~ 100G words = 6.4TB?
<maufred>
ouch !
<thelema>
just the ints, no pointers, no hashtbl buckets
<thelema>
If your sets are over a small range, you could use bitsets, but likely you'll have to rethink what you're doing
<thelema>
or use range sets, if there's a lot of contiguous ranges in your sets
<adrien>
or maybe store ranges in the set if you have many contiguous values
<maufred>
And how can I share this components ? Because one set will have (let's say) {1;2;3;5} and the other {2;3} ?
<thelema>
adrien: better for sets to use range sets
<adrien>
thelema: that's what I meant but you're wording it better =)
<maufred>
I can't know if they are continious
<thelema>
maufred: ocaml sets are balanced binary trees - if you generate one set, and then add an element to it to get another set, the the two sets will have pointers to many common subtrees
<thelema>
i.e. adding a value to a set doesn't allocate O(n) data, but O(log n)
<maufred>
(give me 30 sec to think ;) )
<maufred>
let's explain it clearer (it will be more easy for you to understand)
<maufred>
I have a database of 10 000 persons
<maufred>
I want to know who has the most ancestors
<maufred>
so I build a hashtbl
<adrien>
(you share memory when constructing the values, not afterwards with a function that would scan memory and try to locate common chunks)
<maufred>
in each binding there is a set of ancestor
<maufred>
so maybe Hashtbl 42 will whare common ancestor (values) or hashtbl 12
<maufred>
So, I should find a way to shared this set ?
<thelema>
ok, so you're building a graph with direct index using the hashtable?
<maufred>
yes
<thelema>
so build your 10K node graph, and use a 10K entry hashtable to index into it.
<maufred>
I used a hashtbl because the ancestor of A may be the same of B then I don't want to compute them again
<maufred>
is that not true ?
<thelema>
maufred: store the values in the nodes
<maufred>
... of course
<maufred>
Then, should I use a Map or a Set ?
<thelema>
the trick is building the graph if it's immutable, but just use something like type node = {mutable weight:int; mutable parent: node list; mutable child: node list}
<thelema>
if you need any other data for each node (some sort of person-id), put it in the record
<maufred>
Ah yes !
<thelema>
initialize all the weights to -1, ...
<maufred>
It's much more clear now !
<thelema>
if you want a graph, build a *graph*
<maufred>
OK, it's perfect, I'll try this
<maufred>
Thanks all !
<thelema>
If you know all the people without children, you don't need the child: field
<maufred>
Yes, I can reduce a list with a lot of persons with only the people without child and then reduce again to clean the brother/sister (to keep only one)
<thelema>
then you only need to get the # of ancestors for each of those people, and any duplicate work will be prevented by mutating the graph
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
<maufred>
wonderful !
<maufred>
I think this is exactly what I want
<maufred>
I tried the wrong way with the hashtbl
<thelema>
the right data structure makes the algorithm easy
<maufred>
yes ! I tried so many ways that does'nt work, that I came to ask some help
Snark has quit [Quit: Quitte]
Kakadu has quit [Quit: Konversation terminated!]
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
roconnor has joined #ocaml
<roconnor>
let print_num ff n = fprintf ff "%s" (string_of_num n);;
<roconnor>
#install_printer "print_num";;
<roconnor>
gives me the error:
<roconnor>
Wrong type of argument for directive `install_printer'.
<roconnor>
val print_num : Format.formatter -> Num.num -> unit = <fun>