Where to put Pharo-compatibility code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Where to put Pharo-compatibility code

jtuchel
Hi VAST community,

every time I port code from Pharo, I stumble across the same class of code differences all the time.

Apart from curly braces for Array construction, these mostly are shortcut methods in the Collection hierarchy like #join:, #count:, #sum: , #allButFirstDo: and so on. The list is long.

In the beginning, I just rewrote the methods in my VA port of a monticello package, then I realized people in Pharo love these methods as they save a lot of typing. So they are being used very often in code that I want to port to VAST. If you have to change the same pieces of code every time you want to port a monticello package to VAST, this is not practicable. In the end, porting becomes so much work that you don't do it anymore and stick with what you have for as long as you can.

So the next - and possibly much better - alternative would be to add these methods to VAST, so that porting code from Pharo becomes easier every time somebody added such a method.

This brings me to a series of questions:

  1. Where should we put such methods? It is clear that many of these methods do not belong in any of the ported packages, like NeoCSV or STON or whatever. OTOH, Grease is probably also not the right place to do that, or is it?
  2. How can we make such a layer grow fast? By this I mean we should make it independent of VAST product cycles. (which is also a counter argument to Grease).
  3. How could we make such a beast a community effort? I mean, most of these methods are one to three lines long and chances are that if it's easy to add a method to our new compatibility layer, it will be done by many people and the layer would grow faster
As you can probably see, my feelings towards adding stuff to Grease are mixed. Grease's idea is exactly what I am talking about: a portability layer. So it seems to be the perfect place for such methods. OTOH, adding more and more completely unrelated stuff into such a package would turn it into a giant ball of mud.

I think many of these little helper methods should make their way into the product, but am not sure if Instantiations would be willing to do that. And as long as Instantiations cannot ship upgrades independent of full product releases, this would probably be a slow process. 

So what do people think? Should we start another portability layer and maintain it on VASTGoodies? Should we extend grease and look for ways to synchronize the community version of Grease with the one that Instantiations ships with VA?

What does Instantiations think? Do you see a need for extensions to VAST classes to make porting Pharo (and also Squeak) code easier?

I know people are working on Cypress/Filetree for VAST. Is there any idea for this family of problems in Cypress? What layer do they use/make?

I am really interested in opinions from as many people as possible. Porting code from Pharo could be so much easier if we just added these little extensions to VAST.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Jan van de Sandt
Hello Joachim,

I stumbled across the same problems. A few months ago I imported the Pharo STON project into VASt. I was very difficult to fix all the unit tests because they depend on the equals method of a Dictionary. Currently you cannot compare two dictionaries in VASt to check if they contain the same key-value pairs. An implementation of Dictionary>>#= and Dictionary>>#hash would be a nice addition to Pharo compatibility layer.

A community project on VAStGoodies sounds the most practical to me. Perhaps called "ExtraGrease" ?

Jan.


On Sat, Jan 11, 2014 at 3:17 PM, [hidden email] <[hidden email]> wrote:
Hi VAST community,

every time I port code from Pharo, I stumble across the same class of code differences all the time.

Apart from curly braces for Array construction, these mostly are shortcut methods in the Collection hierarchy like #join:, #count:, #sum: , #allButFirstDo: and so on. The list is long.

In the beginning, I just rewrote the methods in my VA port of a monticello package, then I realized people in Pharo love these methods as they save a lot of typing. So they are being used very often in code that I want to port to VAST. If you have to change the same pieces of code every time you want to port a monticello package to VAST, this is not practicable. In the end, porting becomes so much work that you don't do it anymore and stick with what you have for as long as you can.

So the next - and possibly much better - alternative would be to add these methods to VAST, so that porting code from Pharo becomes easier every time somebody added such a method.

This brings me to a series of questions:

  1. Where should we put such methods? It is clear that many of these methods do not belong in any of the ported packages, like NeoCSV or STON or whatever. OTOH, Grease is probably also not the right place to do that, or is it?
  2. How can we make such a layer grow fast? By this I mean we should make it independent of VAST product cycles. (which is also a counter argument to Grease).
  3. How could we make such a beast a community effort? I mean, most of these methods are one to three lines long and chances are that if it's easy to add a method to our new compatibility layer, it will be done by many people and the layer would grow faster
As you can probably see, my feelings towards adding stuff to Grease are mixed. Grease's idea is exactly what I am talking about: a portability layer. So it seems to be the perfect place for such methods. OTOH, adding more and more completely unrelated stuff into such a package would turn it into a giant ball of mud.

I think many of these little helper methods should make their way into the product, but am not sure if Instantiations would be willing to do that. And as long as Instantiations cannot ship upgrades independent of full product releases, this would probably be a slow process. 

So what do people think? Should we start another portability layer and maintain it on VASTGoodies? Should we extend grease and look for ways to synchronize the community version of Grease with the one that Instantiations ships with VA?

What does Instantiations think? Do you see a need for extensions to VAST classes to make porting Pharo (and also Squeak) code easier?

I know people are working on Cypress/Filetree for VAST. Is there any idea for this family of problems in Cypress? What layer do they use/make?

I am really interested in opinions from as many people as possible. Porting code from Pharo could be so much easier if we just added these little extensions to VAST.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Adriaan van Os-3
ExtraGrease would become the same 'ball of mud', not?

One of the ideas behind Grease is to keep it small. This means: do not use methods and classes that are not portable and if you really have to, use Grease as a portability layer. Everyone will benefit if Smalltalk open source projects follow this principle. Convincing or even helping the developers of projects violating this principle is good start. The Smalllint rules for portability coming with Seaside/Grease can help here.

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

John O'Keefe-3
In reply to this post by jtuchel
Hi Joachim -

I don't have any really good answer for this problem. So I will ramble on a bit and then agree that "ExtraGrease" on VAStGoodies is probably the best short-term (and maybe even long-term) solution. Here are alternatives:

 1. Keep them with the ported code. This inevitably will cause conflict when 2 (or more) ported packages supply the same extension method. This problem is even worse when extension methods with the same selectors have different semantics.

 2. Add methods to the base. The base classes are already pretty heavy. As the product development organization, we would need to evaluate each addition very carefully. A method with the same function but a different spelling from one already in the product would likely be rejected. Also, as others have pointed out, there is a 12-month life cycle to the releases of the base product.

 3. Add methods to Grease. Grease is designed for platform portability, and was based strictly on the needs of Seaside. Our small group of Grease designers worked very diligently to minimize the content. We reduced the original content over several iterations by eliminating the use of non-portable methods where portable equivalent methods were available. Seaside Slime was developed to help developers identify usage of non-portable methods and use its rewrite rules to update their code to replace such usage with portable methods. The net effect is that Grease is a controlled environment, perhaps even more controlled than the base product, because it has to be portable to all supported Smalltalk platforms.

 4. Add methods to a new ExtraGrease VAStGoodies package. This provides a distribution mechanism specifically oriented to Pharo/Squeak -> VA Smalltalk porting. It provides looser control over its content and faster turn-around than with either base product or Grease changes.

Some other thoughts:

 1. There probably should be several ExtraGrease packages, aligned loosely with VA Smalltalk features. So, I envision (as needed) ExtraGrease - Core, ExtraGrease - Server, ExtraGrease - OLE, ExtraGrease - Database, etc.

 2. Marten Feldtmann has already provided VAStGoodies packages along these lines: MSKOleAdditions, and others

John

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Jan van de Sandt
In reply to this post by Adriaan van Os-3
Hello Adriaan,

Grease is ideal for code that is designed to run on all Smalltalk dialects. Projects like Seaside and Magritte.

I think Joachim is taking about projects that are developed specifically for Pharo. For example the STON project of Sven.These projects do use Pharo specific non portable methods and classes. There is not much we can do about this. The goal of "ExtraGrease" is thus to make VASt more Pharo compatible so the porting of these Pharo specific projects becomes a bit easier.

"PharoGrease" is perhaps a better name ....

Jan.



On Mon, Jan 13, 2014 at 1:13 PM, Adriaan van Os <[hidden email]> wrote:
ExtraGrease would become the same 'ball of mud', not?

One of the ideas behind Grease is to keep it small. This means: do not use methods and classes that are not portable and if you really have to, use Grease as a portability layer. Everyone will benefit if Smalltalk open source projects follow this principle. Convincing or even helping the developers of projects violating this principle is good start. The Smalllint rules for portability coming with Seaside/Grease can help here.

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by Adriaan van Os-3
Adrian,

Am Montag, 13. Januar 2014 13:13:30 UTC+1 schrieb Adriaan van Os:
ExtraGrease would become the same 'ball of mud', not?

Unfortunately, I have to agree on this one ;-)
 

One of the ideas behind Grease is to keep it small. This means: do not use methods and classes that are not portable and if you really have to, use Grease as a portability layer. Everyone will benefit if Smalltalk open source projects follow this principle. Convincing or even helping the developers of projects violating this principle is good start. The Smalllint rules for portability coming with Seaside/Grease can help here.

Hmm, I guess it would be good if we could convince people in other Smalltalk dialects to avoid non-portable methods. I haven't asked any of the authors of code that I wanted to port, so maybe I should do that first before I complain. I do have some doubts, however.
 
But I will try.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by Jan van de Sandt
Hi Jan,

Am Montag, 13. Januar 2014 17:03:07 UTC+1 schrieb Jan van de Sandt:
Hello Adriaan,

Grease is ideal for code that is designed to run on all Smalltalk dialects. Projects like Seaside and Magritte.

Right. And it's no wonder, it's been made for that purpose, as John points out.
 

I think Joachim is taking about projects that are developed specifically for Pharo. For example the STON project of Sven.These projects do use Pharo specific non portable methods and classes. There is not much we can do about this. The goal of "ExtraGrease" is thus to make VASt more Pharo compatible so the porting of these Pharo specific projects becomes a bit easier.

Right. And I am talking of code that wouldn't stand in Instantiations' way for new releases. If I were them, I wouldn't like the idea of people adding stuff to Grease while it is my Seaside porting layer. I would probably take code form that from time to time, but no more than that
 

"PharoGrease" is perhaps a better name ....

Well, yes, because it is what its purpose would be ;-)

Still I am not sure what to do now. 

Joachim 

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by John O'Keefe-3
John,

Am Montag, 13. Januar 2014 15:29:28 UTC+1 schrieb John O'Keefe:
Hi Joachim -

I don't have any really good answer for this problem. So I will ramble on a bit and then agree that "ExtraGrease" on VAStGoodies is probably the best short-term (and maybe even long-term) solution.

Although there are quite a few problems associated with it.
 
Here are alternatives:

 1. Keep them with the ported code. This inevitably will cause conflict when 2 (or more) ported packages supply the same extension method. This problem is even worse when extension methods with the same selectors have different semantics.

 I see this group bloom with "Help, I cannot load XY and Z together due to load conflicts". We've seen lots of that in Pharo and Squeak...

 2. Add methods to the base. The base classes are already pretty heavy. As the product development organization, we would need to evaluate each addition very carefully. A method with the same function but a different spelling from one already in the product would likely be rejected. Also, as others have pointed out, there is a 12-month life cycle to the releases of the base product.

I was expecting you to mention this, and I fully understand. From your perspective, supporting such methods is risky.

 3. Add methods to Grease. Grease is designed for platform portability, and was based strictly on the needs of Seaside. Our small group of Grease designers worked very diligently to minimize the content. We reduced the original content over several iterations by eliminating the use of non-portable methods where portable equivalent methods were available. Seaside Slime was developed to help developers identify usage of non-portable methods and use its rewrite rules to update their code to replace such usage with portable methods. The net effect is that Grease is a controlled environment, perhaps even more controlled than the base product, because it has to be portable to all supported Smalltalk platforms.

I think we cannot use Grease, because you will have to adopt Grease for every Seaside and/or VAST release, so it is undesirable to have your Grease throw all of our extensions out of an image with every new VAST release...


 4. Add methods to a new ExtraGrease VAStGoodies package. This provides a distribution mechanism specifically oriented to Pharo/Squeak -> VA Smalltalk porting. It provides looser control over its content and faster turn-around than with either base product or Grease changes.

Sounds like the best option, apart from convincing Pharo committers to avoid methods of their platform ;-)


Some other thoughts:

 1. There probably should be several ExtraGrease packages, aligned loosely with VA Smalltalk features. So, I envision (as needed) ExtraGrease - Core, ExtraGrease - Server, ExtraGrease - OLE, ExtraGrease - Database, etc.

Hmmm. How would we integrate this in VASTGoodies? If you load this goodie, you need these three Pharo portability packages... What about version differences between portability packages for 2 or more packages?

I would love to see something similar to projects like MacPorts or such, where you as a user are freed from most of these problems.... *Scratching my head*

Joachim



John

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Richard Sargent
Administrator
In reply to this post by jtuchel
On Tuesday, January 14, 2014 12:11:33 AM UTC-8, [hidden email] wrote:
Am Montag, 13. Januar 2014 13:13:30 UTC+1 schrieb Adriaan van Os:
ExtraGrease would become the same 'ball of mud', not?

Unfortunately, I have to agree on this one ;-)

 
I would be inclined to stay away from the name "Grease" entirely. It has a specific purpose, and I think this thread is about bring Pharo functionality into VASmalltalk for its own sake.

In that case, I would suggest one or more Applications, prefixed with "Pharo" and the Pharo version number from which the features are taken.

So, for extensions to VA Kernal classes might appear in an Application called Pharo20KernelExtensions. This application would have a SubApplication per extension. WindowBuilder has some examples of this. The SubApplication is named something like Pharo20KernelExtensions_methodName and has two line ups. One line up detects whether the named method exists in the class and application or doesn't exist at all; the other handles the case that the extension is already present from some other package (i.e., an empty line-up). The first line up includes a sub-SubApplication which provides the actual implementation of the method (and probably any related, required methods and classes).

For more extensive extensions, such as the Pharo "Networking" package for example, I would suggest the Application name be "Pharo", the Pharo version, and "Networking" (or "NetworkingPackage"). The goal would be to have this kind of Application contain the code in a form as close as possible to its form in Pharo.


For the "Kernel extensions" kind of thing, it would be a good idea to build a tool to create the Application and SubApplication structures and line ups.


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Adriaan van Os-3
In reply to this post by jtuchel
I understand that using Grease is not easy. It will need a lot of convincing of developers. But the reason it is separated from Seaside is to make it available as a portability layer to other projects. I still believe Grease is the ideal solution, but maybe not feasible.

STON was mentioned by Jan and Joachim. STON uses Grease, I just noticed. Is that because STON used Grease already, or did that start with the port to VA Smalltalk?

Otherwise, if people think Grease won't work,  I suggest to start with MSKPlatformExtension. It does't make sense to me to keep creating new portability layers.

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Adriaan van Os-3
One more thought. The most important thing about a compatibility layer is acceptance and adoption. Preferably across dialects. Because it makes porting and maintaining ports so much easier. That's is why I'm favouring Grease, because, while still being smallish, it has the widest acceptance. Unless we want a VA Smalltalk solution, we might consider involving the other dialects in the discussion. Perhaps the ESUG mailing list is an appropriate platform for this?

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by jtuchel
Hi, I am back to this topic.

While I think Richard's suggestion would be the right/best possible thing to do, it also is the one requiring most work and maintenance. So it's very likely it is not going to happen...

So here I am in the middle of an actual problem that I put myself into: yesterday I uploaded VBRegex in a new version to VASTGoodies, because I had this port for a long time now and thought it's time for others to have it available. I was surprised to see I hadn't uploaded a few months ago.

But now I remember why: the first "customer" who wanted to use it, stumbled from one problem to the next:

first, a method was missing that is implemented in Grease (Character class >> newPage). Okay, I could possibly live with declaring Grease a prerequisite for VBRegex.
A few minutes later, he asked where to find Collection>>#contains: . It turns out is a method that comes with Glorp. 

Since I use Seaside and Glorp all the time, this has never been an issue for me, but it sure will be for others. Making Glorp a prerequisite of VBRegex is sure not as acceptable as making Grease a prerequisite of VBRegex.

Now we're in the middle of the trouble: I could probably use Richard's suggestion and move Collection>>#contains: to a subappliction and add a config expression for it. But this is only part of a possible solution: What if somebody loads Glorp after VBRegex? Then They'd get load errors and scratch editions.

What now?

Joachim




Am Samstag, 11. Januar 2014 15:17:26 UTC+1 schrieb [hidden email]:
Hi VAST community,

every time I port code from Pharo, I stumble across the same class of code differences all the time.

Apart from curly braces for Array construction, these mostly are shortcut methods in the Collection hierarchy like #join:, #count:, #sum: , #allButFirstDo: and so on. The list is long.

In the beginning, I just rewrote the methods in my VA port of a monticello package, then I realized people in Pharo love these methods as they save a lot of typing. So they are being used very often in code that I want to port to VAST. If you have to change the same pieces of code every time you want to port a monticello package to VAST, this is not practicable. In the end, porting becomes so much work that you don't do it anymore and stick with what you have for as long as you can.

So the next - and possibly much better - alternative would be to add these methods to VAST, so that porting code from Pharo becomes easier every time somebody added such a method.

This brings me to a series of questions:

  1. Where should we put such methods? It is clear that many of these methods do not belong in any of the ported packages, like NeoCSV or STON or whatever. OTOH, Grease is probably also not the right place to do that, or is it?
  2. How can we make such a layer grow fast? By this I mean we should make it independent of VAST product cycles. (which is also a counter argument to Grease).
  3. How could we make such a beast a community effort? I mean, most of these methods are one to three lines long and chances are that if it's easy to add a method to our new compatibility layer, it will be done by many people and the layer would grow faster
As you can probably see, my feelings towards adding stuff to Grease are mixed. Grease's idea is exactly what I am talking about: a portability layer. So it seems to be the perfect place for such methods. OTOH, adding more and more completely unrelated stuff into such a package would turn it into a giant ball of mud.

I think many of these little helper methods should make their way into the product, but am not sure if Instantiations would be willing to do that. And as long as Instantiations cannot ship upgrades independent of full product releases, this would probably be a slow process. 

So what do people think? Should we start another portability layer and maintain it on VASTGoodies? Should we extend grease and look for ways to synchronize the community version of Grease with the one that Instantiations ships with VA?

What does Instantiations think? Do you see a need for extensions to VAST classes to make porting Pharo (and also Squeak) code easier?

I know people are working on Cypress/Filetree for VAST. Is there any idea for this family of problems in Cypress? What layer do they use/make?

I am really interested in opinions from as many people as possible. Porting code from Pharo could be so much easier if we just added these little extensions to VAST.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

Adriaan van Os-3
Hi Joachim,

I don't know how long the list of issues is, but Collection>>#contains: is non-ANSI. You could suggest to the VBRegex project to use the ANSI method Collection>>#anySatisfy:.

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by jtuchel
I could solve the issue at hand by changing a few method. A new version of VBRegex is now on  VASTGoodies. It loads into a clean image in 8.6.

But the base question still remains: How do we handle these problems in the future.


Am Freitag, 14. März 2014 10:06:05 UTC+1 schrieb [hidden email]:
Hi, I am back to this topic.

While I think Richard's suggestion would be the right/best possible thing to do, it also is the one requiring most work and maintenance. So it's very likely it is not going to happen...

So here I am in the middle of an actual problem that I put myself into: yesterday I uploaded VBRegex in a new version to VASTGoodies, because I had this port for a long time now and thought it's time for others to have it available. I was surprised to see I hadn't uploaded a few months ago.

But now I remember why: the first "customer" who wanted to use it, stumbled from one problem to the next:

first, a method was missing that is implemented in Grease (Character class >> newPage). Okay, I could possibly live with declaring Grease a prerequisite for VBRegex.
A few minutes later, he asked where to find Collection>>#contains: . It turns out is a method that comes with Glorp. 

Since I use Seaside and Glorp all the time, this has never been an issue for me, but it sure will be for others. Making Glorp a prerequisite of VBRegex is sure not as acceptable as making Grease a prerequisite of VBRegex.

Now we're in the middle of the trouble: I could probably use Richard's suggestion and move Collection>>#contains: to a subappliction and add a config expression for it. But this is only part of a possible solution: What if somebody loads Glorp after VBRegex? Then They'd get load errors and scratch editions.

What now?

Joachim




Am Samstag, 11. Januar 2014 15:17:26 UTC+1 schrieb [hidden email]:
Hi VAST community,

every time I port code from Pharo, I stumble across the same class of code differences all the time.

Apart from curly braces for Array construction, these mostly are shortcut methods in the Collection hierarchy like #join:, #count:, #sum: , #allButFirstDo: and so on. The list is long.

In the beginning, I just rewrote the methods in my VA port of a monticello package, then I realized people in Pharo love these methods as they save a lot of typing. So they are being used very often in code that I want to port to VAST. If you have to change the same pieces of code every time you want to port a monticello package to VAST, this is not practicable. In the end, porting becomes so much work that you don't do it anymore and stick with what you have for as long as you can.

So the next - and possibly much better - alternative would be to add these methods to VAST, so that porting code from Pharo becomes easier every time somebody added such a method.

This brings me to a series of questions:

  1. Where should we put such methods? It is clear that many of these methods do not belong in any of the ported packages, like NeoCSV or STON or whatever. OTOH, Grease is probably also not the right place to do that, or is it?
  2. How can we make such a layer grow fast? By this I mean we should make it independent of VAST product cycles. (which is also a counter argument to Grease).
  3. How could we make such a beast a community effort? I mean, most of these methods are one to three lines long and chances are that if it's easy to add a method to our new compatibility layer, it will be done by many people and the layer would grow faster
As you can probably see, my feelings towards adding stuff to Grease are mixed. Grease's idea is exactly what I am talking about: a portability layer. So it seems to be the perfect place for such methods. OTOH, adding more and more completely unrelated stuff into such a package would turn it into a giant ball of mud.

I think many of these little helper methods should make their way into the product, but am not sure if Instantiations would be willing to do that. And as long as Instantiations cannot ship upgrades independent of full product releases, this would probably be a slow process. 

So what do people think? Should we start another portability layer and maintain it on VASTGoodies? Should we extend grease and look for ways to synchronize the community version of Grease with the one that Instantiations ships with VA?

What does Instantiations think? Do you see a need for extensions to VAST classes to make porting Pharo (and also Squeak) code easier?

I know people are working on Cypress/Filetree for VAST. Is there any idea for this family of problems in Cypress? What layer do they use/make?

I am really interested in opinions from as many people as possible. Porting code from Pharo could be so much easier if we just added these little extensions to VAST.

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by Adriaan van Os-3
Hi Adrian,

I will contact Michel Bany and suggest this. But we'll have to work with more and more non-ANSI methods coming from Pharo. 

Joachim

Am Freitag, 14. März 2014 11:27:53 UTC+1 schrieb Adriaan van Os:
Hi Joachim,

I don't know how long the list of issues is, but Collection>>#contains: is non-ANSI. You could suggest to the VBRegex project to use the ANSI method Collection>>#anySatisfy:.

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put Pharo-compatibility code

jtuchel
In reply to this post by jtuchel
HI again,


as I said in my last posting, I changed the VAST port of Regex11 to not use contains:. I also published a version without #contains: back to Cincom and I hope they'll integrate the changes in upcoming Regex versions.

BUT not we are at the next problem:

Steven Kelly suggests using #cull:cull: in Regex11. This is a method that is present in VisuaWorks and Pharo. But not in Vanilla VAST images.
It does come with Sebastian's port of Announcements, however, so chances are this change to Regex will not harm many developers. (More datils about Steven's suggestions for Regex11 are here: http://forum.world.st/Re-ANN-Regex11-version-1-4-tt4749105.html)

So 1.4.4 of Regex11 will not be easy to port to VAST, because there is the next incompatibility.

The question is: what should we do with #cull: and #cull:cull:? They sure shouldn't be in Announcements. They should possibly be in Grease, or even better in VAST.

I have no idea what to do about this. We need consensus and a plan for the future.

Joachim





--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.