Squeak package update

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

Squeak package update

NorbertHartl
Hi,

I've struggled some time with encodeForHTTP because it does different things in pharo and gemstone (comes with the Squeak package). Now I saw that the squeak implementation has changed the same as in pharo (or vice versa, I don't know).  Reason enough to change the the implementation in the Squeak package.

Ancestors: Squeak-NorbertHartl.242
===========================

Name: Squeak-NorbertHartl.242
Author: NorbertHartl
Time: 10/08/2010, 09:30:56
UUID: 2e2430ac-cad4-49ed-bda3-e414567524c3
Ancestors: Squeak-DaleHenrichs.241

changed CharacterCollection>>encodeForHTTP. The old implementation always encoded as latin-1/composed characters. Nowadays the implementation changed in squeak and pharo. Now encodeForHTTP outputs utf-8 url-safe-encoded strings. Additionally there is encodeForHTTPWithTextEncoding: to specify exactly the needed encoding.
The implementation is not copied from pharo as it uses TextConverter. I changed the old implementation to use Grease instead.
---------------------------

I didn't copy the pharo implementation because it is using TextConverter which is not in gemstone. I used Grease instead which for me is the better choice. Well, it introduces a dependency from Squeak to Grease. I hope that is not a problem. At least this is a starting point to implement platform-specific stuff in a cross-platform manner. uhmm???!!? Sounds weird? It isn't. Think about it :)

hope you like it,

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: Squeak package update

Dale Henrichs
Norbert,

Since the Squeak package is used in the core GemStone (part of
bootstrapping), that means that Grease will have to be part of the
bootsrapping as well...

Since I am interested in portability for GLASS, I am not opposed to
having Grease loaded earlier, although I will have to look at the issues
a little bit closer ... in the end I will probably end up pulling Grease
into the GLASS core.

Dale


On 10/08/2010 12:40 AM, Norbert Hartl wrote:

> Hi,
>
> I've struggled some time with encodeForHTTP because it does different things in pharo and gemstone (comes with the Squeak package). Now I saw that the squeak implementation has changed the same as in pharo (or vice versa, I don't know).  Reason enough to change the the implementation in the Squeak package.
>
> Ancestors: Squeak-NorbertHartl.242
> ===========================
>
> Name: Squeak-NorbertHartl.242
> Author: NorbertHartl
> Time: 10/08/2010, 09:30:56
> UUID: 2e2430ac-cad4-49ed-bda3-e414567524c3
> Ancestors: Squeak-DaleHenrichs.241
>
> changed CharacterCollection>>encodeForHTTP. The old implementation always encoded as latin-1/composed characters. Nowadays the implementation changed in squeak and pharo. Now encodeForHTTP outputs utf-8 url-safe-encoded strings. Additionally there is encodeForHTTPWithTextEncoding: to specify exactly the needed encoding.
> The implementation is not copied from pharo as it uses TextConverter. I changed the old implementation to use Grease instead.
> ---------------------------
>
> I didn't copy the pharo implementation because it is using TextConverter which is not in gemstone. I used Grease instead which for me is the better choice. Well, it introduces a dependency from Squeak to Grease. I hope that is not a problem. At least this is a starting point to implement platform-specific stuff in a cross-platform manner. uhmm???!!? Sounds weird? It isn't. Think about it :)
>
> hope you like it,
>
> Norbert
>

Reply | Threaded
Open this post in threaded view
|

Re: Squeak package update

NorbertHartl

On 08.10.2010, at 18:38, Dale Henrichs wrote:

> Norbert,
>
> Since the Squeak package is used in the core GemStone (part of bootstrapping), that means that Grease will have to be part of the bootsrapping as well...
>
Why is Squeak part of the bootstrap?

> Since I am interested in portability for GLASS, I am not opposed to having Grease loaded earlier, although I will have to look at the issues a little bit closer ... in the end I will probably end up pulling Grease into the GLASS core.
>
Yep, that was in the back of my head but I didn't dare to write :)

Norbert

>
> On 10/08/2010 12:40 AM, Norbert Hartl wrote:
>> Hi,
>>
>> I've struggled some time with encodeForHTTP because it does different things in pharo and gemstone (comes with the Squeak package). Now I saw that the squeak implementation has changed the same as in pharo (or vice versa, I don't know).  Reason enough to change the the implementation in the Squeak package.
>>
>> Ancestors: Squeak-NorbertHartl.242
>> ===========================
>>
>> Name: Squeak-NorbertHartl.242
>> Author: NorbertHartl
>> Time: 10/08/2010, 09:30:56
>> UUID: 2e2430ac-cad4-49ed-bda3-e414567524c3
>> Ancestors: Squeak-DaleHenrichs.241
>>
>> changed CharacterCollection>>encodeForHTTP. The old implementation always encoded as latin-1/composed characters. Nowadays the implementation changed in squeak and pharo. Now encodeForHTTP outputs utf-8 url-safe-encoded strings. Additionally there is encodeForHTTPWithTextEncoding: to specify exactly the needed encoding.
>> The implementation is not copied from pharo as it uses TextConverter. I changed the old implementation to use Grease instead.
>> ---------------------------
>>
>> I didn't copy the pharo implementation because it is using TextConverter which is not in gemstone. I used Grease instead which for me is the better choice. Well, it introduces a dependency from Squeak to Grease. I hope that is not a problem. At least this is a starting point to implement platform-specific stuff in a cross-platform manner. uhmm???!!? Sounds weird? It isn't. Think about it :)
>>
>> hope you like it,
>>
>> Norbert
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Squeak package update

Dale Henrichs
On 10/08/2010 09:53 AM, Norbert Hartl wrote:
>
> On 08.10.2010, at 18:38, Dale Henrichs wrote:
>
>> Norbert,
>>
>> Since the Squeak package is used in the core GemStone (part of bootstrapping), that means that Grease will have to be part of the bootsrapping as well...
>>
> Why is Squeak part of the bootstrap?

At the moment, Monticello itself relies upon a bunch of methods in the
Squeak package.

As you are probably aware, I am currently porting Monticello to the base
for GemStone 3.0, which involves breaking the dependency between
Monticello and the Squeak compat package.

Dale