<hcarty>
flux: Yes, the non-camlp4 Batteries features are certainly its major strengths :-)
<flux>
I'm hoping the non-camlp4 features of batteries turn out to be more interesting
<hcarty>
camlp4 bugs are a large part of why (from what I understand) Batteries is aimed mostly at 3.11.x
<hcarty>
flux: There are LOTS of camlp4+toplevel bugs in OCaml 3.10.x
<kaustuv>
Oh, I guess you can write a camlp4 ast printer
<hcarty>
kaustuv: For what it's worth, (7) can be avoided (camlp4 is not required when using Batteries). (8), the enum-ization can be avoided as well. The availability is (almost?) pervasive, but I don't think enum use is ever required.
* Yoric[DT]
will take a break before leaving the world of threads and entering that of Camlp4.
<Yoric[DT]>
Actually, I've finished the section on Batteries and I'm entering the section on Camlp4.
2009-09-02
<Camarade_Tux>
I've successfully compiled my program using camlp4 .cmo files but ocamlfind and mikmatch_pcre's apparently want to use cma files instead
<Camarade_Tux>
because if there is no differnce, let's use .cmo files everywhere and be happy (for camlp4 on windows)
<Camarade_Tux>
in camlp4, what are the reasons to use a .cma file rather than a .cmo one?
<thelema>
orbitz: [open ... in] does a quite good job. It's too bad it's camlp4
<Camarade_Tux>
does it look ok? I tried to make it short without having to dive through the whole camlp4 sources
* thelema
is happy to avoid camlp4
<Camarade_Tux>
I think it's camlp4 is ok on the inria side, now I need to patch findlib's safe_camlp4
<Camarade_Tux>
seems I got the camlp4 issue sorted but now I have troubles with C libs :)
<thelema>
gildor: aaa batteries is a smaller version of the batteries library - no camlp4, no sexplib
<Camarade_Tux>
I think a simple change to mkcamlp4.ml solves the "undefined reference to dynlink" problem with camlp4 on archs that don't support dynlink and use ocamlfind \o/
<Camarade_Tux>
another possibility is to remove the need for any .cma file when calling safe_camlp4, that would probably require fixing several packages which maybe isn't even easy and some may actually use .cma files and not .cmo ones which means this is not a guaranteed fix
<Camarade_Tux>
a simple solution is to move dynlink.cma before in the chain of arguments like: [ ocamlc dynlink.cma -I +camlp4 camlp4lib.cma Camlp4Bin.cmo a.ml -linkall ]
<Camarade_Tux>
in turn, mkcamlp4 calls ocamlc: [ ocamlc -I +camlp4 camlp4lib.cma dynlink.cma Camlp4Bin.cmo a.ml -linkall ] fails with undefined reference to dynlink
<Camarade_Tux>
basically ocamlfind calls safe_camlp4 which provides a fallback in case dynlink isn't supported, this fallback uses mkcamlp4
<Camarade_Tux>
what is the use for the sexplib.cma in 'camlp4 sexplib.cma pa_sexp_conv.cmo'? it doesn't seem to be needed
<Camarade_Tux>
(findlib doesn't call camlp4, it calls safe_camlp4)
<Camarade_Tux>
it's a shell script with a comment at the top: "Call camlp4 with fallback method if dynamic loading is not supported" and I'm suspecting it's the reason I have "undefined reference to dynlink.cma" errors :D
<Camarade_Tux>
gildor or _zack: do you know if safe_camlp4 a binary that comes with findlib?
2009-09-01
<sgnb>
when you give *.cma argument to camlp4*, it will load it dynamically
<bluestorm>
(when camlp4 get invoked with plugins, it could ask for dynlink somehow in that crazy 3.11 setting I understand nothing of)
<bluestorm>
I meant that possibly the linking issue was a camlp4-time issue instead of a compile-time one
<Camarade_Tux>
no matter the os, I can never get the ocamlfind camlp4 arguments right
<sgnb>
sanest thing would be to fix camlp4's META, IHMO
<Camarade_Tux>
I'm trying to compile with: [ ocamlfind opt -syntax camlp4o -package 'dynlink, camlp4, unix, pcre, sexplib, sexplib.syntax' -linkpkg types.ml yaxmpkg.ml ] but I stil get the "same undefined reference to dynlink" error
<hcarty>
Camarade_Tux: I can email you the GODI camlp4 META file if it would help.
<hcarty>
The META file for camlp4 that ships with GODI is massive.
<Camarade_Tux>
camlp4's META doesn't seem to mention dynlink but I'm not sure I can fix that today, I've tried to add dynlink to a few places in camlp4's META but that doesn't seem to solve it
<Camarade_Tux>
hcarty: order occured to me but I didn't try changing camlp4's META, gonna check/try
<hcarty>
Camarade_Tux: Regarding the Windows problem - is dynlink.cma added too late in the command line? Maybe it needs to be added to camlp4's META file.
<Camarade_Tux>
bah, I can't get my code to compile on windows using ocamlbuild, it's failing because of camlp4 and "undefined reference to dynlink" even though I have pkg_dynlink in _tags or -package dynlink when using ocamlfind (ocamldep)
<Yoric[DT]>
Actually, since we don't have a real hierarchy anymore, we could rework the package and some of the camlp4 macros to split transparently.
<hcarty>
It is already up to the author of Batteries-using code if they want any camlp4 use in their project.
<hcarty>
If I add "open Batteries open Standard" to the start of foo.ml then it compiles without issue, because the library is linked but no camlp4 is applied to foo.ml
<hcarty>
Or, with the full Batteries camlp4 suite.
<hcarty>
It does apply, because with camlp4 the "open Batteries;; open Standard;;" is implicit.
<thelema>
there's no camlp4 that would apply to that. |> is a function.
<hcarty>
But you would have to do that with aaa or any other non-camlp4-Batteries code.
<hcarty>
"let f x = 1 |> print_int" in foo.ml, compiled with "ocamlfind ocamlopt -package batteries -linkpkg foo.ml" fails because none of the camlp4 is used in this case.
<thelema>
it's difficult in the current batteries to use it w/o camlp4 because its build system auto-includes
<hcarty>
If you juse use pkg_batteries (or ocamlfind ocamlc -package batteries ...) no camlp4 is involved.
<hcarty>
camlp4 is only enabled by default if you use the Batteries myocamlbuild.ml and use_batteries
<hcarty>
The camlp4 requirement can already be avoided, correct?
<thelema>
that's the major hurdle for some people - some people won't use camlp4
<hcarty>
There are certainly Batteries-specific pieces in there, but a lot of it is making ocamlfind and camlp4 support easier.
<bluestorm>
I mean, camlp4+ocamlfind is relatively painless thse days
<bluestorm>
is the reason to scrap camlp4 the need for a simple build system ?
<thelema>
but I'm thinking of things like how car batteries commits to camlp4. I'm considering pulling the IO system from aaa
<Camarade_Tux>
I remember what I have against camlp4 on windows, it always seems to fail with "reference to undefine global `Dynlink'"
2009-08-31
<bluestorm>
camlp4 wouldn't be enough : module Obj = struct let magic () = () in end let foo () = Obj.magic ()
<bluestorm>
actually you sometimes have to encode a bit of the semantic in the camlp4 part
<bluestorm>
not all things can be done in "pure OCaml", and camlp4 extensions also need a "pure" library encoding the ocaml-exprimable part of your application domain
<Alpounet>
bluestorm, yeah, when it becomes too heavy to get things like we want in pure OCaml, camlp4 is very handy.
<bluestorm>
Alpounet: OCaml has camlp4 for that
<thelema>
it requires camlp4 to be part of the compiler enough to have the parse tree and some typing
<thelema>
to have a reliable macro system, you have to have that system use the same parser as the language itself, which camlp4 gets right vs. every other macro system (except lisp)
<bluestorm>
.. and was delighted to run into a small camlp4 trickery
2009-08-28
<ertai>
but there are also better guys than me at understanding camlp4 algo
<ertai>
However I consider myself a bit defeatist about the parsing algo of camlp4
<ertai>
I can conclude that the limited support for parameterized rules in camlp4 is a real limitation of the algo/structures
<bluestorm>
but camlp4 rules are represented in a data structure, right ?
<bluestorm>
ertai: how hard would it be to add support for (possibly limited) parametrized rules to Camlp4 ?
<bluestorm>
there are some upstream camlp4 bugs. wrt. antiquotations locations
<bluestorm>
'locations' is the dedicated camlp4 term
<bluestorm>
camlp4 code for that is uglier than the usual "LIST0 .. SEP ';'", but let's do it
2009-08-26
<bluestorm>
Alpounet: the decent module system, the interesting object system, polymorphic variants, optional lazyness, camlp4
<thelema>
camlp4 is hackish
<orbitz>
thelema: i could do soem camlp4 or whatever it is caleld magi ci suppose right?
2009-08-22
<thelema_>
no camlp4, no seprate builds for threads / nothreads, much fewer dependencies (maybe none, I've not decided)
2009-08-18
<thelema_>
and people wonder why I don't love camlp4
2009-08-17
* thelema
just wants camlp4 that can include other camlp4 macors
* brendan
is highly suspicious of camlp4 :)
<kaustuv>
thelema: I think a batteries-lite flavour would be good to have in addition to the full distribution, for those who are highly suspicious of camlp4 (and like to use $ and << in their own code)...
<thelema>
probably not, as some of our dependencies require camlp4 to compile.
<kaustuv>
is it possible to use batteries without camlp4? as in, not even having camlp4 installed?
2009-08-13
<Arthur_Rainbow1>
I would like to know, does anyone know a tutorial about camlP4 wich is not deprecated.
2009-07-28
<bluestorm>
if you find it syntaxically heavy, we could do a camlp4 extension for that (syntaxic sugar)
<kaustuv>
actually, I think a safe version of this can be hacked together with Camlp4 pretty easily.
2009-07-23
<palomer>
there's oset and then there's seditable which is simply a camlp4 extension
2009-07-21
<palomer>
and how do I get ocamldoc to play nice with camlp4?
2009-07-15
<kaustuv>
strictly speaking, anything is an anything in OCaml if you allow Camlp4
2009-07-10
<sgnb>
I guess the right fix would be to use caml_copy_intXX everywhere, and stop allocating the intXX on the caml side (in the camlp4 extension)
2009-07-02
<hcarty>
C_Tux: But [(REPLACE '*' * -> "") "*foo*"] does not give anything. So perhaps the camlp4 magic behind mikmatch explicitly checks for "let"?
<C_Tux>
however, if I run the code through camlp4 and copy its output, it works =/
2009-07-01
<julm>
komar_: pa.ml uses Module, so you must pass module.cmo to camlp4: ocamlc -c -pp "camlp4of module.cmo pa.cmo" -I +camlp4 module.cmo test.ml
2009-06-30
<flux>
(maybe a shortcut similar to labeled arguments could be written in camlp4 ;-))
<julm>
komar_: I don't think that what you want is possible; camlp4 is a preprocessor: it acts before the code is actually run. what you possibly may have is an Ast of {Some "string"} but not the value {Some "string"}
<julm>
could you give an example of the source you're using camlp4 on, and tell more on what you exactly want to have from the name of the value
<komar_>
Hello again. Yet another question about camlp4.
2009-06-28
<komar_>
Command what I use to build: ocamlc -I +camlp4 -I +sqlite3 dynlink.cma camlp4of.cma sqlite3.cma -o test sqltree.cmo pa_sql.cmo test.cmo
<flux>
I suppose that part would be implemented in camlp4
<thelema>
not like camlp4 which is compile-time
<julm>
komar_: well, ulexer.ml doesn't seem to reuse Camlp4's Lexer.mll, but you may be able to do it for your own lexer if you're more used to ocamllex than me.
<thelema>
nice - it looks like the work on functorizing camlp4 does someone some good
<komar_>
(the better way for learning camlp4 is reading sources)
<thelema>
That's above my camlp4 pay grade. anyone else?
<komar_>
Hello. Yet another question about camlp4.
2009-06-26
<komar_>
Maybe I do something wrong? I'm not advanced user of camlp4.
<komar_>
Hello, I have a question about camlp4. Is there any way to translate keyword to string?
<palomer>
I'm using camlp4 to automatically serialize my values
2009-06-24
<palomer>
when automatically generating code (like in camlp4), it would be a pain (and polluting) to constantly define new datatypes
2009-06-22
<palomer>
camlp5 is the old camlp4, right?
2009-06-21
<yziquel>
flux: I'm sure he had an itch that needed scratching: he also created a camlp4 extension to call C functions from OCaml in a syntax close to C...
2009-06-16
<palomer>
camlp4 doesn't do any hash voodoo magic?
<thelema>
has anyone had batteries (or probably camlp4) mess up dependencies between .mli files?
2009-06-15
<jeff_s_1>
palomer - could you point me a few places you looked that helped most with camlp4? Not the revised syntax, the other stuff. also I forgot if you said if you saw how to fuss with the lexer.
<jeff_s_>
palomer - you're the camlp4 expert in here now
2009-06-14
<palomer>
what's the quotation for a type declaration in camlp4? I'm trying to do <:str_item< type $type_name$ = $constructors$ >>
<julm>
strangely, [type_longident] is very different in the revised syntax (I mean it seems to handle completely a Longident.t, whereas in the old syntax, it appears to only handle functor applications (the parenthesis), but camlp4 in old syntax parses well the GG.t example, so my understanding is quite limited)
<jeff_s_>
I didn't know there was {} in type expressions in camlp4
2009-06-13
<palomer>
camlp4 rocks
2009-06-12
<palomer>
why is camlp4 done with revised syntax?
<jeff_s_>
I am also interested in good documentation for camlp4 3.10, 3.11.
<palomer>
so...where can I find some decent camlp4 documentation?
<palomer>
or, at least, write out the grammar for the parser generator in camlp4
<palomer>
well...I've decided to attempt to write a parser generator in ... camlp4!
<olegfink>
so far I've failed to find a nice proprocessor for C, and camlp4 is generally what I want, despite the fact that I don't want to implement C Parser/Printer myself. :-)
<olegfink>
has anyone used camlp4 for completely non-ocaml business?
2009-06-06
<mfp>
most of the gains should come from parallelizing camlp4
2009-06-05
<travisbrady>
i needed camlp4-extras which i was able to install via apt-get if anyone cares
<travisbrady>
$ which camlp4 /usr/bin/camlp4
<travisbrady>
I'm trying to install ocaml-bitstring but it dies with "checking for camlp4of.opt... no configure: error: You must have camlp4 installed" despite the fact that i have camlp4 installed
2009-06-04
<flux>
it'd be darn interesting if camlp4 could interact with the type checker and rest of the compiler..
<flux>
what I was suggesting was that camlp4 could be made to implement the feature, but only in the case when the referred module is a 'top level' module with a .cmi-file.
2009-06-02
<romildo>
But I am not yet modigyin the enum extension, as currently I do not know camlp4. I am first trying examples from the tutorial.
<romildo>
mfp, I am not sure, as I've said before, I am just starting learning camlp4. I am trying the first example from the "Syntax extension tutorial" in the camlp4 wiki.
<palomer>
why does camlp4 use dynlink?
<romildo>
Just a question about it: is it mandatory, or can I use camlp4 without dynamic linking?
<romildo>
But now I am just interested inlearning camlp4 to write a syntax extension. Later on I take a look at dynamic linking.
<romildo>
What documentation do you recommend for learning camlp4?
<romildo>
I want to learn camlp4, but it seems that the tutorials are out of date.
2009-05-28
<Yoric[DT]>
Well, technically, it wouldn't be too hard to add this with Camlp4.
2009-05-27
<olegfink>
Yoric[DT]: I just said I would like to have what you described in camlp4.
<olegfink>
well, from what you describe, OPA could be a cool camlp4 preprocessor. ;-)
2009-05-25
<flux>
is there documentation for the macro camlp4-module that comes with ocaml?
2009-05-23
<julm>
.ml4 is also used for camlp4 files
2009-05-21
<hcarty>
Some camlp4 magic could probably clean it up as well.
<travisbrady_>
flux: i'll have a look at camlp4
<flux>
travisbrady_, one interesting thing ocaml has going on is the preprocessor. I understand haskell has template haskell, but it seems even higher order magic than camlp4..
<julm>
test.ml4 (the source) and test.ml (the output of camlp4 on test.ml4)
<julm>
generally camlp4 is quite accurate in reporting syntax error
<palomer>
is it possible to ask camlp4 to tell me where my syntax error is?
<palomer>
julm, so I was using uid: , which tells camlp4 that it's an uppercase identifier
<julm>
I remember a bug in camlp4 present when output was textual and not present when the output was binary
<julm>
palomer: and if you use camlp4 -printer o ?
<palomer>
if I use camlp4, I get the error "Unbound constructor lv1"
2009-05-20
<palomer>
how do I match the first one with camlp4? <:ctyp< ( $tup:tp$ ) >> doesn't cut it
<palomer>
type foo = Bar of int * int is different from type foo = Bar of (int * int) according to camlp4
<palomer_>
I used it when I wrote a camlp4 language extension
2009-05-16
<palomer>
how do you express a rec_binding in camlp4?
2009-05-15
<palomer>
in camlp4
<palomer>
in camlp4
2009-05-13
<mfp>
camlp4's author, too
<mfp>
it's just that you used to need it for camlp4 quotations, and the support for quotations in original syntax is buggier/incomplete
<palomer>
how do you express "body <- foo" in camlp4?
<Alpounet>
and the camlp4 manual documents only a part of camlp4
<Alpounet>
(for camlp4)
<flux>
I doubt the output of ocamldoc is that useful with camlp4
<flux>
a Camlp4 documentation project would've made a great Jane Street summer project; I wonder if they'd have accepted
<thelema>
and what comes out of camlp4 has to type properly in ocaml
<palomer>
this is a camlp4 function
<thelema>
that's the result type of your camlp4 code - it must produce a function with a specific type
<palomer>
err...I thought camlp4 could let you work some magic
<palomer>
hrmph, how do I turn a list of expressions into a list of expressions in camlp4?
2009-05-12
<palomer>
where can I find more documentation on :expr :str_item :ctyp and friends (in camlp4) ?
<palomer>
or, rather, how do I use camlp4 with omake?
<palomer>
libtype-conv-camlp4-dev - support library for OCaml preprocessor type conversions
<palomer>
is there a tutorial anywhere that shows how to use camlp4 to automatically generate functions to print your types ?
2009-05-11
<hcarty>
palomer: I don't think that the manual is up to date with the changes in camlp4 in 3.10 and later
<palomer>
tha camlp4 tutorial
2009-05-08
<hcarty>
But without the above changes, the findlib and camlp4 goodies will not be applied. So if any non-stdlib packages or syntax is used then it won't work.
2009-05-05
<hcarty>
palomer: camlp4 may not be "prettier", but it will/can do what you are asking
<palomer>
camlp4 can pretty print code?
<hcarty>
palomer: Emacs+tuareg or camlp4?
2009-04-30
<tar_>
Are there any examples of using camlp4 to compile completely different languages using the OCaml compiler?
2009-04-26
<thelema>
the batteries printf uses camlp4 to convert the string into a printer structure
2009-04-24
<bluestorm>
i've tried to adapt my camlp4 testing to the OUnit framework but's it's really quite difficult
2009-04-22
<th5>
thanks - i thought that something in camlp4 would be good but i wasnt sure what - right now i'm writing some code "by hand" to do it for some types im interested in - maybe i should look into doing it in the general case
<kaustuv_`>
th5: no, but one can be written in principle with Camlp4. Cf. sexplib
2009-04-19
<flux>
what would be great: a camlp4 extension to 'lint' or possibly even convert non-batteries programs to batteries-conformant
2009-04-18
<mfp>
_yziquel: you want a new syntactical construct (-> camlp4)
2009-04-17
<flux>
but a camlp4 module should be able to build the tree directly via some secret interface
2009-04-16
<palomer>
some stuff camlp4 allows that caml doesn't (from my experience)
<palomer>
also, it seems that camlp4's syntax is a little more relaxed
<flux>
but apparently the author has been bit by this camlp4 version thingy and bugs :)
<flux>
it only makes the camlp4 off from the compilation procedure
<olegfink>
it's a preprocessor for C very, very much like camlp4
<olegfink>
Yoric[DT]: by the way, speaking of camlp4, have you seen xoc?
<olegfink>
Yoric[DT]: camlp4? :-)
<petchema_>
(camlp4 ?)
2009-04-11
<mrvn>
There is a formal method for doing this so you could write a camlp4 makro that does it automatically for you.
2009-04-07
<flux>
however that's for the old camlp4. but you can likely make use of the code with camlp5.
<jbms>
Is there a camlp4 module for supporting the "try in" construct?
2009-04-05
<kaustuv>
mrvn: You can get __FILE__ and __LINE__ trivially with camlp4
2009-04-04
<kaustuv>
i.e., a camlp4 syntax extension?
<thelema>
"save stuff from camlp4" - what stuff?
<flux>
btw, regarding code that's not under one's control: there should be a way to save stuff from camlp4 and load it when compiling others. of course, there's nothing (?) stopping one from doing this already.. but it would be nice to find the files just in the same way .cmi-files and .cmo-files are found by the compiler.
<kaustuv>
thelema_: camlp4 is already much better than ocaml in signalling the reasons for syntax errors. How does one signal an arity error? I am a camlp4 noob, so I'm quite happy to receive instructions on how to do anything better.
<wsmith84>
without camlp4
<wsmith84>
I haven't used camlp4 yet, seems like a bit much just to get a little bit of syntactic sugar :-)
2009-04-03
<kaustuv>
Is there an ocamldoc of the camlp4 api on the web somewhere?
<Alpounet>
I've a grammar defined with camlp4 and then try to parse a string wrt my grammar. I catch the Loc.Exc_located exception. But I get "(_,_)" instead of where the problem is in my string. I print the exception with :
2009-03-31
<_andre>
say i have a file with contents "let _ = 1 + a". is it possible somehow (from camlp4) to catch the error "Unbound value a"?
<kaustuv>
I'm a complete camlp4 newbie. Is it possible to use it to produce functions like [make_lo] in this example: http://ocaml.pastebin.com/m2d7c45a ? Should I be taking a look at type-conv and sexplib?
2009-03-30
<mfp>
mrvn: sounds like code generation with camlp4
2009-03-28
<Alpounet>
doing such a thing might be possible with camlp4, but that would be metaprogramming.
2009-03-27
<Alpounet>
when working with camlp4, ";" is some sort of synonym of " " right ?
<Yoric[DT]>
Whenever he comes back, could someone tell dartelin that this looks like a Camlp4 bug I've found a few times?
2009-03-26
<thelema>
_andre: sorry, it seems there's no camlp4 gurus here
<mfp>
Alpounet: camlp4 trying to ... ?
<_andre>
is it possible to get a string representation of a given expression in camlp4?
2009-03-24
<Yoric[DT]>
(well, you could with some Camlp4 boilerplate)
2009-03-19
<mrvn>
What I would like is a camlp4 module to convert the "enum Foo {X, Y, Z, ...}" into ocaml type foo = X | Y | Z so you only have to define it once and it will always be in sync.
<_andre>
i'm just getting started with camlp4, but it's been kind of a trial and error process
<_andre>
what's the proper way to evaluate a LIST0 of expressions in camlp4?
2009-03-18
<_andre>
is there a pattern for camlp4 rules that matches a (fun ...) expression?
2009-03-17
<Yoric[DT]>
_andre: ocaml-tutorial.org has a nice tutorial for camlp4, iirc.
<_andre>
what's the best way to get started with the new camlp4?
2009-03-13
<mrvn>
That could be something camlp4 could do.
<mbishop>
mrvn: couldn't that be done with camlp4 magic or something?
<hcarty>
brendan: You need to load the dynlink module first ... camlp4 3.11 requires Dynlink
2009-03-11
<th5>
How should I choose between using list and Stream ? I've been messing around with Stream (via camlp4 [<>] syntax).
2009-03-07
* thelema
wouldn't suggest camlp4 for this.
<Yoric[DT]>
(we can't use camlp4 here because that would screw up with comments)
<thelema>
yes, but not just that - camlp4 knows the grammar, and I still consider it severly flawed because it's pre-processing - what people try to do with it needs to have access to better compiler internals to get done properly
<joelr1>
has anyone written camlp4 stream parsers?
2009-03-06
<joelr1>
can you use ocamllex with a camlp4 parser?
<th5>
bjorkintosh: don't worry about revised syntax at all - they didn't change the syntax - someone made an alternative syntax to the standard - mostly comes up when reading about camlp4 (the whole camlp5 manual in this revised syntax)
<mfp>
bjorkintosh: they share the core language. F# adds to it its own OO, overloading, some monadic stuff, etc., but lacks functors, polymorphic variants, camlp4 and stuff
<thelema>
The claim is that OCaml is declarative because you can extend its syntax or create sublanguages (camlp4, I guess) and because some libraries modify the language
<ertai_>
?foo: is a single token in the camlp4 lexer
2009-02-27
<_zack>
it is not that `IN in camlp4 is forbidden at all as a keyword, is forbidden only if you use camlp4 with the macro machinery a-la cpp
<rwmjones>
_zack, ocamlnet 2.2.9, against ocaml 3.11.0 & camlp4
2009-02-26
<_zack>
what is the new camlp4 equivalent of the old camlp4 which used to mimic cpp -DMARCO arguments?
<mrvn>
Somehow I feel that it should be possible to use the C header files to generate a mapping for errno. Maybe some camlp4 code that will parse an enum { ... } and generate a ocaml type for it.
<_zack>
I was trying to switch back to camlp4 in debian, but it seems there are still issues
<_zack>
rwmjones: in fedora, are you building ocamlnet against 3.11 + camlp4 or camlp5?
<theIdeaMen>
anyone know if there is a version of the camlp5 (old camlp4) manual that uses original syntax instead of revised
<kaustuv>
palomer: if you haven't fixed the problem yet, maybe you need to add camlp4 to the OCAMLPACKS[]. But I'm not sure.
2009-02-25
<thelema>
Alpounet: in the camlp4 docs - I don't know how many people really use it, though.
2009-02-24
<thelema_>
sitaway: batteries will soon integrate some camlp4 that'll allow: (_ $1.attribute) (or something really similar)
<Yoric[DT]>
He already has a prototype of his Camlp4-based printf.
<kaustuv>
Well, maybe I'll see if the pa_printf stuff can be ported to the new camlp4.
<Yoric[DT]>
Well, we've started working with camlp4.
2009-02-19
<thelema_>
I have the feeling we could use some camlp4 to make testing simpler - your tests have a lot of boilerplate.
2009-02-15
<oleg|log>
hi, does using camlp4 for defining a completely different grammar make any sense?
2009-02-14
<Yoric[DT]>
Camarade_Tux: problem traced to a Camlp4 extension.
2009-02-13
<mikeX>
well that's what I was trying to avoid, and that's why there was a problem in the first place (because camlp4 translates the match to what you describe), but I figured it out :)
<hcarty>
I'm not sure how useful "include foo_t from Bar" would be for a type foo_t unless camlp4 could find and pick out the definition of foo_t from Bar
<hcarty>
Yoric[DT]: Could it be used for both? IIRC, camlp4 can distinguish between modules and values
<flux>
at the moment if you wish to do some type-aware processing with camlp4 the only option is to do type inference your self. in essence, reproduce a large amount of the compiler yourself.
<flux>
perhaps there could be camlp4 -> type inference -> some other camlp4-like mechanism -> compiling
<flux>
it'd be nice if camlp4 was able to access everything the compiler can :)
<hcarty>
I don't know if camlp4 can get without a lot of extra work
<Yoric[DT]>
Gasp, it's actually worse than that, Camlp4 seems to remove some blank lines.
<Yoric[DT]>
Camlp4 seems often off by 1 line.
2009-02-11
<tsuyoshi>
only with camlp4
<thelema>
brendan: that's a consistent bug introduced by camlp4
2009-02-10
<Yoric[DT]>
Another issue with camlp4.
<Yoric[DT]>
(and it's a camlp4 bug, by the way)
<rwmjones>
same as for camlp4 etc
<rwmjones>
did that answer your questions about cross-compilation? Note that we use native tools from the ordinary ocaml package for camlp4, ocamllex, ocamlyacc. Only the actual compiler ($target-ocamlopt) is different.
2009-02-08
<mfp>
a rather heavy way to make them implicit would be to detect all refs to Batteries (sub)modules and rewrite them w/ camlp4; seems fragile, though
2009-02-07
<flux>
but using $ is not a great idea, as it is used by camlp4 (for something)
2009-02-06
<flux>
I think the kind folks at inria could still up the version number of camlp4 to camlp6 and go with that, atleast the inclarity on for which version of camlp4 the tutorial is would go away :)
<yziquel_>
Any good tutorial on camlp4?
2009-02-03
<avsm>
cant for the life of me figure out how to add a '-syntax camlp4' using OCamlMakefile, to use json-static
<avsm>
does anyone here use OCamlMakefile / ocamlfind / camlp4 ?