discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Etoile-dev] Re: Io language for StepTalk on Cocoa


From: Quentin Mathé
Subject: Re: [Etoile-dev] Re: Io language for StepTalk on Cocoa
Date: Wed, 31 May 2006 01:23:02 +0200

Le 26 mai 06 à 09:56, Stefan Urbanek a écrit :

Citát Quentin Mathé <gnustep-quentin@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.

Quentin.

--
Quentin Mathé
qmathe@club-internet.fr





reply via email to

[Prev in Thread] Current Thread [Next in Thread]