LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-29-2019, 05:45 AM   #1
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Rep: Reputation: Disabled
CLISP, EMACS & SLIME and the '(slime-repl)


Hello folks - good day

Try as I might, on Slackware 14.2 (32 or 64), I cannot get a working CLISP/EMACS/SLIME setup with the latest versions - well more specifically, it is when trying to use the contrib '(SLIME-REPL) ... which is the whole point of using EMACS/SLIME.

I am always getting 'unexpected disconnections' when an error is encountered in a lisp form. I have raised this on the CLISP mailing list and some responses were given, though not to resolution. Indeed, one suggested that on their *Debian* setup of CLISP/EMACS/SLIME using the SLIME-REPL was fine and I am not sure what that suggests. It used to work I feel on earlier co-operating versions, but I am not any where near competent in lisp, clisp, emacs etc to debug it etc.

*****
Any way all that said, what my enquiry here is about: if anyone is using CLISP, EMACS, SLIME with the SLIME-REPL on Slackware specifically, please can you post the .clisprc.lisp, the .emacs config files... please ?

I can start from there and that seems better than any thing else at this stage.
*****

I have tried all sorts of settings from simple to complex and nothing seems to stop the 'unexpected disconnection' when using the 'slime-repl'.

Thank you if by [perhaps] rare chance, anyone out there is using without any errors and can post the configs.
Habs
 
Old 09-29-2019, 03:27 PM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Maybe you should raise an issue at https://github.com/slime/slime/issues

When you turn on "Enter debugger on error" in the options menu and then run your command, what does the traceback look like?
 
Old 09-30-2019, 08:40 AM   #3
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
Maybe you should raise an issue at https://github.com/slime/slime/issues

When you turn on "Enter debugger on error" in the options menu and then run your command, what does the traceback look like?
Thank you for your reply. I will endeavour to raise the matter as you suggest.

I dont get a traceback, because the 'unexpected disconnection' between CLISP and SLIME/SWANK just crashes out. Mind you, I am not aware of how or where (CLISP, or SLIME/SWANK) to debug it. CLISP is running as inferior-lisp in EMACS SLIME mode.

That's why I wanted first to start with some know working configs on Slackware 14.2, 32 and 64 bit. Maybe someone will pop along with some in the meantime...probably not though :-)

Regards.
Habs

Last edited by badbetty; 09-30-2019 at 08:41 AM.
 
Old 10-04-2019, 08:34 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
So, I just used a special user that I have on my Slackware64 14.2 system that normally doesn't have anything special configured.

I used MELPA to install SLIME by creating the file ~/.emacs.d/init.el containing...
Code:
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                    (not (gnutls-available-p))))
       (proto (if no-ssl "http" "https")))
  (when no-ssl
    (warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))
  ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
  (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
  ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
I restarted emacs and then ran the command
Code:
M-x package-refresh-contents
followed by
Code:
M-x package-install RET slime RET
. I then edited my init.el file to add 3 lines after (package-initialize)...
Code:
(require 'slime-autoloads)
(setq inferior-lisp-program "/usr/bin/clisp")
(setq slime-contribs '(slime-repl))
...and restarted emacs one last time.

I then ran
Code:
M-x slime
followed by entering the crap form
Code:
 (setq barf "bibble"
	       ))
in the *slime-repl clisp* buffer and hitting return.

The *sldb clisp/0* buffer gave me
Code:
READ from #1=#<INPUT STRING-INPUT-STREAM>: an object cannot start with #\)
   [Condition of type SYSTEM::SIMPLE-READER-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*PROCESS-INPUT] Continue reading input.
 2: [ABORT] Return to SLIME's top level.
 3: [CLOSE-CONNECTION] Close SLIME connection.
 4: [ABORT] Abort main loop

Backtrace:
  0: <1/399> #<COMPILED-FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
     [397] frame binding variables (~ = dynamically):
       | ~ *DEBUGGER-HOOK* <--> #<COMPILED-FUNCTION SWANK:SWANK-DEBUGGER-HOOK>
  1: <1/394> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> 1
     [393] frame binding variables (~ = dynamically):
       | ~ SYSTEM::*PRIN-STREAM* <--> #<UNBOUND>
  2: <1/383> #<SYSTEM-FUNCTION SYSTEM::RPAR-READER> 2
     [381] frame binding variables (~ = dynamically):
       | ~ SYSTEM::*READING-STRUCT* <--> NIL
  3: <1/363> #<SYSTEM-FUNCTION READ>
     - ("bibble")
  4: [355] unwind-protect frame
  5: <1/351> #<COMPILED-FUNCTION SWANK::EVAL-REGION>
     - #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1-1-1>
  6: <1/349> #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1-1-1>
     - #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1-1-1>
  7: [348] unwind-protect frame
  8: <1/344> #<COMPILED-FUNCTION SWANK-REPL::TRACK-PACKAGE>
     - #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1-1>
  9: <1/342> #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1-1>
     - #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1-1>
 10: <1/331> #<COMPILED-FUNCTION SWANK::CALL-WITH-RETRY-RESTART>
     - #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1>
 11: <1/328> #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1>
     - #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL-1>
 12: <1/326> #<COMPILED-FUNCTION #:|478 480 (DEFINTERFACE CALL-WITH-SYNTAX-HOOKS (FN) ...)-58-3-1|>
     - #<COMPILED-FUNCTION #:|478 480 (DEFINTERFACE CALL-WITH-SYNTAX-HOOKS (FN) ...)-58-3-1|>
 13: <1/322> #<COMPILED-FUNCTION SWANK/BACKEND:CALL-WITH-SYNTAX-HOOKS>
     [321] frame binding variables (~ = dynamically):
       | ~ *PACKAGE* <--> #<PACKAGE COMMON-LISP-USER>
 14: <1/317> #<COMPILED-FUNCTION SWANK::CALL-WITH-BUFFER-SYNTAX>
     - #(NIL "(setq barf \"bibble\"\n	       ))\n")
 15: <1/313> #<COMPILED-FUNCTION SWANK-REPL::REPL-EVAL>
     - SWANK-REPL::REPL-EVAL
 16: <1/309> #<COMPILED-FUNCTION SWANK-REPL:LISTENER-EVAL>
     - #<COMPILED-FUNCTION SWANK-REPL:LISTENER-EVAL>
 17: [306] EVAL frame for form (SWANK-REPL:LISTENER-EVAL "(setq barf \"bibble\"\n	       ))\n")
 18: <1/298> #<SYSTEM-FUNCTION EVAL>
     [297] frame binding variables (~ = dynamically):
       | ~ SWANK::*SLIME-INTERRUPTS-ENABLED* <--> NIL
 19: <1/293> #<COMPILED-FUNCTION SWANK::EVAL-FOR-EMACS-4>
     - #<COMPILED-FUNCTION SWANK::EVAL-FOR-EMACS-4>
 --more--
 
Old 10-05-2019, 01:44 AM   #5
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Original Poster
Rep: Reputation: Disabled
@richard cranium - thankyou for that.

Since your previous to last post, I've been narrowing down the issue. This problem appears to be only when using a 32bit system...I've tried Debian 32bit (as a virtual machine) too and get the same 'unexpected disconnection...'.

Your 64bit test does appear to work fine just as it did for me.

I have consulted the Clisp mailing list with the 32bit observation to see if there is any comment/observation/verification on the problem.

Thanks again for the interest. If you have available a 32bit setup to try as you did 64bit and a bit of time in and amongst...that would be helpful.

Of course it may just be easier to migrate from 32bit machines, but finding out why this is happening when it shouldn't be might not then happen.
 
Old 10-05-2019, 08:09 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
So, I created a new VM for Slackware 14.2 and upgraded it to be up-to-date.

I then followed the same steps to install SLIME as I mentioned above.

I then evaluated the form (setq barf "bibble")), which failed with a "Lisp connection closed unexpectedly: connection broken by remote peer"

The buffer *inferior-lisp* contained a better error message...
Code:
*** - handle_fault error 2 ! address = 0x408 not in [0x206ec004,0x20924874) !
SIGSEGV cannot be cured.  Fault address = 0x408
GC count: 342
Space collected by GC: 0 208030496
Run time: 4 275000
Real time: 18 610303
GC time: 1 14800
Permanently allocated: 94080 bytes.
Currently in use: 4375336 bytes.
Free space: 20 bytes.
I don't believe that anything after the SIGSEGV cannot be cured. Fault address = 0x408 is significant.

I'm afraid that my interest in a 32-bit only problem is practically non-existent; none of my current machines run 32 bit slackware and I don't see doing so in the future.
 
Old 10-06-2019, 03:07 AM   #7
badbetty
Member
 
Registered: Jan 2014
Posts: 159

Original Poster
Rep: Reputation: Disabled
I dare say we have arrived at the same point. As I mentioned, it isn't just Slackware; this happens with Debian too. It seems to be just 32bit as we have observed.

Thank you for your testing @Richard Cranium. Perhaps your comments on 32bit machines reflect the natural progression, but in that, what used to work no longer does.

My foray into this problem started with trying to do a remote connection (as in from one machine to slime/swank on a remote machine) and it failed to work, but if I recall, the remote slime/swank was on a 32bit machine. It would seem that the CLISP /SWANK comms. on 32bit is suspect.

Cheers. I will report back to clisp-list
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sublime Text and Python. When you active REPL within Sublime Text 3 with Python, pop up version 2.7 as default, onto Ubuntu environment for arrayo Programming 1 04-05-2019 11:45 AM
[SOLVED] Follow on re: CLISP re-build using current - does CLISP on current work with quicklisp ? badbetty Slackware 10 04-11-2018 02:47 PM
[SOLVED] slime will not load in emacs cliff1m Linux - Newbie 1 02-23-2015 05:32 PM
How can I get emacs -nw when I call emacs from a terminal but GUI emacs elsewhere? Blackened Justice Linux - Newbie 4 09-08-2011 07:57 AM
Simple REPL buffer question flebber Programming 4 08-09-2006 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration