<whitequark>
for a moment I felt really like implementing it, then I remembered what camlp4 source looks like and it passed
<pippijn>
camlp4 could do it
<whitequark>
pippijn: I don't see an easy camlp4 solution either, sounds like you'd need to write your own pattern matching expander
<pippijn>
whitequark: of course with camlp4 or some other preprocessing step, that could be made transparent
2014-03-07
<tobiasBora>
Ok thank you. I need to study more about camlp4 this summer !
<def-lkb>
camlp4 syntax extensions, like type-conv
2014-02-25
<kaustuv>
But my patience with Camlp4 has run out for now and I'm off to do more productive things.
<kaustuv>
Is it actually possible to use Camlp4 quotations in an ocaml script?
<kaustuv>
I'm a complete camlp4 noob. What is the reason for the syntax error here? http://pastebin.com/AJKx7s4k
2014-02-22
<Kakadu>
Guys, how to debug errors like Camlp4: Uncaught exception: Unix.Unix_error (20 | CstTag21, "connect", "") ?
2014-02-18
<palomer>
"no macros": see camlp4 or the new binary thing from ocamlpro
2014-02-17
<sagotch>
the only issue with bisect is that it use camlp4
<Drup>
menhir and camlp4 are very easy to integrate in oasis, probably easier than with makefiles
<sagotch>
I should learn how to use oasis, but using menhir + bisect + having "<<" operators in code messing up with camlp4 seems to make things hard to handle with automated tools (and I have 6 files in my project...)
2014-02-13
<smondet>
bernardofpc: maybe you have ocamlc/opt in some opam switch and camlp4 somewhere else, etc.
<bernardofpc>
Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib64/ocaml/lwt/lwt-syntax-options.cma", "interface mismatch on Camlp4_import") -> any hints ?
2014-02-09
<adrien>
working with ppx is much easier than working with camlp4
<companion_cube>
there is camlp4
<companion_cube>
you can't extend the syntax (disregarding camlp4) but you can write a higher order function
2014-02-05
<j0sh>
but cant seem to compile it with ocamlfind ocamlc -pp camlp4of -syntax camlp4 ...
<j0sh>
Kakadu: thanks, looking at it... still learning camlp4, it's pretty dense
<j0sh>
is there a way to get the elements of a tupl as a list, with camlp4?
2014-02-04
<kaustuv>
My earlier patch had an answer for the pre-splitup camlp4...
<gasche>
I'm currently looking at how your M.[foo] idea can be implemented in Camlp4
2014-01-30
<rks`>
merlin users regularly complain about grammar inconsistencies between camlp4 and ocaml − they complain because they're used to camlp4, and merlin has (more or less) the same parser as the compiler −
2014-01-28
<nlucaroni>
the rule does... 84-6 : tag ml files with those values. with_pa_bisect adds the flags on line 166, the other two include camlp4 and bisect respectively. lines 77-1 tags the executibles to test against coverage with the bisect package, and 82 builds the exes, 88 runs them, and 90 executes bisect-report to generate the report. Not sure if that's all obvious or it helps a bit, but I gotta head home. laters
2014-01-26
<nisstyre>
well, Clean doesn't have a way to extend the language easily like camlp4 I guess
2014-01-21
<murRz>
Maybe I should learn camlp4 and revise the revised syntax.
2014-01-20
<mrvn>
Drup: got it. I need to set "BuildDepends: camlp4" in _oasis and '"dealer/parser.ml": syntax_camlp4o' in _tags
<Drup>
oh, the syntax extension is in camlp4 now
<gasche>
the only thing that doesn't work very well is passing command-line parameters to camlp4 extensions, but extension points do not provide any help with that
<companion_cube>
gasche: I mean, compiling files that use camlp4, not compiling camlp4 itself
<gasche>
companion_cube: is Camlp4 difficult to compile when you use ocamlfind?
<companion_cube>
will it be as complicated to compile as camlp4?
2014-01-17
<Drup>
struktured: if you can use camlp4, the library deriving can do that
<companion_cube>
struktured: many people use deriving or type_conv (with camlp4) to generate this kind of functions
2014-01-12
<companion_cube>
still looks better than camlp4
2014-01-10
<pippijn>
camlp4 :)
<pippijn>
camlp4 people do
2013-12-29
<smondet_>
not now :) compiling camlp4 takes ages on that machine
2013-12-28
<gasche_>
I wrote a camlp4 extension for that back in the days, to please rz0
2013-12-23
<adrien>
because, for instance, Jacques Garrigue had has issues with some changes with camlp4 when bootstrapping and obviously, that wouldn't have happened with camlp4 outside of the compiler tree :)
<adrien>
I'm waiting for the splits to stop (camlp4, labltk)
2013-12-22
<adrien>
(labltk moved, camlp4 moved, what next?)
2013-12-19
<companion_cube>
I hope we could get rid of type_conv and camlp4
2013-12-18
<whitequark>
um, I broke camlp4
2013-12-17
<rks`>
(I believe it was for a problem related to camlp4)
2013-12-14
<dsheets>
(in addition to internal to camlp4)
<dsheets>
don't you have to use revised syntax inside of ocaml camlp4 quotations?
<ggole>
camlp4 uses it internally iirc
2013-12-11
<companion_cube>
I don't know much about camlp4 sadly
2013-12-10
<malvarez>
patojo: never touched metaocaml, but I always found camlp4 to be too cumbersome for some things
<patojo>
malvarez: Look into camlp4 or metaocaml
<companion_cube>
camlp4 allows to write syntax extensions
<avsm>
Noone really wants to depend on camlp4, but it has provided us with a decade of experimenting with syntax extensions, and type_conv hit a sweet spot of performance vs complexity that has survived pretty well
2013-12-08
<malvarez>
I have to admit, camlp4 is the only part of OCaml I don't like
<malvarez>
Does anybody know of any good tutorials on camlp4?
2013-12-05
<watermind>
hmm but there's also a camlp4... why are we talking camlp4 then?
<Drup>
(including camlp4 extensions :P)
<Drup>
there is lot's of stuff in camlp4 to do that precisely
<ggole>
camlp4?
<def-lkb>
watermind: sexplib leverage camlp4 with a custom extension to generate the boilerplate
<adrien_oww>
typically they're files which are transformed through camlp4
2013-12-02
<sgnb>
in camlp5 at least, I don't know if it was kept in the new camlp4
2013-11-29
<jpeeters>
Hi every one, can someone help me with camlp4 (> 3.10) ?
2013-11-27
<Drup>
(but camlp4 still does have a crazy structural complexity)
<sgnb>
then what's all the camlp4* binaries?
2013-11-19
<ygrek>
you should probably file the bug with ubuntu that camlp4 package doesn't provide camlp4 META file
<ygrek>
probably bubuntu is broken wrt camlp4, I dunno
<ygrek>
what is the output of aptitude reinstall camlp4?
<ddosia>
I see that ocamlfind list not show me camlp4, althought it is located under /usr/lib/ocaml
<ddosia>
I have tried to reinstall camlp4, but no luck
2013-11-18
<rs0>
but i'm just seeing how far i can get towards a spec DSL without having to fire up camlp4
2013-11-16
<gasche>
it may in fact be a camlp4 issue
2013-11-14
<adrien>
maurer: atdgen relies on you writing a type definition which is straightforward; others use camlp4 to derive everything
<adrien>
I guess the main reason for Marshal is that camlp4 uses it to "talk" to the compiler
2013-11-11
<Kakadu>
but you can try with camlp4
2013-11-09
* Drup
don't like camlp4.
<Drup>
I don't even find Camlp4_import in ocaml sources, and the documentation is terribad, so don't know more.
<Drup>
also, if Obj.magic work, Camlp4 should export the type equality ...
<Drup>
(is there a online documentation somwhere for camlp4 ? :/)
<jyeo>
I am trying to type check a Camlp4 str_item type
<maurer>
Drup: Try using camlp4 and then doing bytecode profiling
2013-11-04
<adrien>
- bootstrap camlp4
2013-11-01
<jyeo>
well, i am getting syntax errors with my camlp4 extension ml file
2013-10-27
<whitequark>
Drup: from a quick look, seems not very different from camlp4, conceptually
2013-10-26
<ollehar>
gasche: no way to instead of `assert false` tell camlp4 to use `usual syntax`. Or if I define new behaviour for a operator, must I redefine the old behaviour too?
2013-10-25
<gasche>
of course, this won't protect you from assert false if --> is misused; the existing camlp4 code is very fragile, I suppose it was just a proof of concept, but anyway
2013-10-23
<pippijn>
to fix camlp4?
2013-10-22
<jyeo>
radditz: I have a myocamlbuild.ml file that was controlling the arguments to camlp4
<jyeo>
radditz: when you deal with camlp4 and ocamlfind packages, things get a lot hairier.
<jyeo>
Camlp4: Uncaught exception: DynLoader.Error ("/Users/mapleleaf/.opam/system/lib/pa_debug_lib/pa_debug_syntax.cma", "error while linking /Users/mapleleaf/.opam/system/lib/pa_debug_lib/pa_debug_syntax.cma.\nReference to undefined global `Pa_deriving_common'")
<radditz>
I mean what change does the order of the camlp4 parameters imply?
<radditz>
well IDK how it works,. but would it be a reasonable solution to make your own camlp4 script that changes the order and calls the true camlp4 command? by changing the PATH maybe ?
<jyeo>
apparently, camlp4 reads the cma files from right to left. it works with a particular order but not the other way around
<radditz>
jyeo: it fixes the camlp4 order
<jyeo>
gets changed to camlp4 'pa_Y.cma' pa_X.cma' myfile.ml
<jyeo>
e.g camlp4 'pa_X.cma' 'pa_Y.cma' myfile.ml
<jyeo>
i am trying to change the order that ocamlbuild generates the camlp4 command line argument. is there anyway to do that?
<jyeo>
I have to rearrange the arguments to camlp4 on command line to make it work
2013-10-15
<jyeo>
this is the line that is causing the problems: ocamlfind ocamlopt -a -I +camlp4 camlp4lib.cmxa pp.cmx pa_debug.cmx -o myfile.cmxa
2013-10-14
<flux>
but I don't see how it would actually be hooked up.. mind you, I only wish I could read camlp4 code :)
<flux>
reading the latest release kernels_ext.ml it clearly has support for the external kernels, but it also has bunch of code that would deal with the Sarek kernels.. (camlp4 DSL for creating kernels)
<flux>
has someone managed to use SPOC (an ocaml opencl library) and its camlp4-based Sarek-language?
2013-10-10
<pippijn>
def-lkb: it's camlp4 generated code
2013-10-08
<ggole>
obuild? If you mean ocamlbuild, it has built in tags for camlp4 iirc
<Kakadu>
Guys, do you if obuild already supports compiling camlp4 syntax extensions. If not, any thought is difficult to implement this?
2013-10-07
<hnrgrgr>
Basically, a class is a module dynloaded in camlp4
<f[x]>
if you use debian ocaml ensure camlp4-extra is installed
2013-10-01
<adrien_oww>
./configure -no-camlp4
<jpdeplaix>
the module-alias branch failed to install :( camlp4 doesn't work yet
<pippijn>
Effective set of compiler predicates: pkg_deriving-ocsigen.base,pkg_num.core,pkg_num,pkg_deriving-ocsigen,pkg_camlp4,pkg_type-conv,pkg_unix,pkg_bigarray,pkg_sexplib,pkg_sexplib.syntax,pkg_corelib,pkg_ucslib,pkg_str,pkg_findlib,pkg_camomile,pkg_batteries,pkg_baselib,autolink,native
2013-09-30
<reynir>
I have used camlp4 (or camlp5?) once. It's pretty nice
2013-09-27
<avsm>
sprinkle some camlp4
<avsm>
gour: I meant an actual critical comparison. e.g., using OCamlMakefile instead of just Make, testing performance for a project, how well it handles camlp4 or packaging
2013-09-20
<pippijn>
and I made camlp4 quotations for it :)
2013-09-18
<ggole>
That's fortunate: you've just about exhausted my knowledge of camlp4.
<ggole>
You can fire up a repl and get camlp4 to produce the Ast
<rwmjones>
camlp4 .. so great yet so frustrating
2013-09-17
<Kakadu>
A question about camlp4 parsers
2013-09-16
<adrien_oww>
and that means moving camlp4 out first
<pippijn>
adrien_oww: camlp4?
2013-09-14
<pippijn>
most of the time is spent in camlp4 code
<adrien>
wmeyer: blah, found an issue in my patches: you can't get the same effect as make install DESTDIR=... anymore when installing camlp4 and ocamlbuild
2013-09-13
<jpdeplaix>
gour: yes. But IMHO, not now. It's not enough finished to actually replace it. There are some things missing like: a simple and documented handling of camlp4 extensions, (at least, a little) plugin system, …
2013-09-12
<sgnb>
camlp4of is in camlp4-extra
<whitequark>
I can just use camlp4 to make assert behave like I want
2013-09-11
<mrvn>
it shouldn't be to hard to write a camlp4 module that creates a function_foo_ast value for each function_foo.
2013-09-09
<wmeyer>
pippijn: what you are cooking in camlp4
<mrvn>
pippijn: How do you inline List.map from camlp4?
<pippijn>
and now I'm thinking of writing an AST transformation in camlp4 or with the now -ppx
<pippijn>
I only know camlp4 uses it
<adrien>
kerneis: let me know if that's an issue (but I'd really prefer to not install an additional "camlp4"; there's a requirement that the native compiler and the cross-compiling one are the exact same version)
<adrien>
kerneis: hi, for cross-compilation, we should install i686-w64-mingw32-ocamlopt(.opt)? I'm not sure how the patches implement it but OCaml will only install the compilers but not target-specific ocamldoc, camlp4 and ocamlbuild
2013-09-04
<Drup>
jyeo: at least, not strictly within camlp4, you will need to do stuff with compiler-libs
<jyeo>
is there any way to get type information when I am generating code in camlp4?
<pippijn>
or even with camlp4, but you would have to do the scope binding
2013-08-30
<ggole>
And dynlink (which camlp4 needs)
<Anarchos>
one line : reference to undefined global 'camlp4' :)
<ggole>
module C = Camlp4;; => 19,887 lines of interface O_O
<adrien_oww>
12:03 < adrien_oww> camlp4, ocamlbuild, ocamldoc, ... are slowly being separated from the com
2013-08-29
<thomasga>
any camlp4 extension doing that ? or first-class module trickery ?
2013-08-25
<gasche>
so we could provide a registration service to still keep freedom about the initialization time, as Camlp4 does
<gasche>
Nicolas Pouillard evidently knew about plugin dynlinking from his Camlp4 experience, and he avoided that in ocamlbuild
2013-08-21
<watermind>
3 - when installing why3 it complains about Reference to undefined global `Camlp4'. in coq's file grammar.cma.
2013-08-19
<ddonna>
So, one would install libsexplib-camlp4-dev or somesimilar, then work out the linking manually?
<whitequark>
I have camlp4 enabled but this file only uses ocaml syntax
<gasche>
(ocamlbuild itself and camlp4)
2013-08-13
<gasche>
fds: still have your camlp4 problem?
2013-08-12
<fds>
kerneis: Yes, the one that returns "Camlp4 version 4.00.1" when type "camlp4 -v".
<francis>
I believe that there's no official documentation for Camlp4 version 4, but are there any documents that you can recommend for me to start working with it?
<dsheets>
zRecursive, any special options? i get a malloc error in the camlp4 build around 768M
2013-08-06
<flux>
well, there was this camlp4 syntax extension called pa_refutable.ml or something
2013-08-05
<whitequark>
anyone familiar with camlp4 ocaml parser here?
<gasche>
ggole: I've actually implemented whitespace-sensitive syntaxes for OCaml as Camlp4 extensions
<ousado>
why don't you use camlp4 then?
<whitequark>
(check validity of conversion with camlp4-generated methods, and then use Obj.magic to do the, well, magic.)
<whitequark>
I just realized I can take camlp4 and add the kind of RTTI I want to ocaml.
<gasche>
adrien: hongboz just added -no-ocamlfind to camlp4-ocamlbuild compilation command
2013-08-03
<adrien>
I think that removing the ocamlcomp{,opt}.sh kludge reduced build times (without ocamlbuild and camlp4 and with ccache) from 5m20s to 4m20s \o/
2013-08-01
<ggole>
Based on camlp4?
<ousado>
I just found a post from 2001 mentioning some camlp4 thing replacing them with a literal
2013-07-30
<gasche>
I haven't looked at ocp-indent closely, but I did camlp4 extensions for indentation-aware syntax for OCaml
2013-07-28
<flux>
mrvn, apparently only when using camlp4?
<asmanur>
introom: without camlp4 it is valid
2013-07-23
<wmeyer>
camlp4 is the major offender here
<wmeyer>
I believe ocamldoc, camlp4, and ocamlbuild can be used on the host, but the cross compilers are essential
<adrien>
random useless data: with -no-ocamldoc -no-camlp4 -no-ocamlbuild -no-graph -no-tk -no-debugger, "make world" gives me a 14MB installation :P
2013-07-22
<adrien>
110 seconds to "make world" on my laptop with camlp4, ocamlbuild, ocamldebug, ocamldoc disabled (although with a ccache)
2013-07-21
<adrien_>
if [ "x$WITH_CAMLP4" = "x" ]; then WITH_CAMLP4="camlp4"; fi
<adrien_>
but this means that building without camlp4 might be broken
<adrien_>
I renamed the variable to WITH_CAMLP4
<adrien_>
for the patch that makes ocamlbuild, ocamldoc, the debugger optional, I renamed the variable that is named CAMLP4 and is either "camlp4" (camlp4 build enabled) or "" (camlp4 build disabled)
<whitequark>
ggole: then you add use_camlp4 to your target tags and there's some myocamlbuild.ml trickery
<wmeyer>
well you can disable camlp4 for time being
<ggole>
Yeah, now I remember why I've never been able to figure camlp4 out
<ggole>
I've never been able to figure camlp4 out
<whitequark>
ggole: I'm pretty sure you already can, with camlp4 and a really simple extension?
<whitequark>
mrvn: I don't quite understand what you want, but if you're tired of typing, can't you use camlp4 in some creative way?
2013-07-16
<whitequark>
the whole camlp4 thing, right?
2013-07-10
<whitequark>
camlp4?
<MarcWeber>
I'm trying to understand whether shell scripts to use cppo and camlp4 are portable
* whitequark
idly wonders if writing a camlp4 preprocessor to add diagnostic literals is a good idea
2013-07-09
<whitequark>
(with camlp4 preprocessor)
<whitequark>
I'll probably rewrite it in camlp4, it isn't that big
<whitequark>
camlp4, yeah
<pippijn>
2) when merr uses camlp4, that is trivial (unless I misunderstand)
<pippijn>
camlp4 is fine
<whitequark>
but this would also be better off with camlp4, I guess
<whitequark>
the sample file would really be better off with camlp4
2013-07-08
<pippijn>
camlp4 can't
<companion_cube>
aww, I dont't know camlp4
<whitequark>
that is... problematic. it for sure lies outside my camlp4 skillset/understanding.
<whitequark>
see, I use camlp4 to automatically wrap all literals in a cast
2013-07-07
<whitequark>
I'm trying to make ocamlbuild invoke my camlp4 extension in the build process
<whitequark>
hm, seems I need a camlp4 preprocessor to mark my literals as utf8-safe... doesn't seem very hard
<Drup>
"I can rip the camlp4 parts from it"
<whitequark>
camlp4 is fine, why wouldn't it be?
<whitequark>
I guess I can rip the camlp4 parts from it
<mrvn>
whitequark: check if libtext-ocaml doesn't already have one. It depends on camlp4
<mrvn>
whitequark: write a camlp4 thing to turn string literals into another type
<wmeyer>
you can use camlp4 to do the type safe marshaling work for you
2013-07-06
<mrvn>
camlp4 module
<mrvn>
I wonder if sexplib could be implemented with GADTs instead of camlp4
2013-07-04
<gasche>
hnrgrgr: thanks a lot; did you benchmark against 4.00 or trunk/4.01? I believe Camlp4 is now faster to compile
<Kakadu>
Do you know will RWO have a chapter about camlp4?
<pippijn>
the rewrite would use camlp4
2013-07-02
<wmeyer>
we want to remove this cruft from the repo, and perhaps use makefile even for ocamlbuild and possibly camlp4, at least no bootstrap of ocamlbuild
<wmeyer>
you could do it with fan or camlp4 easily, except you have to use them consistently
<hcarty>
It's significantly less interesting without extension-points. I was hoping for fun things like a let-finally syntax and camlp4-free lwt support.
<gasche>
quotations+antiquotations is one part of Camlp4 that I actually like
<gasche>
do you have a specific reason not to use Camlp4, as the Cow people do?
<kaustuv>
I basically just want a general purpose quote/antiquote mechanism in OCaml -- well one that doesn't use Camlp4
2013-07-01
<adrien>
I don't understand how building with -no-camlp4 gives me the same build times as building with camlp4
2013-06-30
<adrien>
wmeyer: I have a fix for the issue; the build has failed quite later on in camlp4 and I'm checking how to fix that
<wmeyer>
you could also use camlp4
<wmeyer>
oh actually yes, so long not used Camlp4!
<wmeyer>
pipe the ml file through camlp4
2013-06-29
<gasche>
(ah, and "camlp4", not "ocamlp4")
<gasche>
this form of dynamic plugin would encourage people to distribute side-effectful compilation units for reuse of ocamlbuild logic, like it is currently done in Camlp4
<mfp>
hmm I guess you could build something atop camlp4 or ppx or something that finds nontrivial expressions passed as function arguments
2013-06-28
<orbitz>
what could a camlp4 do to an expression taht will guarnatee you get the output in the same order that it is executed without the camlp4?
<MarcWeber>
Is anybody in here knowing camlp4 and filters well I could pay for getting a small task done? The task would be about "write a tracing line for each ocaml command which gets executed, like what ocamldebug writes to stdout pressing step only"
<gasche>
camlp4 quotations, or the current experiments in the extension_points branch, would both be suitable
<pippijn>
maybe I can use camlp4 or compiler libs and have actual ocaml syntax with just a source filter
<pippijn>
I didn't know of camlp4 at that time
2013-06-27
<wmeyer>
pippijn: partially, camlp4 uses
<MarcWeber>
Is there a camlp4 parser which can cope with that line 26 in the paste?
<MarcWeber>
kaustuv: Do you know how to combine cppo with camlp4 ?
<pippijn>
you need camlp4
<pippijn>
well, if you want better ocaml error messages, you either need to use camlp4
2013-06-26
<gasche>
MarcWeber: I *think* Camlp4 should suppor th
<MarcWeber>
cppo adds line markers "# 142" which camlp4 has trouble with?
2013-06-25
<pippijn>
camlp4 can tell me?
<MarcWeber>
Camlp4 could have told you. No idea. I could use grep.
<pippijn>
you mean camlp4 filter
2013-06-23
<ocaml_newbie>
Hello, what tis error message means "Camlp4: Uncaught exception: DynLoader.Error ("/root/.opam/system/lib/pgocaml/pa_pgsql.cma", "error while linking /root/.opam/system/lib/pgocaml/pa_pgsql.cma.\nReference to undefined global `Batteries'")", i have installed pgsql and batteries.
2013-06-21
<pippijn>
I have not many problems with camlp4
<wmeyer>
pippijn: only one thing, does not require camlp4 - replacing the parsing frontend
<pippijn>
wmeyer: what does your monad extension do better than the camlp4 monad extensions?
<gasche>
one obvious thing is that the workaround we used for Camlp4 in trunk could easily be defeated by new optimizations too clever for their own good, and right now there is no monitoring in place to make sure memory consumption doesn't have a regression
<ggole_>
Certainly defmacro is more convenient than camlp4
<companion_cube>
whitequark: I don't know, I don't use camlp4
<whitequark>
however, e.g. http://www.ffconsultancy.com/ocaml/benefits/parsing.html mentions that camlp4's RDPs can be more complex... as this syntax is generally less flexible than handwritten parsing code (I think?), how much is it a problem in practice?
<whitequark>
how good an idea is it to use a recursive descent parser provided by camlp4? my motivation is that RDPs seem to provide the best kind of error recovery available
2013-06-20
<amiller_>
i mean anything harder than what's done for camlp4
2013-06-18
<amiller_>
so maybe my plan should be to traverse the typedtree, save whatever information i need in some database file or something, then make an camlp4 transformer that looks up in the database to know what translation to do
<amiller_>
basically i am doing a type-directed transformations so i need to traverse the Typedtree to learn about the inferred types in some places, but then I want to go splice new code into some untyped AST using camlp4 quoting
<hnrgrgr>
amiller_: no. Ocaml.Precast.Ast is a custom ast used by camlp4
2013-06-16
<wmeyer>
but you highlighted an important issue, if the new user of OCaml wants to use a pre-processor, he/she needs to resort to Camlp4, which is not the best idea to begin with
<wmeyer>
spanish: camlp4 takes time to master
<wmeyer>
camlp4 is in wild can be used to implement almost any syntax and code generator
<wmeyer>
spanish: I'd recomend any of the camlp4, which can be used for conditional compilation.
<ygrek>
there is also builtin very powerful but quite complex preprocessor camlp4
2013-06-13
<Drup>
gasche: Well, maybe it's because I'm not use to it, but I find writing parsers (and extensions in general) with camlp4 quite painful.
<gasche>
(Camlp4 uses it to define the grammar of the whole OCaml language, with error messages that are often better than what the ocamlyacc parser provides)
<gasche>
Camlp4 provides a rather generic way to define parsers as a kind of DSL, that is actually appropriate to write whole parsers for serious programming languages
<gasche>
22:45 < Drup> more thant that, camlp4 is not intended to be a general purpose parser, it's for ocaml extension. You can do it, but that's really not the point (and it will be horrible to do)
<Drup>
more thant that, camlp4 is not intended to be a general purpose parser, it's for ocaml extension. You can do it, but that's really not the point (and it will be horrible to do)
<dsheets>
camlp4 is rather overkill if yacc/menhir does what you need
<osa1>
I'm trying to make a choice between camlp4 parser thing and ocamllex & ocamlyacc
<avsm>
once you're happy with whatever transformation you want, you can engage in masochistic camlp4 hackery
2013-06-11
<avsm>
that'll let me add a base-camlp4 to OPAM
<avsm>
so ocamlfind builds without camlp4 now with 1.4?
<gasche>
I think camlp4 and ocamlbuild may be split from the core distribution eventually
<adrien_oww>
I definitely wouldn't mind installing ocaml (compiler only), then ocamlfind, then ocamldebug, then ocamldoc, then camlp4, then labltk, then ...
<adrien_oww>
(and ocamldebug, ocamldoc, camlp4, ... outside of it)
<avsm>
for the bigger projects, we run ocamlfind at configure time and just cache the various camlp4 options on a per-project bassis
<gasche>
that is emulate "ocamlfind camlp4" by using "ocamlfind ocamlc -dsource" instead
<gasche>
the problem being that ocamlfind doesn't allow to call only the preprocessor easily (no "ocamlfind camlp4" command)
2013-06-10
<ousado>
and omonad doesn't depend on camlp4
<Drup>
this fail at camlp4 time, because pa_macaque don't parse it
2013-06-08
<def-lkb_>
in git version, there is support for js_of_ocaml and ignoring camlp4 expression quotations (that, those are typed as "forall a. a")
<wmeyer``>
second, provide plugins that ignore some stuff. For instance quotations in Camlp4 are fine, they are still the same class of code.
<wmeyer``>
asmanur_: so I see two solutions for Camlp4 support in merlin
2013-06-07
<wmeyer``>
how quickly I could write a code generator in Camlp4, writing menhir grammar etc. vs how much time i need invest to do it with depenent typing. (it's not too bad, given I have a robust type system of Coq for my need)
2013-05-27
<companion_cube>
orbitz: including camlp4?
<gasche>
your build system may not thinking of handling the batteries dependency to the camlp4 command-line arguments as well as ocamlc's
<mk270>
Camlp4: Uncaught exception: DynLoader.Error ("/home/mk270/.opam/4.00.1/lib/pgocaml/pa_pgsql.cma", "error while linking /home/mk270/.opam/4.00.1/lib/pgocaml/pa_pgsql.cma.\nReference to undefined global `Batteries'")
<mk270>
Camlp4: Uncaught exception: DynLoader.Error ("/home/mk270/.opam/4.00.1/lib/pgocaml/pa_pgsql.cma", "error while linking /home/mk270/.opam/4.00.1/lib/pgocaml/pa_pgsql.cma.\nReference to undefined global `Batteries'")