[Top][All Lists]

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

[Bug-apl] Implementing realtime variable viewer support

From: Elias Mårtenson
Subject: [Bug-apl] Implementing realtime variable viewer support
Date: Wed, 12 Feb 2014 12:58:05 +0800

I was watching this video where they take advantage of the )ED command in Dyalog which supports realtime updated views of a variable: http://youtu.be/a9xAKttWgP4?t=5m2s

At 5:02 into the above video, the presenter types )ED variablename which opens a window that with the content of a variable. This is a very neat feature.

Obviously, I wanted to see the same thing in GNU APL (for myself, I'd like to see it in an Emacs buffer). So, I started work on this (exactly what method should be used to invoke this feature is a subject for a separate email thread which I will post shortly).

The key feature that is needed is a way to be informed when a variable is changed. Changes to a variable seems to be done through calls to method of Symbol. The key methods are Symbol::assign(), Symbol::assign_indexed() and Symbol::push_value().

The approach I started experimenting with is to create a subclass of Symbol which provides callback functionality when these methods are called, which I can then use to send a message to Emacs when the values are changed. I'm not done with this yet, so I'm not ready to say if this say if it works fully at this point.

Now, I would like to know three things:
I suppose an alternative approach to all of this would be to add the callback functionality right into the Symbol class, but that would have negative potential performance implications.

What are your thoughts on this?


reply via email to

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