* Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
2007-04-24 20:17 ` new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) Martin Jambon
@ 2007-04-24 21:38 ` Yaron Minsky
2007-04-24 22:53 ` new+old Camlp4 ls-ocaml-developer-2006
2007-04-25 1:03 ` new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) skaller
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: Yaron Minsky @ 2007-04-24 21:38 UTC (permalink / raw)
To: Martin Jambon; +Cc: skaller, Diego Olivier FERNANDEZ PONS, caml-list
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
On 4/24/07, Martin Jambon <martin.jambon@ens-lyon.org> wrote:
>
>
> It could go like "the old camlp4 is deprecated, and support will be
> dropped completely [one year after the first stable-and-documented release
> of camlp4 3.10]"
>
> * It means two versions of camlp4 would be distributed and installed with
> ocaml 3.10.
> * Command names for the new camlp4 would be distinct from the old camlp4.
> * Old programs would still compile and work without having to patch
> makefiles.
> * Upgraded programs could add new features only to the 3.10 version, while
> maintaining minimal support (bug fixes) for the 3.09 version, without
> forcing the camlp4 programmer to use ocaml 3.09 for testing.
> * New programs could support only the new camlp4.
This seems like a great idea.
y
Martin
>
> --
> Martin Jambon
> http://martin.jambon.free.fr
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
[-- Attachment #2: Type: text/html, Size: 1976 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4
2007-04-24 21:38 ` Yaron Minsky
@ 2007-04-24 22:53 ` ls-ocaml-developer-2006
0 siblings, 0 replies; 19+ messages in thread
From: ls-ocaml-developer-2006 @ 2007-04-24 22:53 UTC (permalink / raw)
To: caml-list
"Yaron Minsky" <yminsky@cs.cornell.edu> writes:
> On 4/24/07, Martin Jambon <martin.jambon@ens-lyon.org> wrote:
>
> It could go like "the old camlp4 is deprecated, and support will be
> dropped completely [one year after the first stable-and-documented release
> of camlp4 3.10]"
>
> * It means two versions of camlp4 would be distributed and installed with
> ocaml 3.10.
> * Command names for the new camlp4 would be distinct from the old camlp4.
Call the new version camlp5 ;-).
Regards -- Markus
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
2007-04-24 20:17 ` new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) Martin Jambon
2007-04-24 21:38 ` Yaron Minsky
@ 2007-04-25 1:03 ` skaller
2007-04-25 2:29 ` Daniel de Rauglaudre
2007-04-25 17:11 ` Markus Mottl
3 siblings, 0 replies; 19+ messages in thread
From: skaller @ 2007-04-25 1:03 UTC (permalink / raw)
To: Martin Jambon; +Cc: Diego Olivier FERNANDEZ PONS, caml-list
On Tue, 2007-04-24 at 13:17 -0700, Martin Jambon wrote:
> On Wed, 25 Apr 2007, skaller wrote:
> I wanted to start this as dedicated thread, but let's do it now.
> The current situation with camlp4 3.10-beta is terrible. Not
> because the new camlp4 is not good or anything, but because it is not
> compatible with the old one and yet replaces it. Replacing the old one by
> the new one in the next release of OCaml is practically unmanageable
> because:
>
> 1) Source duplication is unavoidable
> 2) Upgrading to the new camlp4 is not automatic
Curious, but can't you run camlp4 (old) to generate pure Ocaml text?
Then, you have no macros and can re-introduce them.
> A smooth transition would be much preferrable. I acknowledge that I don't
> know how make it possible to use syntax extensions using the old and the
> new camlp4 on a same ocaml source file, but for those using only one
> extension or several extensions using the same version of camlp4, it would
> be convenient if it just works.
An alternative is a translator from old to new syntax, I guess that
would be HARD otherwise it would have been done?
> * It means two versions of camlp4 would be distributed and installed with
> ocaml 3.10.
> * Command names for the new camlp4 would be distinct from the old camlp4.
> * Old programs would still compile and work without having to patch
> makefiles.
> * Upgraded programs could add new features only to the 3.10 version, while
> maintaining minimal support (bug fixes) for the 3.09 version, without
> forcing the camlp4 programmer to use ocaml 3.09 for testing.
> * New programs could support only the new camlp4.
>
> Does that make sense?
I wonder if a pipeline would work, so you can multi-stage
pre-processors?
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
2007-04-24 20:17 ` new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) Martin Jambon
2007-04-24 21:38 ` Yaron Minsky
2007-04-25 1:03 ` new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) skaller
@ 2007-04-25 2:29 ` Daniel de Rauglaudre
2007-04-25 17:11 ` Markus Mottl
3 siblings, 0 replies; 19+ messages in thread
From: Daniel de Rauglaudre @ 2007-04-25 2:29 UTC (permalink / raw)
To: caml-list
Hi,
On Tue, Apr 24, 2007 at 01:17:31PM -0700, Martin Jambon wrote:
> The current situation with camlp4 3.10-beta is terrible. Not because
> the new camlp4 is not good or anything, but because it is not compatible
> with the old one and yet replaces it.
Alternative solution : download my version of Camlp4, named "camlp4s" :
http://pauillac.inria.fr/~ddr/camlp4s/
This is Camlp4 before its inclusion into OCaml some years ago, and
upgraded to be (almost) compatible to the most recent versions of
Camlp4, except the forthcoming one 3.10.
Most important changes :
One only source which can be used for several versions of OCaml. Just
need to be recompiled. Can be used for ocaml versions from 3.08.1 to
3.10. (If you use a more older version, I can add it.)
The lexer Plexer has been rewritten. It uses a new syntax pa_lexer.cmo
allowing to make parser of streams of characters with a shorter syntax.
Experimented new directive "#pragma" allowing to evaluate expressions
at compile time (= camlp4 time). Useful, for example, to experiment
syntax extensions with the EXTEND statement without having to put
it in another file.
Started an experiment of a new pretty printing system, the old one
of Camlp4 not being satisfactory, nor Format which has sometimes
problems. The library is named Sformat, and is very simple.
But notice that this module Sformat is not yet used for camlp4s pretty
print, the old system remaining for the moment. I experimented it
separatedly and it seems to work. Interesting future feature : you
will be able to decide, by symmetry, to skip all lines in a pattern
matching between the pattern and the expression if one case need a
newline. Same thing in a "if then else" if the "then" case and the
"else" case are similar ("similarity" is tested with the library
"mldiff").
Its distribution being independant from OCaml distribution, new releases
can be done at any time.
--
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
2007-04-24 20:17 ` new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc) Martin Jambon
` (2 preceding siblings ...)
2007-04-25 2:29 ` Daniel de Rauglaudre
@ 2007-04-25 17:11 ` Markus Mottl
2007-04-26 3:00 ` skaller
2007-04-27 9:15 ` new+old Camlp4 Xavier Leroy
3 siblings, 2 replies; 19+ messages in thread
From: Markus Mottl @ 2007-04-25 17:11 UTC (permalink / raw)
To: Martin Jambon; +Cc: skaller, Diego Olivier FERNANDEZ PONS, caml-list
On 4/24/07, Martin Jambon <martin.jambon@ens-lyon.org> wrote:
> I wanted to start this as dedicated thread, but let's do it now.
> The current situation with camlp4 3.10-beta is terrible. Not
> because the new camlp4 is not good or anything, but because it is not
> compatible with the old one and yet replaces it. Replacing the old one by
> the new one in the next release of OCaml is practically unmanageable
> because:
>
> 1) Source duplication is unavoidable
> 2) Upgrading to the new camlp4 is not automatic
And:
3) Documentation for the new camlp4 is almost non-existent.
> The direct consequences are that it will take time until all syntax
> extensions support camlp4/ocaml 3.10, and probably anything new will work
> with either ocaml 3.09 or 3.10, but not both.
I am not so concerned about the 3.09 compiler not working with the new
macro syntax, because presumably people will upgrade somewhat quickly
anyway. Unless... they depend on old syntax extensions that have not
been rewritten yet.
Very substantial parts of our code base depend on non-trivial Camlp4
macros, and it is a lot of tedious work to rewrite those. Even though
it's a huge PITA, we could live with the lack of backwards
compatibility as long as there were at least sufficient documentation
to support a quick transition. I am also currently working on a new
non-trivial extension, and haven't started writing the macro part yet
in the hope that documentation will soon be available to improve my
productivity.
It seems reasonable to predict that many people won't (be able to)
upgrade to 3.10 for the reasons explained by Martin. I can't imagine
that INRIA wants to make a release that has a hard time of being
accepted by the community. This would be a waste of INRIA's
resources, too.
I'd therefore strongly suggest that INRIA plan more carefully how to
make the next release. From my point of view, the best way would be
to provide sufficient documentation in advance to allow Camlp4
developers to rewrite their macros in time. It would be a great
advantage, too, if the old Camlp4 supported any new syntax (not
extensions, just the base language; there are probably very few
changes anyway) so that people have at least a short reprieve during
which they can just use an old camlp4 installation before they are
forced to upgrade their macros for future OCaml-releases.
> I started upgrading some of my non-trivial syntax extensions already. It's
> ok to translate a file once, but I'll be adding new features and I don't
> know if I should continue to support ocaml 3.09 or ocaml 3.10. Even though
> I want to support both, I can't because it takes twice the time and it's
> pretty boring.
Indeed...
> It could go like "the old camlp4 is deprecated, and support will be
> dropped completely [one year after the first stable-and-documented release
> of camlp4 3.10]"
Sounds reasonable.
> * It means two versions of camlp4 would be distributed and installed with
> ocaml 3.10.
This would surely be helpful, but I don't think that this is
absolutely necessary. It isn't horribly hard to have two
OCaml-installations, and refer to the old camlp4 where necessary.
> * Upgraded programs could add new features only to the 3.10 version, while
> maintaining minimal support (bug fixes) for the 3.09 version, without
> forcing the camlp4 programmer to use ocaml 3.09 for testing.
Maintaining a second OCaml-installation would certainly be a bigger
problem if the macro code itself refers to a lot of external packages
(this may be rare), which may then need to be maintained in a
separation installation, too.
It would surely be most helpful for the community if both good
documentation were available, and a backwards compatible camlp4
version were provided. If there are limited resources at INRIA that
prevent solving both problems, my preference is that they be invested
in the former rather than the latter...
Regards,
Markus
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
2007-04-25 17:11 ` Markus Mottl
@ 2007-04-26 3:00 ` skaller
2007-04-27 9:15 ` new+old Camlp4 Xavier Leroy
1 sibling, 0 replies; 19+ messages in thread
From: skaller @ 2007-04-26 3:00 UTC (permalink / raw)
To: Markus Mottl
Cc: Martin Jambon, Diego Olivier FERNANDEZ PONS, caml-list,
Debian OCaml Maintainers
On Wed, 2007-04-25 at 13:11 -0400, Markus Mottl wrote:
> > * It means two versions of camlp4 would be distributed and installed with
> > ocaml 3.10.
>
> This would surely be helpful, but I don't think that this is
> absolutely necessary. It isn't horribly hard to have two
> OCaml-installations, and refer to the old camlp4 where necessary.
This is not the case for all users. For example I myself have
no problem building multiple versions of Ocaml on my Ubuntu
Linux box, where I deliberately do NOT use the Debian packages
for Ocaml (in fact I prefer the CVS head).
But I also test my product on Cygwin and Windows-native, and both come
with pre-built Ocaml packages. It isn't quite so easy to build on
Cygwin and I cringe in fear at the idea of having to do a Windows
native build -- esp on XP64.
I also run Ocaml on platforms I don't control: shell accounts
on hosted servers.
Furthermore, my product has a Debian package. There's no easy
option to have two ocamls using the Debian autobuilder.
There's NO WAY I can expect my intended user base to install
two versions of Ocaml. I have to write code that "just works"
with any reasonably up-to-date Ocaml installation.
So actually I don't use any camlp4 macros, and at least part
of the reason has been the lack of any concept of installation
and package management in the Ocaml distribution: actually
getting macros to work with camlp4 is quite hard because you
need to know where the files are. The same with third party
libraries.
And now running with multiple installations of Ocaml will
make that even harder -- I already have to do this on Windows
where I support both Cygwin and Windows native build, and
have to support 64 bit Windows Ocaml if someone manages to
actually build one, as well as 32 bit and probably the
MinGW version too...
So I would like to suggest -- yes, it *is* horribly hard to have
two Ocaml installations.
If this is necessary the Ocaml debian maintenance team at least will
have to change their package management design entirely,
since currently it only permits one Ocaml installation.
So actually I like this plan:
* leave camlp4 as it is
* rename the new system camlp5
* supply both
In particular this would support what I would do: if I need to build
third party libraries I put the source in my product, and if library A
uses p4 and library B uses p5 I can easily modify my build scripts
to support both A and B because both p4 and p5 are available.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4
2007-04-25 17:11 ` Markus Mottl
2007-04-26 3:00 ` skaller
@ 2007-04-27 9:15 ` Xavier Leroy
2007-04-27 13:43 ` Markus Mottl
2007-05-02 8:03 ` [Caml-list] " Hendrik Tews
1 sibling, 2 replies; 19+ messages in thread
From: Xavier Leroy @ 2007-04-27 9:15 UTC (permalink / raw)
To: Markus Mottl
Cc: Martin Jambon, Diego Olivier FERNANDEZ PONS, caml-list, skaller
> I'd therefore strongly suggest that INRIA plan more carefully how to
> make the next release. From my point of view, the best way would be
> to provide sufficient documentation in advance to allow Camlp4
> developers to rewrite their macros in time.
I agree with the need for documentation, but not with the timing you
propose. Release 3.10.0 has been delayed quite a bit already, and
1- there is no reason to make users who do not depend on Camlp4 wait longer
for 3.10;
2- having the new Camlp4 officially released as part of 3.10.0 can only
facilitate the porting of Camlp4 macros and extensions.
More generally, we are painfully aware that the transition from 3.09
to 3.10 is a minor upgrade for users who do not depend on Camlp4, but
a major change for Camlp4 users. We plan to maintain 3.09 (by making
bug-fix releases) longer than usual so that users who are stuck with
the old Camlp4 can stay with 3.09 for a while. Nobody is forced to
upgrade to 3.10 immediately.
Releasing both old and new Camlp4 as part of 3.10 is out of the
question, however. That would only delay the inevitable and would
waste a lot of our time to make such a release. The priorities are
1- get 3.10.0 out of the door, and 2- of course, provide more
documentation on the new Camlp4.
- Xavier Leroy
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: new+old Camlp4
2007-04-27 9:15 ` new+old Camlp4 Xavier Leroy
@ 2007-04-27 13:43 ` Markus Mottl
2007-05-02 8:03 ` [Caml-list] " Hendrik Tews
1 sibling, 0 replies; 19+ messages in thread
From: Markus Mottl @ 2007-04-27 13:43 UTC (permalink / raw)
To: Xavier Leroy
Cc: Martin Jambon, Diego Olivier FERNANDEZ PONS, caml-list, skaller
On 4/27/07, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:
> I agree with the need for documentation, but not with the timing you
> propose. Release 3.10.0 has been delayed quite a bit already, and
> 1- there is no reason to make users who do not depend on Camlp4 wait longer
> for 3.10;
I agree that there are probably many more users who do not depend on
Camlp4 than ones that do.
> 2- having the new Camlp4 officially released as part of 3.10.0 can only
> facilitate the porting of Camlp4 macros and extensions.
Well, I wouldn't exactly say that it facilitates it, but it certainly
enforces it ;-)
> Releasing both old and new Camlp4 as part of 3.10 is out of the
> question, however. That would only delay the inevitable and would
> waste a lot of our time to make such a release.
We certainly understand that INRIA has limited resources and cannot
afford the same level of support that a commercial company would
provide.
> The priorities are
> 1- get 3.10.0 out of the door
Finally we'll get stack backtraces for native code, which is an
extremely important feature for production systems. I guess every
OCaml-developer will be happy about that.
> and 2- of course, provide more documentation on the new Camlp4.
Please!
Best regards,
Markus
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Caml-list] Re: new+old Camlp4
2007-04-27 9:15 ` new+old Camlp4 Xavier Leroy
2007-04-27 13:43 ` Markus Mottl
@ 2007-05-02 8:03 ` Hendrik Tews
1 sibling, 0 replies; 19+ messages in thread
From: Hendrik Tews @ 2007-05-02 8:03 UTC (permalink / raw)
To: caml-list
Xavier Leroy <Xavier.Leroy@inria.fr> writes:
Releasing both old and new Camlp4 as part of 3.10 is out of the
question, however. That would only delay the inevitable and would
waste a lot of our time to make such a release. The priorities are
1- get 3.10.0 out of the door, and 2- of course, provide more
documentation on the new Camlp4.
I believe you got the priorities wrong here. Documentation should
be finished before the release.
Bye,
Hendrik
^ permalink raw reply [flat|nested] 19+ messages in thread