Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2016-10

Closures / anonymous methods

39 messages · 11 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Maciej Izak

Hi,

I'd like to take over work on closures/anonymous methods:

http://newpascal.org/compass.html (point #5).

Patch/hg repository from original author has gone away but I have made copy. My working repository is here:

https://github.com/maciej-izak/freepascal/commits/closures

I sent here original patch.

I will rework this functionality according to all suggestions from Jonas and Sven (reference to all informations avaible in NewPascal "compass" listed above).

any objections?

Best regards, Maciej Izak

Reply by email

Michael Van Canneyt
to Maciej Izak
Maciej Izak wrote 18 lines
Hi, I'd like to take over work on closures/anonymous methods: http://newpascal.org/compass.html (point #5). Patch/hg repository from original author has gone away but I have made copy. My working repository is here: https://github.com/maciej-izak/freepascal/commits/closures I sent here original patch. I will rework this functionality according to all suggestions from Jonas and Sven (reference to all informations avaible in NewPascal "compass" listed above). any objections?

None, on the contrary. Glad that someone is taking it up.

One remark only: you should keep it independent of (or orthogonal to) the work you did on management operators.
One should not depend on the other...

Michael.

Reply by email

Unknown author
to Unknown author
Show quoted text 8 lines
On 25.10.2016 16:06, Maciej Izak wrote @ http://lists.freepascal.org/pipermail/fpc-devel/2016-October/037375.html : > I'd like to take over work on closures/anonymous methods In theory, that is fine by me (the author). However, if I were to formally pass the bucket to you, I would like to settle with Scooter Software on my work done thus far.

if i/we may ask, what happened to your Patch/hg repository? why did it go away?

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Unknown author
to Unknown author
if i/we may ask, what happened to your Patch/hg repository? why did it go away?

As I said to Sven back then: "I did some server maintenance on 27th June, and I have had no incentive to put that part back yet". That is the only reason: lack of time.
(But, AFAIR, there has been only a couple of minor bug fixes since then.)

βþ

Reply by email

Maciej Izak
to Michael Van Canneyt: None, on the contrary. Glad that someone is taking it up. One remark only: you should…

2016-10-25 15:45 GMT+02:00 Michael Van Canneyt :

One remark only: you should keep it independent of (or orthogonal to) the work you did on management operators. One should not depend on the other...

Yes I know and I agree :P One branch for Generics.Collections, one for Management Operators, one for Smart Pointers, one for patches and new one for Closures.

I hope that Github has enough space for all branches...

Best regards, Maciej Izak

Reply by email

Unknown author
to Maciej Izak
Maciej Izak wrote
What Scooter Software has to GPL licensed code?

It has to do with what is right.
Allow me to provide a little background:
1) I do not use FPC at all;
2) Essentially, I was "hired" by Scooter Software (they do use FPC, I presume) to implement the subj (after one other person failed to improve on my earlier work);
3) I have not abandoned this project (and I am as frustrated with the pace as you may be; although, the previous disruption was not my fault -- I had allocated last December to finally have this merged, but got no response from maintainers within a month).

TL;DR: while there may be nothing preventing you from just grabbing the feature-ready files and "taking over" from the legal standpoint (and I do not care to check), there are other implications to consider.

The other reason I mentioned Scooter Software is that they may be interested in funding your further work. (The list does not reflect this, but I CC'ed my original message to them to keep them in the loop.)

βþ

Reply by email

Maciej Izak
to Unknown author

2016-10-25 20:38 GMT+02:00 :

Show quoted text 6 lines
3) I have not abandoned this project (and I am as frustrated with the pace as you may be; although, the previous disruption was not my fault -- I had allocated last December to finally have this merged, but got no response from maintainers within a month).

... I understand ... :\

Show quoted text 9 lines
TL;DR: while there may be nothing preventing you from just grabbing the feature-ready files and "taking over" from the legal standpoint (and I do not care to check), there are other implications to consider. The other reason I mentioned Scooter Software is that they may be interested in funding your further work. (The list does not reflect this, but I CC'ed my original message to them to keep them in the loop.)

that is very interesting for me. Thanks?

btw. your work (with my modifications and with regression tests) will become part of NewPascal release (for sure!) and I hope it makes you less frustrated :)

Best regards, Maciej Izak

Reply by email

Unknown author
to Maciej Izak
Maciej Izak wrote
your work (with my modifications and with regression tests) will become part of NewPascal release (for sure!) and I hope it makes you less frustrated :)

Now you have me confused.
I thought you wanted to "take over" acceptance of this into FPC and doing further improvements. What is this NewPascal? How official is it? Are the changes ported to FPC? (Googling through the lists.freepascal.org did not help.)

βþ

Reply by email

Maciej Izak
to Unknown author

2016-10-26 0:03 GMT+02:00 :

Show quoted text 6 lines
Now you have me confused. I thought you wanted to "take over" acceptance of this into FPC and doing further improvements. What is this NewPascal? How official is it? Are the changes ported to FPC? (Googling through the lists.freepascal.org did not help.)

NewPascal is official compiler for mORMot. NewPascal means tuned compiler more Delphi compatible with additional support for mORMot framework, cross compiling and early access for new features. More info about changes and differences with comparison to official FPC:
http://newpascal.org/compass.html . All is reported on FPC bugtracker. I can't do much in that matter.

... I also want acceptance of all important patches into FPC (that is why I will work on your patch). We really need NewPascal fork, to get important patches/modifications in reasonable time, for example merge for finished Generics.Collections took 2 years...

Many users likes more modern Pascal (for example oxygene mode is also one of NewPascal targets), FPC core team likes more old fashioned Pascal... I do not believe that core team would accept oxygene mode/patch. Anyway...

*NewPascal is and will be as close FPC trunk/bugtracker as possible*.

Best regards, Maciej Izak

Reply by email

Sven Barth
to Maciej Izak
"Maciej Izak" wrote
Many users likes more modern Pascal (for example oxygene mode is also one

of NewPascal targets), FPC core team likes more old fashioned Pascal... I do not believe that core team would accept oxygene mode/patch. Anyway...

As long as it's really a separate mode (plus maybe modeswitches for selected features, that other modes might profit from) I don't see a problem with adding an Oxygene mode.

Regards,
Sven

Reply by email

Michael Van Canneyt
to Sven Barth
Sven Barth wrote 8 lines
Am 26.10.2016 00:58 schrieb "Maciej Izak" : > Many users likes more modern Pascal (for example oxygene mode is also one of NewPascal targets), FPC core team likes more old fashioned Pascal... I do not believe that core team would accept oxygene mode/patch. Anyway... As long as it's really a separate mode (plus maybe modeswitches for selected features, that other modes might profit from) I don't see a problem with adding an Oxygene mode.

Indeed. This is the reason modes were invented.

Michael.

Reply by email

Maciej Izak
to Michael Van Canneyt

2016-10-26 11:56 GMT+02:00 Michael Van Canneyt :

Show quoted text 6 lines
As long as it's really a separate mode (plus maybe modeswitches for > selected features, that other modes might profit from) I don't see a > problem with adding an Oxygene mode. > Indeed. This is the reason modes were invented.

This is obvious. I won't touch the holy OBJFPC mode ;). Ever. I am worried about the speed of reviewing patches and integrations. For example: Management operators are key feature for many elements in Oxygene mode. Today I am 28 years old. I think that maybe before my 40th birthday FPC team decide to merging Management Operatos into trunk -,- . If Oxygene patch is next, which relay on MO... 80th birthday?

Best regards, Maciej Izak

Reply by email

Michael Van Canneyt
to Maciej Izak
Maciej Izak wrote 16 lines
2016-10-26 11:56 GMT+02:00 Michael Van Canneyt : > As long as it's really a separate mode (plus maybe modeswitches for >> selected features, that other modes might profit from) I don't see a >> problem with adding an Oxygene mode. >> > > Indeed. This is the reason modes were invented. This is obvious. I won't touch the holy OBJFPC mode ;). Ever. I am worried about the speed of reviewing patches and integrations. For example: Management operators are key feature for many elements in Oxygene mode. Today I am 28 years old. I think that maybe before my 40th birthday FPC team decide to merging Management Operatos into trunk -,- . If Oxygene patch is next, which relay on MO... 80th birthday?

I am happy to report that you are wrong. They are currently under discussion. Some valid concerns were raised.

By the looks of it, they may be integrated before long.

Please understand:

Free Pascal is a team project.
This means you cannot expect to have all patches integrated here-and-now.

Specially when they are as invasive as yours.
You are in essence converting pascal to a C++ clone with this MO patch. Is it so bad that this is discussed thoroughly first ?

I understand your youthful impatience, just have a little more patience :-)

Michael.

Reply by email

Paul van Helden
to Michael Van Canneyt

On Wed, Oct 26, 2016 at 12:48 PM, Michael Van Canneyt <

Show quoted text 32 lines
wrote: On Wed, 26 Oct 2016, Maciej Izak wrote: 2016-10-26 11:56 GMT+02:00 Michael Van Canneyt : > > As long as it's really a separate mode (plus maybe modeswitches for >> >>> selected features, that other modes might profit from) I don't see a >>> problem with adding an Oxygene mode. >>> >>> >> Indeed. This is the reason modes were invented. >> > > > This is obvious. I won't touch the holy OBJFPC mode ;). Ever. I am > worried about the speed of reviewing patches and integrations. For example: > Management operators are key feature for many elements in Oxygene mode. > Today I am 28 years old. I think that maybe before my 40th birthday FPC > team decide to merging Management Operatos into trunk -,- . If Oxygene > patch is next, which relay on MO... 80th birthday? > Specially when they are as invasive as yours. You are in essence converting pascal to a C++ clone with this MO patch. Is it so bad that this is discussed thoroughly first ?

+1 for Oxygene mode. An Oxygene mode to me will be like early Christmas and the next 10 years' Christmases rolled together!

I disagree that modernizing Pascal is making it into a C++ clone. Why not take the best features of C++ while keeping Pascal readable? (FPC did that allready with I+=2, not that I'm arguing this is more readable. A better example would be ** vs. Power() - a no-brainer if you ask me, though I'd prefer ^ which was in Algol).

Allowing EMB to dictate the future of Pascal is just wrong. Look what they've done with parallelism compared to Oxygene's clean (Pascal-like) approach. How is TParallel.For Pascallish? The difference seems to be that Pascal purists don't want to add keywords, while Oxygene adds many new keywords (eg. nullable, future, async, for parallel, is not, etc).

And then for some flame-bait: I like declaring variables inside begin..end; ;-) To me it looks perfectly Pascallish if it starts with var.. and it is necessary anyway for duck typing, nullable types, etc.

Reply by email

Michael Van Canneyt
to Paul van Helden
Paul van Helden wrote 9 lines
> Specially when they are as invasive as yours. You are in essence > converting pascal to a C++ clone with this MO patch. Is it so bad that this > is discussed thoroughly first ? > > +1 for Oxygene mode. An Oxygene mode to me will be like early Christmas and the next 10 years' Christmases rolled together! I disagree that modernizing Pascal is making it into a C++ clone.

It depends on how you do it.

What is being introduced with management operators is RAII. (Resource Acquisition Is Initialization)
This concept (using copy/clone constructors etc.) comes from C++.

Javascript doesn't have it. Python also not (to my knowledge). And these are so-called 'modern' languages.

Michael.

Reply by email

Michael Schnell
to Paul van Helden: On Wed, Oct 26, 2016 at 12:48 PM, Michael Van Canneyt < +1 for Oxygene mode. An Oxygene…
Paul van Helden wrote
+1 for Oxygene mode. An Oxygene mode to me will be like early Christmas and the next 10 years' Christmases rolled together!

Hmmm, Oxygene introduces several new concept.

To me, parallel loops seem most interesting (and "modern" as modern multi-core chips can be decently used). But Oxygene can use the underlying Framework for the dirty work, while FPC would need to build the support (thread pool)for this completely new in the RTL.

-Michael

Reply by email

Florian Klämpfl
to Maciej Izak: 2016-10-26 0:03 GMT+02:00 : NewPascal is official compiler for mORMot. NewPascal means…
Maciej Izak wrote
to get important patches/modifications in reasonable time, for example merge for finished Generics.Collections took 2 years...

While I agree that we are merging invasive changes slowly, this is a little bit unfair as Generics.Collections required a lot of bugs to be fixed before it could be merged: http://bugs.freepascal.org/view.php?id=27206

Reply by email

Maciej Izak
to Florian Klämpfl

2016-10-29 13:29 GMT+02:00 Florian Klämpfl :

Show quoted text 6 lines
While I agree that we are merging invasive changes slowly, this is a little bit unfair as Generics.Collections required a lot of bugs to be fixed before it could be merged: http://bugs.freepascal.org/view.php?id=27206

Last serious bug was fixed around rev. 29537 (January 2015). Ok just ~1,5 year. My bad ;). Sven had a lot of doubts about manual interfaces :P... Anyway I am very happy that we finally have rtl-generics!

Best regards, Maciej Izak

Reply by email

Zoë Peterson
to Maciej Izak: 2016-10-25 20:38 GMT+02:00 : ... I understand ... :\ that is very interesting for me.…

We (Scooter Software) don't care who or how it it gets into Free Pascal, as long as it eventually ends up there. :) We do need it in FPC proper though, not New Pascal, because we need it on Linux and macOS, and our build process is complicated enough that I wouldn't want to throw a cross compiler into the mix.

Blaise, I'm fine settling up with you if Maciej takes over. Is there a foreseeable schedule for you finishing if he doesn't?

Maciej, we can kick in some additional bounty to push it through if it'll help. We can discuss things off list if you get it going.

Zoë Peterson Scooter Software

Reply by email

Unknown author
to Zoë Peterson
Zoë Peterson wrote
We do need it in FPC proper though, not New Pascal

I was going to ask you to clarify that; thanks.

Blaise, I'm fine settling up with you if Maciej takes over. Is there a foreseeable schedule for you finishing if he doesn't?

I am ready to allocate a week or two from my schedule in the next month for this, but:
1) I would like a general commitment from the decision-makers to include this. By that I mean A) they want the feature, B) they are ready, in concept, to accept this patch (it may not implement the full support, but it fully implements the core and hardest aspects), provided that we work out the easy details (how to name stuff, where to put it, and blocking bugs -- should we find any).
2) I would like a commitment from at least one of the committers to work closely with me during that period on resolving issues that prevent merging. And by that I mean to be ready to react to my changes/questions within a day/two/three (not a month) as we both go through the list item by item. Provided that we agree on the two above points, I believe we can have it merged by the end of November.

Not a hard requirement, but, additionally, it would be nice if your staff (at Scooter Software), or someone on this mailing list, took over the formal tests (writing, running, integration).

I would like to emphasise that the stages that depended solely on me (however long they were) have ended last December. Now, collaboration is required from some devs and users who want this feature.

βþ

Reply by email

Sven Barth
to Unknown author
Show quoted text 11 lines
On 31.10.2016 5:30, Zoë Peterson wrote: > We do need it in FPC proper though, not New Pascal I was going to ask you to clarify that; thanks. > Blaise, I'm fine settling up with you if Maciej takes over. Is there a > foreseeable schedule for you finishing if he doesn't? I am ready to allocate a week or two from my schedule in the next month for this, but:

Sorry for the long delay. I didn't want to answer this on my phone and it had taken a while till I remembered that I wanted to answer this while being in front of my desktop computer... mea culpa

Show quoted text 6 lines
1) I would like a general commitment from the decision-makers to include this. By that I mean A) they want the feature, B) they are ready, in concept, to accept this patch (it may not implement the full support, but it fully implements the core and hardest aspects), provided that we work out the easy details (how to name stuff, where to put it, and blocking bugs -- should we find any).

Yes, to both A and B.

Show quoted text 5 lines
2) I would like a commitment from at least one of the committers to work closely with me during that period on resolving issues that prevent merging. And by that I mean to be ready to react to my changes/questions within a day/two/three (not a month) as we both go through the list item by item.

That might be the biggest hurdle as this is after all a voluntary project and how one organizes one's free time is a topic in itself... That said I'll be at home next week due to a vacation and my hope is that I'll be able to work on a couple of FPC topics that are still open.

Show quoted text 6 lines
Provided that we agree on the two above points, I believe we can have it merged by the end of November. Not a hard requirement, but, additionally, it would be nice if your staff (at Scooter Software), or someone on this mailing list, took over the formal tests (writing, running, integration).

Tests are very important indeed.

Regards,
Sven

Reply by email

Unknown author
to Sven Barth: Sorry for the long delay. I didn't want to answer this on my phone and it had taken a…
Sven Barth wrote
On 31.10.2016 14:58, wrote: > I would like a commitment from at least one of the committers to work closely with me during that period on resolving issues that prevent merging. And by that I mean to be ready to react to my changes/questions within a day/two/three (not a month) as we both go through the list item by item. I'll be at home next week due to a vacation and my hope is that I'll be able to work on a couple of FPC topics that are still open.

So, is that a commitment? Do I book my next week for this? :)

βþ

Reply by email

Sven Barth
"Maciej Izak" wrote 8 lines
2016-11-24 19:38 GMT+01:00 Sven Barth : > > mea culpa So what next? Blaise is still interested in? Am I alone on battle field?

Is Scooter Software around? I am confused.

Give them some time to answer. After all I had written this mail not even 24h ago. ;)
Nevertheless I've now added both Blaise and Zoë in CC so that they're definitely aware that there's a reply.

Regards,
Sven

Reply by email

Zoë Peterson
to Maciej Izak: 2016-11-24 19:38 GMT+01:00 Sven Barth : So what next? Blaise is still interested in? Am I…
So what next? Blaise is still interested in? Am I alone on battle field? Is Scooter Software around? I am confused.

Yes, we're still around. Yes, we're still willing to throw some money at anyone else who can help get this pushed in, whether that's Blaise, Sven, or Maciej. I don't have experiencing with the compiler team organization or patch process though, and we're preparing a new release right now though, so aside from money, I'm not sure we'll be able to do anything until it's pushed into trunk. We need the feature for new code, not existing, so I don't have test cases, and I can't justify the time to develope that code until I know we'll be able to use it.

Zoë Peterson Scooter Software

Reply by email

Sven Barth
to Unknown author: So, is that a commitment? Do I book my next week for this? :) βþ
Show quoted text 6 lines
On 24.11.2016 21:38, Sven Barth wrote: > > On 31.10.2016 14:58, wrote: >> >> I would like a commitment from at least one of the committers to work

closely with me during that period on resolving issues that prevent merging. And by that I mean to be ready to react to my changes/questions within a day/two/three (not a month) as we both go through the list item by item.

> > I'll be at home next week due to a vacation and my hope is that I'll be

able to work on a couple of FPC topics that are still open.

So, is that a commitment? Do I book my next week for this? :)

Just to be sure: we're talking about the week from 28th to 2nd. If so, yes I'll try to make sure that I'm available. Maybe I'll even hang around on IRC :)

Regards,
Sven

Reply by email

Maciej Izak
to Sven Barth

2016-11-25 19:10 GMT+01:00 Sven Barth :

Just to be sure: we're talking about the week from 28th to 2nd. If so, yes I'll try to make sure that I'm available. Maybe I'll even hang around on IRC :)

Any new info? Link to repository? Should I continue?

Best regards, Maciej Izak

Reply by email

Sven Barth
to Maciej Izak
"Maciej Izak" wrote 5 lines
2016-11-25 19:10 GMT+01:00 Sven Barth : > > Just to be sure: we're talking about the week from 28th to 2nd. If so,

yes I'll try to make sure that I'm available. Maybe I'll even hang around on IRC :)

Any new info? Link to repository? Should I continue?

I didn't get any mail from Blaise during my holidays... Until he's replied again I'd say to let it be for now.

Regards,
Sven

Reply by email

Unknown author
to Sven Barth
Sven Barth wrote
I didn't get any mail from Blaise during my holidays

As agreed, I have allocated time, and I have been working. (FTR, I really want(ed) you to enlist for the task we discussed, so we would work in parallel.)

For now, with your latest letter, I have all the info I need from you. (I have one pending question on terminology, but I believe it belongs to the list, so I will ask here.)

βþ

Reply by email

Sven Barth
to Unknown author
Show quoted text 8 lines
On 05.12.2016 13:36, Sven Barth wrote: > I didn't get any mail from Blaise during my holidays As agreed, I have allocated time, and I have been working. (FTR, I really want(ed) you to enlist for the task we discussed, so we

would work in parallel.)

You never wrote that you'd now start or that you'd now be available in IRC or whatever. Missing that I simply worked on bugs and other stuff that came along...

For now, with your latest letter, I have all the info I need from you. (I have one pending question on terminology, but I believe it belongs to

the list, so I will ask here.)

You mean that from around a year ago? Yeah, that should contain most points.

Regards,
Sven

Reply by email

Unknown author
to Sven Barth
Sven Barth wrote
You mean that from around a year ago?

No. Your latest letter to me is dated 26.11.2016.
In which, instead of accepting the offer, you chose to write a (much appreciated) HOWTO. (The offer stands; should you reconsider, kindly email me directly.)

Otherwise, as I stated above, no help/answers is required for now; and I am working.

βþ

Reply by email

Maciej Izak
to Unknown author

2016-12-05 15:12 GMT+01:00 :

Show quoted text 6 lines
On 05.12.2016 16:44, Sven Barth wrote: You mean that from around a year ago? > No. Your latest letter to me is dated 26.11.2016.

I see big problem with communication. Seems like I am special mediator. Without my notification the topic was almost dead for 1 year. Now we have similar situation again probably for another year or two.

I need that feature to start many other related features in my compiler work. For example I like to start experiments with "yield" and other stuff (compiler code behind closures is usefully).

From my experience with management operators:

* The patch can't be simple as one big patch, the working feature is just a start (in current form, closures are not in that stage yet - see problems with already implemented "blocks" by Jonas). State of closures IMO is far far away from "ready to merge".
* When big patch is ready you need to rework whole patch for small commits
* Each owner/author of feature, should be able to create full-test suite, generally only author knew how it works in all details, and how to create proper test suite to cover low level scenarios, so community could not help much with test suite (sure - bug reports and related tests are fine but I mean test suite prepared by core team for each new feature).
* The style of compiler code *must* be exactly same in all parts (after many hours with compiler I think it is perfect).

Did I miss something important? I might be wrong.

Let me know if you do not have enough patience for FPC core team ;). I will do it :P...

Best regards, Maciej Izak

Reply by email

Unknown author
to Maciej Izak
Maciej Izak wrote
the topic was almost dead for 1 year

Because much communication occurred off-list.

if you do not have enough patience for FPC core team

What I do not have is respect for schismatics who create unnecessary forks, splitting the community and resources.

βþ

Reply by email

Maciej Izak
to Unknown author

2016-12-05 17:46 GMT+01:00 :

Because much communication occurred off-list.

:) in that case all is ok. Good luck. I have hope to see new release soon. I will try to create few tests.

Show quoted text 5 lines
if you do not have enough patience for FPC core team > What I do not have is respect for schismatics who create unnecessary forks, splitting the community and resources.

Indeed! That would be terrible. I think that is good that we don't have any Lord Vader nor Emperor :)

Best regards, Maciej Izak

Reply by email

Blaise Thorn
to Ondrej Pokorny

There has been some feature-level progress; in particular, capturing across arbitrary level of nested and nameless routines is now supported, along with proper lifetime management. Sven has read-write access to the source.
No other features are planned by me before the merge. I am currently hung up on a couple of FPC bugs. Once I file them, I will enable public read access.

βþ

Reply by email

Marcos Douglas B. Santos
to Blaise Thorn
Blaise Thorn wrote 8 lines
There has been some feature-level progress; in particular, capturing across arbitrary level of nested and nameless routines is now supported, along with proper lifetime management. Sven has read-write access to the source. No other features are planned by me before the merge. I am currently hung up on a couple of FPC bugs. Once I file them, I will enable public read access.

What is the progress?

Best regards,
Marcos Douglas

Reply by email