2010-09-02

<thelema> you're right, it's a camlp4 problem, not related to batteries, as if I just load camlp4o, the same error happens
<dark> how to compile with ocamlc, but with camlp4 extensions?
<thelema> yes, but desn't use any camlp4
<dark> is there a way to have Batteries at toplevel without camlp4?
<thelema> camlp4 shouldn't affect that code
<dark> before loading batteries (and camlp4), it was all ok. now, ocaml says {< s = x; p = y >} has a problem (it interprets it as s = (x; p =y))

2010-08-29

<MarcWeber> ygrek_: So camlp4 must have kind of triggers triggering those extensions, so that the extensions parse noly what they should see.
<thelema> as for multiple camlp4 pre-processors, I recommend using ocamlbuild to deal with dependencies

2010-08-28

<tautologico> is there any documentation about what camlp4 extensions are active by default when using batteries?

2010-08-24

<a_m0d> What about using a pure camlp4 based parser? Is that fairly fast?
<flux> maybe you could make-do by having a thread use camlp4 streams and provide a lexing function terms of that?
<a_m0d> Is it possible to use ocamlyacc with a camlp4-stream based lexer?

2010-08-21

<gildor> tab: you asked a question yesterady or the day before about oasis and camlp4
<tab> gildor: we're evaluating oasis at the moment, and we have some modules requiring camlp4
<gildor> tab: do you perform using camlp4 syntax with oasis ?

2010-08-20

<Anarchos> hcarty i never played with camlp4, maybe i should give it a try !
<tab> any way to have ocamlfind and camlp4 play together ?
<tab> adrien: never used camlp4 before unfortunately
<adrien> tab: iirc, it creates the _tags file, simply open it and append the regular tags, as for any ocamlbuild project (have you ever used ocamlbuild+camlp4?)
<tab> hi, anyone had any luck with using camlp4 syntax with oasis ?
<thelema> this is a known bug in the camlp4 API - the fix is in the git tree
<dark> maybe i need to install camlp5? or maybe the new camlp4 introduced some incompatibility?

2010-08-13

<adrien> well, you can use camlp4 in ocaml
<adrien> MarcWeber: using camlp4 will give "better" error messages (I never do it on purpose but get it as a side-effect of using mikmatch and sexplib)

2010-08-11

<gildor> MarcWeber: you will have more advanced parsing (esp. with camlp4 integrated) using ocamlbuild which is in the core caml distribution
<thelema> you need camlp4 for stream parsing extensions

2010-07-30

<uotr> Unless you mean just write a big ol' ocaml parser in camlp4 :P
<uotr> My impression is that camlp4 is more for preprocessing (and so generating ocaml code from a DSL) than it is for analyzing existing ocaml code
<uotr> *camlp4
<orbitz> camlp4?

2010-07-27

<th5> Can anyone comment on the difference between using ocamllex and a camlp4 lexer? Any big performance differences (for instance)?

2010-07-23

<adrien> heh, mikmatch-pcre *just* failed building in godi because of camlp4 ;-)
<hcarty> camlp4 3.12+rc1 still plays badly with the toplevel... that's disappointing.

2010-07-21

<hcarty> From my position of relative ignorance, it looks like it would be a straightforward and useful addition to pa_string in Batteries. But hacking on camlp4 extensions is still mostly opaque to me.

2010-07-14

<palomer> I'm trying to write something similar to camlp4

2010-07-07

<kaustuv> mfp: thanks, but I would rather live without any camlp4 anyhow. Has this been reported upstream?
<kaustuv> Also, what does 'EOI' in this Camlp4 error mean?
<thelema> there's probably a better way involving the Print module and its associated camlp4 magic, but that's what I use at the moment

2010-07-06

<hcarty> camlp4 3.12 seems to break the toplevel as well
<hcarty> mfp: Yep, camlp4. After experimentally installing several camlp4 extensions with GODI, bitstream/bitmatch seems to be unaffected, but it's apparently the exception.
<mfp> hcarty: is that caused by changes in camlp4 or in the language?
<hcarty> Lots of camlp4 extensions seem to have problems with 3.12
<thelema> it's a camlp4 regression. ocaml bug.
* thelema checks to see if bolt requires camlp4 to be usable

2010-07-03

<elehack> camlp4 can make the build system really hairy sometimes...
<thelema> mfp: I really dislike the compile-time changes needed for camlp4
<thelema> mfp: I appreciate that camlp4 doesn't contaminate other code. but it contaminates the code it's being used on badly enough, and there's no indication in the source what's going on.
<mfp> so you are not forced to use camlp4 just because something else did
<mfp> thelema: what's the reason for "I want batteries default usability w/o camlp4"? Cannot camlp4 be assumed to be available everywhere where OCaml is to be found?
<elehack> maybe keep the existing Batteries module, and make this an optional feature if you are OK with camlp4 and want to reduce binary size?
<thelema> I'd be up for it except it'd pretty much require camlp4 for batteries, and I want batteries default usability w/o camlp4

2010-06-30

<robthebob> ugly but interestingly this works: ocaml -I `ocamlfind query pa_do` -I +camlp4 dynlink.cma camlp4o.cma pa_infix.cmo pa_dollar.cmo test.ml

2010-06-29

<mfp> at any rate the workaround can be included in batteries, Topfind.load_deeply ["dynlink"; "camlp4"; "batteries.pa_string.syntax"; "batteries.pa_comprehension.syntax"]; in battop.ml should do the trick
<sgnb> I would even say thet dynlink was statically linked into camlp4's cma at one time
<mfp> robthebob: IIRC right after 3.11 was released camlp4's META didn't specify the dynlink dep and that was solved in a subsequent findlib release
<robthebob> so if i #require "dynlink" before the loading of camlp4 etc then it works!
<robthebob> pr_exn (fun () -> Topfind.load_deeply ["camlp4"; "batteries.pa_string.syntax";

2010-06-25

<jgrozave> elehack: it's a good reason to go digging around in the source at least. felt educational when I wasn't pulling my head out trying to figure what options or files to include to camlp4 to make it the same as camlp4orf
<jgrozave> camlp4 isn't very well documented at the moment, I should probably put those findings on a wiki somewhere as well huh
<jgrozave> i had an example camlp4 syntax extension i wanted to test out, but it's makefile used camlp4of and I couldn't figure out how to translate that to useing ocamlfind with its -syntax option
<jgrozave> elehack: and on an unrelated to windows note, I also figured out how to add support to the camlp4(of|rf|oof|orf) syntaxes using ocamlfind

2010-06-24

<jgrozave> thelema: hey, I finally figured out that camlp4 problem I was having earlier
<jgrozave> those definitely look like options you can pass to camlp4 to function just like camlp4of :)
<thelema> yup, the update of camlp4 around 3.10 left it with less docs. There's a wiki somewhere to add docs to
<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] [];;
<jgrozave> no problem, camlp4 interests me quite a bit, but there isn't much recent documenation
<thelema> I'm not a big fan of camlp4, so I don't know this either
<jgrozave> but this one complains that there's a parse error "ocamlc -c -pp 'camlp4 -parser of' -I +camlp4 pa_openin.ml -verbose"
<jgrozave> this command runs just fine "ocamlc -c -pp camlp4of -I +camlp4 pa_openin.ml"
<jgrozave> there is a -parser of option for camlp4
<jgrozave> thelema: what are the equivalent -parser options to give to camlp4 for all of those?
<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

2010-06-23

<jgrozave> I've got a few camlp4 questions

2010-06-22

<jgrozave> even camlp4 --help
<jgrozave> in fact whenever i try to call camlp4 it gives an error complaining about dllunix.dll not being found
<jgrozave> I've narrowed it down to a call to camlp4

2010-06-21

<alexyk> thelema: I forgot, is there a way to turn off camlp4 extensions in the batteries toplevel?

2010-06-20

<flux> I thought template haskell is something like what camlp4 provides?

2010-06-19

<thelema> I guess there's some syntax change of camlp4 in 3.12 that breaks pa_format:
<alexyk> ah ok, so it's solely camlp4 thing
<thelema> revised syntax responses in the toplevel - loading camlp4 in the toplevel changes the responses you get (even if you don't load the revised syntax)
<thelema> to enable batteries, you modified your ocamlinit. That code loads battop.ml, which loads the camlp4 extensions after it prints the banner
<thelema> It's a bug in findlib's handling of camlp4, not directly in batteries

2010-06-16

<robthebob> camlp4 is just the tip of the iceberg

2010-06-14

<thelema> so +camlp4 = /usr/lib/ocaml/camlp4 (or /usr/local, depending on install)
<palomer> what does ocamlc -I +camlp4 mean?
<thelema> I approve. I also kinda wish that such a feature could be implemented in camlp4, but I suspect it can't
<thelema> I also really dislike how camlp4 is a compile time action that has no mandatory "comment" in the source code that it's needed
<thelema> the main reason I worry about camlp4 is composability issues
<kaustuv> ISTR batteries (AAA) was adopting a just-say-no-to-camlp4 policy

2010-06-13

<elehack> (camlp4 problem: I needed to build my extension with camlp4.quotations.o, not camlp4.quotations)
<elehack> and I've tried adding more modules to the camlp4 invocation, but still can't get it to work.
<thelema> or camlp4 isn't so wise
<elehack> I have a syntax extension that works under camlp4of, but fails under camlp4 -parser o -parser op -parser p (like ocamlfind invokes it)

2010-06-11

<robthebob> i get: "Camlp4: Uncaught exception: DynLoader.Error ("pa_strings.cma", "file not found in path")"

2010-05-13

<hcarty> derdon: Not sure - it's a bug in some part of the system, either the toplevel, camlp4, findlib or the method Batteries uses to load the extensions
<hcarty> derdon: You need to use camlp4 and the batteries.pa_string.syntax findlib package to enable the extension I think

2010-05-07

<Gooffy> so, i think you may emulate type classes by implicit pass dictionary with functions, and maybe this already done by somebody else with camlp4 syntax extension :)

2010-05-06

<mfp> essentially no one uses it outside camlp4 (and syntax extensions that use it), though :)
<mfp> rovar_: a different syntax designed by camlp4's orig author
<avsm> camlp4 makes it pretty easy to track location of the code you wrote vs the generated code. and if you need to debug, you can just call 'camlp4o' directly to view the generated code

2010-05-04

<hcarty> thelema: Any chance that the estring magic could be completed by 1.2 or 2.0? I don't know camlp4 well enough to do it myself, but it would be nice to have (Print.printf p"%05.2f" 1.234567) work correctly.

2010-04-27

<sgnb> can someone who knows camlp4 update http://en.wikipedia.org/wiki/Camlp4 ?

2010-04-25

<eldragon> adrien, camlp4 is inside of 3.11.2, but what's preferable? camlp4 or camlp5?
<adrien> eldragon: what are you trying to do? current camlp4 won't work for older (pre 3.10) ocaml versions
<eldragon> hi guys, what's the recommendation for legacy ocaml programs, camlp4 or camlp5?
<gareth_0> i am using camlp4, i have a "schema" defined in one file - this is defined via a syntax extension, and is turned into some ocaml data type when it is read, i wish to have "queries" in *other* files use that ocaml data read from the "schema"

2010-04-17

<gareth_0> Camlp4: Uncaught exception: Not_found
<gareth_0> how can get an uncaught exception stack trace from camlp4?

2010-04-09

<flux> is your head running camlp4 or camlp5 possibly?-)

2010-04-06

<thelema> no annotations, should compile w/o camlp4
<orbitz> is that camlp4?
<orbitz> thelema: think it could eb donw tih camlp4?
<thelema> Camarade_Tux: actually, I take that back - I don't think you could (reasonably) do it in camlp4, as it'd require looking into any [open]ed namespaces, which would go outside the current file.
<Camarade_Tux> thelema: as I said, I don't know camlp4 but I thought that maybe you could access the already-bound identifiers
<flux> wish there was a camlp4-like thingy with more possibility to converse with the compiler :)
<kaustuv> In vanilla OCaml there is no way to have cyclic dependencies. If you are not opposed to Camlp4, you can use INCLUDE and Camlp4MacroProcessor

2010-04-04

<xavierbot> Camlp4 Parsing version 3.11.2
<xavierbot> Camlp4 Parsing version 3.11.2

2010-03-31

<thelema> that said, I've not written any camlp4, I just find the way it's integrated (specifically that it's not) horrible
<orbitz> hwo do you guys feel abotu camlp4

2010-03-29

<avsm> jake's pages are great; you might also want to look at dyntype: github.com/mirage/dyntype, which gives you dynamic introspection of ocaml types and values. it's a pretty basic use of camlp4
<robthebob> hey all, i'm hoping to write some fairly simple camlp4, but i haven't been able to find any documentation on the new version. where should i be looking?

2010-03-26

<kaustuv> That would be ideal and easily doable with Camlp4MacroProcessor, but for difficult to explain reasons I would rather not use Camlp4
<kaustuv> OUnit users: do you write your tests inline with your modules or in separate modules? And, if you don't or can't use Camlp4, how do you disable compilation of tests?

2010-03-19

<kaustuv> I want to create a comment syntax that typechecks the commented text but does not compile it. I assume this is doable using local modules and Camlp4 without much trouble, but before I attempt it does anyone know of something like it already?

2010-03-18

<ttamttam> I have a small question about camlp4

2010-03-17

<mfp> (needs more camlp4)
<mfp> maybe some trivial camlp4

2010-03-16

<ygrek> interesting, is it possible to build camlp4o executable on user machine in postinstall? cause it basically is camlp4 + some cmo ....
<ReachingFarr> So on Fedora when I install camlp4 I get a camlp4o.cma but no camlp4o executable. Any idea on why this might be?

2010-03-13

<gareth_000> the extension .cmo seems to build ok, but when the extension is used to preprocess the test file, camlp4 complains about references to other modules that are used by the extension not being found
<gareth_000> hello, i am attempting to use ocamlbuild to build a camlp4 extension and use the extension on a test file

2010-03-11

<mrvn> The ~a you could do with camlp4 I guess.

2010-03-04

<thelema> bmp: topinit.ml requires batteries, initializes the help, prints a logo, opens batteries, installs some printers, and loads the camlp4 with batteries

2010-03-01

<orbitz> where is the documetantion on the camlp4 stream stuff?

2010-02-14

<Associat0r> F# lacks polymorphic variants, camlp4

2010-02-08

<yziquel> what's arguably the simplest, non-trivial, used by strictly more than one person, camlp4 (not camlp5) syntax extension lying around on the net?

2010-02-04

<det> Is there such thing as a camlp4 extension for parser combinators?

2010-02-03

<thelema> Gertm: camlp4 has the problem that it's external to the ocaml code itself.
<Gertm> I read somewhere that camlp4 is like defmacro on steroids

2010-01-31

<Yoric> So to understand it, ocamldep needs to pass it through camlp4.

2010-01-27

<travisbrady> anyone know of any simple camlp4 examples out there? I'd just like to learn so I was going to try to parse something very simple like kv pairs like so "ID: 4 Time:12344 Name:Bob"

2010-01-26

<thelema> he found the bug reported in batteries, tracked it to a problem in camlp4 and has a quite well written bug report in ocaml's bug tracker, as well as a response to the person who found the batteries bug in our bugtracker

2010-01-25

<flux> and most of this could be automated with camlp4, right?

2010-01-19

<olegfink> doesn't pgocaml come with some camlp4-based parser?
<olegfink> ocamlc -pp camlp4oof -I +camlp4 -c parser.ml slvm.cma syntax.cmo -o parser.cmo
<olegfink> here's the command line my makefile produces: ocamlc -pp camlp4oof -cclib -lstdc++ -I +camlp4 dynlink.cma camlp4lib.cma llvm.cma llvm_bitwriter.cma llvm_bitreader.cma modstr.o minml.ml -o minml

2010-01-18

<thelema> ok, patch your camlp4-META file like this:
<thelema> something changed in how camlp4 has to get compiled
<thelema> yup, your camlp4 is borked...
<thelema> so it doesn't work just loading camlp4?
<thelema> but we've not really solved the problem, we just disabled the camlp4 extensions
<flux> mbac, there's a camlp4 module that gives irrefutable pattern matching without disabling the warning globally, where you need

2010-01-15

<thelema> no, forwards compatibility is rarely broken. The camlp4 thing mentioned is the most recent example.
<flux> leonidas, most (?) of 3.09-camlp4-code can be however used with the camlp5, which is forked from the old camlp4
<yziquel> julm: like what? i'm really not familiar with camlp4 syntax (for now)...
<yziquel> i'm just getting lost in the camlp4 sources, and can't seem to grasp them.

2010-01-14

<yziquel> julm: ah, ok! camlp4o instead of camlp4...
<yziquel> julm: camlp4 pa_relational.cmo pa_relational_postgresql.cmo
<julm> well pass -printer o to camlp4
<yziquel> how can you process a file through a camlp4 syntax extension and dump the result in another file?
<yziquel> mfp: ok, but why is there two successive '[' in camlp4? what's the use? why not only one?
<fx___> mfp, sql parser in camlp4?
<mfp> Camlp4OCamlRevisedParser.ml is the only up-to-date Camlp4 documentation :-/
* mfp 's camlp4 is a bit rusty
<olegfink> hm, it would be trivial to implement sml-like selectors (see http://www.mpi-sws.org/~rossberg/sml-vs-ocaml.html#records) in camlp4, hasn't this been done before?

2010-01-12

<det> Can you override the lexer in camlp4 ?
<mrvn> det: write a camlp4 module

2010-01-11

<Leonidas> Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib/ocaml/site-lib/bitstring/bitstring.cma", "error loading shared library: dllbitstring.so: dllbitstring.so: cannot open shared object file: No such file or directory")

2010-01-08

<Leonidas> ocamlfind ocamlc -g -package dynlink,unix,str,extlib,cil -I +camlp4 -I .. -c bitstring_import_c.ml

2010-01-07

<thelema> but I confirm your camlp4 error
<rwmjones> Leonidas, have you loaded the camlp4 extension?
<det> oh, this looks like some camlp4 thing that I have no knowlefge of
<Leonidas> how do it hook the neccessary camlp4 run into omake?

2010-01-03

<palomer> I think camlp4 or sexplib does this

2010-01-02

<mrvn> flux: he is generating the code with camlp4. No inline C/asm in ocaml :(
<mrvn> Pepe_: i.e. make a rule that identifiers with __ are for camlp4 only
<mrvn> palomer: in the code camlp4 parses

2010-01-01

<mrvn> Then you need a lot of magic in your camlp4.
<palomer> the other option was to have camlp4 generate the unique identifiers
<palomer> it would have to come from camlp4
<palomer> but I'm generating this code with camlp4
<palomer> im using camlp4 so having extra declarations is kind of a bummer

2009-12-31

<palomer> what's the assignment operator in camlp4?
<palomer> if so, camlp4-extras or somesuch
<palomer> how does camlp4 differentiate between <- and :=?
<palomer> I thought they had camlp4 analyze the module
<flux> in principle there indeed could be additional keywords (say, camlp4-implemented, as mrvn suggested) that would allow to easily expose what you want
<mrvn> flux: some camlp4 preprocessor could.
<mfp> <palomer> ocamlfind: When using -syntax, the META variable 'preprocessor' must be set <-- I still get the same error -> if pa_type_conv doesn't set preprocessor, you can try with -package camlp4,pa_type_conv

2009-12-30

<palomer> how do I use ocamlfind to compile camlp4 source files?
<palomer> how do I tell omake to include pcre when compiling a camlp4 source file?

2009-12-29

<olegfink> hmm, wait, why not camlp4?
<thelema> olegfink: hmmm.. I don't see a way to do it in camlp4...
<olegfink> what I didn't get is how opa is implemented, it comes with an ocaml install, but how does it use it? there also seems to be an intermediate language, qml, which is probably compiled by a camlp4 frontend...
<DWyatt> You will need ocaml and camlp4 3.06 to compile this package.

2009-12-27

<mrvn> libbatteries-ocaml-dev libbatteries-ocaml-doc libbin-prot-camlp4-dev libcamomile-ocaml-data libcamomile-ocaml-dev libcryptgps-ocaml-dev libnethttpd-ocaml-dev libocamlnet-ocaml libocamlnet-ocaml-dev libocamlnet-ocaml-doc libpcre-ocaml libpcre-ocaml-dev libpcre3-dev libpcrecpp0 libsexplib-camlp4-dev libtype-conv-camlp4-dev libzip-ocaml
<thelema> cpp's #include conventions succeed in one way that camlp4 fails - one macro can include another.
<flux> I was thinking camlp4 only for extracting information, it wouldn't provide any new syntax. wouldn't that work more likely?
<thelema> scoped camlp4 seems much better than whole-file camlp4
<flux> also, if implemented in camlp4, it make it a mandatory piece basically, when doing 'easy compliation'
<flux> however, that part (finding missing modules) may not be that easy with camlp4

2009-12-23

<thelema> This is very odd - I'm using findlib to load camlp4 into the toplevel
<palomer> camlp4 uses findlib to get pcre
<Alpounet> Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib/ocaml/site-lib/seditable/pa_seditable.cmo", "interface mismatch on Pcre")
<Alpounet> Camlp4: Uncaught exception: DynLoader.Error ("/usr/lib/ocaml/pcre-ocaml/pcre.cma", "error loading shared library: dllpcre_stubs.so: dllpcre_stubs.so: cannot open shared object file: No such file or directory")
<palomer> sudo apt-get install libpcre-ocaml-dev libtype-conv-camlp4-dev libxml-light-ocaml-dev libsdl1.2-dev libsdl-ttf2.0-dev ocaml-findlib omake libsexplib-camlp4-dev libextlib-ocaml-dev camlp4-extra

2009-12-22

<palomer> I'm using camlp4 to associate every type to a unique integer
<palomer> camlp4 is extremely nice

2009-12-20

<palomer> let foo = <:expr< let module FOO = (struct let x = 5 end) in FOO.x >> <---camlp4 doesn't like this
<palomer> the only way of avoiding obj.magic in my case is to have camlp4 provide some form of type equality

2009-12-19

<thelema> But especially camlp4, which changes the meaning of the contents, should be specified at the beginning, so you know what context the following will be evaluated in
<thelema> which is one major objection I have to camlp4
<palomer> EliasAmaral, nope, but there is only 1 function and 3 methods you can use. the 3 methods are generated by camlp4

2009-12-18

<palomer> the camlp4 reference isn't very helpful

2009-12-17

<palomer> I'm encoding my types as values using camlp4 and then using (=) on these values for coercion
<rwmjones> ocaml-camlp4-3.11.1-0.rc1.2.fc12.1.x86_64
* palomer wish he understood camlp4 better

2009-12-16

<ygrek> I can make it work as : ocamlc -pp camlp4of dynlink.cma -I +camlp4 toplevellib.cma camlp4o.cma q.ml -o q
<rwmjones> ygrek, same for me (Fedora 12). I'm baffled by what the code is supposed to be doing though, so I guess it's a bug/problem with the code or camlp4.
<ygrek> this doesn't help : ocamlc -linkall -pp camlp4of dynlink.cma -I +camlp4 camlp4lib.cma Camlp4Parsers/Camlp4OCamlParser.cmo q.ml -o q

2009-12-15

<palomer> I'm producing code in camlp4 and typeconv, consider the types 1. (int * bool) and 2. (int * int) and 3. (bool * bool)
<palomer> man, I wish there was a camlp4 function for expanding a type
<palomer> my knowledge of camlp4 tells me this isn't possible

2009-12-07

<mrvn> Or some camlp4 code that writes a "contain" function for every type.

2009-12-05

<mrvn> But camlp4 can do that.
<mrvn> You could do that with camlp4

2009-12-03

<thelema> Yes, you can't do completely automatic memoization without camlp4, but it's not difficult to write your recursive function in a style that allows for easy memoization.
<Smerdyakov> I don't think there is a way to do automatic memoization in OCaml without using camlp4 or something like that.

2009-11-25

<fx_> ertai, maybe this is the bug in camlp4?
<fx_> any camlp4 guru around? http://codepad.org/AXKtyEnU

2009-11-24

<thelema> stupid camlp4...
<thelema> num and netstring have to be loaded before camlp4
<thelema> which have to be handled carefully - batteries had some issues with toplevel priorities of camlp4 and some packages

2009-11-23

<mrvn> Leonidas: from camlp4

2009-11-22

<ua> right now i'm not event using the camlp4 syntax extensions of batteries.

2009-11-18

<thelema> If batteries never resurrects, there's room in aaa for *very optional* camlp4
<hcarty> thelema: Or would you prefer for all camlp4 to remain separate from aaa?
<hcarty> thelema: Are you opposed to, at some later point, adding back the camlp4 magic pieces as optional and not-on-by-default components?
<hcarty> The camlp4'd print system is very nice, but it still needs polish
<thelema> The print system requiring camlp4 magic isn't in aaa.

2009-11-16

<thelema> hmm, how to deal with ropes & unicode strings w/o camlp4
<thelema> camlp4 is a very powerful weapon to improve ocaml

2009-11-15

<Camarade_Tux> or can't you use camlp4?

2009-11-12

<thelema> hmm, some things in camlp4...

2009-11-11

<mfp> alternatively, there are several camlp4 extensions that generate pretty-printers from you given the type definition
<Camarade_Tux> it also tries to avoid camlp4 as it causes issues on some platforms

2009-11-10

<mfp> and add requires = "camlp4 dynlink" to the package "lib" ( section
<polemon> ocamlfind ocamlc -I +camlp4 unix.cma camlp4lib.cma \
<polemon> ocamlfind ocamlc -I +camlp4 unix.cma camlp4lib.cma -linkpkg dynlink.cmabitstring.cma bitstring_persistent.cma bitstring_objinfo.cmo -o bitstring-objinfo
<mfp> polemon: it's a missing package dependency in the META file for camlp4 (old findlib)
<polemon> ocamlfind ocamlc -I +camlp4 unix.cma camlp4lib.cma -linkpkg bitstring.cma bitstring_persistent.cma bitstring_objinfo.cmo -o bitstring-objinfo
<polemon> Error: Error while linking /usr/lib/ocaml/camlp4/camlp4lib.cma(Camlp4):

2009-11-05

<_zack> any well known example of writing a parser using CamlP4 (new) and ulex together?

2009-11-04

<hcarty> flux: The C stubs are generated by the camlp4 extension
<flux> mrvn, yes, I know, but a more structured system would be nice for as a tool for writing such a camlp4 generator
<mrvn> mattiase: write a camlp4 module that outputs C stubs for ocaml types.
<mrvn> too bad camlp4 works before type inference
<hcarty> flux: Yes, Richard Jones has one implementation and pa-do has another one which is strictly camlp4.
<thelema> but don't ask me - I'm not a camlp4 guru - I pulled it out of aaa because I don't understand it.
<mrvn> in camlp4 preprocessing can I get information from another module used in the source?

2009-10-29

<mfp> is camlp4 out of the question?

2009-10-26

<palomer> hrmph, I'm using camlp4 to check (at runtime) if two types are equal. I'm doing this by encoding the types by datatypes. To do this, I need to have a unique identifier for variant and record declarations. how do I get that?
<flux> mfp, well, if not gadts directly, how about a camlp4-like solution for the type system.. ;-)

2009-10-25

<palomer> anyone know how to uniquely identify a type in a type declaration when using camlp4?

2009-10-23

<thelema> ah, camlp4 operator

2009-10-22

<bluestorm> did you add dynlink.cma _before_ the camlp4 object file ?

2009-10-21

<kaustuv_> I think that's only used for ocamlbuild and camlp4, not for the rest

2009-10-20

<flux> quick, someone come up with a camlp4-frontend for sml.. ;)

2009-10-13

<orbitz> could you use camlp4 for to make something similar to python's rawstrins?
<flux> how about a perl6-regexp-camlp4-extension for ocaml :P (I suppose we better first wait if anything comes out of perl6, though ;))
<Camarade_Tux> ttamttam: and without the quotes? ocamlc -pp $CAMLP4
<ttamttam> I have to do ocamlc -pp "%CAMLP4%" ...
<ttamttam> And I cant do ocamlc -pp "$CAMLP4" ... for example

2009-10-09

<flux> a C code generation library would go a long way for building, say, camlp4 bindings that generate the bindings with some description, embedded in your code

2009-10-08

<hcarty> The LTU one uses some camlp4 magic, but it's pretty cool even without it.

2009-10-03

<flux> actually it seems to me it'd be feasible to implemnt active patterns purely via camlp4..
<flux> for example, no camlp4; it has something to reduce the pain though (can't remember it's name, but a similar camlp4-module exists for ocaml also)

2009-09-30

<Yoric[DT]> It couldn't be implemented on top of Camlp4.

2009-09-29

<hcarty> thelema: Ok, that sounds reasonable. So something along the lines of "Batteries - The Library" and "Batteries - The camlp4"

2009-09-26

<flux> I'm hoping camlp4 could help me a bit with this

2009-09-25

<_andre> anyone got ocamlviz's automatic instrumentation with camlp4 to work?

2009-09-23

<flux> any camlp4 or other code to randomly generate datastructures? like type a = A | B type b = C of a | D and the code would randomly produce all kinds of values that can be generated

2009-09-18

<flux> and there are some camlp4-based attempts to provide such facilities

2009-09-15

<flux> too bad bluestorm isn't around, he was a sucker for new camlp4 ideas :P
<flux> hmmm.. a camlp4-extension (rather a whole new ruleset embedding ocaml language) that would be like awk but in ocaml.. ;-) <- free idea, you may implement it without any royalties
<Camarade_Tux> ocaml libs aren't hard to build, usually the problem is that you lack ocamlfind or that you can't camlp4 or ...

2009-09-14

<kaustuv_> Is that really the main objection to camlp4?
<kaustuv_> (very delayed) <julm> one may be reluctant to pass through the camlp4 machinery (which makes things slower)

2009-09-13

<julm> derdon: however one may be reluctant to pass through the camlp4 machinery (which makes things slower), to only do simple things (like what a copy/paste may solve)
<mfp> camlp4 is an advanced topic
<derdon> I started with OCaml yesterday, so I know nearly nothing about it. So first of all, the only thing I have to know now is that I can influence the parser with camlp4
<mfp> derdon: the camlp4 preprocessor allows to extend the OCaml syntax
<julm> camlp4 is a preprocessor
<derdon> is camlp4 the name of OCaml's compiler?
<julm> well, OCAML's syntax being to as simple as, say, Lisp's, it make things harder; plus I much to often need to directly go to camlp4's sources to understand how to do what I want to do..
<julm> derdon: I would say: no parallelism, minimal standard library, not a lot of bindings, and a preprocessor (camlp4) hard to use
<flux> hmph, bluestorm isn't around. anyone else up for writing a camlp4 extension that would decorate all expressions with a call to function with current file name, line and column number?-)