WebClient License Update

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

WebClient License Update

Andreas.Raab
Hi -

After careful consideration I've decided to put WebClient under the MIT
license, and updated the repository at
http://www.squeaksource.com/WebClient.html to reflect the license change.

If you're curious why I'm making the change, the answer is really that
the code isn't all that unique and even though I'm not done with it it's
good enough to be released and by now I simply get more benefits from it
being thoroughly tested by as many people as possible. That and the (to
me surprising) amount of interest that WebClient has received in
combination with the (to me disturbing) lack of due diligence that many
users of WebClient apparently have. I think we can all take away a
lesson from this little incident that even if you find some random code
on the net it doesn't mean it's up for grabs.

Also, if I may be so bold, let me propose the "2 step process to eternal
license happiness". It's really simple:

        [ ] Did we check the license of the package?
        [ ] Did we contact the author of the package?

If you check off the above two steps whenever you're about to use some
third-party code, I think you'll find that situations like the one we've
encountered here are virtually impossible. Attach the steps to the bug
tracker if you must, but follow them.

Since you know how to verify the license status on your own, let me add
the second step of the process and once more repeat that I would rather
keep WebClient an externally loadable package. If at all possible I urge
you to look at what has been done with HTTPSocket in Squeak and adopt a
similar approach; that is provide a minimal internal HTTP interface and
allow third-party libraries (WebClient or other) to hook into this
interface. There is really no need to have everything tied together at
the hip; HTTPSocket is a reasonable facade for HTTP requests in the kernel.

Regarding write access to the WebClient repository, I'm not a fan of
making repos world-writable (this is really a sign of abandonware) but
due to the license I'm fine with granting Sven and Philippe write access
if they want it (drop me a note if you do).

Cheers,
   - Andreas

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Stéphane Ducasse
Thanks.

> Hi -
>
> After careful consideration I've decided to put WebClient under the MIT license, and updated the repository at http://www.squeaksource.com/WebClient.html to reflect the license change.
>
> If you're curious why I'm making the change, the answer is really that the code isn't all that unique and even though I'm not done with it it's good enough to be released and by now I simply get more benefits from it being thoroughly tested by as many people as possible. That and the (to me surprising) amount of interest that WebClient has received in combination with the (to me disturbing) lack of due diligence that many users of WebClient apparently have. I think we can all take away a lesson from this little incident that even if you find some random code on the net it doesn't mean it's up for grabs.
>
> Also, if I may be so bold, let me propose the "2 step process to eternal license happiness". It's really simple:
>
> [ ] Did we check the license of the package?
> [ ] Did we contact the author of the package?
>
> If you check off the above two steps whenever you're about to use some third-party code, I think you'll find that situations like the one we've encountered here are virtually impossible. Attach the steps to the bug tracker if you must, but follow them.
>
> Since you know how to verify the license status on your own, let me add the second step of the process and once more repeat that I would rather keep WebClient an externally loadable package. If at all possible I urge you to look at what has been done with HTTPSocket in Squeak and adopt a similar approach; that is provide a minimal internal HTTP interface and allow third-party libraries (WebClient or other) to hook into this interface.

we will look at that.
And do not worry I think that everybody learn a lesson in the process.

> There is really no need to have everything tied together at the hip; HTTPSocket is a reasonable facade for HTTP requests in the kernel.
>
> Regarding write access to the WebClient repository, I'm not a fan of making repos world-writable (this is really a sign of abandonware) but due to the license I'm fine with granting Sven and Philippe write access if they want it (drop me a note if you do).
>
> Cheers,
>  - Andreas
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Alexandre Bergel
In reply to this post by Andreas.Raab
Cool!

Alexandre


On 7 Sep 2010, at 03:03, Andreas Raab wrote:

> Hi -
>
> After careful consideration I've decided to put WebClient under the MIT license, and updated the repository at http://www.squeaksource.com/WebClient.html to reflect the license change.
>
> If you're curious why I'm making the change, the answer is really that the code isn't all that unique and even though I'm not done with it it's good enough to be released and by now I simply get more benefits from it being thoroughly tested by as many people as possible. That and the (to me surprising) amount of interest that WebClient has received in combination with the (to me disturbing) lack of due diligence that many users of WebClient apparently have. I think we can all take away a lesson from this little incident that even if you find some random code on the net it doesn't mean it's up for grabs.
>
> Also, if I may be so bold, let me propose the "2 step process to eternal license happiness". It's really simple:
>
> [ ] Did we check the license of the package?
> [ ] Did we contact the author of the package?
>
> If you check off the above two steps whenever you're about to use some third-party code, I think you'll find that situations like the one we've encountered here are virtually impossible. Attach the steps to the bug tracker if you must, but follow them.
>
> Since you know how to verify the license status on your own, let me add the second step of the process and once more repeat that I would rather keep WebClient an externally loadable package. If at all possible I urge you to look at what has been done with HTTPSocket in Squeak and adopt a similar approach; that is provide a minimal internal HTTP interface and allow third-party libraries (WebClient or other) to hook into this interface. There is really no need to have everything tied together at the hip; HTTPSocket is a reasonable facade for HTTP requests in the kernel.
>
> Regarding write access to the WebClient repository, I'm not a fan of making repos world-writable (this is really a sign of abandonware) but due to the license I'm fine with granting Sven and Philippe write access if they want it (drop me a note if you do).
>
> Cheers,
>  - Andreas
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

garduino
In reply to this post by Andreas.Raab
Thanks you very much Andreas.

And yes, I agree we learned something.

About the two steps you mention, is what I did with regarding SPDF, so
we now have
(unfortunately) the certainty that can not use it.

About WebClient, as you know because I write you asking permit, I'm
using on my product
WebPostAutomation and I've extended (or at least documented) the way
to make "posts" using
multipart/form-data. And WebClient works very well, really thanks by
license it as MIT.

Cheers.
Germán.


2010/9/7 Andreas Raab <[hidden email]>:

> Hi -
>
> After careful consideration I've decided to put WebClient under the MIT
> license, and updated the repository at
> http://www.squeaksource.com/WebClient.html to reflect the license change.
>
> If you're curious why I'm making the change, the answer is really that the
> code isn't all that unique and even though I'm not done with it it's good
> enough to be released and by now I simply get more benefits from it being
> thoroughly tested by as many people as possible. That and the (to me
> surprising) amount of interest that WebClient has received in combination
> with the (to me disturbing) lack of due diligence that many users of
> WebClient apparently have. I think we can all take away a lesson from this
> little incident that even if you find some random code on the net it doesn't
> mean it's up for grabs.
>
> Also, if I may be so bold, let me propose the "2 step process to eternal
> license happiness". It's really simple:
>
>        [ ] Did we check the license of the package?
>        [ ] Did we contact the author of the package?
>
> If you check off the above two steps whenever you're about to use some
> third-party code, I think you'll find that situations like the one we've
> encountered here are virtually impossible. Attach the steps to the bug
> tracker if you must, but follow them.
>
> Since you know how to verify the license status on your own, let me add the
> second step of the process and once more repeat that I would rather keep
> WebClient an externally loadable package. If at all possible I urge you to
> look at what has been done with HTTPSocket in Squeak and adopt a similar
> approach; that is provide a minimal internal HTTP interface and allow
> third-party libraries (WebClient or other) to hook into this interface.
> There is really no need to have everything tied together at the hip;
> HTTPSocket is a reasonable facade for HTTP requests in the kernel.
>
> Regarding write access to the WebClient repository, I'm not a fan of making
> repos world-writable (this is really a sign of abandonware) but due to the
> license I'm fine with granting Sven and Philippe write access if they want
> it (drop me a note if you do).
>
> Cheers,
>  - Andreas
>



--
=================================================
Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
Arduino Software & Web Hosting   http://www.arduinosoftware.com
PasswordsPro  http://www.passwordspro.com
=================================================

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Philippe Marschall-2-3
In reply to this post by Andreas.Raab
On 07.09.2010 09:03, Andreas Raab wrote:

> Hi -
>
> After careful consideration I've decided to put WebClient under the MIT
> license, and updated the repository at
> http://www.squeaksource.com/WebClient.html to reflect the license change.
>
> If you're curious why I'm making the change, the answer is really that
> the code isn't all that unique and even though I'm not done with it it's
> good enough to be released and by now I simply get more benefits from it
> being thoroughly tested by as many people as possible. That and the (to
> me surprising) amount of interest that WebClient has received in
> combination with the (to me disturbing) lack of due diligence that many
> users of WebClient apparently have. I think we can all take away a
> lesson from this little incident that even if you find some random code
> on the net it doesn't mean it's up for grabs.
>
> Also, if I may be so bold, let me propose the "2 step process to eternal
> license happiness". It's really simple:
>
>     [ ] Did we check the license of the package?
>     [ ] Did we contact the author of the package?
>
> If you check off the above two steps whenever you're about to use some
> third-party code, I think you'll find that situations like the one we've
> encountered here are virtually impossible. Attach the steps to the bug
> tracker if you must, but follow them.
>
> Since you know how to verify the license status on your own, let me add
> the second step of the process and once more repeat that I would rather
> keep WebClient an externally loadable package. If at all possible I urge
> you to look at what has been done with HTTPSocket in Squeak and adopt a
> similar approach; that is provide a minimal internal HTTP interface and
> allow third-party libraries (WebClient or other) to hook into this
> interface. There is really no need to have everything tied together at
> the hip; HTTPSocket is a reasonable facade for HTTP requests in the kernel.
>
> Regarding write access to the WebClient repository, I'm not a fan of
> making repos world-writable (this is really a sign of abandonware) but
> due to the license I'm fine with granting Sven and Philippe write access
> if they want it (drop me a note if you do).

Did you change your position towards #squeakToUtf8 and string
concatenation (I didn't follow the entire previous thread)? Otherwise it
would probably make more sense if I continue sending patches.

Now don't get me wrong, you're of course allowed to write code whichever
way you see fit and reject anything that doesn't follow this. But the
same goes for me. And for me it's important that code loads without any
overrides. So I'm probably going to set up a WebClientPharo or
WebClientPhilippe or something repository.

Cheers
Philippe


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Igor Stasenko
On 7 September 2010 21:15, Philippe Marschall <[hidden email]> wrote:

> On 07.09.2010 09:03, Andreas Raab wrote:
>> Hi -
>>
>> After careful consideration I've decided to put WebClient under the MIT
>> license, and updated the repository at
>> http://www.squeaksource.com/WebClient.html to reflect the license change.
>>
>> If you're curious why I'm making the change, the answer is really that
>> the code isn't all that unique and even though I'm not done with it it's
>> good enough to be released and by now I simply get more benefits from it
>> being thoroughly tested by as many people as possible. That and the (to
>> me surprising) amount of interest that WebClient has received in
>> combination with the (to me disturbing) lack of due diligence that many
>> users of WebClient apparently have. I think we can all take away a
>> lesson from this little incident that even if you find some random code
>> on the net it doesn't mean it's up for grabs.
>>
>> Also, if I may be so bold, let me propose the "2 step process to eternal
>> license happiness". It's really simple:
>>
>>     [ ] Did we check the license of the package?
>>     [ ] Did we contact the author of the package?
>>
>> If you check off the above two steps whenever you're about to use some
>> third-party code, I think you'll find that situations like the one we've
>> encountered here are virtually impossible. Attach the steps to the bug
>> tracker if you must, but follow them.
>>
>> Since you know how to verify the license status on your own, let me add
>> the second step of the process and once more repeat that I would rather
>> keep WebClient an externally loadable package. If at all possible I urge
>> you to look at what has been done with HTTPSocket in Squeak and adopt a
>> similar approach; that is provide a minimal internal HTTP interface and
>> allow third-party libraries (WebClient or other) to hook into this
>> interface. There is really no need to have everything tied together at
>> the hip; HTTPSocket is a reasonable facade for HTTP requests in the kernel.
>>
>> Regarding write access to the WebClient repository, I'm not a fan of
>> making repos world-writable (this is really a sign of abandonware) but
>> due to the license I'm fine with granting Sven and Philippe write access
>> if they want it (drop me a note if you do).
>
> Did you change your position towards #squeakToUtf8 and string
> concatenation (I didn't follow the entire previous thread)? Otherwise it
> would probably make more sense if I continue sending patches.
>
> Now don't get me wrong, you're of course allowed to write code whichever
> way you see fit and reject anything that doesn't follow this. But the
> same goes for me. And for me it's important that code loads without any
> overrides. So I'm probably going to set up a WebClientPharo or
> WebClientPhilippe or something repository.
>

How about extra package in same repository (WebClient)?
This is, of course, if you can't avoid it.

> Cheers
> Philippe
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Philippe Marschall-2-3
On 08.09.2010 08:35, Igor Stasenko wrote:

> On 7 September 2010 21:15, Philippe Marschall <[hidden email]> wrote:
>> On 07.09.2010 09:03, Andreas Raab wrote:
>>> Hi -
>>>
>>> After careful consideration I've decided to put WebClient under the MIT
>>> license, and updated the repository at
>>> http://www.squeaksource.com/WebClient.html to reflect the license change.
>>>
>>> If you're curious why I'm making the change, the answer is really that
>>> the code isn't all that unique and even though I'm not done with it it's
>>> good enough to be released and by now I simply get more benefits from it
>>> being thoroughly tested by as many people as possible. That and the (to
>>> me surprising) amount of interest that WebClient has received in
>>> combination with the (to me disturbing) lack of due diligence that many
>>> users of WebClient apparently have. I think we can all take away a
>>> lesson from this little incident that even if you find some random code
>>> on the net it doesn't mean it's up for grabs.
>>>
>>> Also, if I may be so bold, let me propose the "2 step process to eternal
>>> license happiness". It's really simple:
>>>
>>>     [ ] Did we check the license of the package?
>>>     [ ] Did we contact the author of the package?
>>>
>>> If you check off the above two steps whenever you're about to use some
>>> third-party code, I think you'll find that situations like the one we've
>>> encountered here are virtually impossible. Attach the steps to the bug
>>> tracker if you must, but follow them.
>>>
>>> Since you know how to verify the license status on your own, let me add
>>> the second step of the process and once more repeat that I would rather
>>> keep WebClient an externally loadable package. If at all possible I urge
>>> you to look at what has been done with HTTPSocket in Squeak and adopt a
>>> similar approach; that is provide a minimal internal HTTP interface and
>>> allow third-party libraries (WebClient or other) to hook into this
>>> interface. There is really no need to have everything tied together at
>>> the hip; HTTPSocket is a reasonable facade for HTTP requests in the kernel.
>>>
>>> Regarding write access to the WebClient repository, I'm not a fan of
>>> making repos world-writable (this is really a sign of abandonware) but
>>> due to the license I'm fine with granting Sven and Philippe write access
>>> if they want it (drop me a note if you do).
>>
>> Did you change your position towards #squeakToUtf8 and string
>> concatenation (I didn't follow the entire previous thread)? Otherwise it
>> would probably make more sense if I continue sending patches.
>>
>> Now don't get me wrong, you're of course allowed to write code whichever
>> way you see fit and reject anything that doesn't follow this. But the
>> same goes for me. And for me it's important that code loads without any
>> overrides. So I'm probably going to set up a WebClientPharo or
>> WebClientPhilippe or something repository.
>>
>
> How about extra package in same repository (WebClient)?

I believe I just addressed that in the previous paragraph.

Cheers
Philippe


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Andreas.Raab
In reply to this post by Andreas.Raab
Phillipe wrote:
 > Did you change your position towards #squeakToUtf8 and string
 > concatenation (I didn't follow the entire previous thread)?

Implicitly yes, but let's discuss this. You're saying you want WebClient
"without overrides" but is this really what you mean? The only reason
these methods are marked overrides is so that they don't kill your
system if the methods themselves get added to the system at some point.
For example, Grease currently adds extension methods for
Collection>>sorted but these methods are already in Squeak and while
nothing harmful happens if you load Grease, unloading it will destroy
several methods. As a consequence it is vastly advantageous to mark
methods as overrides if they have even the slightest possibility to
conflict (but of course if you'd rather have them straightforward
extensions, I have no problems with that).

As for integrating the changes itself, I think that we're talking two
very different issues here. I suspect that the only objection to
#squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their
name. I don't think you'd have any objection if they would've been
called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish
attitude from my point of view.

For string concatenation on the other hand, we're basically talking
about dispersing a whole load of FUD about all the things that "may" go
wrong. Fact is, nothing actually *does* go wrong with the change, but
the change does fix situations that are *very* difficult to handle
otherwise. One of the unfortunate realities of string concatenation is
that it's very often used around error messages and logging, often in
corner cases that aren't well tested, like:

<some impossible condition> ifTrue:[
        self log: 'Found impossible condition: ', foo.
].

The problem with these uses is that it's quite easy to forget some
asString, or #printString (for example, if you generally had expected
foo to be a string but in the impossible condition it's actually nil)
and when you hit the condition your logging screws up and instead of
getting informed about the impossible condition the program quits due to
the error. In fact, I'm willing to bet that there's at least one bug in
Pharo and/or Seaside which is the result of erroneous string
concatenation of this kind. It's just very easy to get wrong.

The other relevant bit about this change is that it's entirely
type-safe. I.e., the return type does not depend on the argument, the
return type is always a string. That means that the change does *not*
introduce failures down the road due to type violations. It *does* mean
that if you have a bug in your code you might print "a SomethingOrOther"
when you didn't mean to, but unless you're the kind of person who
believes that a program that doesn't raise an error must be obviously
correct, this makes little difference. The only difference it makes is
that your program will not abort when the *intention* is so utterly obvious.

Put differently, the change adds nothing but robustness to the system.
There is really no data to back up the FUD about all the changes that
"may" go wrong, but from my experience there is ample evidence to show
that logging and error handling involving string concatenation is highly
susceptible to this kind of problem and generally not very well tested
and difficult to QA. And the major use of string concatenation is right
in these areas.

Last but not least, programming is about efficiency. Why would you waste
your time in typing 'The result is: ', x printString" when you could
just type "'The result is: ', x" and spare the time to write all the
extra characters? Do you realize how much time you've wasted sprinkling
all those #printString and #asString around WebClient?

Cheers,
   - Andreas

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Miguel Cobá
El mié, 08-09-2010 a las 19:27 -0700, Andreas Raab escribió:

It is amazing how square-minded you are. All this diatribe was nothing
but to defend the current state of the code you write.

> Phillipe wrote:
>  > Did you change your position towards #squeakToUtf8 and string
>  > concatenation (I didn't follow the entire previous thread)?
> Implicitly yes, but let's discuss this. You're saying you want WebClient
> "without overrides" but is this really what you mean? The only reason
> these methods are marked overrides is so that they don't kill your
> system if the methods themselves get added to the system at some point.
> For example, Grease currently adds extension methods for
> Collection>>sorted but these methods are already in Squeak and while
> nothing harmful happens if you load Grease, unloading it will destroy
> several methods. As a consequence it is vastly advantageous to mark
> methods as overrides if they have even the slightest possibility to
> conflict (but of course if you'd rather have them straightforward
> extensions, I have no problems with that).

So now overrides are encouraged?

>
> As for integrating the changes itself, I think that we're talking two
> very different issues here. I suspect that the only objection to
> #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their
> name. I don't think you'd have any objection if they would've been
> called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish
> attitude from my point of view.
>

Well then lets rename withBlanksTrimmed to, lets say,
windowsWithBlankTrimmed, or maybe lispWithBlankTrimmed, or better yet,
asdfAsdfASDF.
The name must be right, no matter what you personally think.

> For string concatenation on the other hand, we're basically talking
> about dispersing a whole load of FUD about all the things that "may" go
> wrong. Fact is, nothing actually *does* go wrong with the change, but
> the change does fix situations that are *very* difficult to handle
> otherwise. One of the unfortunate realities of string concatenation is
> that it's very often used around error messages and logging, often in
> corner cases that aren't well tested, like:
>
> <some impossible condition> ifTrue:[
> self log: 'Found impossible condition: ', foo.
> ].
>

Maybe in practice happens. That is not a excuse to put the burden in the
environment and let the software that relies in wrong code remain
unfixed. If some package hits the error, the right thing is to fix the
package, not to put trash in the environment just in case. This promotes
mean software

> The problem with these uses is that it's quite easy to forget some
> asString, or #printString (for example, if you generally had expected
> foo to be a string but in the impossible condition it's actually nil)
> and when you hit the condition your logging screws up and instead of
> getting informed about the impossible condition the program quits due to
> the error. In fact, I'm willing to bet that there's at least one bug in
> Pharo and/or Seaside which is the result of erroneous string
> concatenation of this kind. It's just very easy to get wrong.

Idem. If that is the case, then Seaside must be corrected.

>
> The other relevant bit about this change is that it's entirely
> type-safe. I.e., the return type does not depend on the argument, the
> return type is always a string. That means that the change does *not*
> introduce failures down the road due to type violations. It *does* mean
> that if you have a bug in your code you might print "a SomethingOrOther"
> when you didn't mean to, but unless you're the kind of person who
> believes that a program that doesn't raise an error must be obviously
> correct, this makes little difference. The only difference it makes is
> that your program will not abort when the *intention* is so utterly obvious.
>

Wrong, I prefer it abort loudly so I now that there is something wrong
in the package and I can fix it, not hide it because the environment
somehow worked
 around it.
> Put differently, the change adds nothing but robustness to the system.
> There is really no data to back up the FUD about all the changes that
> "may" go wrong, but from my experience there is ample evidence to show
> that logging and error handling involving string concatenation is highly
> susceptible to this kind of problem and generally not very well tested
> and difficult to QA. And the major use of string concatenation is right
> in these areas.

So your experience is real data to back up your claims but others isn't.
BS!

>
> Last but not least, programming is about efficiency.

Umm, wasn't Smalltalk about intention-reveling code. Wasn't adviced
everytime that premature optimization is evil. Since when  Smalltalk was
about efficiency. Isn't C programming.

>  Why would you waste
> your time in typing 'The result is: ', x printString" when you could
> just type "'The result is: ', x" and spare the time to write all the
> extra characters? Do you realize how much time you've wasted sprinkling
> all those #printString and #asString around WebClient?

So, if you are tagging the  effort that they put in modifying WebClient
as wasted time, then I think there is nothing to discuss between the
possible contributors and you. This is not a dialog or a discussion is
an intransigent monologe.

--
Miguel Cobá
http://miguel.leugim.com.mx


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Henrik Sperre Johansen
In reply to this post by Andreas.Raab

On Sep 9, 2010, at 4:27 50AM, Andreas Raab wrote:

> Phillipe wrote:
> > Did you change your position towards #squeakToUtf8 and string
> > concatenation (I didn't follow the entire previous thread)?
>
> Implicitly yes, but let's discuss this. You're saying you want WebClient "without overrides" but is this really what you mean? The only reason these methods are marked overrides is so that they don't kill your system if the methods themselves get added to the system at some point. For example, Grease currently adds extension methods for Collection>>sorted but these methods are already in Squeak and while nothing harmful happens if you load Grease, unloading it will destroy several methods. As a consequence it is vastly advantageous to mark methods as overrides if they have even the slightest possibility to conflict (but of course if you'd rather have them straightforward extensions, I have no problems with that).
>
> As for integrating the changes itself, I think that we're talking two very different issues here. I suspect that the only objection to #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their name. I don't think you'd have any objection if they would've been called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish attitude from my point of view.

Yeesh.
I can only speak for myself, but my objection to the methods is more that I don't think knowing how to change its contents to a specific encoding should be the responsibility of the String class.
Yes, there are plenty of other comparable delegations of responsibility, but in this case it is easily avoided.
Sure though, it's a bit faster in some cases than the alternatives using convertToWithConverter:, or convertToEncoding: (at least with a symbol -> converter cache added),
but with the general improvements to UTF8TextConverter the speedup is no longer measured in the orders of magnitudes, where it might feel worth it (to me).


>
> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>
> <some impossible condition> ifTrue:[
> self log: 'Found impossible condition: ', foo.
> ].
>
> The problem with these uses is that it's quite easy to forget some asString, or #printString (for example, if you generally had expected foo to be a string but in the impossible condition it's actually nil) and when you hit the condition your logging screws up and instead of getting informed about the impossible condition the program quits due to the error. In fact, I'm willing to bet that there's at least one bug in Pharo and/or Seaside which is the result of erroneous string concatenation of this kind. It's just very easy to get wrong.
>
> The other relevant bit about this change is that it's entirely type-safe. I.e., the return type does not depend on the argument, the return type is always a string. That means that the change does *not* introduce failures down the road due to type violations. It *does* mean that if you have a bug in your code you might print "a SomethingOrOther" when you didn't mean to, but unless you're the kind of person who believes that a program that doesn't raise an error must be obviously correct, this makes little difference. The only difference it makes is that your program will not abort when the *intention* is so utterly obvious.
>
> Put differently, the change adds nothing but robustness to the system. There is really no data to back up the FUD about all the changes that "may" go wrong, but from my experience there is ample evidence to show that logging and error handling involving string concatenation is highly susceptible to this kind of problem and generally not very well tested and difficult to QA. And the major use of string concatenation is right in these areas.

While I see some value in your arguments, in addition to Pharo, at least the VW, GST and ST-X dialects, plus the ANSI standard, do not allow it.
IE, if you want to write your code the least bit portable, you include the ugly as/printString sends.

Cheers,
Henry
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Douglas Brebner
In reply to this post by Andreas.Raab
  On 09/09/2010 03:27, Andreas Raab wrote:

> For string concatenation on the other hand, we're basically talking
> about dispersing a whole load of FUD about all the things that "may"
> go wrong. Fact is, nothing actually *does* go wrong with the change,
> but the change does fix situations that are *very* difficult to handle
> otherwise. One of the unfortunate realities of string concatenation is
> that it's very often used around error messages and logging, often in
> corner cases that aren't well tested, like:
>
> <some impossible condition> ifTrue:[
>     self log: 'Found impossible condition: ', foo.
> ].
>

I'm not sure how important this is considered in Squeak/Pharo,
especially in this context, but isn't this sort of output string
manipulation a definite no-no from an i18n viewpoint?

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Philippe Marschall-2-3
In reply to this post by Andreas.Raab
On 09.09.2010 04:27, Andreas Raab wrote:
> Phillipe wrote:
>> Did you change your position towards #squeakToUtf8 and string
>> concatenation (I didn't follow the entire previous thread)?
>
> Implicitly yes,

That's fine.

> but let's discuss this.

Personal coding styles are a matter of taste, no way we ever reach a
consensus (the discussion that will go nowhere has already started).

> You're saying you want WebClient
> "without overrides" but is this really what you mean? The only reason
> these methods are marked overrides is so that they don't kill your
> system if the methods themselves get added to the system at some point.
> For example, Grease currently adds extension methods for
> Collection>>sorted but these methods are already in Squeak and while
> nothing harmful happens if you load Grease, unloading it will destroy
> several methods. As a consequence it is vastly advantageous to mark
> methods as overrides if they have even the slightest possibility to
> conflict (but of course if you'd rather have them straightforward
> extensions, I have no problems with that).

We need to fix that, thanks for pointing that out.

> As for integrating the changes itself, I think that we're talking two
> very different issues here. I suspect that the only objection to
> #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their
> name. I don't think you'd have any objection if they would've been
> called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish
> attitude from my point of view.
>
> For string concatenation on the other hand, we're basically talking
> about dispersing a whole load of FUD about all the things that "may" go
> wrong. Fact is, nothing actually *does* go wrong with the change, but
> the change does fix situations that are *very* difficult to handle
> otherwise. One of the unfortunate realities of string concatenation is
> that it's very often used around error messages and logging, often in
> corner cases that aren't well tested, like:
>
> <some impossible condition> ifTrue:[
>     self log: 'Found impossible condition: ', foo.
> ].
>
> The problem with these uses is that it's quite easy to forget some
> asString, or #printString (for example, if you generally had expected
> foo to be a string but in the impossible condition it's actually nil)
> and when you hit the condition your logging screws up and instead of
> getting informed about the impossible condition the program quits due to
> the error. In fact, I'm willing to bet that there's at least one bug in
> Pharo and/or Seaside which is the result of erroneous string
> concatenation of this kind. It's just very easy to get wrong.
>
> The other relevant bit about this change is that it's entirely
> type-safe. I.e., the return type does not depend on the argument, the
> return type is always a string. That means that the change does *not*
> introduce failures down the road due to type violations. It *does* mean
> that if you have a bug in your code you might print "a SomethingOrOther"
> when you didn't mean to, but unless you're the kind of person who
> believes that a program that doesn't raise an error must be obviously
> correct, this makes little difference. The only difference it makes is
> that your program will not abort when the *intention* is so utterly
> obvious.
>
> Put differently, the change adds nothing but robustness to the system.
> There is really no data to back up the FUD about all the changes that
> "may" go wrong, but from my experience there is ample evidence to show
> that logging and error handling involving string concatenation is highly
> susceptible to this kind of problem and generally not very well tested
> and difficult to QA. And the major use of string concatenation is right
> in these areas.
>
> Last but not least, programming is about efficiency. Why would you waste
> your time in typing 'The result is: ', x printString" when you could
> just type "'The result is: ', x" and spare the time to write all the
> extra characters? Do you realize how much time you've wasted sprinkling
> all those #printString and #asString around WebClient?

Cheers
Philippe


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Stéphane Ducasse
In reply to this post by Andreas.Raab
> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>
> <some impossible condition> ifTrue:[
> self log: 'Found impossible condition: ', foo.
> ].

I do not buy this argument. We should fix the code and not break the libraries.
Your argument is bogus. We do not want such kind of extensions that opens the door to really sloppy code.

Then we should avoid overrides as much as possible.

Stef


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Stéphane Ducasse
In reply to this post by Andreas.Raab
>
> Implicitly yes, but let's discuss this. You're saying you want WebClient "without overrides" but is this really what you mean? The only reason these methods are marked overrides is so that they don't kill your system if the methods themselves get added to the system at some point. For example, Grease currently adds extension methods for Collection>>sorted but these methods are already in Squeak and while nothing harmful happens if you load Grease, unloading it will destroy several methods. As a consequence it is vastly advantageous to mark methods as overrides if they have even the slightest possibility to conflict (but of course if you'd rather have them straightforward extensions, I have no problems with that).

may be we should change the semantics of unload with overriding (without *overrides*): restore the hidden
method that a new load can be do.

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Stéphane Ducasse
In reply to this post by Andreas.Raab
BTW andreas I was reading your changes in squeak about fileList -> FileServices and I noticed that there is a bug
there is one method missing suffixOf: in FileServices and I sent a notification in squeak-dev so may be you see it.
I did not have the time to produce a fix but this is an easy one.

Stef


On Sep 9, 2010, at 4:27 AM, Andreas Raab wrote:

> Phillipe wrote:
> > Did you change your position towards #squeakToUtf8 and string
> > concatenation (I didn't follow the entire previous thread)?
>
> Implicitly yes, but let's discuss this. You're saying you want WebClient "without overrides" but is this really what you mean? The only reason these methods are marked overrides is so that they don't kill your system if the methods themselves get added to the system at some point. For example, Grease currently adds extension methods for Collection>>sorted but these methods are already in Squeak and while nothing harmful happens if you load Grease, unloading it will destroy several methods. As a consequence it is vastly advantageous to mark methods as overrides if they have even the slightest possibility to conflict (but of course if you'd rather have them straightforward extensions, I have no problems with that).
>
> As for integrating the changes itself, I think that we're talking two very different issues here. I suspect that the only objection to #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their name. I don't think you'd have any objection if they would've been called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish attitude from my point of view.
>
> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>
> <some impossible condition> ifTrue:[
> self log: 'Found impossible condition: ', foo.
> ].
>
> The problem with these uses is that it's quite easy to forget some asString, or #printString (for example, if you generally had expected foo to be a string but in the impossible condition it's actually nil) and when you hit the condition your logging screws up and instead of getting informed about the impossible condition the program quits due to the error. In fact, I'm willing to bet that there's at least one bug in Pharo and/or Seaside which is the result of erroneous string concatenation of this kind. It's just very easy to get wrong.
>
> The other relevant bit about this change is that it's entirely type-safe. I.e., the return type does not depend on the argument, the return type is always a string. That means that the change does *not* introduce failures down the road due to type violations. It *does* mean that if you have a bug in your code you might print "a SomethingOrOther" when you didn't mean to, but unless you're the kind of person who believes that a program that doesn't raise an error must be obviously correct, this makes little difference. The only difference it makes is that your program will not abort when the *intention* is so utterly obvious.
>
> Put differently, the change adds nothing but robustness to the system. There is really no data to back up the FUD about all the changes that "may" go wrong, but from my experience there is ample evidence to show that logging and error handling involving string concatenation is highly susceptible to this kind of problem and generally not very well tested and difficult to QA. And the major use of string concatenation is right in these areas.
>
> Last but not least, programming is about efficiency. Why would you waste your time in typing 'The result is: ', x printString" when you could just type "'The result is: ', x" and spare the time to write all the extra characters? Do you realize how much time you've wasted sprinkling all those #printString and #asString around WebClient?
>
> Cheers,
>  - Andreas
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

NorbertHartl
Hey guys,

did I miss something and Andreas is reading the pharo mailing list? If not than he is not included in cc: like Phillipe is.

my 2 cents,

Norbert

On 09.09.2010, at 18:18, Stéphane Ducasse wrote:

> BTW andreas I was reading your changes in squeak about fileList -> FileServices and I noticed that there is a bug
> there is one method missing suffixOf: in FileServices and I sent a notification in squeak-dev so may be you see it.
> I did not have the time to produce a fix but this is an easy one.
>
> Stef
>
>
> On Sep 9, 2010, at 4:27 AM, Andreas Raab wrote:
>
>> Phillipe wrote:
>>> Did you change your position towards #squeakToUtf8 and string
>>> concatenation (I didn't follow the entire previous thread)?
>>
>> Implicitly yes, but let's discuss this. You're saying you want WebClient "without overrides" but is this really what you mean? The only reason these methods are marked overrides is so that they don't kill your system if the methods themselves get added to the system at some point. For example, Grease currently adds extension methods for Collection>>sorted but these methods are already in Squeak and while nothing harmful happens if you load Grease, unloading it will destroy several methods. As a consequence it is vastly advantageous to mark methods as overrides if they have even the slightest possibility to conflict (but of course if you'd rather have them straightforward extensions, I have no problems with that).
>>
>> As for integrating the changes itself, I think that we're talking two very different issues here. I suspect that the only objection to #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their name. I don't think you'd have any objection if they would've been called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish attitude from my point of view.
>>
>> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>>
>> <some impossible condition> ifTrue:[
>> self log: 'Found impossible condition: ', foo.
>> ].
>>
>> The problem with these uses is that it's quite easy to forget some asString, or #printString (for example, if you generally had expected foo to be a string but in the impossible condition it's actually nil) and when you hit the condition your logging screws up and instead of getting informed about the impossible condition the program quits due to the error. In fact, I'm willing to bet that there's at least one bug in Pharo and/or Seaside which is the result of erroneous string concatenation of this kind. It's just very easy to get wrong.
>>
>> The other relevant bit about this change is that it's entirely type-safe. I.e., the return type does not depend on the argument, the return type is always a string. That means that the change does *not* introduce failures down the road due to type violations. It *does* mean that if you have a bug in your code you might print "a SomethingOrOther" when you didn't mean to, but unless you're the kind of person who believes that a program that doesn't raise an error must be obviously correct, this makes little difference. The only difference it makes is that your program will not abort when the *intention* is so utterly obvious.
>>
>> Put differently, the change adds nothing but robustness to the system. There is really no data to back up the FUD about all the changes that "may" go wrong, but from my experience there is ample evidence to show that logging and error handling involving string concatenation is highly susceptible to this kind of problem and generally not very well tested and difficult to QA. And the major use of string concatenation is right in these areas.
>>
>> Last but not least, programming is about efficiency. Why would you waste your time in typing 'The result is: ', x printString" when you could just type "'The result is: ', x" and spare the time to write all the extra characters? Do you realize how much time you've wasted sprinkling all those #printString and #asString around WebClient?
>>
>> Cheers,
>> - Andreas
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Stéphane Ducasse
I do not know.
But I posted it to Squeak-dev

On Sep 10, 2010, at 4:40 PM, Norbert Hartl wrote:

> Hey guys,
>
> did I miss something and Andreas is reading the pharo mailing list? If not than he is not included in cc: like Phillipe is.
>
> my 2 cents,
>
> Norbert
>
> On 09.09.2010, at 18:18, Stéphane Ducasse wrote:
>
>> BTW andreas I was reading your changes in squeak about fileList -> FileServices and I noticed that there is a bug
>> there is one method missing suffixOf: in FileServices and I sent a notification in squeak-dev so may be you see it.
>> I did not have the time to produce a fix but this is an easy one.
>>
>> Stef
>>
>>
>> On Sep 9, 2010, at 4:27 AM, Andreas Raab wrote:
>>
>>> Phillipe wrote:
>>>> Did you change your position towards #squeakToUtf8 and string
>>>> concatenation (I didn't follow the entire previous thread)?
>>>
>>> Implicitly yes, but let's discuss this. You're saying you want WebClient "without overrides" but is this really what you mean? The only reason these methods are marked overrides is so that they don't kill your system if the methods themselves get added to the system at some point. For example, Grease currently adds extension methods for Collection>>sorted but these methods are already in Squeak and while nothing harmful happens if you load Grease, unloading it will destroy several methods. As a consequence it is vastly advantageous to mark methods as overrides if they have even the slightest possibility to conflict (but of course if you'd rather have them straightforward extensions, I have no problems with that).
>>>
>>> As for integrating the changes itself, I think that we're talking two very different issues here. I suspect that the only objection to #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their name. I don't think you'd have any objection if they would've been called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish attitude from my point of view.
>>>
>>> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>>>
>>> <some impossible condition> ifTrue:[
>>> self log: 'Found impossible condition: ', foo.
>>> ].
>>>
>>> The problem with these uses is that it's quite easy to forget some asString, or #printString (for example, if you generally had expected foo to be a string but in the impossible condition it's actually nil) and when you hit the condition your logging screws up and instead of getting informed about the impossible condition the program quits due to the error. In fact, I'm willing to bet that there's at least one bug in Pharo and/or Seaside which is the result of erroneous string concatenation of this kind. It's just very easy to get wrong.
>>>
>>> The other relevant bit about this change is that it's entirely type-safe. I.e., the return type does not depend on the argument, the return type is always a string. That means that the change does *not* introduce failures down the road due to type violations. It *does* mean that if you have a bug in your code you might print "a SomethingOrOther" when you didn't mean to, but unless you're the kind of person who believes that a program that doesn't raise an error must be obviously correct, this makes little difference. The only difference it makes is that your program will not abort when the *intention* is so utterly obvious.
>>>
>>> Put differently, the change adds nothing but robustness to the system. There is really no data to back up the FUD about all the changes that "may" go wrong, but from my experience there is ample evidence to show that logging and error handling involving string concatenation is highly susceptible to this kind of problem and generally not very well tested and difficult to QA. And the major use of string concatenation is right in these areas.
>>>
>>> Last but not least, programming is about efficiency. Why would you waste your time in typing 'The result is: ', x printString" when you could just type "'The result is: ', x" and spare the time to write all the extra characters? Do you realize how much time you've wasted sprinkling all those #printString and #asString around WebClient?
>>>
>>> Cheers,
>>> - Andreas
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Andreas.Raab
In reply to this post by Stéphane Ducasse
On 9/9/2010 3:34 AM, Stéphane Ducasse wrote:
>> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>>
>> <some impossible condition>  ifTrue:[
>> self log: 'Found impossible condition: ', foo.
>> ].
>
> I do not buy this argument. We should fix the code and not break the libraries.

Yes, that is the usual FUD. Can you clarify how that change breaks any
libraries, where and when exactly? Because it doesn't.

> Your argument is bogus.

Which one? I made about five different arguments from that this change
doesn't break anything, over it preserving the type semantics, that
string concatenation often occurs in less tested code, that it is
error-prone for no good reason, up until the efficiency argument.

Or is it simply "I don't like this guy so matter what he says I will not
listen"?

> We do not want such kind of extensions that opens the door to really sloppy code.

And that would be sloppy code because ... ? It's more efficient to write
it that way? Is that your measure of sloppyness? If not how do you
distinguish "sloppy" code from other perfectly well accepted patterns
like the type coercions happening in arithmetic? You *could* write "4
asFloat + 3.0" instead of "4 + 3.0" you know.

> Then we should avoid overrides as much as possible.

I wholeheartedly agree but did you actually follow the Grease
discussion? The problem of not being able to remove methods after they
have been added to the base is quite real. The only way to address this
problem currently is by using overrides.

Cheers,
   - Andreas

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Andreas.Raab
In reply to this post by Henrik Sperre Johansen
On 9/9/2010 1:15 AM, Henrik Johansen wrote:

>
> On Sep 9, 2010, at 4:27 50AM, Andreas Raab wrote:
>
>> Phillipe wrote:
>>> Did you change your position towards #squeakToUtf8 and string
>>> concatenation (I didn't follow the entire previous thread)?
>>
>> Implicitly yes, but let's discuss this. You're saying you want WebClient "without overrides" but is this really what you mean? The only reason these methods are marked overrides is so that they don't kill your system if the methods themselves get added to the system at some point. For example, Grease currently adds extension methods for Collection>>sorted but these methods are already in Squeak and while nothing harmful happens if you load Grease, unloading it will destroy several methods. As a consequence it is vastly advantageous to mark methods as overrides if they have even the slightest possibility to conflict (but of course if you'd rather have them straightforward extensions, I have no problems with that).
>>
>> As for integrating the changes itself, I think that we're talking two very different issues here. I suspect that the only objection to #squeakToUtf8 and #utf8ToSqueak is that they have "Squeak" in their name. I don't think you'd have any objection if they would've been called #utf8Encoded and #utf8Decoded. Which, honestly, is a childish attitude from my point of view.
>
> Yeesh.
> I can only speak for myself, but my objection to the methods is more that I don't think knowing how to change its contents to a specific encoding should be the responsibility of the String class.
> Yes, there are plenty of other comparable delegations of responsibility, but in this case it is easily avoided.
> Sure though, it's a bit faster in some cases than the alternatives using convertToWithConverter:, or convertToEncoding: (at least with a symbol ->  converter cache added),
> but with the general improvements to UTF8TextConverter the speedup is no longer measured in the orders of magnitudes, where it might feel worth it (to me).

Which isn't really the argument. The utf8 encoding and decoding methods
are by far the most commonly used conversion methods. They are similar
to methods such as #zipped/#unzipped, or #base64Encoded/#base64Decoded.
I actually have some code that literally uses:

        data := aString squeakToUtf8 zipped base64Encoded.

Compare that with the (exactly) equivalent version that doesn't have the
utility methods:

(Base64MimeConverter mimeEncode:
     (((GZipWriteStream on:
         (RWBinaryOrTextStream on: String new))
             nextPutAll: (aString convertToWithConverter:
UTF8TextConverter new);
             close;
             encodedStream) contents) readStream) contents

Thus, the basic claim here is that it's worthwhile to have shorthand
methods for conversion to/from utf8 because it's so prevalent.

As for why it's called squeakToUtf8 and utf8ToSqueak, that's simply
because there's a family of conversion methods in String which use the
squeakToXXX/xxxToSqueak pattern (remnants of which you can still find in
Pharo). These methods got first introduced around Squeak 3.8 to deal
with various issues during m17n integration and have been in Squeak ever
since.

>> Put differently, the change adds nothing but robustness to the system. There is really no data to back up the FUD about all the changes that "may" go wrong, but from my experience there is ample evidence to show that logging and error handling involving string concatenation is highly susceptible to this kind of problem and generally not very well tested and difficult to QA. And the major use of string concatenation is right in these areas.
>
> While I see some value in your arguments, in addition to Pharo, at least the VW, GST and ST-X dialects, plus the ANSI standard, do not allow it.
> IE, if you want to write your code the least bit portable, you include the ugly as/printString sends.

Unless you convince people to change things. Would make a fine addition
to Grease, too :-)

Cheers,
   - Andreas

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: WebClient License Update

Stéphane Ducasse
In reply to this post by Andreas.Raab
Bonjour cher andreas

>>> For string concatenation on the other hand, we're basically talking about dispersing a whole load of FUD about all the things that "may" go wrong. Fact is, nothing actually *does* go wrong with the change, but the change does fix situations that are *very* difficult to handle otherwise. One of the unfortunate realities of string concatenation is that it's very often used around error messages and logging, often in corner cases that aren't well tested, like:
>>>
>>> <some impossible condition>  ifTrue:[
>>> self log: 'Found impossible condition: ', foo.
>>> ].
>>
>> I do not buy this argument. We should fix the code and not break the libraries.
>
> Yes, that is the usual FUD.

I know that this is not FUD :) with your code idiom people will start to concatenate object and strings
and slowly this will be a terrible mess. Of course you code does not break anything right now. I'm not saying that.
Let me clear on that: you can add , on Object if you want but not in Pharo.
We do not want coding patterns that do not scale because we will end up in messy libraries.
Now you can do whatever you want on your system and we will not use WebClient.
There is no problem with that.

> Can you clarify how that change breaks any libraries, where and when exactly? Because it doesn't.
>
>> Your argument is bogus.
>
> Which one? I made about five different arguments from that this change doesn't break anything, over it preserving the type semantics, that string concatenation often occurs in less tested code, that it is error-prone for no good reason, up until the efficiency argument.
>
> Or is it simply "I don't like this guy so matter what he says I will not listen"?

I let you judge. :)

I have no energy for this kind of discussion.
I'm over little war and disputes. I'm clean I took the red pill and this is pharo for me.
I'm in positive energy, happy people and beautiful flower world now even without smoking strange substances.
I decided that I want to build a beautiful world. No energy for the rest. Sorry to cut our non-discussion.


A fun note for the headbangers around :)
        http://www.youtube.com/watch?v=CrctcJqfpXU
Suicidal Tendencies - You cannot bring me down (with the bassist of metallica - this is fun to see the gesture of mike muir strange guy but crazy band) I saw them live and it was quite cool (with slayer, megadeth and Testament).


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project