[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MIT Scheme with SLIME
From: |
Philip Kaludercic |
Subject: |
MIT Scheme with SLIME |
Date: |
Tue, 04 Jun 2024 10:04:24 +0000 |
Does anyone here use Emacs' SLIME? I adapted this snippet from
swank-mit-scheme.scm, bundled under the contrib/ directory:
--8<---------------cut here---------------start------------->8---
(with-eval-after-load 'slime
(defun mit-scheme-slime-init (file encoding)
(format "%S\n\n"
`(begin
(load-option 'format)
(load-option 'sos)
(eval
'(create-package-from-description
(make-package-description '(swank) (list (list))
(vector) (vector) (vector) false))
(->environment '(package)))
(load ,(expand-file-name "contrib/swank-mit-scheme.scm"
slime-path)
(->environment '(swank)))
(eval '(start-swank ,file) (->environment '(swank))))))
(add-to-list 'slime-lisp-implementations
`(mit-scheme ("mit-scheme")
:init ,#'mit-scheme-slime-init)))
(defun slime-mit-scheme ()
(interactive)
(slime 'mit-scheme))
--8<---------------cut here---------------end--------------->8---
But it fails, because of this function:
--8<---------------cut here---------------start------------->8---
(define (swank:set-package _ package)
(set-repl/environment! (nearest-repl)
(->environment (read-from-string package)))
(let* ((p (environment->package (user-env #f)))
(n (write-to-string (package/name p))))
(list n n)))
--8<---------------cut here---------------end--------------->8---
specifically the (->environment (read-from-string package)), that
apparently fails to correctly read a string and turn it into an
acceptable argument for ->environment:
--8<---------------cut here---------------start------------->8---
1 ]=>
;Loading "format.com"... done
;Loading "load.scm"...
; Loading "sos-unx.pkd"... done
; Loading "geneqht.com"... done
; Loading "generic.com"... done
; Loading "genmult.com"... done
; Loading "tvector.com"... done
; Loading "recslot.com"... done
; Loading "slot.com"... done
; Loading "class.com"... done
; Loading "instance.com"... done
; Loading "method.com"... done
; Loading "printer.com"... done
; Loading "macros.com"... done
;... done
;Loading "swank-mit-scheme.scm"...
;The object #[package 12 (swank)], passed as an argument to ->environment, is
not an environment.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.
--8<---------------cut here---------------end--------------->8---
I haven't contacted the SLIME developers yet (considered CC'ing their
mailing list, but apparently you have to sign up first), because I
assumed that someone here would have a better understanding of what the
problem on the Scheme side is.
Furthermore, I know about Geiser and I am not satisfied with the
package, which is why I am looking into this in the first place.
--
Philip Kaludercic on peregrine
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- MIT Scheme with SLIME,
Philip Kaludercic <=