Hi,

First half regarding FreeCC...

Especially since JavaCC is more-less abandoned, it's good to have a better
alternative, that's now un-abandoned. At this point I don't yet know how
the parser of FM3 will be though. Likely it will have an EL parser, and the
rest of it (the top-level language) will be... hand written, or maybe not.
Because, the top-level syntax will be much simpler compared to the current
one, as a major point of the planned FM3 is that there's no special syntax
per directive, but that little syntax is have things that can be awkward to
express in at least in JavaCC (tag pairing without predefined tag names,
unparsed blocks, the tricky whitespace removal from the output). So anyway,
for now I can't add much to this part of the discussion.

I thought it will be great if you work on this, given your experience with
JavaCC, and the FreeMarker parser in particular, your will to lift lot of
weight, etc. It was proven what you can and can't do, we all know that.
Or me and Attila do, at least. It can be a beneficial cooperation, I
thought, and win-win given your renew interest in FreeCC. But given your
extreme anger towards me, which I was surprised to experience just recently
(anger for mismanagement in your absence, and not giving the old FM3 branch
and FreeCC enough publicity after the same -- see details later for the
others), and not even really that (because OK, the project didn't go well,
even if it's not as black and white as you state it is, but whatever), but
how futile my efforts were in the background to make peace, I don't really
see how would it work. I mean, I try not to forward private correspondence
here, and so hopefully you don't see it as such, but man, you expect me to
welcome you in the community, but how on earth could I do that, if you
believe that I'm liar, and that I have whatever shady motives, and you go
as far as you did on that line of thought. Obviously, *if* you can't get
yourself out of these beliefs, then too bad, the two of us won't be able to
collaborate. Right? Certainly you won't be willing to do the same either
anyway. So what am I to do with this? Or, what did you expect to happen?
Anyway, there other people than me here, so... not everything is lost.

Second half... others than Jon may wonder what the mismanagement thing is
about. So bellow is what's held against me. And, yeah Jon, I though I go
ahead, rather than waiting for you starting a crusade or whatever we call
it. Call it political trick, I guess you will. Meanwhile, the reality is
that I just didn't though about these things much, not in the recent years
for sure, let alone keeping them in secret.

After Jon has burned out of the whole FM thing, and maybe OS itself, and
Attila decided to leave the project as well, I was the only one left. I
didn't do much coding in FM earlier, I mostly just did the Manual, but I
was still a quite active member of the project. This meltdown was around
2008-2009. The SVN trunk was back then a quite reworked version of
FreeMarker, called FreeMarker 3 (nothing to do with the current FM3
branch), which, if memory serves, wasn't fully backward compatible, but
wasn't as radically incompatible as the current totally independent FM3
branch for sure. Anyway, that branch, I didn't continue, and continued to
release from the 2.3.x branch instead, same where releases are still coming
from now. So, the trunk was abandoned, and if some hero showed up to invest
a substantial time to FM, they probably would have been discouraged to
continue that. Nobody showed up anyway, such things have little change in
reality, but anyway, we can postulate, that the new branch would have been
more tempting to jump into, and so then who knows what happens if it's the
one pushed. So, as Jon puts it, I have buried his work, and so damaged
FreeMarker, and therefore its users.

My reflection was/is this. I can't exactly remember what went down in my
head back then, I can't even accurately emulate my old self (I was much
more an purist/extremist though, in development, and also in social
interactions). But I believe I didn't like that branch, because I felt it
wasn't enough improvement (like it didn't fix some things I thought was
important, something like that), at least not enough for "spending" your
backward compatibility breakage opportunity (because I think doing that is
better a once-per-decade thing, or such). Also, searching my memories, I
was thinking that if I write a template engine the way I think it is right
(which I was quite fixed on when I was younger... after working developer
for a good while, not anymore...), it couldn't be called FreeMarker, given
how dissimilar it would be. And, I had some conflicts that Jon doesn't like
to test what he does enough (with the reasoning along the lines that others
trying the new stuff will do that anyway, but I don't believe in that,
given my experience of fat enough bugs remained unreported for like 10 year
or so, in the stable branch used by a lot of people). Feeling it wasn't a
quality work (I mean, like hasty, too untested), probably I didn't feel
motivated doing the boring part so that the trunk becomes releasable
(according to what I believe is releasable). The big wrinkle is, from my
maybe selfish point of view, is my whole totoally new template engine thing
didn't go anywhere. Not being able to completely give up on FM, I stuck
leaking my resources on 2.3.x, and, well, you can see how much went into
that starting with 2.3.17. Was it the wrong place to invest... on global
scale, most certainly it was. As a next possibility, should I have continue
with the trunk though? Given that no new wonder template engine was made
(by me anyway), as we know now, probably. Though I had to review the old
trunk to know exactly how much was lost there, and how much was left to do
there. But at this point certainly that would be a futile, given the gap
between that and 2.3.30, and what I want to add (see in current FM3 - and
even there I dialed back to not throw TemplateModel-s for the MOP
approach). Given the changed landscape (we now do have some good engines,
so it's pointless to add another one if it's not really good... or at least
I don't feel motivated to do so), and changing coding standards, it
probably had to go though heavy refactoring again even if no new feature is
added/changed. As of 2.3.x, it's surely was and is motivating that since
it's backward compatible, people can upgrade very easily, and so stuff I
fix or add will be used in lot of projects.

Yeah, and another grievance of Jon, which I think was an important spark in
the whole mess, was that I had this mail:
https://lists.apache.org/thread.html/22e7bd635a06f92d8a26ecce5a60703149a7cc51e324caa1697dece6%40
<dev.freemarker.apache.org> "Anybody interested in some FM3 parser
research?" There, I don't mention FreeCC. And so I was questioned, why? As
I said in private, it's probably because FreeCC was long abandoned, and I
thought it wasn't even finished. As it turns out, it was pretty complete
(or so I guess now at least), and I didn't even remember that it was almost
used in 2.3.15 as well. Sorry, I have a bad memory, believe or not. This
was 10 years ago. My apologies.

I don't know, I think that's basically it.

On Wed, Dec 11, 2019 at 4:25 AM Jonathan Revusky <[email protected]> wrote:

> Hi all.
>
> I don't know offhand how many of the people receiving this email know
> who I am.  For those of you who don't, I was quite heavily involved with
> the FreeMarker project from some point in late 2001 to late 2008 or so.
> About 7 years. I was the original author of the first JavaCC grammar for
> FreeMarker. Before that, it was a hand-written parser.
>
> As a result of that, and the evolution of FreeMarker, I became quite a
> JavaCC power user and eventually I did a lot of work on JavaCC, which I
> tried to donate to that project. Well, they basically refused to look at
> my work, so I ended up forking it and I labeled that as FreeCC.
>
> Well, also, recently, I was trying to take a look at what was going on
> here and I noticed that the whole subject of parser generators came up
> -- this is a couple of years ago now, and nobody seemed to even know
> that FreeCC existed. Well, it was kind of abandoned and the only place
> to find it would have been on its archived Google Code site, which is
> still there. https://code.google.com/archive/p/freecc/
>
> Of course, Google Code is basically defunct, so the first step to
> resuscitating the project was to put it on Github, which I did just
> yesterday. Here: https://github.com/revusky/freecc
>
> If you want to get your hands on it and play with it, that is quite
> easy. It is simply:
>
> git clone https://github.com/revusky/freecc.git
>
> There are freecc and freecc.bat launchers that run straight out of the
> box since there is a "bootstrap" freecc.jar file, which is needed to do
> a build of freecc!
>
> To do a build is really easy. After checking it out, it's just
>
> cd freecc
>
> ant
>
> That builds a freecc.jar in the root directory that the launchers use in
> preference to the one in bin (if it is there, obviously...)
>
> You can run the test cases such as they are with:
>
> ant test
>
> and generate some (rather limited) docs with
>
> ant docs
>
> In the examples, there is an example grammar for FreeMarker which I had
> actually intended to be the basis of the grammar in newer versions of
> FreeMarker. You can also eyeball those files here:
>
> https://github.com/revusky/freecc/tree/master/examples/freemarker
>
> Note how the FreeMarker grammar is broken into two files, FTL.freecc and
> FEL.freecc. The first is the grammar for directives while the second
> file is just for expressions, FEL being FreeMarker Expression Language.
> In fact, it would be fairly simple to have separate builds in which you
> swap in and out different FEL.freecc files and have alternative syntax
> for expressions. (I don't know how useful that is, but it is nifty and
> it is something that is, to all intents and purposes, not even possible
> with JavaCC, which is a much more inflexible and cumbersome tool.)
>
> I had originally thought that, having abandoned FreeCC for a decade,
> that the work had no value now, since there would be so much progress
> over that time, but actually, I look at this, and see that,
> surprisingly, FreeCC could still be pretty useful, so I thought to try
> get it to a 1.0 release level.
>
> Over the last few days, I've been updating the included Java grammar to
> handle more modern constructs. It now handles the newer try-catch
> blocks, the double colon :: operator, but I still haven't implemented
> the lambda expression syntax. But I intend to. I ran the java parser
> over the entire freemarker codebase and it fails on 2 files, precisely
> because those are the two that use lambda expressions.
>
> Also, I fixed a couple of bugs that had been in the GoogleCode bug
> tracker for like 11 years.
>
> FreeCC in its very core algorithmically is the same as JavaCC, but since
> it uses FreeMarker templates to generate the code, it is actually far
> more configurable and flexible than JavaCC. You can get an idea of the
> new (actually, not so new features at this point!) from these Wiki posts
> I wrote about 11 years ago.
>
> https://code.google.com/archive/p/freecc/wikis
>
> I had the beginnings of a tutorial written about 11 years ago. I put
> that up right here:
>
> https://revusky.com/freecc/docs/
>
> Well, the whole thing has quite a bit of potential, and it is a very
> good example of how FreeMarker can be used outside the web space, for
> code generation. It is quite striking to compare FreeCC's code with
> JavaCC and see how much more tersely and cleanly the whole thing is
> expressed using FreeMarker templates to generate the code of the parsers
> rather than the println statements approach used by JavaCC.
>
> Well, I write this hoping that some people could really get interested
> in this. You might or might not, but it is easy to check out the project
> and play with it. There are some very old examples that are from JavaCC
> and then some examples I added. In particular, the included FTL.freecc
> and FEL.freecc are quite worthy of study, in particular, if you are
> interested in reworking FreeMarker.
>
> I'll close the note here.
>
> Best Regards,
>
> Jonathan Revusky
>
>

-- 
Best regards,
Daniel Dekany

Reply via email to