Feature request: Save/restore-stack

14 views
Skip to first unread message

mja

unread,
Nov 11, 2011, 6:56:16 AM11/11/11
to Reinteract
As I understand it, Reinteract saves the state after each operation to
avoid complete recalculations upon changes. Wouldn't that make it easy
to implement a save/restore-stack à la the graphic state stack in
Postscript (gstore/grestore/grestoreall).

Another possibility would be restore points/snapshots saved within
state-objects, like the save/restore combo in Postscript. The best
scenario would of course be to implement both, like Postscript.

I've also implemented save/restore points on an object level in Ruby,
it was also really useful.

Restore points is really addictive in an interactive computer language/
environment, as users of even Reinteract limited save/restore-
capabilities might have experienced. Reinteract seem to be halfway
there to implement a really useful explorative programming
environment.

And yes, I really like Postscript, it is a wonderful language for
interactive/exploratory use. It is a shame that the designers of
Javascript, Ruby and Python haven't realised that they have created
very crude dictionary-based languages and made them as wonderful as a
dictionary-based language can be (e.g. Postscript). Try out
Ghostscript in interactive mode (or interact with your Postscript
printer through a remote connection), there is a lot of stuff that
would be nice to have in Reinteract (and there are a lot of stuff that
would be nice to have in Ghostscript that Reinteract have).

I'm currently relearning Python (with the help of Reinteract), to see
if it has improved since the last time I used it 15 years ago (and
hated it) and because a lot of applications I use have Python as their
native scripting language. Reinteract seem cool, except for the
serious lag when I'm writing stuff; wtf, waiting 20 minutes to see
what I wrote in 2 minutes (and I have a rather fast computer, I wonder
how much lag it would be on a slow computer), if the word completion/
help tips can't be made faster, it should be possible to turn them off.

Owen Taylor

unread,
Nov 11, 2011, 10:09:22 AM11/11/11
to reint...@googlegroups.com
On Fri, Nov 11, 2011 at 6:56 AM, mja <martin.ja...@gmail.com> wrote:
> As I understand it, Reinteract saves the state after each operation to
> avoid complete recalculations upon changes. Wouldn't that make it easy
> to implement a save/restore-stack à la the graphic state stack in
> Postscript (gstore/grestore/grestoreall).

It's possible, yes, if you what you want to save and restore are the
local variables of the Reinteract worksheet. It doesn't immediately
strike me as something that fits well within Reinteract way of
working.

Do you have an example where a save()/restore() would take something
that is cumbersome to write currently and make it simple?

> I'm currently relearning Python (with the help of Reinteract), to see
> if it has improved since the last time I used it 15 years ago (and
> hated it) and because a lot of applications I use have Python as their
> native scripting language. Reinteract seem cool, except for the
> serious lag when I'm writing stuff; wtf, waiting 20 minutes to see
> what I wrote in 2 minutes (and I have a rather fast computer, I wonder
> how much lag it would be on a slow computer), if the word completion/
> help tips can't be made faster, it should be possible to turn them off.

Hmm, are you hitting:

https://bugzilla.gnome.org/show_bug.cgi?id=659335

But that really takes a *big* module to make it obnoxious - the 'gtk'
module has over 1200 symbols, and it still only causes a few second of
hang, not 20 minutes of hang.

Generally reinteract stays really fast for me unless I'm doing
calculations that are themselves slow.

- Owen

Reply all
Reply to author
Forward
0 new messages