zinc incompatibilities with gemstone

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

zinc incompatibilities with gemstone

EstebanLM
Hi,
I'm trying to load Zinc on gemstone. It more or less loads fine, but there are some fixes needed, I'm attaching the problems I found, hoping some benevolent soul will integrate to gemstone zinc code :)
 
This are the problems found:
       
ZnUrl>>scheme: symbol
        symbol isNil
                ifTrue: [ scheme := nil ]
                ifFalse: [
                        (#(#http #https) includes: symbol) "<== they need to be strings (symbols ~= strings in gemstone)"
                                ifTrue: [ scheme := symbol asSymbol ]
                                ifFalse: [ (ZnUnknowScheme scheme: symbol) signal ] ]
                               
                               
ZnNetworkingUtils>>isProxySet
        "Should a proxy be used ?"
       
        ^ NetworkSystemSettings useHTTPProxy "<== This class does not exists."
       
ZnNetworkingUtils>>socketStreamTimeout
        "Access the current timeout in seconds for SocketStream IO"
       
        ^ ZnConnectionTimeout value "<== DynamicVariable class (parent of ZnConnectionTimeout) does not exists."

best,
Esteban
Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

Paul DeBruicker
Esteban & Sven:

I have time to take a look at it towards the end of the day.  Please
feel free to make the improvements yourself if you want.

Esteban - Did you look for/find any classes in Gemstone that are similar
to NetworkSystemSettings or DynamicVariable?  I have not.

I'll get back to you later in the day.

Paul





On 06/28/2011 09:32 AM, Esteban Lorenzano wrote:

> Hi,
> I'm trying to load Zinc on gemstone. It more or less loads fine, but there are some fixes needed, I'm attaching the problems I found, hoping some benevolent soul will integrate to gemstone zinc code :)
>
> This are the problems found:
>
> ZnUrl>>scheme: symbol
> symbol isNil
> ifTrue: [ scheme := nil ]
> ifFalse: [
> (#(#http #https) includes: symbol) "<== they need to be strings (symbols ~= strings in gemstone)"
> ifTrue: [ scheme := symbol asSymbol ]
> ifFalse: [ (ZnUnknowScheme scheme: symbol) signal ] ]
>
>
> ZnNetworkingUtils>>isProxySet
> "Should a proxy be used ?"
>
> ^ NetworkSystemSettings useHTTPProxy "<== This class does not exists."
>
> ZnNetworkingUtils>>socketStreamTimeout
> "Access the current timeout in seconds for SocketStream IO"
>
> ^ ZnConnectionTimeout value "<== DynamicVariable class (parent of ZnConnectionTimeout) does not exists."
>
> best,
> Esteban

Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

Paul DeBruicker
In reply to this post by EstebanLM
Hi Esteban -


How are you loading Zinc into Gemstone?  Were you using the metacello
configuration on Squeaksource or something else?

The reason I ask is all three issues you report were fixed/working at
the start of June when I updated the port to what was current at the
time.  The Gemstone port is current up to
Zinc-HTTP-SvenVanCaekenberghe.162 which is from May 19th.

Let me know if loading via the metacello config is flawed and I'll
update everything.  Also check that you are loading version 1.1 of the
project.  It is the version referenced in #stable:

I pasted the specific fixes below

Thanks
Paul



ZnUrl>>scheme: symbol
        symbol isNil
                ifTrue: [ scheme := nil ]
                ifFalse: [
                        (#(http https) includes: symbol asSymbol)
                                ifTrue: [ scheme := symbol asSymbol ]
                                        ifFalse: [ (ZnUnknowScheme scheme: symbol) signal ] ]


ZnNetworkingUtils>>isProxySet
        ^ HTTPSocket httpProxyServer isEmptyOrNil not


ZnNetworkingUtils class>> socketStreamTimeout
        "Timeout in seconds for SocketStream IO"
       
        ^ 10
Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

Philippe Marschall
2011/6/28 Paul DeBruicker <[hidden email]>:
> ...
> symbol asSymbol

<troll>
Every time you do this you admit that dynamic typing is a failure and
suggested types don't work for large scale development.
</troll>

Cheers
Philippe
Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

EstebanLM
In reply to this post by Paul DeBruicker
Hi,
I'm loading ConfigurationOfZincHTTPComponents from MetacelloRepository, and I'm loading #bleedingEdge version of zinc, but 1.0 is not loading either.

Cheers,
Esteban

El 28/06/2011, a las 3:50p.m., Paul DeBruicker escribió:

> Hi Esteban -
>
>
> How are you loading Zinc into Gemstone?  Were you using the metacello configuration on Squeaksource or something else?
>
> The reason I ask is all three issues you report were fixed/working at the start of June when I updated the port to what was current at the time.  The Gemstone port is current up to Zinc-HTTP-SvenVanCaekenberghe.162 which is from May 19th.
>
> Let me know if loading via the metacello config is flawed and I'll update everything.  Also check that you are loading version 1.1 of the project.  It is the version referenced in #stable:
>
> I pasted the specific fixes below
>
> Thanks
> Paul
>
>
>
> ZnUrl>>scheme: symbol
> symbol isNil
> ifTrue: [ scheme := nil ]
> ifFalse: [
> (#(http https) includes: symbol asSymbol)
> ifTrue: [ scheme := symbol asSymbol ]
> ifFalse: [ (ZnUnknowScheme scheme: symbol) signal ] ]
>
>
> ZnNetworkingUtils>>isProxySet
> ^ HTTPSocket httpProxyServer isEmptyOrNil not
>
>
> ZnNetworkingUtils class>> socketStreamTimeout
> "Timeout in seconds for SocketStream IO"
>
> ^ 10

Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

NorbertHartl
In reply to this post by Philippe Marschall

Am 29.06.2011 um 15:10 schrieb Philippe Marschall:

> 2011/6/28 Paul DeBruicker <[hidden email]>:
>> ...
>> symbol asSymbol
>
> <troll>
> Every time you do this you admit that dynamic typing is a failure and
> suggested types don't work for large scale development.
> </troll>
>
It is not good but that's what you get if you develop in a system where #foo = 'foo' resolves to true and you try to deploy this in an environment where the same expressions resolves to false. It still means it needs to be fixed at the right place but I like to express that I can understand doing this. This striked me to death several times already.
And zinc is still in the "make it work" phase.

Norbert


Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

Paul DeBruicker
In reply to this post by Philippe Marschall
On 06/29/2011 09:10 AM, Philippe Marschall wrote:

> 2011/6/28 Paul DeBruicker<[hidden email]>:
>> ...
>> symbol asSymbol
>
> <troll>
> Every time you do this you admit that dynamic typing is a failure and
> suggested types don't work for large scale development.
> </troll>
>
> Cheers
> Philippe


Yeah. Its only from naïveté .  What do you recommend I do instead?

As Norbert mentioned in Pharo

#hi = 'hi'

evaluates to true but in Gemstone it evaluates to false.  My only ideas
to address the issue you bring up is to:

1. get Sven to change his design/coding behavior which may impede the
functional improvement of Zinc in a small way.
2. get Pharo to behave as the blue book says it should
3. get Gemstone to behave like Pharo does.
4. Put an asSymbol everywhere the problem pops up.
5. ???

I'm sure there are better ideas but that's all I can think of at the
moment.

Also I do it twice in that method.  I'd really appreciate reading a
guide or some guidelines on how to do cross platform development.  Or
just code reviews like you've provided.

I also override things rather than subclass in the port, as a rule.  I
think that's also offensive in some way but I'm not sure how/why.


Thanks for the heads up

Paul


Reply | Threaded
Open this post in threaded view
|

Re: zinc incompatibilities with gemstone

Philippe Marschall
2011/6/29 Paul DeBruicker <[hidden email]>:

> On 06/29/2011 09:10 AM, Philippe Marschall wrote:
>>
>> 2011/6/28 Paul DeBruicker<[hidden email]>:
>>>
>>> ...
>>> symbol asSymbol
>>
>> <troll>
>> Every time you do this you admit that dynamic typing is a failure and
>> suggested types don't work for large scale development.
>> </troll>
>>
>> Cheers
>> Philippe
>
>
> Yeah. Its only from naïveté .  What do you recommend I do instead?

Fixing the senders. The method expects a symbol and works fine when a
symbol is passed. It's the senders that are broken. They don't stick
to the contract and get undefined behavior.

Cheers
Philippe