Re: Idea: Can we modify Devel::REPL or combine with Perl Object Environment to have programmatic interaction with a gtk2-perl process like in other languages?
- From: Mitchell Laks <mlaks post harvard edu>
- To: gtk-perl-list gnome org
- Subject: Re: Idea: Can we modify Devel::REPL or combine with Perl Object Environment to have programmatic interaction with a gtk2-perl process like in other languages?
- Date: Wed, 22 Apr 2009 01:43:27 -0400
On 17:36 Mon 20 Apr , muppet wrote:
Remco Wouts did something along those lines:
http://mail.gnome.org/archives/gtk-perl-list/2005-January/msg00128.html
as did i:
http://asofyet.org/muppet/software/gtk2-perl/gish.html
http://asofyet.org/muppet/software/gtk2-perl/gws.html
There should be some ideas in there on how to fix the mainloop issue. :-)
Thank you muppet, that is exactly what I was thinking of.
1.
Of course, when I wrote my email I was still very hazy in my thinking.
I knew what I wanted, (to work with gtk2-perl with a REPL) but had not thought it out what was involved.
Yes, as you said, I wanted to have access to get into the mainloop..
2.
Of course, what Remco and you have done is essentially running eval on the command line input, either via
Term::Readline::Gnu
or in gish via your Tk package (which I haven't figured out yet, his is more straight forward for me to
grasp).
Can you explain what is going on in your Tk magic... Also in view of the work of Ryan below...
Conceptually, what you are doing is, essentially, 180 degree ANTI 'Taint' mode.
Instead of sanitizing, we anti-sanitize
we just eval the input directly from the Terminal::Readline!
Then another approach is to set up a text buffer window (can be multiple!) with gtk2-perl and some buttons
and then
when we hit a button eval the text (or subset of the text) in the corresponding buffer(s).
That would work as well I guess.
I think that is the idea of what you do in your GWS application.
3.
Your method (and Remco) reminds me of the perldl shell
which comes with PDL mathematical methods package. Or possibly perl debugger.
I have used them...
4.
I am still reading about Devel::REPL and compared it to these direct eval methods?
He creates a persistent lexical environment so my works.
http://chainsawblues.vox.com/library/post/a-perl-read-excute-print-loop-repl.
Now I will play with Ryans REPL/Plugin/Glib.pm and see how it works.
5.
I just also found the Stylish::REPL emacs plugin method of Jonathan Rockway.
http://blog.jrock.us/articles/Stylish REPL.pod
See his amazing video
http://www.iinteractive.com/stylish-repl-screencast.ogv
which is a counterpart to the common lisp Slime Emacs video
http://www.archive.org/details/UsingtheSLIMELispInteractionModeforEmacs
I will be playing with that too.. Have you tried it?
6.
I guess the POE is another way (besides GUI windows) to allow multiple processes to get access to resources
and thus execute. I am still
reading about that...
Thanks once again!
Mitchell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]