<jgrozave>
okay, i've got a bit of a different question then. requiring camlp4 basically sets the preprocessor to camp4. what if you wanted to use camlp4of or any of the other variations of camlp4
<jgrozave>
thelema: what are the equivalent -parser options to give to camlp4 for all of those?
<jgrozave>
there is a -parser of option for camlp4
<jgrozave>
but it doesn't seem to function the same as using camlp4of
<jgrozave>
this command runs just fine "ocamlc -c -pp camlp4of -I +camlp4 pa_openin.ml"
<jgrozave>
but this one complains that there's a parse error "ocamlc -c -pp 'camlp4 -parser of' -I +camlp4 pa_openin.ml -verbose"
<thelema>
I'm not a big fan of camlp4, so I don't know this either
<jgrozave>
no problem, camlp4 interests me quite a bit, but there isn't much recent documenation
<jgrozave>
it's all for older versions of ocaml and it seems to have changed a lot
<jgrozave>
gives me a reason to dig through the source i guess haha
<jgrozave>
HAHA speaking of that, i just found this line which seems quite promising: mk_camlp4 "camlp4of" [pa_r; pa_qc; pa_q; pa_o; pa_rp; pa_op; pa_g; pa_macro; pa_l] [pr_a] [];;
<thelema>
yup, the update of camlp4 around 3.10 left it with less docs. There's a wiki somewhere to add docs to
<jgrozave>
those definitely look like options you can pass to camlp4 to function just like camlp4of :)
<jgrozave>
do you know what this syntax means: A"string"
<jgrozave>
that's a really hard thing to google :P
<alexyk>
mfp: so where do I add that line? in Omakefile or OMakeroot?I compile native and you have OCAMLOPTFLAGS there already
<mfp>
OMakefile
<mfp>
-warn-error is honored by both ocamlc and ocamlopt, so you can use OCAMLFLAGS directly (which is used for both)
<alexyk>
and [-warn-error a] will turn it off?
<mfp>
yes
<alexyk>
cool!
<mfp>
the list of flags is documented in ocamlc -h
<alexyk>
I really want to try to replace Hashtbl with one of yours as I grow Twitter graphs to 10-30 GB
<alexyk>
and it's a major time expense
<alexyk>
so if I understood the benchmark, it's either FastHashtbl or Ternary, right?
<alexyk>
and if I want functional, then Ternary?
<mfp>
the safest thing is to benchmark with a subset of your corpus ;-)
<mfp>
alexyk: Ternary is much faster than Map if you don't mind the size, but imperative hash tables are usually faster (but for sorted traversals). As for FastHashtbl, its performance will degrade if you're deleting elements, so it's not always the best choice.
<alexyk>
mfp: I actually don't delete, so that may be good
<alexyk>
mfp: not all of them are API-rich, i.e. they're not drop-in replacements for Hashtbl... Ternary seems almost standard-like
<alexyk>
I need fold for all
<mfp>
I didn't bother to implement iter & fold for FastHashtbl, but it should be trivial
<mfp>
off the top of my head...
* mfp
looks at the type def
<mfp>
let iter f h = Array.iter (function Data (k, v, _) -> f k v | Empty | Removed -> ()) h.data or such
<mfp>
let fold f h x = Array.fold_left (function e x -> match e with Empty | Removed -> x | Data (k, v, _) -> f k v e) x h.data
<mfp>
that types modulo s/function/fun/ in the 2nd def
<mfp>
ugh and another braino
<mfp>
make that let fold f h x = Array.fold_left (fun x e -> match e with Empty | Removed -> x | Data (k, v, _) -> f k v x) x h.data
th5 has quit [Read error: Connection reset by peer]
th5 has joined #ocaml
<jgrozave>
thelema: hey, I finally figured out that camlp4 problem I was having earlier
travisbrady has joined #ocaml
joewilliams is now known as joewilliams_away
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
<alexyk>
mfp: thx!
ulfdoz has joined #ocaml
ztfw` has joined #ocaml
ztfw has quit [Read error: Connection reset by peer]
boscop_ has left #ocaml []
ttamttam has joined #ocaml
boscop has joined #ocaml
alexyk has quit [Quit: alexyk]
avsm has quit [Quit: Leaving.]
jgrozave has quit [Quit: Page closed]
travisbrady has quit [Read error: Connection reset by peer]
travisbrady_ has joined #ocaml
Anarchos has joined #ocaml
Modius has quit [Quit: I'm big in Japan]
alexyk has joined #ocaml
travisbrady_ has quit [Ping timeout: 258 seconds]
th5 has quit [Quit: th5]
<alexyk>
when I want to add debugging to opt, do I add -g to OCAMLOPTFLAGS, omake clean; omake?
<alexyk>
hmm, omake ate my executable, and it doesn't work.
<alexyk>
make does fine... so simply copying an OMakefile from mfp and adding my objects and packages is not enough :)
mbishop has quit [Read error: Connection reset by peer]
mbishop has joined #ocaml
avsm has joined #ocaml
travisbrady has joined #ocaml
eelte is now known as coucou747
drk-sd is now known as Dark-Side
Dark-Side is now known as drk-sd
_unK has joined #ocaml
th5 has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Anarchos has joined #ocaml
_andre has quit [Quit: *puff*]
mbishop has quit [Ping timeout: 240 seconds]
<derdon>
thelema: I've found a tiny typo in the doc to the Print module