Frozen EQL window

10 views
Skip to first unread message

Paul Walz

unread,
Dec 31, 2010, 5:55:45 PM12/31/10
to eql-user
I am trying to run an interactive instance of EQL via slime. When I
run EQL directly from a command prompt using the command "eql -qgui"
it works correctly. When I try to invoke EQL via slime/emacs using the
"(eql:qgui)" command I get a frozen EQL window. I noticed someone else
on this group also had the same problem and that it was suggested that
there was something that probably needed to be tweaked in the swank
patch but I didn't see any specific solutions and was hoping that
since that posting was old maybe someone else had a solution by now.
fyi my configuration is as follows:
Windows Vista SP2 32bit
MS Visual Studio 2008
ECL 10.4.1
XEmacs 21.4.22 (not regular Emacs)

Thanks!

Polos Ruetz

unread,
Jan 1, 2011, 6:10:19 AM1/1/11
to eql-...@googlegroups.com
2010/12/31, Paul Walz <paul...@gmail.com>:

> I am trying to run an interactive instance of EQL via slime.
> ...

> Windows Vista SP2 32bit
> MS Visual Studio 2008
> ECL 10.4.1
> XEmacs 21.4.22 (not regular Emacs)

I have a working configuration for both XP and 7, simply using the
".emacs" from the "Windows Easy Guide", and applying the SLIME patch,
see file "doc/SLIME-Windows.htm".
The trick here is to use the eql.exe instead of the ecl.exe for SLIME,
see the following line from ".emacs":

(setq inferior-lisp-program "C:/eql/eql.exe")

After starting SLIME, you can switch to the EQL package:

(in-package :eql)

Now you have a EQL REPL processing Qt events.

The way it works is a hack (e.g. some SLEEP function is needed in SLIME).

You may want to look at example 9 for a clean solution where Qt events
are processed natively, without performance loss, keeping your program
interactive.
But example 9 is only a very very simple and experimental editor, see
the README.

Paul

Polos Ruetz

unread,
Jan 1, 2011, 9:04:38 AM1/1/11
to eql-user
On 31 Dic 2010, 23:55, Paul Walz <paul.w...@gmail.com> wrote:
> I am trying to run an interactive instance of EQL via slime.
> ...
> XEmacs 21.4.22 (not regular Emacs)

I just tried with XEmacs on Windows 7.
The only difference there is the Emacs ini file, which for me is
located here:

C:\Users\<username>\.xemacs\custom.el

Running (eql:qgui) didn't work, freezing the window (I will look into
this some other day).

BUT: after restarting XEmacs & SLIME, running the example "2-
clock.lisp" worked just fine (using slashes instead of backslashes in
the pathname).

Paul

Polos Ruetz

unread,
Jan 1, 2011, 10:53:16 AM1/1/11
to eql-user
On 31 Dic 2010, 23:55, Paul Walz <paul.w...@gmail.com> wrote:
> When I try to invoke EQL via slime/emacs using the
> "(eql:qgui)" command I get a frozen EQL window.

OK, please open the file eql/gui/gui.lisp, and check if it ends with
the line:

#|

Shame on me, this should obviously be |# instead (end of multi-line
comment).
After correcting this typo (which affected a version from some day
ago), it worked for me, even in XEmacs.

Paul

Paul Walz

unread,
Jan 2, 2011, 9:45:37 AM1/2/11
to eql-user
Hi Polos,

Thank you for spending the time to look into my issue and for all the
responses.

1) Forgot to mention in my initial posting that I am using Qt 4.7.1 -
not sure if that makes any difference.

2) You mentioned several items to confirm that I was doing, and things
to try so here we go...
a) Use the instructions in doc/SLIME-Windows.htm to apply the SLIME
patch
Already done.
b) Make sure I am using the line (setq inferior-lisp-program "C:/eql/
eql.exe")
Already done.
c) Use C:\Users\<username>\.xemacs\custom.el
I use C:\Users\<username>\.xemacs\init.el but I am sure that XEmacs
is successfully executing this file because it is what I used to
initially setup XEmacs to talk to my lisp implementation. ie if XEmacs
were not using this I would not even be able to use SLIME with
(regular) ECL to begin with.
d) Try example "2-clock.lisp"
You mention "using slashes instead of backslashes in the pathname" -
I am not sure what you mean by this.
These are the steps I performed:
i) Run XEmacs. (XEmacs successfully opens)
ii) C-x C-f c:\eql\examples\2-clock.lisp (The 2-clock.lisp file
opens in XEmacs)
iii) M-x slime (I can see XEmacs loading the correct version of
SLIME on my system - the copy of SLIME that has the EQL related patch.
Using Process Explorer from SysInternals I can see that XEmacs has in
fact correctly loaded eql.exe (not ecl.exe))
iv) Switched back to buffer containing 2-clock.lisp
v) Ran C-c C-k to compile (I get a small frozen eql window)
vi) I restarted the process and this time used C-c C-l instead of C-
c C-k (I got the same small frozen eql window)
e) Confirm that eql/gui/gui.lisp ends with correctly with "|#" (if it
ends with "#|" that would be wrong)
My copy of eql/gui/gui.lisp already ends correctly with "|#". So it
aleardy appears to be correct in my copy of EQL and it still freezes.
Here are the last few lines as they already appeared in my file:

;;; profile

#|
(require :profile)

(progn
(use-package :profile)
(profile:profile
qfun
qset
qget))
|#

This makes me wonder though... When I downloaded EQL I used the "eql-
master.tar.gz (gitorious)" link found at http://password-taxi.at/EQL
which points to http://gitorious.org/eql/eql/archive-tarball/master
since I did not have GIT installed on this machine. Is is OK to use
that link to get your latest code or do I need to use the git command
you have on that page instead. ie did the code on your local machine
have the incorrect closing multiline comment because your code is
newer than what is in GIT or because I need to use the GIT command to
fetch your code instead of the http://gitorious.org/eql/eql/archive-tarball/master
link?

3) NOTE:
When editing swank-backend.lisp I put the following code at the very
END of the file:
(let ((embedded-qt-lisp (find :eql *features*))) ; [EQL]
(defun wait-for-streams (streams timeout)
(loop
;; [EQL]
(when embedded-qt-lisp
(eql:qprocess-events))
(when (check-slime-interrupts) (return :interrupt))
(let ((ready (remove-if-not #'stream-readable-p streams)))
(when ready (return ready)))
(when timeout (return nil))
(sleep (if embedded-qt-lisp 0.02 0.1))))) ; [EQL]

And when editing swank-loader.lisp I put the following code at the
very BEGINNING of the file (directly after the comments at the head of
the file):
(make-package :swank-loader)
(defparameter swank-loader::*fasl-directory* "C:/xemacs/slime/fasl/")

Thanks!

Polos Ruetz

unread,
Jan 2, 2011, 4:11:32 PM1/2/11
to eql-...@googlegroups.com
2011/1/2, Paul Walz <paul...@gmail.com>:
> ...

Thanks for your detailed description, I already found a possible
reason, read on.

> d) Try example "2-clock.lisp"
> You mention "using slashes instead of backslashes in the pathname" -
> I am not sure what you mean by this.

This was meant when using LOAD.

> This makes me wonder though... When I downloaded EQL I used the "eql-
> master.tar.gz (gitorious)" link found at http://password-taxi.at/EQL
> which points to http://gitorious.org/eql/eql/archive-tarball/master
> since I did not have GIT installed on this machine. Is is OK to use
> that link to get your latest code

Yes, you don't need git, the tarball always contains the latest
version (it is even preferable, since EQL contains lots of generated
files which may change, and which git has to keep track of --
currently the git version is already ~50(!) MB large, uncompressed).

> 3) NOTE:
> When editing swank-backend.lisp I put the following code at the very
> END of the file:
> (let ((embedded-qt-lisp (find :eql *features*))) ; [EQL]
> (defun wait-for-streams (streams timeout)

> ...

Here we have it: the patch should *not* be appended to the file -- it
is meant to add the code marked red to the already existing function.
I'm sorry if this is not clear from my description of how to apply the
patch.

So, please could you try to out-comment the original WAIT-FOR-STREAMS
function in "swank-backend.lisp".

I tried appending the patched function to the file (as you did),
leaving the original function untouched, and got a frozen window like
you...

Additional note:
I will try to replace the current SLIME patch with a better, simpler
solution, similar in spirit to example 9:
- no SLIME patch needed
- no performance loss (native Qt event processing, no SLEEP needed)
- it will suffice to point the inferior Lisp of SLIME to EQL instead of ECL

Paul Walz

unread,
Jan 2, 2011, 7:38:38 PM1/2/11
to eql-user
Hi Polos,

I now replaced that function (instead of appending another copy) and
tried both (eql:qgui) and the 2-clock.lisp and they both work
perfectly now! (no frozen windows) I look forward to trying the new
solution you mention when it is ready. I am really excited to be able
to have a GUI for my lisp apps, thanks again for all the help!

On Jan 2, 4:11 pm, Polos Ruetz <polos.ru...@gmail.com> wrote:
> 2011/1/2, Paul Walz <paul.w...@gmail.com>:
>
> > ...
>
> Thanks for your detailed description, I already found a possible
> reason, read on.
>
> >    d) Try example "2-clock.lisp"
> >            You mention "using slashes instead of backslashes in the pathname" -
> > I am not sure what you mean by this.
>
> This was meant when using LOAD.
>
> >            This makes me wonder though... When I downloaded EQL I used the "eql-
> > master.tar.gz (gitorious)" link found athttp://password-taxi.at/EQL
Reply all
Reply to author
Forward
0 new messages