how can I test host environment: Pharo or Squeak

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

how can I test host environment: Pharo or Squeak

Alan Pinch
I am trying to keep a single package for both. Is there a good clean way
to test whether I am in squeak or Pharo?

--
Thank you for your consideration,
Alan


Reply | Threaded
Open this post in threaded view
|

Re: how can I test host environment: Pharo or Squeak

fniephaus
This should work:

isSqueak
  ^ SystemVersion current version beginsWith: 'Squeak'

Best,
Fabio

On Tue, Oct 17, 2017 at 4:15 PM Alan Pinch <[hidden email]> wrote:
I am trying to keep a single package for both. Is there a good clean way
to test whether I am in squeak or Pharo?

--
Thank you for your consideration,
Alan




Reply | Threaded
Open this post in threaded view
|

Re: how can I test host environment: Pharo or Squeak

Tobias Pape
Correct.

But depending on what you do, using Grease or Metacello might be better.

Best regards
        -Tobias

> On 17.10.2017, at 17:31, Fabio Niephaus <[hidden email]> wrote:
>
> This should work:
>
> isSqueak
>   ^ SystemVersion current version beginsWith: 'Squeak'
>
> Best,
> Fabio
>
> On Tue, Oct 17, 2017 at 4:15 PM Alan Pinch <[hidden email]> wrote:
> I am trying to keep a single package for both. Is there a good clean way
> to test whether I am in squeak or Pharo?
>
> --
> Thank you for your consideration,
> Alan
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: how can I test host environment: Pharo or Squeak

Alan Pinch
What's Grease? I have not heard of it before. Is this something that
might work between squeak and pharo? ANd cuis?

Alan


On 10/17/2017 11:38 AM, Tobias Pape wrote:

> Correct.
>
> But depending on what you do, using Grease or Metacello might be better.
>
> Best regards
> -Tobias
>> On 17.10.2017, at 17:31, Fabio Niephaus <[hidden email]> wrote:
>>
>> This should work:
>>
>> isSqueak
>>    ^ SystemVersion current version beginsWith: 'Squeak'
>>
>> Best,
>> Fabio
>>
>> On Tue, Oct 17, 2017 at 4:15 PM Alan Pinch <[hidden email]> wrote:
>> I am trying to keep a single package for both. Is there a good clean way
>> to test whether I am in squeak or Pharo?
>>
>> --
>> Thank you for your consideration,
>> Alan
>>
>>
>>
>

--
Thank you for your consideration,
Alan


Reply | Threaded
Open this post in threaded view
|

Re: how can I test host environment: Pharo or Squeak

Jakob Reschke
In reply to this post by Alan Pinch
How about:

    Smalltalk version

'Squeak5.1'
'Pharo6.0'

2017-10-17 16:15 GMT+02:00 Alan Pinch <[hidden email]>:
> I am trying to keep a single package for both. Is there a good clean way
> to test whether I am in squeak or Pharo?
>
> --
> Thank you for your consideration,
> Alan
>
>

Reply | Threaded
Open this post in threaded view
|

Re: how can I test host environment: Pharo or Squeak

Nicolas Cellier
In reply to this post by Alan Pinch
Grease is a dialect-specific layer that enables Seaside to be ported on different Smalltalks.

2017-10-17 17:52 GMT+02:00 Alan Pinch <[hidden email]>:
What's Grease? I have not heard of it before. Is this something that might work between squeak and pharo? ANd cuis?

Alan



On 10/17/2017 11:38 AM, Tobias Pape wrote:
Correct.

But depending on what you do, using Grease or Metacello might be better.

Best regards
        -Tobias
On 17.10.2017, at 17:31, Fabio Niephaus <[hidden email]> wrote:

This should work:

isSqueak
   ^ SystemVersion current version beginsWith: 'Squeak'

Best,
Fabio

On Tue, Oct 17, 2017 at 4:15 PM Alan Pinch <[hidden email]> wrote:
I am trying to keep a single package for both. Is there a good clean way
to test whether I am in squeak or Pharo?

--
Thank you for your consideration,
Alan





--
Thank you for your consideration,
Alan





Reply | Threaded
Open this post in threaded view
|

Re: how can I test host environment: Pharo or Squeak

Hannes Hirzel
Grease  http://wiki.squeak.org/squeak/3750

On 10/17/17, Nicolas Cellier <[hidden email]> wrote:

> Grease is a dialect-specific layer that enables Seaside to be ported on
> different Smalltalks.
>
> 2017-10-17 17:52 GMT+02:00 Alan Pinch <[hidden email]>:
>
>> What's Grease? I have not heard of it before. Is this something that
>> might
>> work between squeak and pharo? ANd cuis?
>>
>> Alan
>>
>>
>>
>> On 10/17/2017 11:38 AM, Tobias Pape wrote:
>>
>>> Correct.
>>>
>>> But depending on what you do, using Grease or Metacello might be better.
>>>
>>> Best regards
>>>         -Tobias
>>>
>>>> On 17.10.2017, at 17:31, Fabio Niephaus <[hidden email]> wrote:
>>>>
>>>> This should work:
>>>>
>>>> isSqueak
>>>>    ^ SystemVersion current version beginsWith: 'Squeak'
>>>>
>>>> Best,
>>>> Fabio
>>>>
>>>> On Tue, Oct 17, 2017 at 4:15 PM Alan Pinch <[hidden email]>
>>>> wrote:
>>>> I am trying to keep a single package for both. Is there a good clean
>>>> way
>>>> to test whether I am in squeak or Pharo?
>>>>
>>>> --
>>>> Thank you for your consideration,
>>>> Alan
>>>>
>>>>
>>>>
>>>>
>>>
>> --
>> Thank you for your consideration,
>> Alan
>>
>>
>>
>