Soup works in 2.0

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

Soup works in 2.0

Sean P. DeNigris
Administrator
All tests pass. I updated the config and uploaded it to SqS and ss3...

Cheers,
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Camillo Bruni-3
nice!

On 2013-01-28, at 18:21, "Sean P. DeNigris" <[hidden email]> wrote:

> All tests pass. I updated the config and uploaded it to SqS and ss3...
>
> Cheers,
> Sean
>
>
>
> --
> View this message in context: http://forum.world.st/Soup-works-in-2-0-tp4665907.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Stéphane Ducasse
In reply to this post by Sean P. DeNigris
Cool.
May be we should migrate to SmalltalkHub.
If you do it put me as a contributor :)

stef

On Jan 28, 2013, at 2:21 PM, Sean P. DeNigris wrote:

> All tests pass. I updated the config and uploaded it to SqS and ss3...
>
> Cheers,
> Sean
>
>
>
> --
> View this message in context: http://forum.world.st/Soup-works-in-2-0-tp4665907.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
All tests pass. I updated the config and uploaded it to SqS and ss3...
Soup class>>fromUrl: references HTTPClient, which doesn't exist in Pharo 2.0. What's the best way to fix this? Is HTTPClient gone for good? Is Soup expected to work outside of Pharo? You get the idea... I see the config only mentions Pharo...

Cheers,
Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sven Van Caekenberghe-2
Hi Sean,

On 06 Feb 2013, at 03:34, "Sean P. DeNigris" <[hidden email]> wrote:

> Sean P. DeNigris wrote
>> All tests pass. I updated the config and uploaded it to SqS and ss3...
>
> Soup class>>fromUrl: references HTTPClient, which doesn't exist in Pharo
> 2.0. What's the best way to fix this? Is HTTPClient gone for good? Is Soup
> expected to work outside of Pharo? You get the idea... I see the config only
> mentions Pharo...
>
> Cheers,
> Sean

Yeah, that is a tough one. HTTPClient and HTTPSocket are gone, fully deprecated.

If there is little to no HTTP interaction, I would consider

Soup class>>fromUrl: urlObject
        urlObject asUrl retrieveContents.

Or explicitely testing for Zn classes.

Sven


--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill


Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sean P. DeNigris
Administrator
Sven Van Caekenberghe-2 wrote
I would consider

Soup class>>fromUrl: urlObject
        urlObject asUrl retrieveContents.
This looks good, but if the user has a ZnUrl, it DNU #asUrl... otherwise, it will work for strings and Url objects.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sven Van Caekenberghe-2

On 09 Feb 2013, at 05:26, "Sean P. DeNigris" <[hidden email]> wrote:

> Sven Van Caekenberghe-2 wrote
>> I would consider
>>
>> Soup class>>fromUrl: urlObject
>> urlObject asUrl retrieveContents.
>
> This looks good, but if the user has a ZnUrl, it DNU #asUrl... otherwise, it
> will work for strings and Url objects.

Darn, yes that's right.

Then there is only one solution: the Soup project needs to make the right choice based on the platform. Either dynamically (testing for the presence of classes and doing #perform) or statically using different platform sub packages. Since it i only for 1 method, the former seems easier.

Sven
Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sean P. DeNigris
Administrator
Sven Van Caekenberghe-2 wrote
> ...ZnUrl... DNU #asUrl

Darn, yes that's right.
Does it make any sense to add #asUrl to ZnUrl? Also, going forward, will we continue to have two Url classes in the image? It seems a bit confusing...

Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Marcus Denker-4

On Feb 9, 2013, at 4:02 PM, Sean P. DeNigris <[hidden email]> wrote:

> Sven Van Caekenberghe-2 wrote
>>> ...ZnUrl... DNU #asUrl
>>
>> Darn, yes that's right.
>
> Does it make any sense to add #asUrl to ZnUrl? Also, going forward, will we
> continue to have two Url classes in the image? It seems a bit confusing…
>
I would like to remove URI and Url…. URI as one of the first things in 3.0

        Marcus



Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sven Van Caekenberghe-2

On 09 Feb 2013, at 16:50, Marcus Denker <[hidden email]> wrote:

> On Feb 9, 2013, at 4:02 PM, Sean P. DeNigris <[hidden email]> wrote:
>
>> Sven Van Caekenberghe-2 wrote
>>>> ...ZnUrl... DNU #asUrl
>>>
>>> Darn, yes that's right.
>>
>> Does it make any sense to add #asUrl to ZnUrl? Also, going forward, will we
>> continue to have two Url classes in the image? It seems a bit confusing…
>>
> I would like to remove URI and Url…. URI as one of the first things in 3.0
>
> Marcus

OK ;-)



Reply | Threaded
Open this post in threaded view
|

Re: Soup works in 2.0

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
Does it make any sense to add #asUrl to ZnUrl?
Since Zinc may or may not be present, I made a new config which checks to see if ZnUrl is present, and if so, adds asUrl as an extension method, to make it polymorphic with string and url for the purpose of Soup class>>fromUrl:

In 1.4 or 2.0...
Gofer it
        squeaksource: 'MetacelloRepository';
        package: 'ConfigurationOfSoup';
        load.
       
(Smalltalk at: #ConfigurationOfSoup) project development load: 'ALL'.

That will load 1.3, which should be stable (only a small change), but I'll play with it a bit before tagging it #stable.
Cheers,
Sean