2009-02-02

<_zack> but with the latest version of type-conf (from janest _website_ ) I got this camlp4 build error:
* thelema wonders how reasonable it'd be to bridge that gap, in camlp4 if possible, in the compiler if necessary

2009-02-01

<bluestorm> the camlp4-using files that failed seems camlp4-3.10-unfriendly, i'll try to install camlp5 and see
<bluestorm> vixey: i just got the darcs repo and "configure" seems quite happy with 3.10.2+camlp4
<mfp> apart from camlp4, the other APIs are stable
<mfp> by installing OCaml, you get the corresponding camlp4, how did the mismatch happen?
<vixey> so is camlp4 3.00
<mfp> <vixey> and so it camlp4 3.00 -> what?
<vixey> and so it camlp4 3.00

2009-01-31

<bluestorm> but i'm afraid camlp4 ocaml grammar doesn't have a notion of "enclosing braces" that would make that sort of thing easy to do
<bluestorm> and camlp4 use $
<bluestorm> but the idea to inline using camlp4 is still good, though i'm not sure it's possible to do that sanely
<hcarty> bluestorm: Would you use pa-do or "raw" camlp4 for the <| and |> implementation and optimization in Batteries?
<bluestorm> mrvn: do you think adding |> <| as camlp4 extensions, documenting the non-standard behavior, would be reasonable and not too bad practice ?
<bluestorm> (the reasons being : 1/ it's really hard to find satisfying operators with the correct associativity 2/ that is made easy by a camlp4-treatment instead of a infix-operator treatment, wich also enables for inlining, wich is a sensible advantage 3/ (&&) and (||) already have a special status somehow, and our application operators should probably set the evaluation order in stone too)

2009-01-30

<psnively> Yeah, and there's the delimited overloading camlp4 extension, too.

2009-01-29

<hcarty> Perhaps "the earlier one" is a dropped branch then. I'm hoping to try the non-camlp4 version soon on a new app
<hcarty> The version I found from 2006 on Google Code has an old-camlp4/camlp5 syntax extension
<Yoric[DT]> It's either camlp4 or sexplib.

2009-01-28

<thelema> I've read through some of the code, although I'll admit that I've not learned camlp4

2009-01-27

<vixey> but I heard it will not use any camlp4
<vixey> But you do this /and/ refuse to use camlp4?

2009-01-24

<bluestorm> hm, how is it camlp4-related ?
<thelema> I dunno, camlp4 usually doesn't do things like that (working or not working based on declarations at the top of the file)
<Yoric[DT]> thelema: I agree that the right fix is Camlp4.
<thelema> of course, the right fix is to use camlp4 (I think it should be possible) to fix the associativity of <|
<flux> you could use camlp4 for that, generating an id for each record

2009-01-22

<hcarty> I wouldn't be in such a rush to switch to 3.11 if the camlp4 support in 3.10.x didn't have so many problem with the toplevel

2009-01-20

* Yoric[DT] considers writing a Camlp4 syntax extension for this purpose.

2009-01-19

<mfp> safe_marshal, a small camlp4 extension that computed a "type id" for each type def
<fremo> Is there any refactoring tools for Ocaml ? Eclipse ? A mode for emacs ? A Camlp4 based one ? ...

2009-01-10

<thelema> bluestorm: any brilliant new camlp4 extensions lately?

2009-01-09

<flux> ..atleast if there were any decent documentation for camlp4..

2009-01-05

<Yoric[DT]> Well, camlp4 does original-to-revised and revised-to-original.
* rwmjones wonders how to print a ctyp in camlp4 ...

2009-01-03

<flux> unfortunately not all packages in hump are up to date - especially considering the situation with camlp4
<sheijk> i don't use any camlp4 stuff
<mfp> note that the "camlp4 things" includes typeconv and thus sexplib
<mfp> a few camlp4 things

2008-12-30

<mattam> Yeah. That's how camlp4 is used in Coq for example.

2008-12-28

<vixey> doesn't any wizard write a camlp4 thingy?

2008-12-16

<flux> hey, perhaps a camlp4 code to convert closures into real functions would work :)

2008-12-15

<mfp> I like the module system, the straightforwardness of most code (Haskell is a bit punctuation heavy and feels like I have to keep many things in mind --- but I have done little Haskell), camlp4, polymorphic variants, OO system and late binding when needed, reasonable toolset, very good predictability (space & time)

2008-12-09

<munga> alternatively, is there a way to look-ahead one character ? I remember this was possible with a hack in camlp5 ... some hack in camlp4 ?
<munga> can I write a camlp4 entry that looks like [[ l = LIST1 var ; EOL - > l ]] where EOL is the end of line ?

2008-12-06

<thelema> yes, the camlp4 would be needed to rewrite literals.
<mfp> <thelema> olegfink: it'd be more than just an open, as camlp4 would be needed to take literals and make them into the appropriate type -> so you want a global pa_do ?
<thelema> olegfink: it'd be more than just an open, as camlp4 would be needed to take literals and make them into the appropriate type
* thelema realizes this project will require camlp4
<Yoric[DT]> I think I learnt about it from the documentation of Camlp4 :)

2008-12-05

<Smerdyakov> That's just the convention for prefixing camlp4 filenames.

2008-12-04

<olegfink> alexyk_: well, camlp4, imperative features (no, I don't believe in The Pure Thing, at least not in the haskell way, maybe DDC gets closer to it), and not having a large culture built around it.
<Yoric[DT]> alexyk_: first thing from the top of my mind would be Camlp4.
<olegfink> alexyk_: ah, it's just called pa_macro.cmo in camlp4 3.10
<alexyk_> what about one of the P's in camlp4?

2008-12-03

<olegfink> mneh, it is a camlp4 extension, right?

2008-12-02

<Yoric[DT]> With camlp4, "parser" is a reserved keyword.
<Yoric[DT]> Well, it's certainly camlp4.
<munga> I've written a small camlp4 parser. now I want to give it a whole file to read and parse I usually use Gram.parse_string to parse line by line. Is there a function to pass the entire file at one ? like Gram.parse_file ?

2008-12-01

<munga> I think there is no way to tell ocamlbuild to use something like : "-I +camlp4 camlp4fulllib.cmxa" without using an myocamlbuild module... Am I wrong ?

2008-11-29

<olegfink> dynamically added? camlp4-generated sources are static.
<alexyk> Camarade_Tux: pgocaml has to be recompiled, and it uses camlp4

2008-11-27

<alexyk> MichealGG: or you mean camlp4 like?

2008-11-26

<munga> actually I can compile the ml : /usr/bin/ocamlc.opt -c -I +camlp4 -pp camlp4of -o parsing.cmo parsing.ml
<munga> do you have any idea where it might come from ? maybe a camlp4 related problem ?

2008-11-25

<mfp> there's a SML parser in camlp4's tree (unmaintained); don't know how hard it'd be to turn in into a quotation
<flux> where are sml, haskell, c, c++ and java-quotations for camlp4?
<flux> I wonder how sophisticated cross-language transformations would be possible with a camlp4-approach
<Yoric[DT]> By adding rewriting rules (in the spirit of Camlp4, but with type information) between the typing and the code generation.

2008-11-24

<vixey> ok time I read camlp4 manual
<flux> vixey, I suppose one could write a camlp4 extension to do that for you :)
<alexyk> Camlp4: Uncaught exception: DynLoader.Error ("/opt/godi/lib/ocaml/std-lib/pgocaml/pgocaml.cmo", "error while linking /opt/godi/lib/ocaml/std-lib/pgocaml/pgocaml.cmo.\nReference to undefined global `ExtString'")

2008-11-22

<thelema> for a pretty view, you'll want something like sexp, which uses camlp4 to generate nice printing functions

2008-11-18

<flux> I'm not sure if it's worth the trouble. someone familiar with campl4 (bluestorm, mfp?) might have an idea if it'd cause problems with camlp4 extensions.
<flux> now now, are you backing on your "with camlp4, anything's possible" statement :)
<thelema> but with camlp4, anything's possible.

2008-11-17

<Yoric[DT]> Or it's one of these incompatibilities between camlp4 and camlp5.
<bkudria> i think i will just build ocaml and camlp4 myself
<bkudria> mfp: no clue. it's from the camlp4-extra debian package
<bkudria> in compiling a program called POY, I run into a syntax error in Token.mli from camlp4. the line it complains about is this: http://gist.github.com/25918 . this looks like a correct functor def to me. is there something wrong with it that the compiler doesn't like it?
<bkudria> in compiling a program called POY, I run into a syntax error in Token.mli from camlp4. the line it complains about is this: http://gist.github.com/25918 . this looks like a correct functor def to me. is there somethign wrong with it that the compiler doesn't like it?
<flux> I'm not familiar with camlp4 at all, so I don't know :)
<bkudria> ocamlc.opt -pp 'camlp4orf poyExtension.cmo -DUSENCURSES -DUSEPARALLEL -DUSE_LARGE_MESSAGES -DUSE_LONG_SEQUENCES -DUSE_LARGE_ALPHABETS -DUSEGRAPHICS=2' -I +camlp4 -I ../ocamlmpi/ -I +camlp4 -I ./gz-0.5.7 -I ./grappa -I ./camlpdf-0.3 -I ./graphps -g /usr/lib/ocaml/3.10.2/camlp4/Loc.mli
<bkudria> err, camlp4

2008-11-16

<Yoric[DT]> I won't have much time to discuss this but our Camlp4 manager has approved pa-do :)
<bluestorm> besides, pa-do concernes more than camlp4 only, as a reasonable integration of pa_do would probably impact the libraries much deeper
<bluestorm> and hcarty is probably as knowledgeable as me about camlp4 so he shouldn't wait for me to go on on such things
<Yoric[DT]> Well, I'm for pa_do, but since bluestorm is in charge of Camlp4, I'm waiting for him to give his approval.
<bluestorm> well i wouldn't pretend i can do much better, but the amout of code pasted from the camlp4 sources is a bit suffocating
<bluestorm> seems camlp4 is able to survive when the same grammar entries are created twice
* thelema doesn't speak camlp4
<Yoric[DT]> Which wreaks havoc with Camlp4.
<Yoric[DT]> I don't like $[...] too much, in addition to which it's bound to cause problems with Camlp4.
<flux> it is usually avoided, because it's used in camlp4

2008-11-15

<hcarty> bluestorm: Yoric[DT] said that you are the one to talk with regarding camlp4 extensions in Batteries
<hcarty> ertai: I saw that there is a changelog for OCaml 3.10.3 in CVS - will this get the camlp4 + toplevel fixes?

2008-11-13

<hcarty> The camlp4+toplevel bug has been there since 3.10.0
<hcarty> Which makes using camlp4 from the toplevel a royal pain
<hcarty> It's a problem with the 3.10.x camlp4
<hcarty> I'm not sure of the specific reasons why, but use of $ >> and a few other operators are frowned on. Something to do with camlp4 issues.
<hcarty> I'm not sure if that can be done here without reverting to camlp4
<flux> but printf/scanf as they are implemented now have nothing to do with camlp4
<flux> looking that pgocaml is implemented in camlp4 then I suppose yes, you could have printf-like capabilities with it
<olegfink> printf/scanf can be implemented in camlp4, right?

2008-11-12

<flux> det, I suppose camlp4 is the way, although in a sense it does reduce the easiness ocaml code can now be understood; the associativity and priority of an operator is defined by its first character
<det> I wouldn't mind a camlp4 solution

2008-11-11

<Yoric[DT]> Well, we'll just fix this with Camlp4 (and possibly using pa_do).
<mfp> it's an argument against the current (<|), but not against a fixed one using camlp4
<flux> well, o wouldn't be that bad, except it requires camlp4
<det> o can't be defined except using camlp4
<hcarty> The patches also make the extension work properly with a (patched) 3.10.2 toplevel or a 3.11.0 toplevel which already has several camlp4 + toplevel bugs fixed
<hcarty> bluestorm: Yoric[DT] said you are the one to talk to regarding camlp4 + Batteries. I have some patches for pa-do which add ocamlbuild support and expand the META file a bit if/when you integrate pa-do.
<Yoric[DT]> Yeah, camlp4.
<mfp> yes, the only pb is that is so much uglier than |> <|, camlp4 is looking better...
<Yoric[DT]> Well, the Camlp4 solution is probably better.
<mfp> either using an operator starting with ^, @ or **, or camlp4, yep
<Yoric[DT]> For the moment, I'm thinking about using Camlp4 to change the associativity of this operator.

2008-11-10

<Yoric[DT]> Camlp4 and needing to rewrite every single library.

2008-11-09

<Yoric[DT]> There's a little list comprehension as a Camlp4 module provided with OCaml.
<mfp> Smerdyakov: typed relational algebra in OCaml using heavy camlp4 code generation, so I suppose you won't find it that interesting :)
<flux> I was just scared away by camlp4 ;)

2008-11-08

<mfp> type-conv: camlp4 change

2008-11-06

<Yoric[DT]> There's a nice tutorial on Camlp4 in ocaml-tutorial.org, though.
<Yoric[DT]> I don't remember ever using something called [Grammar] in new-school Camlp4.
<yziquel> Yoric[DT]: ok, but you may know more about the new-school Camlp4. The documentation on the website doesn't to fit my experience... Is the new-school camlp4 documented?
<Yoric[DT]> (and I haven't used old-school Camlp4, so I can't really help)
<Yoric[DT]> Camlp4 is new-school Camlp4.
<Yoric[DT]> Just for the sake of vocabulary: Camlp5 is old-school Camlp4, kept alive by a splinter cell of Inria.
<Yoric[DT]> iirc, that's old-school Camlp4.
<yziquel> hi. i'm trying to use camlp4 in a toplevel, and i'm having trouble loading the Grammar module. Where should i find it? See paste at http://paste.lisp.org/display/69812
<yziquel> what's the difference between camlp4 and camlp5?

2008-11-05

<yziquel> hmmm... to put it simply: either camlp4 or compiler source code...
<flux> options: write a camlp4 module that extracts the module for you per given instructions

2008-11-02

<thelema> can someone help me with a camlp4 request?

2008-10-30

<thelema> ocaml doesn't allow that level of programming - camlp4 does, but that works on the syntax level.

2008-10-26

<bluestorm> mfp: btw, i'm still not so sure including it in batteries is not a bit premature, but who wouldn't love a bit of hairy camlp4 bugfixing with angry users ?

2008-10-23

<pierre_m> in fact I know nothing about camlp4, and I'm far from being a caml guru
<pierre_m> Yoric[DT]: some message on batteries-devel had me willing to look at camlp4 for a more convenient syntax for Ropes
<pierre_m> well I was curious about camlp4
<flux> camlp4 cannot unfortunately inspect the program in the type level - atleast not without reimplementing much of the compiler
<flux> I'm not actually familiar with camlp4 almost at all, but what kind of string manipulation were you thinking of?
<pierre_m> do you think that dealing with unicode string manipulation (probably using ocaml-rope) is a good way to learn camlp4 ?
<thelema> ? at the moment, batteries is just a (mega-)library and some camlp4 code.

2008-10-21

<hcarty> Curses. Old camlp4 is apparently part of the base Fr library.
<Yoric[DT]> hcarty: bluestorm is in charge of everything Camlp4 for Batteries.
<hcarty> Yoric[DT]: Since ertai has fixed the camlp4 + toplevel bugs (at least the ones that were giving me trouble), I have been playing with pa-do some more
<gildor_> thelema: camlp4 macro ?

2008-10-20

<Yoric[DT]> The Camlp4 wiki.

2008-10-19

* Yoric[DT] needed the Camlp4 manual and Averell.
<vixey> I guess [| |] camlp4

2008-10-17

<mfp> huh anybody knows how to generate a value with a non-default constructor in camlp4?

2008-10-14

<hcarty> Yoric[DT]: Does it break extension code, or code written using camlp4 extensions?
<hcarty> Yoric[DT]: I've heard that you can't use ( $ ) b/c of camlp4, but what does it break?
<Yoric[DT]> Of course, we can't use $ because of Camlp4.
<hcarty> Yoric[DT]: ertai was kind enough to fix the #use "foo.ml";; + camlp4 toplevel-breaking bug in CVS HEAD. So syntax extensions seem to work properly in the toplevel now, with the patch applied.

2008-10-13

<hcarty> camlp4 seems to work well in the toplevel again!
<flux> I wonder what ever happened to ocaml+twt for the new camlp4
<hcarty> ertai: If you are around - do you have an idea of approximately how long it will take for the camlp4 changes to propagate to the public anonymous CVS?
<ertai> hcarty: I would like you to test the camlp4 toplevel a little bit

2008-10-12

<ertai> hcarty: I have to go and so pause this camlp4 fix don't hesitate to recall me about it
<olegfink> it has a camlp4 implementation, if anyone cares.
<hcarty> ertai: Is there anything someone relatively ignorant of the OCaml internals, such as myself, can do to help resolve OCaml bugs #4495 and/or #4593? (camlp4 + toplevel)
<Yoric[DT]> In that case, Camlp4 may not be the right tool for what I have in mind.
<Yoric[DT]> ertai: I had a Camlp4-related question.

2008-10-08

* Yoric[DT] wonders if a Camlp4 pretty-printer couldn't be more useful there than a Camlp4 pre-processor.
* Yoric[DT] needs to find a way to just add something at the top of a file from Camlp4.
<Yoric[DT]> Gasp, my camlp4 extension to auto-open Batteries works.
<rwmjones> OCaml could do with, with a camlp4 extension perhaps

2008-10-07

<JonDHarrop> They could strip down the Camlp4 grammar for OCaml and write the whole compiler in OCaml using LLVM for code generation.
<JonDHarrop> Yoric[DT]: Let's say they start by stripping out the OCaml grammar from Camlp4 to include only core features (no functors, no objects, no types beyond ML's etc.) and then implement that.
<Yoric[DT]> (I'm thinking Camlp4, which already knows the AST of OCaml)
<Yoric[DT]> (probably going to fail, I haven't put all the right Camlp4 options)
<Yoric[DT]> Does anyone have an example camlp4 extension which makes use of type-conv?

2008-10-05

<Yoric[DT]> (that is, to use Camlp4 as a lexer, a parser and/or a pretty-printer)
<Yoric[DT]> In the mean-time, I'm attempting to add Camlp4 support.
<Yoric[DT]> Speaking of which I'll have to ask ertai[NP] a few questions about integrating Camlp4.
<Yoric[DT]> Then I'll get on to Camlp4.

2008-10-04

<Yoric[DT]> But it's probably possible to write a "staged" Camlp4. Each stage being able to take advantage of type information from code already compiled in some previous stage.
<olegfink> what I want is probably a way to play with ocaml's type system, while camlp4 lets me do things with syntax
<Yoric[DT]> olegfink: it's probably possible to write a Camlp4 with types.
<olegfink> for example, I suffer from the fact that my suspension thing is essentially a unit -> (unit -> unit) type map and I can't express this in camlp4
<olegfink> camlp4 is one of the funniest computer games I've ever played, but it's a bit pity that it's completely unaware of types (if I knew Haskell I would probably go for Template Haskell)
<rwmjones_> olegfink, I guess it's possible, but xavierbot limits you to writing everything on a single line, and writing a camlp4 extension on a single line would be quite ambitious
<rwmjones_> olegfink, oh I see .. no. We would prevent that anyway because xavierbot is already using camlp4 to disable unsafe bits of ocaml
<olegfink> for example, is it possible for xavierbot to define, compile and load camlp4 extensions on the fly?
<olegfink> by the way, is it possible to load camlp4 stuff at run time?
<olegfink> I implemented one with camlp4, but failed to find a use case for it.

2008-10-03

<mfp> so one can see it as a sort of camlp4 without the syntax rewriting part but with output that is guaranteed to be well-typed
<flux> perhaps metaocaml+camlp4 can play nice together, so that certain kinds of extensions written in camlp4 won't bring the performance down in the way they would were they written naively
<Yoric[DT]> Well, the main difference with Camlp4 is that any code you generate is well-typed.
<flux> with basically the same syntax too - and syntax customization is what camlp4 really offers
<Yoric[DT]> flux: well, for one thing, you can think of MetaOCaml as being Camlp4 with types.

2008-09-30

<olegfink> so there isn't such thing as 'operator' in camlp4?
<olegfink> tell me what's wrong with it, I finally mastered camlp4 enough to write that suspend thing I was bugging everyone about

2008-09-28

<thelema> The two bets options are: 1) use camlp4 to generate custom printing functions

2008-09-24

<olegfink> was there any efforts on making something (probably a camlp4 module?) which would take some more imperative notation, for example, something C-like?
<ertai> are you using camlp4

2008-09-23

<gildor> GustNG: just have read a mail from rwmjones that remind me that what you are speaking about is maybe a real bug in camlp4

2008-09-22

<Yoric[DT]> Any new high-level language should have at least ML's polymorphism, Haskell's type-classes, OCaml's Camlp4 and .Net's libraries.
<Yoric[DT]> (with Camlp4)
<Yoric[DT]> Of course, these streams are run-time incompatible with the camlp4-provided streams, which is more than strange.
<Yoric[DT]> Sure, it's Camlp4.
<DroneZilla> I rememer do that with the stream in caml-light and in ocaml using a special syntax which come from something like camlp4
<Yoric[DT]> I believe that the ocaml-tutorial version of camlp4 is up-to-date.
<flux> I wonder if camlp4 documentation and tutorials are up to date these days
<olegfink> heh, seems I should read a camlp4 reference

2008-09-16

<Associat0r> delimted overloading is done with camlp4 I think and it had some additional notiation to it
<Associat0r> also pattern matching in F# is extended IIRC and it has sequence expressions etc without camlp4
<Associat0r> electronx : or the camlp4 thing?

2008-09-14

<Yoric[DT]> thelema: unfortunately, it requires changing the camlp4 lexer...
<thelema> mbishop: write some camlp4, please

2008-09-12

<tsuyoshi> someone should do it in camlp4

2008-09-08

<bluestorm> it's actually probably harder than the camlp4 way
<flux> it's slightly negative is using batteries requires camlp4, because camlp4's syntax errors differ from ocaml's
<bluestorm> well, camlp4 could do that for sure
<Yoric[DT]> Well, maybe camlp4 can get you interested :)
<Yoric[DT]> So if we can get a camlp4 preprocessor which just adds one expression at the beginning of the file, we're good.
<Yoric[DT]> (since camlp4 already has that capability)
<Yoric[DT]> Otoh, iirc, findlib already has what's necessary to chain multiple camlp4 preprocessors.
<Yoric[DT]> I was looking for something much more complex (i.e. using Camlp4 to insert the command right after the first comment or something such).
<Yoric[DT]> So I don't need Camlp4 after all.
<Yoric[DT]> Of course, a little bit of camlp4 might do the trick by adding "open Bla" at the beginning of each file.

2008-09-05

<bluestorm> Yoric[DT]: once the packaging is settled, i'll be able to import other extensions from osr_camlp4 easily
<bluestorm> moreover, my upstream.txt file (from the previous osr_camlp4 attempt) is dangerously alike your .spec format (is it specified somewhere ?), i could probably convert it
<tsuyoshi> there's a preprocessor, camlp4

2008-09-03

<pango_> camlp4 and camlp5 are OCaml preprocessors. camlp5 is the new name for the old preprocessor (pre ocaml 3.10), but it can be useful to have both if you find code that wasn't updated
<Palace_Chan> hmm ocaml-core does not include camlp5 only camlp4 and camlp4-extra
<pango_> Palace_Chan: I hope I don't miss important packages, but "ocaml-base ocaml-nox ocaml-native-compilers camlp4 camlp5 ocaml-findlib ocaml-mode tuareg-mode otags" should be sufficient for writing symbolic processing programs like compilers

2008-08-30

<ertai> yes but just for the global default grammar of camlp4, that is mutated in all cases.
<bluestorm> ertai: i'm unsure about something concerning the functorial layer of camlp4
<flux> mbishop, I suppose one wouldn't really need language support, camlp4 should come to the rescue?

2008-08-28

<flux> with camlp4 ;)

2008-08-26

<rwmjones> since they'll prevent your code from being _parsed_ by camlp4
<hcarty> The docs recommend against using ( $ ) as an OCaml operator because it is used by camlp4. Could anyone here comment on the applicability of this warning outside of a camlp4 extension?

2008-08-25

<Eridius> (without using camlp4's stream syntax)

2008-08-23

<bluestorm> and if it means crafting DSLs, we can use Camlp4 for that

2008-08-21

<Jedai> jeddhaberstro: with is an extension (camlp4)
<bluestorm> (and actually, my never-released proof-of-concept camlp4 extension mimicking the Haskell syntax was able to do that, and it was fun)

2008-08-17

<Yoric[DT]> Yeah, I've noticed nice speed-ups with Camlp4-based inlinings.
<hcarty> Given that it isn't at this time, camlp4 translations seem like a reasonable fix for now
<bluestorm> if it really turned into a performance problem, an other possibility would be to replace every qualified name in the AST, effectively having the same effect as openin, but at camlp4 time
<hcarty> bluestorm: Is this the correct way to match record fields in camlp4? -- http://ocaml.pastebin.com/m77a04b98
<hcarty> seafood: Sorry I can't be more help :-) My camlp4 knowledge is limited to hacking at work others have done
<hcarty> They have each done fairly significant work with the new camlp4 and are on here often
<seafood> Hey guys, I'm trying to learn about camlp4

2008-08-16

<bluestorm> apparently, not having slept for 32 hours does not help with camlp4 transformations
<hcarty> No - my camlp4 experience so far only extends to modifying others' code
<hcarty> bluestorm: Sounds good. This is getting to be somewhat beyond my camlp4 understanding, but I'm happy to learn more
<rwmjones> bluestorm, have you built recursive functions in camlp4, like 'let a () = ... and b () = ...' ?
<hcarty> I'm still far from understanding the details of camlp4, and I doubt I will have time in the near term to become familiar with it

2008-08-15

<jdh302> Hmm, Camlp4 is very cool. Tough call...
<jlouis> in camlp4

2008-08-14

<bluestorm> there is at least one exception, though : the stream syntaxic sugar is not included in the core language anymore, and you have to use camlp4

2008-08-13

<bluestorm> though an intricated camlp4 solution is imaginable
<bluestorm> hcarty was asking about using camlp4 to inline simple operators (in his case function composition)
<bluestorm> wich is remotely related to your camlp4+monad work
<bluestorm> camlp4 is a syntaxic tool
<flux> ocaml type system implementation in camlp4 would be cool
<Asmadeus> rwmjones: mfp did the camlp4 part actually, the rest was just scanf's type which changed
<mfp> Asmadeus: I'll try to backport it to 3.09's camlp4
<Asmadeus> (it's required for camlp4-safety-things, can't ignore it really :/)
<Yoric[DT]> Now, if it only were possible to extend it easily (say, with either overloading or through Camlp4).

2008-08-12

<jdh30> F# also lacks optional arguments, Camlp4, streams, polymorphic variants, structurally-typed objects, ...
<jdh30> Camlp4 would be an awesome tool if it was better documented, e.g. how to write your own lexer.
<jdh30> mbishop: Also, F#'s quotations are insanely restrictive compared to OCaml's camlp4. With Camlp4 you can quote anything. With F#'s quotations you can quote a tiny sublanguage. Camlp4 also provides extensible grammars. F# has nothing comparable.
<Yoric[DT]> Now, perhaps Camlp4 with clearer semantics would be nicer.
<Yoric[DT]> I like the idea of Camlp4.
<jdh30> We could also build upon OCaml itself, e.g. lex and parse with Camlp4
<twobitwork> re: DSLs... if we could find something better than camlp4 we'd be in good shape
<rwmjones> bluestorm, ocamlc -I +camlp4 -pp camlp4of -c useless-with.ml
<Jeff_123> there is a camlp4 extension for list comprehensions, but it's not very mature.
<mbishop> pretty sure there is already a list comprehensions camlp4 extension
<Jeff_123> camlp4 is a huge pain in the rear

2008-08-11

<bluestorm> mfp: that's a good question : to what i understand, there was a limited support for that in pre-3.10 camlp4, wich was removed due to inconsistencies
<rwmjones> camlp4 question ...

2008-08-07

<hcarty> bitstring started as a camlp4 3.10.0+ extension as far as I know
<hcarty> nDuff: I'm pretty sure bitstring uses the new camlp4, released with OCaml 3.10.0+

2008-08-03

<bluestorm> while Foo.(...) is meant to be used in non-camlp4 user code
<bluestorm> hm, "where" should not be very difficult, camlp4 is a flexible tool
<bluestorm> (and i'm ashamed to admit that as long as i haven't actually tried the camlp4 implementation, i have no idea how the ambiguity will he resolved, even if i could probably enforce one direction or the other with levels)

2008-08-01

<jynxzero> Ah, shame. I have fairly strong camlp4 skills but I guess it'd be hard to live like a student again, I've got too comfy.
<rwmjones> the skills required will be in camlp4

2008-07-31

<ertai> bluestorm: There is perhaps one also in camlp4 itself
<ertai> bluestorm: that kind of auxillary function over camlp4 ast can be integrated
<bluestorm> the idea was only to look at the different camlp4 extensions avaiable right now, see if they share some common auxiliary functions (modulo some changes maybe), and factor them out in a common library
<bluestorm> i'm considering writing a library for camlp4 extension writers, that would expose some of the most-used operations
<ertai> bluestorm: What kind of camlp4 changes do you have in mind?
<ertai> Indeed I don't consider camlp4 nighmare bugs, and ocamlbuild on windows as fun stuffs
<ertai> My work on Camlp4 (starting as an intership) and on ocamlbuild was a kind of "extra work" for "fun".
<ertai> bluestorm: I don't want to spend to much time on camlp4 until now
<bluestorm> are you (= the camlp4 code) open to extern submissions ?

2008-07-30

<bluestorm> nasty camlp4 fact : { foo = foo; ; bar = bar } parses correctly
<rwmjones> however you cannot write a generic 'show' function using camlp4 that could work like 'show 4', 'show "hello"'
<rwmjones> camlp4 knows the details of type foo (because it is being defined there and then) and writes a sexpr_of_foo function
<rwmjones> tvn1981a, when camlp4 runs, you don't know the types
<fremo> can't it be done with camlp4 ?
<bluestorm> (or maybe those unknown camlp4 parsers/filters are described somewhere ?)

2008-07-28

<rwmjones> has anyone tried writing a camlp4 extension in terms of another extension? ie. generating << >> antiquotations which use a camlp4 extension?

2008-07-24

<Smerdyakov> Coq uses camlp4 for extensible syntax.
<pippijn> so camlp4 can parse arbitrary grammars?