Hi,
Are signals and notifiers like chapter 11 of http://community.gemstone.com/download/attachments/6816350/GS64-ProgGuide-3.0.pdf?version=1 somehow exposed in maglev? It'd be wicked feature.
Patrik
--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/Byu9kOSs7v0J.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.
I don't think they are, but if you're up to it, the class methods :primitive and :class_primitive take two arguments: the name of the ruby method you want to expose sth as, and the name of the Smalltalk method to expose. Have a look at rchash.rb to see how it can be done. If you extract something useful, we can certainly include it in the next release. :)
> Are signals and notifiers like chapter 11 of http://community.gemstone.com/download/attachments/6816350/GS64-ProgGuide-3.0.pdf?version=1 somehow exposed in maglev? It'd be wicked feature.
They are not currently exposed. It is easy and straightforward to expose a Smalltalk API to Ruby (e.g., see src/kernel/bootstrap/System.rb for ideas). The hard part is handling the asynchronous signals. Smalltalk's execption handling is superior to Ruby's, since Smalltalk handles the exception by pushing another frame onto the stack and running the exception handler there, giving you the option of resuming the previous computation. Ruby semantics destroy the stack as it searches for a handler, so if you install a handler up at the beginning of your program, you can't effectively handle it from Ruby (no place to resume after catching the exception).
Despite those problems, there are some interesting possibilities (a) you could poll for the gem to gem signals and (b) there might be a way to start a smalltalk thread to handle the async signals, and then deliver them to Ruby using some communications channel that is appropriate for Ruby (a queue, callback or whatever).
Could be an interesting project!
--
Peter McLain
pmc...@vmware.com
--
Peter McLain
pmc...@vmware.com
It's a bit above my head at the moment but I'll try to read up and learn. For my purposes the gemstone/s features are great, but I love the ruby language (to be honest never given smalltalk much of a go) so getting the combo would be fantastic and worth learning a bit to accomplish.
--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/ae-xJxWZS0gJ.
Feel free to pop into irc and ask questions, Squeak can be quite
overwhelming the first time :)
On 10 November 2011 11:13, Patrik Sundberg <patrik....@gmail.com> wrote:
> which gemtools version goes well with maglev and where do I find it? thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "MagLev Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/maglev-discussion/-/kH6dnSd8VScJ.