Fwd: [Cuis] ProcessSpecificVariable and DynamicVariable

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

Fwd: [Cuis] ProcessSpecificVariable and DynamicVariable

Angel Java Lopez
Hola gente!

Ayer lei este email de maese @garduino.

No entendi el ejemplo, donde se usa ahi ProcessSpecificVariable o
DynamicVariable?

Que es ProcessSpecificVariable? Me imagino algo como thread local storage
Que es DynamicVariable?

Gracias por cualquier info

Nos leemos!

Angel "Java" Lopez
@ajlopez
gh:ajlopez

---------- Forwarded message ----------
From: Germán Arduino <[hidden email]>
Date: Mon, Dec 17, 2012 at 11:23 PM
Subject: [Cuis] ProcessSpecificVariable and DynamicVariable
To: [hidden email]


Hi Juan, List:

In Pharo and Squeak exist the classes of the subject.


A common use is a the way that follow:

ZnConnectionTimeout
 value: 5
during: [ ^ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ]



These classes are not present in Cuis and I not found nothing similar to
try the same thing. Even the Process in Cuis have different methods and as
I don't know this part very deep I want to ask what should do the correct
way here.


I should implement this classes and the missing method in Process? Or I
should use other classes already present in the Cuis image to achieve the
same goals?


Thanks.

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

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [Cuis] ProcessSpecificVariable and DynamicVariable

garduino
Hola Angel:

La verdad que yo tampoco tengo muy claro exactamente porque hay una clase
para esto que sólo la usa Zinc y nadie más (al menos dentro de la imagen
base).

Después con más tiempo voy a mirar los test que vi que hay en Squeak.

Saludos.

2012/12/18 Angel Java Lopez <[hidden email]>

> **
>
>
> Hola gente!
>
> Ayer lei este email de maese @garduino.
>
> No entendi el ejemplo, donde se usa ahi ProcessSpecificVariable o
> DynamicVariable?
>
> Que es ProcessSpecificVariable? Me imagino algo como thread local storage
> Que es DynamicVariable?
>
> Gracias por cualquier info
>
> Nos leemos!
>
> Angel "Java" Lopez
> @ajlopez
> gh:ajlopez
>
> ---------- Forwarded message ----------
> From: Germán Arduino <[hidden email]>
> Date: Mon, Dec 17, 2012 at 11:23 PM
> Subject: [Cuis] ProcessSpecificVariable and DynamicVariable
> To: [hidden email]
>
>
> Hi Juan, List:
>
> In Pharo and Squeak exist the classes of the subject.
>
>
> A common use is a the way that follow:
>
> ZnConnectionTimeout
>  value: 5
> during: [ ^ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ]
>
>
>
> These classes are not present in Cuis and I not found nothing similar to
> try the same thing. Even the Process in Cuis have different methods and as
> I don't know this part very deep I want to ask what should do the correct
> way here.
>
>
> I should implement this classes and the missing method in Process? Or I
> should use other classes already present in the Cuis image to achieve the
> same goals?
>
>
> Thanks.
>
> --
> ============================================
> Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
> Arduino Software  http://www.arduinosoftware.com
> PasswordsPro  http://www.passwordspro.com
> greensecure.blogspot.com germanarduino.blogspot.com
> ============================================
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [Cuis] ProcessSpecificVariable and DynamicVariable

Angel Java Lopez
Interesante!

Supongo que se puede simular con un dictionario que tenga como clave un
proceso, y como valor el valor que buscas.

Me imagino a mano alzada:

Object subclass: #ProcessSpecificVariable
     instanceVariableNames: 'dict'
....

!

!ProcessSpecificVariable methods!

initialize
    dict := Dictionary new "no tengo aca como se llama un dictionario tipo
hashtable en Smalltalk"
!

value
    ^dict at: Process current "tampoco se si es Process current o algo asi,
y agregaria algun ifAbsent: [^nil]"
!

value: aValue
    dict at: Process current put: aValue
! !

Y DynamicVariable? Tambien es de Zinc? Relacionado con
ProcessSpecificVariable o para otra cosa?

Nos leemos!

Angel "Java" Lopez
@ajlopez

2012/12/18 Germán Arduino <[hidden email]>

> **
>
>
> Hola Angel:
>
> La verdad que yo tampoco tengo muy claro exactamente porque hay una clase
> para esto que sólo la usa Zinc y nadie más (al menos dentro de la imagen
> base).
>
> Después con más tiempo voy a mirar los test que vi que hay en Squeak.
>
> Saludos.
>
>
> 2012/12/18 Angel Java Lopez <[hidden email]>
>
>> **
>>
>>
>> Hola gente!
>>
>> Ayer lei este email de maese @garduino.
>>
>> No entendi el ejemplo, donde se usa ahi ProcessSpecificVariable o
>> DynamicVariable?
>>
>> Que es ProcessSpecificVariable? Me imagino algo como thread local storage
>> Que es DynamicVariable?
>>
>> Gracias por cualquier info
>>
>> Nos leemos!
>>
>> Angel "Java" Lopez
>> @ajlopez
>> gh:ajlopez
>>
>>  ---------- Forwarded message ----------
>> From: Germán Arduino <[hidden email]>
>> Date: Mon, Dec 17, 2012 at 11:23 PM
>> Subject: [Cuis] ProcessSpecificVariable and DynamicVariable
>> To: [hidden email]
>>
>>
>> Hi Juan, List:
>>
>> In Pharo and Squeak exist the classes of the subject.
>>
>>
>> A common use is a the way that follow:
>>
>> ZnConnectionTimeout
>>  value: 5
>> during: [ ^ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ]
>>
>>
>>
>> These classes are not present in Cuis and I not found nothing similar to
>> try the same thing. Even the Process in Cuis have different methods and as
>> I don't know this part very deep I want to ask what should do the correct
>> way here.
>>
>>
>> I should implement this classes and the missing method in Process? Or I
>> should use other classes already present in the Cuis image to achieve the
>> same goals?
>>
>>
>> Thanks.
>>
>> --
>> ============================================
>> Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
>> Arduino Software  http://www.arduinosoftware.com
>> PasswordsPro  http://www.passwordspro.com
>> greensecure.blogspot.com germanarduino.blogspot.com
>> ============================================
>>
>> _______________________________________________
>> Cuis mailing list
>> [hidden email]
>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>
>>
>>
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: [Cuis] ProcessSpecificVariable and DynamicVariable

garduino
Sip, fijate ProcessSpecificVariable >>value
      ^Processor activeProcess environmentAt: self ifAbsent: [self
default]. (Y default es nil).

DynamicVariable hereda de ProrcessSpecificVariable, pero no es de Zinc
entiendo yo (están en Pharo y Squeak con diferentes implementaciones).

Por otro lado, lo que decia que me sonaba extraño es que no encontré en las
imágenes base otros usuarios de esas clases, así que supongo que son para
paquetes externos.

Pero francamente, no conozco como surgieron estas clases, el porque, las
motivaciones y más aún ¿por qué están en la imagen base si no se usan?

Lamento no poder aportar mucho más por ahora.

Saludos.

2012/12/18 Angel Java Lopez <[hidden email]>

> **
>
>
> Interesante!
>
> Supongo que se puede simular con un dictionario que tenga como clave un
> proceso, y como valor el valor que buscas.
>
> Me imagino a mano alzada:
>
> Object subclass: #ProcessSpecificVariable
>      instanceVariableNames: 'dict'
> ....
>
> !
>
> !ProcessSpecificVariable methods!
>
> initialize
>     dict := Dictionary new "no tengo aca como se llama un dictionario tipo
> hashtable en Smalltalk"
> !
>
> value
>     ^dict at: Process current "tampoco se si es Process current o algo
> asi, y agregaria algun ifAbsent: [^nil]"
> !
>
> value: aValue
>     dict at: Process current put: aValue
> ! !
>
> Y DynamicVariable? Tambien es de Zinc? Relacionado con
> ProcessSpecificVariable o para otra cosa?
>
> Nos leemos!
>
> Angel "Java" Lopez
> @ajlopez
>
> 2012/12/18 Germán Arduino <[hidden email]>
>
>> **
>>
>>
>> Hola Angel:
>>
>> La verdad que yo tampoco tengo muy claro exactamente porque hay una clase
>> para esto que sólo la usa Zinc y nadie más (al menos dentro de la imagen
>> base).
>>
>> Después con más tiempo voy a mirar los test que vi que hay en Squeak.
>>
>> Saludos.
>>
>>
>> 2012/12/18 Angel Java Lopez <[hidden email]>
>>
>>> **
>>>
>>>
>>> Hola gente!
>>>
>>> Ayer lei este email de maese @garduino.
>>>
>>> No entendi el ejemplo, donde se usa ahi ProcessSpecificVariable o
>>> DynamicVariable?
>>>
>>> Que es ProcessSpecificVariable? Me imagino algo como thread local storage
>>> Que es DynamicVariable?
>>>
>>> Gracias por cualquier info
>>>
>>> Nos leemos!
>>>
>>> Angel "Java" Lopez
>>> @ajlopez
>>> gh:ajlopez
>>>
>>>  ---------- Forwarded message ----------
>>> From: Germán Arduino <[hidden email]>
>>> Date: Mon, Dec 17, 2012 at 11:23 PM
>>> Subject: [Cuis] ProcessSpecificVariable and DynamicVariable
>>> To: [hidden email]
>>>
>>>
>>> Hi Juan, List:
>>>
>>> In Pharo and Squeak exist the classes of the subject.
>>>
>>>
>>> A common use is a the way that follow:
>>>
>>> ZnConnectionTimeout
>>>  value: 5
>>> during: [ ^ ZnClient new get: 'http://zn.stfx.eu/zn/small.html' ]
>>>
>>>
>>>
>>> These classes are not present in Cuis and I not found nothing similar to
>>> try the same thing. Even the Process in Cuis have different methods and as
>>> I don't know this part very deep I want to ask what should do the correct
>>> way here.
>>>
>>>
>>> I should implement this classes and the missing method in Process? Or I
>>> should use other classes already present in the Cuis image to achieve the
>>> same goals?
>>>
>>>
>>> Thanks.
>>>
>>> --
>>> ============================================
>>> Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
>>> Arduino Software  http://www.arduinosoftware.com
>>> PasswordsPro  http://www.passwordspro.com
>>> greensecure.blogspot.com germanarduino.blogspot.com
>>> ============================================
>>>
>>> _______________________________________________
>>> Cuis mailing list
>>> [hidden email]
>>> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>>>
>>>
>>>
>>
>>
>  
>