On Thu, Nov 9, 2023 at 9:00 PM Benjamin Marwell <bmarw...@apache.org> wrote:
> I never knew there was an "original" freemarker project. > So you actually thought that FreeMarker was developed at Apache? Well, no. FreeMarker is a very very old project at this point. FreeMarker 1 was originally written by a guy named Benjamin Geer, in the late 90's. Though Ben Geer was, strictly speaking, the original author, I don't think he was really involved in the project for very long. He wasn't involved when I showed up in the community in late 2001 anyway. At that point, I basically took over, and within a few months, the thing was a complete rewrite. And that was when FreeMarker 2.0 came into being. From 2002 to 2004/2005 we went through 4 release cycles, 2.0, 2.1, 2.2, and 2.3. Each release cycle added quite a bit more functionality. It is kinda sad that there is just about no meaningful difference between 2023 "Apache FreeMarker" and FreeMarker 2.3 from 2005 (or even late 2004). But the thing to understand is that this Apache FreeMarker code, the continuation of the FreeMarker 2.3 codebase, is really something very ancient. Most of the work on this was done in the period from 2002 to 2005 or so, about a decade before there was any "Apache FreeMarker". Basically, the project was very old and stagnant at that point and came to Apache to die, I guess. So I've decided to resuscitate it. Or give it my best shot... > Your web site is down, the documentation on the GitHub project is sparse. > That is true at the moment but is all quite remediable -- especially if some people want to get involved and do some heavy lifting. (I get the feeling that's not you!) In any case, I said quite clearly that this is a preview. You can't expect something that is a preview to be as polished as something as old as FreeMarker 2.3, which has been pretty stable since 2004 or thereabouts! > There is no way to tell whether it really is more advanced or not. > Well, frankly, this is just nonsense. There is no legitimate controversy over whether this version of FreeMarker is more advanced or not. Of course it is. As I explained in the previous note in response to Taher Alkhateeb, it is built on top of the 2.4 codebase, while Apache FreeMarker is a continuation of the 2.3 codebase. Aside from that, just scan over the commit record: https://github.com/freemarker/freemarker3/commits/master Truth told, over the last few months, I have effected something close to a complete rewrite. But this is just ridiculous! Tell me, do you think there is some legitimate controversy over whether JDK 8 is more advanced than JDK 7? That's just silly. In any case, both FreeMarker 2.3 and this FreeMarker 3.0 preview that I just announced are largely my work. Is it possible that an earlier version of work by the same author is more advanced than the later version? Does that make any sense? Of course this version is more advanced! It can never be on Maven central, because the namespace (groupid) > "freemarker" is already claimed by Apache Freemarker. > Well, Ben... it is kind of disrespectful to talk such blatant nonsense to somebody. This is supposed to be some serious technical forum, isn't it? The "groupid" used on Maven Central is not something with any real transcendence at all. It certainly has no technical meaning. I mean, look, here is an example. The main OSS project I'm working on, as I said before, is CongoCC. A few months ago, our project (finally!) put out an "artifact" on Maven Central. That is here: https://central.sonatype.com/artifact/org.congocc/org.congocc.parser.generator I later realized that somebody else had previously put up a Maven artifact. That is here: https://central.sonatype.com/artifact/com.clickhouse/org.congocc Funny enough, the guy who put that up was not even in touch with us about it beforehand. But the one we put up is, I guess, under org.congocc and the one put up earlier by a third party is under com.clickhouse, which I guess is the URL he controls or his employer, or... I dunno... Actually, I just looked, and there is a patched version of FreeMarker 2.3.29 put up by Liferay, which is this one: https://central.sonatype.com/artifact/com.liferay/org.freemarker But the point is that it just doesn't matter! The whole idea that I can't put something on Maven Central because this nothingburger project controls the freemarker.org domain... Well, okay, I guess it's true that we can't use "org.freemarker" as a groupid since it's taken but... so what? So we use something else. (Duh.) When I decided on CongoCC as a new name for the parser generator project, I checked whether congocc.org was available and registered it. But I had anticipated having github.com/congocc as our "organization" location, but somehow that was taken, so we use github.com/congo-cc with a hyphen. Whatever. It would be a bit nicer if we had congocc without the hyphen, but it's hardly a sine qua non either. Well, anyway, look, we're not acquainted, but I find this quite off-putting. You have the possibility of raising whatever technical issue, making suggestions, giving feedback, and instead, you just come up with this flagrant nonsense about not being able to put up things on Maven Central (of course we can! LOL) .... or how it is so controversial that the more advanced version of the codebase actually is more advanced (Of course it is! LOL) .... or that some links being broken or the documentation being patchy is somehow a permanent state of affairs... (Of course it's not!) Well, anyway, I felt I had to answer this, but if you spout more nonsense like this, I think I will just refrain from answering. In the past, I have got into these annoying arguments with people because they got under my skin with this kind of stuff, but I suppose it's time to live and learn, eh? Jon > > - Ben > > Am Do., 9. Nov. 2023 um 18:40 Uhr schrieb Taher Alkhateeb > <ta...@pythys.com.invalid>: > > > > > > I'm a little confused. Why aren't we joining efforts on the apache > version? Why make it "a pity if a wider group of > > people never get the benefit of this work"? Am I missing something too > obvious or too old or something? Is this code base completely incompatible? > Is this a technical issue? > > > > Taher Alkhateeb > > > > On Wednesday, November 08, 2023 04:03 +03, Jonathan Revusky < > revu...@gmail.com> wrote: > > Greetings, > > > > I thought to let people know that there is a vastly more advanced version > > of FreeMarker available here: https://github.com/freemarker/freemarker3 > > > > You can build it via: > > > > git clone https://github.com/freemarker/freemarker3.git > > cd freemarker3 > > ant > > > > Or, if you want, there is a prebuilt jarfile you can grab here: > > https://parsers.org/download/freemarker.jar > > > > Though it is actually a rather superficial new feature, I think that one > > thing that people will enjoy is the new terser syntax. Basically, if a > > directive starts a line (aside from whitespace) there is no need for any > > pointy (or square) brackets. So you can just write: > > > > #if foo == bar > > blah blah > > /#if > > > > You can look here for a more complete description: > > https://github.com/freemarker/freemarker3/wiki/Terse-Syntax and here is > an > > example of a template from the old test suite rewritten using the terser > > syntax: > > > https://github.com/freemarker/freemarker3/blob/master/src/freemarker/testcase/template/test-switch.html > > > > In this version of FreeMarker, the #assign and #local directives (though > > they still work in a backward-compatible mode) were replaced with the > newer > > #var and #set. This is (IMHO) a significant improvement and is described > > here: https://github.com/freemarker/freemarker3/wiki/Strict-Vars > > > > Just generally speaking though, the biggest changes are really under the > > hood and would not be so visible to the casual user. This FreeMarker > > codebase has been refactored so that it largely does away with all of > those > > TemplateXXXModel wrappers and mostly just directly uses POJOs. (Plain Old > > Java Objects.) This is described here: > > https://github.com/freemarker/freemarker3/wiki/Under-the-Hood > > > > Various longstanding annoyances, like not being able to directly use a > map > > with non-string keys, have been addressed. > > > > Oh, it suddenly occurs to me that many (perhaps most) people on this > > mailing list do not know who I am. I am effectively the original author > of > > FreeMarker. I say "effectively" because there was a FreeMarker 1.x, which > > was really little more than a weekend hack. The version that 99% of > > FreeMarker users have used, which is 2.x, was a complete rewrite and is > > largely my work. > > > > As for other questions about what is going on with this, for example, > why I > > have put some renewed effort into FreeMarker after all years... well, my > > main open source efforts have been going into my rewrite of that old > JavaCC > > parser generator that FreeMarker 2.x was originally built with. The new > > version of JavaCC was originally called FreeCC, then when I resuscitated > it > > a few years ago, I called it JavaCC 21, but it is now rebranded as > CongoCC. > > So, since FreeMarker is a key part of CongoCC, I found myself adding the > > occasional new feature to FreeMarker (my own version, not Apache > > FreeMarker). For example, the feature described here > > https://github.com/freemarker/freemarker3/wiki/Macros-as-Functions was > > added to support CongoCC development back in 2020, but probably a lot of > > FreeMarker users would appreciate this. > > > > So, at some point, I did rework FreeMarker to use CongoCC instead of the > > legacy JavaCC. CongoCC is a much, much more powerful parser generator > than > > the original JavaCC, so it makes FreeMarker development comparatively a > > breeze. For example, I quite recently implemented assertions in > FreeMarker > > and this is where it is implemented: > > > https://github.com/freemarker/freemarker3/blob/master/src/parser/Directives.inc.ccc#L417-L445 > > > > Or here is where ternary expressions are implemented: > > > https://github.com/freemarker/freemarker3/blob/master/src/parser/Expressions.inc.ccc#L98-L118 > > You really should compare the FreeMarker grammar expressed with CongoCC > to > > the one that was written with legacy JavaCC, that is here: > > https://github.com/apache/freemarker/blob/2.3-gae/src/main/javacc/FTL.jj > > > > So I rewrote FreeMarker (it is largely a rewrite at this point) to: (a) > > have a better tool for CongoCC development and (b) to provide a showcase > > for CongoCC's capabilities. > > > > As for my plans, well, I do think it would be a pity if a wider group of > > people never get the benefit of this work. Whether I intend to call this > > version of FreeMarker "FreeMarker 3" or rename it to "Congo Templates", I > > still haven't decided about that. I really only put some serious effort > > into the FreeMarker codebase starting this summer and the work kind of > took > > on a life of its own. > > > > In any case, anybody who is interested in getting involved, by all means. > > Maybe start a discussion here: > > https://github.com/freemarker/freemarker3/discussions > > > > Best Regards and Greetings from Spain, > > > > Jonathan Revusky >