You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@freemarker.apache.org by Daniel Dekany <dd...@apache.org> on 2022/12/16 12:07:03 UTC

Pushing for minimal but quick 2.3.32

Hi,

I'm adding some smaller changes to the 2.3-gae branch, so we can do a
release relatively quickly, without waiting for the ever dragging java.time
support. I hope it will be ready for voting in a few days, which means that
it can be released this year.

Here's the change log so far... but it will grow. The changes related to ?c
are already quite substantial, so take a look if you can:
https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html

After the voting (in a few days if all goes well), I will continue with
java.time support, which will be part of the next release after this coming
2.3.32 release.

Re: Pushing for minimal but quick 2.3.32

Posted by Siegfried Goeschl <si...@gmail.com>.
Good morning,

Hope you don't have anything serious and get better soon ....

Siegfried

> On 01.01.2023, at 00:20, Daniel Dekany <dd...@apache.org> wrote:
> 
> I'm forward porting the changes from 2.3-gae into 3.0 as a form of code
> self-review. Especially in case nobody else takes a look. I will try to do
> that with CFormat/?c/?cn tomorrow, if my health allows it. I'm quite sick.
> Not sure if I will be able to proceed next week with FREEMARKER-35.
> 
> On Tue, Dec 27, 2022 at 12:25 AM Daniel Dekany <dd...@apache.org> wrote:
> 
>> OK, it has grown to be not that minimalistic after all. Nowadays I see
>> people suffering with generating JSON, in particular string literals that
>> can be null. With 2.3.31 (the old version) it's like this:
>> 
>> {
>>    ...
>>    "fullName": <#if
>> user.fullName??>"${user.fullName?json_string}"<#else>null</#if>
>>    ...
>> }
>> 
>> So I wanted to offer some new built-in for that, and it went further than
>> I anticipated. Because, I realized that I can say that ?c generates
>> literals in a target computer language, and therefore someString?c could
>> generate a string literal in that computer language (a quoted, escaped
>> thing). Currently ?c doesn't support strings, so that's backward
>> compatible. So I generalized ?c a bit, which caused further changes at
>> many places. Like I had to add the c_format setting to specify the target
>> computer language.
>> 
>> Then I also added a new built-in, ?cn, for "C Nullable", which will output
>> a null literal if its left side operand is a null/missing value (?c just
>> dies with missing value error). I know, yet another cryptic shorthand, but
>> in the use cases where these are needed, you often use them a lot. Also ?c
>> is already like that. So now the earlier example is reduced to this:
>> 
>> {
>>    ...
>>    "fullName": ${user.fullName?cn}
>>    ...
>> }
>> 
>> 
>> Of course ?cn will work with numerical and boolean values as well, as it's
>> the same as ?c, except when it comes to handling null/missing values. At
>> places where you don't expect null/missing values, you should use ?c
>> instead of ?cn.
>> 
>> Updated change log/documentation is here:
>> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>> 
>> Feedback is welcome!
>> 
>> I might add a bit more, but not much more, as I should wrap up 2.3.32, and
>> then go on with java.time support.
>> 
>> 
>> On Fri, Dec 16, 2022 at 1:07 PM Daniel Dekany <dd...@apache.org> wrote:
>> 
>>> Hi,
>>> 
>>> I'm adding some smaller changes to the 2.3-gae branch, so we can do a
>>> release relatively quickly, without waiting for the ever dragging java.time
>>> support. I hope it will be ready for voting in a few days, which means that
>>> it can be released this year.
>>> 
>>> Here's the change log so far... but it will grow. The changes related to
>>> ?c are already quite substantial, so take a look if you can:
>>> 
>>> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>>> 
>>> After the voting (in a few days if all goes well), I will continue with
>>> java.time support, which will be part of the next release after this coming
>>> 2.3.32 release.
>>> 
>>> 


Re: Pushing for minimal but quick 2.3.32

Posted by Denis Bredelet <br...@mac.com.INVALID>.
Hello Daniel,

> Le 31 déc. 2022 à 23:20, Daniel Dekany <dd...@apache.org> a écrit :
> 
> I'm forward porting the changes from 2.3-gae into 3.0 as a form of code
> self-review. Especially in case nobody else takes a look. I will try to do
> that with CFormat/?c/?cn tomorrow, if my health allows it. I'm quite sick.
> Not sure if I will be able to proceed next week with FREEMARKER-35.

I hope you get better soon! Wishing you good health for this new year 2023.

Regards,
— Denis.

> On Tue, Dec 27, 2022 at 12:25 AM Daniel Dekany <dd...@apache.org> wrote:
> 
>> OK, it has grown to be not that minimalistic after all. Nowadays I see
>> people suffering with generating JSON, in particular string literals that
>> can be null. With 2.3.31 (the old version) it's like this:
>> 
>> {
>>    ...
>>    "fullName": <#if
>> user.fullName??>"${user.fullName?json_string}"<#else>null</#if>
>>    ...
>> }
>> 
>> So I wanted to offer some new built-in for that, and it went further than
>> I anticipated. Because, I realized that I can say that ?c generates
>> literals in a target computer language, and therefore someString?c could
>> generate a string literal in that computer language (a quoted, escaped
>> thing). Currently ?c doesn't support strings, so that's backward
>> compatible. So I generalized ?c a bit, which caused further changes at
>> many places. Like I had to add the c_format setting to specify the target
>> computer language.
>> 
>> Then I also added a new built-in, ?cn, for "C Nullable", which will output
>> a null literal if its left side operand is a null/missing value (?c just
>> dies with missing value error). I know, yet another cryptic shorthand, but
>> in the use cases where these are needed, you often use them a lot. Also ?c
>> is already like that. So now the earlier example is reduced to this:
>> 
>> {
>>    ...
>>    "fullName": ${user.fullName?cn}
>>    ...
>> }
>> 
>> 
>> Of course ?cn will work with numerical and boolean values as well, as it's
>> the same as ?c, except when it comes to handling null/missing values. At
>> places where you don't expect null/missing values, you should use ?c
>> instead of ?cn.
>> 
>> Updated change log/documentation is here:
>> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>> 
>> Feedback is welcome!
>> 
>> I might add a bit more, but not much more, as I should wrap up 2.3.32, and
>> then go on with java.time support.
>> 
>> 
>> On Fri, Dec 16, 2022 at 1:07 PM Daniel Dekany <dd...@apache.org> wrote:
>> 
>>> Hi,
>>> 
>>> I'm adding some smaller changes to the 2.3-gae branch, so we can do a
>>> release relatively quickly, without waiting for the ever dragging java.time
>>> support. I hope it will be ready for voting in a few days, which means that
>>> it can be released this year.
>>> 
>>> Here's the change log so far... but it will grow. The changes related to
>>> ?c are already quite substantial, so take a look if you can:
>>> 
>>> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>>> 
>>> After the voting (in a few days if all goes well), I will continue with
>>> java.time support, which will be part of the next release after this coming
>>> 2.3.32 release.
>>> 
>>> 


Re: Pushing for minimal but quick 2.3.32

Posted by Daniel Dekany <da...@gmail.com>.
Sure, you can report here. Thanks, fixed these!

On Thu, Jan 5, 2023 at 3:15 PM Denis Bredelet <br...@mac.com.invalid>
wrote:

> Hi Daniel,
>
> > Le 5 Jan 2023 à 13:52, Daniel Dekany <da...@gmail.com> a écrit :
> >
> > I'm back from this sickness - thanks for the good wishes.
>
> Glad you are better!!
>
> > We have the proposed 2.3.32 pushed into Git. I don't plan to add anything
> > more to it. Release voting starts tomorrow (the 6th) GMT afternoon. If
> you
> > can spot anything before(!) that, even typos in documentation, that will
> > still fit in. So please go ahead, if you can, and thank you for any help!
> >
> > Changes and all the generated documentation for your convenience:
> >
> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>
> Can I just report typos here?
>
> Release notes:
>
> prevision -> precision
>
> different conversions as in most languages -> different conversions than
> in most languages
>
> javaSctringEsc -> javaStringEnc
> (I suppose)
>
> — Denis.
>
> >
> > On Sun, Jan 1, 2023 at 2:40 PM Jacques Le Roux <
> jacques.le.roux@les7arts.com>
> > wrote:
> >
> >> Hi Daniel,
> >>
> >> Our brain is dragging up much energy. I wish you will get enough time to
> >> rest, heal and have a very good 2023 new year.
> >>
> >> Jacques
> >>
> >> Le 01/01/2023 à 00:20, Daniel Dekany a écrit :
> >>> if my health allows it. I'm quite sick.
> >>
> >
> >
> > --
> > Best regards,
> > Daniel Dekany
>
>

-- 
Best regards,
Daniel Dekany

Re: Pushing for minimal but quick 2.3.32

Posted by Denis Bredelet <br...@mac.com.INVALID>.
Hi Daniel,

> Le 5 Jan 2023 à 13:52, Daniel Dekany <da...@gmail.com> a écrit :
> 
> I'm back from this sickness - thanks for the good wishes.

Glad you are better!!

> We have the proposed 2.3.32 pushed into Git. I don't plan to add anything
> more to it. Release voting starts tomorrow (the 6th) GMT afternoon. If you
> can spot anything before(!) that, even typos in documentation, that will
> still fit in. So please go ahead, if you can, and thank you for any help!
> 
> Changes and all the generated documentation for your convenience:
> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html

Can I just report typos here?

Release notes:

prevision -> precision

different conversions as in most languages -> different conversions than in most languages

javaSctringEsc -> javaStringEnc
(I suppose)

— Denis.

> 
> On Sun, Jan 1, 2023 at 2:40 PM Jacques Le Roux <ja...@les7arts.com>
> wrote:
> 
>> Hi Daniel,
>> 
>> Our brain is dragging up much energy. I wish you will get enough time to
>> rest, heal and have a very good 2023 new year.
>> 
>> Jacques
>> 
>> Le 01/01/2023 à 00:20, Daniel Dekany a écrit :
>>> if my health allows it. I'm quite sick.
>> 
> 
> 
> -- 
> Best regards,
> Daniel Dekany


Re: Pushing for minimal but quick 2.3.32

Posted by Daniel Dekany <da...@gmail.com>.
I'm back from this sickness - thanks for the good wishes.

We have the proposed 2.3.32 pushed into Git. I don't plan to add anything
more to it. Release voting starts tomorrow (the 6th) GMT afternoon. If you
can spot anything before(!) that, even typos in documentation, that will
still fit in. So please go ahead, if you can, and thank you for any help!

Changes and all the generated documentation for your convenience:
https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html


On Sun, Jan 1, 2023 at 2:40 PM Jacques Le Roux <ja...@les7arts.com>
wrote:

> Hi Daniel,
>
> Our brain is dragging up much energy. I wish you will get enough time to
> rest, heal and have a very good 2023 new year.
>
> Jacques
>
> Le 01/01/2023 à 00:20, Daniel Dekany a écrit :
> > if my health allows it. I'm quite sick.
>


-- 
Best regards,
Daniel Dekany

Re: Pushing for minimal but quick 2.3.32

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Daniel,

Our brain is dragging up much energy. I wish you will get enough time to rest, heal and have a very good 2023 new year.

Jacques

Le 01/01/2023 à 00:20, Daniel Dekany a écrit :
> if my health allows it. I'm quite sick.

Re: Pushing for minimal but quick 2.3.32

Posted by Daniel Dekany <dd...@apache.org>.
I'm forward porting the changes from 2.3-gae into 3.0 as a form of code
self-review. Especially in case nobody else takes a look. I will try to do
that with CFormat/?c/?cn tomorrow, if my health allows it. I'm quite sick.
Not sure if I will be able to proceed next week with FREEMARKER-35.

On Tue, Dec 27, 2022 at 12:25 AM Daniel Dekany <dd...@apache.org> wrote:

> OK, it has grown to be not that minimalistic after all. Nowadays I see
> people suffering with generating JSON, in particular string literals that
> can be null. With 2.3.31 (the old version) it's like this:
>
> {
>     ...
>     "fullName": <#if
> user.fullName??>"${user.fullName?json_string}"<#else>null</#if>
>     ...
> }
>
> So I wanted to offer some new built-in for that, and it went further than
> I anticipated. Because, I realized that I can say that ?c generates
> literals in a target computer language, and therefore someString?c could
> generate a string literal in that computer language (a quoted, escaped
> thing). Currently ?c doesn't support strings, so that's backward
> compatible. So I generalized ?c a bit, which caused further changes at
> many places. Like I had to add the c_format setting to specify the target
> computer language.
>
> Then I also added a new built-in, ?cn, for "C Nullable", which will output
> a null literal if its left side operand is a null/missing value (?c just
> dies with missing value error). I know, yet another cryptic shorthand, but
> in the use cases where these are needed, you often use them a lot. Also ?c
> is already like that. So now the earlier example is reduced to this:
>
> {
>     ...
>     "fullName": ${user.fullName?cn}
>     ...
> }
>
>
> Of course ?cn will work with numerical and boolean values as well, as it's
> the same as ?c, except when it comes to handling null/missing values. At
> places where you don't expect null/missing values, you should use ?c
> instead of ?cn.
>
> Updated change log/documentation is here:
> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>
> Feedback is welcome!
>
> I might add a bit more, but not much more, as I should wrap up 2.3.32, and
> then go on with java.time support.
>
>
> On Fri, Dec 16, 2022 at 1:07 PM Daniel Dekany <dd...@apache.org> wrote:
>
>> Hi,
>>
>> I'm adding some smaller changes to the 2.3-gae branch, so we can do a
>> release relatively quickly, without waiting for the ever dragging java.time
>> support. I hope it will be ready for voting in a few days, which means that
>> it can be released this year.
>>
>> Here's the change log so far... but it will grow. The changes related to
>> ?c are already quite substantial, so take a look if you can:
>>
>> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>>
>> After the voting (in a few days if all goes well), I will continue with
>> java.time support, which will be part of the next release after this coming
>> 2.3.32 release.
>>
>>

Re: Pushing for minimal but quick 2.3.32

Posted by Daniel Dekany <dd...@apache.org>.
OK, it has grown to be not that minimalistic after all. Nowadays I see
people suffering with generating JSON, in particular string literals that
can be null. With 2.3.31 (the old version) it's like this:

{
    ...
    "fullName": <#if
user.fullName??>"${user.fullName?json_string}"<#else>null</#if>
    ...
}

So I wanted to offer some new built-in for that, and it went further than I
anticipated. Because, I realized that I can say that ?c generates literals
in a target computer language, and therefore someString?c could generate a
string literal in that computer language (a quoted, escaped thing).
Currently ?c doesn't support strings, so that's backward compatible. So I
generalized ?c a bit, which caused further changes at many places. Like I
had to add the c_format setting to specify the target computer language.

Then I also added a new built-in, ?cn, for "C Nullable", which will output
a null literal if its left side operand is a null/missing value (?c just
dies with missing value error). I know, yet another cryptic shorthand, but
in the use cases where these are needed, you often use them a lot. Also ?c
is already like that. So now the earlier example is reduced to this:

{
    ...
    "fullName": ${user.fullName?cn}
    ...
}


Of course ?cn will work with numerical and boolean values as well, as it's
the same as ?c, except when it comes to handling null/missing values. At
places where you don't expect null/missing values, you should use ?c
instead of ?cn.

Updated change log/documentation is here:
https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html

Feedback is welcome!

I might add a bit more, but not much more, as I should wrap up 2.3.32, and
then go on with java.time support.


On Fri, Dec 16, 2022 at 1:07 PM Daniel Dekany <dd...@apache.org> wrote:

> Hi,
>
> I'm adding some smaller changes to the 2.3-gae branch, so we can do a
> release relatively quickly, without waiting for the ever dragging java.time
> support. I hope it will be ready for voting in a few days, which means that
> it can be released this year.
>
> Here's the change log so far... but it will grow. The changes related to
> ?c are already quite substantial, so take a look if you can:
>
> https://freemarker.apache.org/builds/2.3.32-preview/docs/versions_2_3_32.html
>
> After the voting (in a few days if all goes well), I will continue with
> java.time support, which will be part of the next release after this coming
> 2.3.32 release.
>
>