Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Io language for StepTalk on Cocoa

15 views
Skip to first unread message

Jeremy Tregunna

unread,
May 24, 2006, 1:05:57 PM5/24/06
to Yen-Ju Chen, Developers_list_for_Étoilé_desktop_environment, discuss...@gnu.org
Excellent work.

On 24-May-06, at 1:12 AM, Yen-Ju Chen wrote:

I quickly put together an io language[1] bundle for StepTalk.
It only works on Cocoa because IoObjcBridge only works on Cocoa.
It shouldn't be hard to port IoObjcBridge to GNUstep.
It was ported before.
Hope it is interesting enough that someone can
help porting IoObjcBridge to GNUstep again (see below).

Have fun.

P.S. The IoVM is included. There is no need to install io language first.


Yen-Ju

On 5/22/06, Quentin Mathé <gnustep...@club-internet.fr> wrote:
Le 21 mai 06 à 19:39, Yen-Ju Chen a écrit :

> On 5/21/06, Quentin Mathé <gnustep...@club-internet.fr> wrote:
>
>> There is a very good io/objc bridge in Io repository itself, it was
>> ported in the past to GNUstep but right now it is broken. I have a
>> new experimental port (not yet committed). It is based on a snapshot
>> of Io core and Io/Objective-C bridge. Until now I only fixed the
>> compilation, it's still untested. Got to work on it.
>>
>> Here is a link to Io website: <http://www.iolanguage.com>
>
>  I just take a look of io and it indeed looks interesting.
>  I am always in favor of Ruby,

:-)

>  but io seems to be another good choice for script language.

I think so.

>  The IoObjC bridge looks relatively simple than RubyObjC.

Yes.

>  If you can commit it, I am happy to test it after I learn this
> language.

The problem is my Io/Objc bridge port is on a hard disk I cannot
connect to my current computer. I have to recover the content of this
hard disk ASAP.

Cheers,
Quentin.

--
Quentin Mathé


_______________________________________________
Etoile-dev mailing list



!DSPAM:4473efbb21473608488397!
<IoLanguage_bundle.tar.gz>
<IoLanguage_stlanguage.jpg>
_______________________________________________
Discuss-gnustep mailing list


!DSPAM:4473efbb21473608488397!


--

Jeremy Tregunna

jtre...@blurgle.ca



"The proof is the proof that the proof has been proven and that's the proof!" - Jean Chrétien

Nicolas Roard

unread,
May 25, 2006, 6:03:16 AM5/25/06
to Developers list for Étoilé desktop environment, discuss...@gnu.org
On 5/25/06, Yen-Ju Chen <yjc...@gmail.com> wrote:
> O.K. This one works on GNUstep, but is not tested with StepTalking on GNUstep.
> It also creates a tool 'io_objc' to use directly without StepTalk.
> After compilation, use 'obj/io_objc test_gnustep.io' on GNUstep
> or 'obj/io_objc test_cocoa.io' on mac.
> There are still some glitches here and there, though.
> And GNUmakefile needs modification for you system.
>
> That is pretty much all I will do for now.
> Feel free to make it better.
> Have fun.

Really cool ! io_objc works fine on gnustep. Impressive !
in StepTalk it seems to be broken though (seems a problem not saving
the context)

--
Nicolas Roard
"I love deadlines. I like the whooshing sound they make as they fly
by." -- Douglas Adams


Yen-Ju Chen

unread,
May 25, 2006, 2:54:10 PM5/25/06
to Developers list for Étoilé desktop environment, discuss...@gnu.org
On 5/25/06, Nicolas Roard <nicola...@gmail.com> wrote:
> On 5/25/06, Yen-Ju Chen <yjc...@gmail.com> wrote:
> > O.K. This one works on GNUstep, but is not tested with StepTalking on GNUstep.
> > It also creates a tool 'io_objc' to use directly without StepTalk.
> > After compilation, use 'obj/io_objc test_gnustep.io' on GNUstep
> > or 'obj/io_objc test_cocoa.io' on mac.
> > There are still some glitches here and there, though.
> > And GNUmakefile needs modification for you system.
> >
> > That is pretty much all I will do for now.
> > Feel free to make it better.
> > Have fun.
>
> Really cool ! io_objc works fine on gnustep. Impressive !
> in StepTalk it seems to be broken though (seems a problem not saving
> the context)

Io language is interesting in a way that you can redefine all syntax.
In my mind, it might not be hard to create a 'Objective-C Script'
language on it.
And it has a different object (prototype) and thread (actor) model
than Objective-C,
which could be a good companion to GNUstep.
But the langauge itself is still young and may have some big changes later
on the language design and internal implementation.
So I prefer to wait a couple months and see how it is going.

Yen-Ju

>
> --
> Nicolas Roard
> "I love deadlines. I like the whooshing sound they make as they fly
> by." -- Douglas Adams
>
>

Quentin Mathé

unread,
May 25, 2006, 7:15:50 PM5/25/06
to Developers list for Étoilé desktop environment, GNUStep Discuss
Le 25 mai 06 à 12:03, Nicolas Roard a écrit :

> On 5/25/06, Yen-Ju Chen <yjc...@gmail.com> wrote:
>> O.K. This one works on GNUstep, but is not tested with StepTalking
>> on GNUstep.
>> It also creates a tool 'io_objc' to use directly without StepTalk.
>> After compilation, use 'obj/io_objc test_gnustep.io' on GNUstep
>> or 'obj/io_objc test_cocoa.io' on mac.
>> There are still some glitches here and there, though.
>> And GNUmakefile needs modification for you system.
>>
>> That is pretty much all I will do for now.
>> Feel free to make it better.
>> Have fun.
>
> Really cool ! io_objc works fine on gnustep. Impressive !
> in StepTalk it seems to be broken though (seems a problem not saving
> the context)

Good news, I can give up on my buggy old version :-).

It works very well. Excellent work ! I got it working with StepTalk
(GNUstep) properly yesterday. I hacked IoLanguageEngine to have
Io_State kept value in an ivar. This way between each call to -
interpretScript:inContext: the context is maintained. The correct way
to do it would be to store Io_State in STContext instance I think.

As a side note, I have been unable to load AppKit environment with
StepTalk, either stexec or stshell (using the flag -env AppKit).

I'm going to commit it in Étoilé repository really soon.

Thanks,

Jeremy Tregunna

unread,
May 25, 2006, 7:43:14 PM5/25/06
to Yen-Ju Chen, Developers_list_for_Étoilé_desktop_environment, discuss...@gnu.org
On 25-May-06, at 2:54 PM, Yen-Ju Chen wrote:

 Io language is interesting in a way that you can redefine all syntax.
 In my mind, it might not be hard to create a 'Objective-C Script'
language on it.

I have a script written about a year ago for Io that does this very thing. (Though it is dependant on the : being part of the identifier, which is one thing we are considering removing at the moment (replacing it with underscores); though it shouldn't be difficult to modify if we do make that change to the language.)

 And it has a different object (prototype) and thread (actor) model
than Objective-C,
 which could be a good companion to GNUstep.
 But the langauge itself is still young and may have some big changes later
 on the language design and internal implementation.

There are still some major changes to be made to the language (Collections work comes to mind first and foremost) before we're closer to a stable release; but yes, caution should be taken, it's still rather rough.

Stefan Urbanek

unread,
May 26, 2006, 3:56:05 AM5/26/06
to Quentin Mathé, Developers list for Étoilé desktop environment, GNUStep Discuss
Citát Quentin Mathé <gnustep...@club-internet.fr>:

> Le 25 mai 06 ŕ 12:03, Nicolas Roard a écrit :


>
> > On 5/25/06, Yen-Ju Chen <yjc...@gmail.com> wrote:
> >> O.K. This one works on GNUstep, but is not tested with StepTalking
> >> on GNUstep.
> >> It also creates a tool 'io_objc' to use directly without StepTalk.
> >> After compilation, use 'obj/io_objc test_gnustep.io' on GNUstep
> >> or 'obj/io_objc test_cocoa.io' on mac.
> >> There are still some glitches here and there, though.
> >> And GNUmakefile needs modification for you system.
> >>
> >> That is pretty much all I will do for now.
> >> Feel free to make it better.
> >> Have fun.
> >
> > Really cool ! io_objc works fine on gnustep. Impressive !
> > in StepTalk it seems to be broken though (seems a problem not saving
> > the context)
>
> Good news, I can give up on my buggy old version :-).
>
> It works very well. Excellent work ! I got it working with StepTalk
> (GNUstep) properly yesterday. I hacked IoLanguageEngine to have
> Io_State kept value in an ivar. This way between each call to -
> interpretScript:inContext: the context is maintained. The correct way
> to do it would be to store Io_State in STContext instance I think.
>

How it works? Do you need some language-engine specific configuration to be
saved into the STContext in a special way (different to context's variables)?
If yes, would it be thread safe - when two threads will be acessing the same
(parent)context?

Btw. how it is with bridging Objective-C objects with io? Is it only isolated io
computation engine or can I pass objects in and out?

Is it possible to implement STEngine createMethod:... for the io language?

> As a side note, I have been unable to load AppKit environment with
> StepTalk, either stexec or stshell (using the flag -env AppKit).
>

What error are you getting?

Regards,

Stefan Urbanek
--
http://stefan.agentfarms.net

First they ignore you, then they laugh at you, then they fight you, then
you win.
- Mahatma Gandhi


Stefan Urbanek

unread,
May 26, 2006, 5:16:38 AM5/26/06
to nic...@roard.com, Nicolas Roard, GNUStep Discuss
Citát Nicolas Roard <nicola...@gmail.com>:

> On 5/26/06, Stefan Urbanek <ste...@agentfarms.net> wrote:
> > Citát Quentin Mathé <gnustep...@club-internet.fr>:
> >
> > > Le 25 mai 06 ŕ 12:03, Nicolas Roard a écrit :
> > >

<snip>

> > > It works very well. Excellent work ! I got it working with StepTalk
> > > (GNUstep) properly yesterday. I hacked IoLanguageEngine to have
> > > Io_State kept value in an ivar. This way between each call to -
> > > interpretScript:inContext: the context is maintained. The correct way
> > > to do it would be to store Io_State in STContext instance I think.
> > >
> >
> > How it works? Do you need some language-engine specific configuration to be
> > saved into the STContext in a special way (different to context's
> variables)?
> > If yes, would it be thread safe - when two threads will be acessing the
> same
> > (parent)context?
> >
> > Btw. how it is with bridging Objective-C objects with io? Is it only
> isolated io
> > computation engine or can I pass objects in and out?
> >
> > Is it possible to implement STEngine createMethod:... for the io language?
>

> I'm thinking that StepTalk could simply be used as a standard way of
> accessing objective-c objects -- eg, for the languages that have a
> proper bridge to objc (io, ruby, scheme, gnu smalltalk) do not use the
> languages bundles only to execute methods, but let them completely
> handles objects. It would be much more efficient than building an OO
> architecture with STActor (although this is nice too -- it provides
> "one" OO language/architecture where methods can be in any language)
> and more importantly it would let people really take advantage of each
> language's strength.
>

(moved to discuss-gnustep only)

Well ... "much more efficient than building an OO architecture with STActor "
... it depends on your needs. Neither STActor nor standard script execution is
better or worse, both have quite different uses and both can "really take
advantage of each language's strength".

Actors can have behaviour written in different languages - depending on the
needs of each method. Language itself do not have to provide method ceration -
script is enough. Howeverm the language engine have to support passing
arguments either named or not to the script. If it is not possible to generate
method from the language, one of many ways how to create the method can be like
the following that is going to be used for NSPredicate based language:

valueIsBetween:lowerBound and:upperBound
value >= lowerBound && value <= upperBound

Engine pre-parses the source, extracts the method name and adds method variables
to a method execution contex that is passed then to the engine. Method name is
stripped from the method source and rest is passed as a script to the engine.

Engine do not have to compile the method, it can only pack source in an object
and then execute it as requested...

Quentin Mathé

unread,
May 30, 2006, 7:23:02 PM5/30/06
to Developers list for Étoilé desktop environment, Stefan Urbanek, GNUStep Discuss
Le 26 mai 06 à 09:56, Stefan Urbanek a écrit :

> Citát Quentin Mathé <gnustep...@club-internet.fr>:
>
>> Le 25 mai 06 ŕ 12:03, Nicolas Roard a écrit :
>>

>>> Really cool ! io_objc works fine on gnustep. Impressive !
>>> in StepTalk it seems to be broken though (seems a problem not saving
>>> the context)
>>
>> Good news, I can give up on my buggy old version :-).
>>

>> It works very well. Excellent work ! I got it working with StepTalk
>> (GNUstep) properly yesterday. I hacked IoLanguageEngine to have
>> Io_State kept value in an ivar. This way between each call to -
>> interpretScript:inContext: the context is maintained. The correct way
>> to do it would be to store Io_State in STContext instance I think.
>
> How it works? Do you need some language-engine specific
> configuration to be
> saved into the STContext in a special way (different to context's
> variables)?

We only need to store Io_State, it's a C structure, we may probably
just wrap it in an NSValue object part of STContext variables
dictionary.
For STContext, it could be better to provide an instance variable
which is just a hash table where language engine states are keyed by
language engine instances. That would allow :
- to pass a context accross language engines, without polluting
STContext variables dictionary
- to handle different execution contexts on language engine side
without having to set up a new language engine instance.
Finally well, it would be mandatory if it's not possible to wrap
Io_State in NSValue.

> If yes, would it be thread safe - when two threads will be acessing
> the same
> (parent)context?

I don't really know. I think it's should be possible to have it
thread safe. It would be by running method calls as asynchronous
messages on Io runtime side.

> Btw. how it is with bridging Objective-C objects with io? Is it
> only isolated io
> computation engine or can I pass objects in and out?

At this time, it's an isolated Io engine. It should be possible
easily to pass objects in and out since Io_State references the Lobby
(list of root objects in Io execution context). This could be
accomplished by calling C functions that set/update slots in Lobby.

> Is it possible to implement STEngine createMethod:... for the io
> language?

I think so. A method is an object in Io. Moreover any objects in Io
is just a key/value pairs list, each key/value pair is called a slot.

>> As a side note, I have been unable to load AppKit environment with
>> StepTalk, either stexec or stshell (using the flag -env AppKit).
>
> What error are you getting?

I have to check on my GNUstep install. I don't remember right now.

0 new messages