&lt; <error printing =“”object =“”>&gt; lisp - matlisp

时间:2015-11-12 18:34:44

标签: lisp common-lisp slime quicklisp

我对Common Lisp很新,在尝试使用Matlisp包时遇到了问题,我加载了它(ql:quickload:matlisp)。

当我尝试使用包时,例如,只需执行:

(randn '(2 2))

我总是收到错误说:

&#34; 不会(是的,你读的是正确的,破坏者!)生成抽象张量等级的方法&#34; TENSOR双浮子 - 轨道 - 附件简单&#34;。&#34; [TENSOR-ABSTRACT-CLASS类型的条件]

在回溯中,我看到很多&#34;错误打印对象&#34;消息(如附图所示)。 Backtrace

我尝试过的所有matlisp功能都会出现问题。我可能遗漏了一些非常基本的东西,或者这是包裹的问题?

我在Emacs 25.0.50上运行slime,我的Lisp实现是SBCL 1.2.11,如果这些信息是相关的。

非常感谢任何帮助!

这里的回溯:

Will not (yes you read that right, buster!) generate method for abstract tensor class "TENSOR DOUBLE-FLOAT STRIDE-ACCESSOR SIMPLE-ARRAY".
   [Condition of type TENSOR-ABSTRACT-CLASS]

Restarts:
 0: [CONTINUE] Retry assertion.
 1: [RETRY] Retry SLIME REPL evaluation request.
 2: [*ABORT] Return to SLIME's top level.
 3: [REMOVE-FD-HANDLER] Remove #<SB-IMPL::HANDLER INPUT on descriptor 8: #<CLOSURE (LABELS SWANK/SBCL::RUN :IN SWANK/BACKEND:ADD-FD-HANDLER) {10031CEE8B}>>
 4: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-KERNEL:ASSERT-ERROR (TENSOR-LEAFP #:XX348) ((#:XX348 |TENSOR DOUBLE-FLOAT STRIDE-ACCESSOR SIMPLE-ARRAY|)) NIL TENSOR-ABSTRACT-CLASS :TENSOR-CLASS |TENSOR DOUBLE-FLOAT STRIDE-ACCESSOR SIMPLE-ARRAY|..
  1: ((:METHOD REF (STRIDE-ACCESSOR)) #<error printing object>) [fast-method]
      Locals:
        SUBSCRIPTS = (0 0)
        X = #<|TENSOR DOUBLE-FLOAT STRIDE-ACCESSOR SIMPLE-ARRAY| <<error printing object>> {1005CE9F93}>
  2: ((LABELS TWO-PRINT :IN PRINT-TENSOR) #<error printing object>)
      Locals:
        SB-DEBUG::ARG-0 = #<|TENSOR DOUBLE-FLOAT STRIDE-ACCESSOR SIMPLE-ARRAY| <<error printing object>> {1005CE9F93}>
        SB-DEBUG::ARG-1 = NIL
  3: ((FLET SB-IMPL::PRINT-DESCRIPTION :IN SB-IMPL::%PRINT-UNREADABLE-OBJECT))
  4: (SB-IMPL::%PRINT-UNREADABLE-OBJECT #<error printing object>)
  5: ((:METHOD PRINT-OBJECT (TENSOR T)) #<error printing object>) [fast-method]
      Locals:
        SB-DEBUG::ARG-2 = #<|TENSOR DOUBLE-FLOAT STRIDE-ACCESSOR SIMPLE-ARRAY| <<error printing object>> {1005CE9F93}>
        SB-DEBUG::ARG-3 = #<SB-IMPL::STRING-OUTPUT-STREAM {1005CEB763}>
  6: ((LABELS SB-IMPL::HANDLE-IT :IN SB-KERNEL:OUTPUT-OBJECT) #<SB-IMPL::STRING-OUTPUT-STREAM {1005CEB763}>)
  7: (SB-IMPL::STRINGIFY-OBJECT #<error printing object>)
  8: (PRIN1-TO-STRING #<error printing object>)
  9: (SWANK::PRESENT-REPL-RESULTS #<error printing object>)
 10: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1005CE9DAB}>)
 11: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1005CE9D0B}>)
 12: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1005CE9CEB}>)
 13: (SWANK-REPL::REPL-EVAL "(randn '(2 2)) ..)
 14: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "(randn '(2 2)) ..)
 15: (EVAL (SWANK-REPL:LISTENER-EVAL "(randn '(2 2)) ..)
 16: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(randn '(2 2)) ..)
 17: (SWANK::PROCESS-REQUESTS T)
 18: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
 19: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
 20: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {1005CE6B7B}>)
 21: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/danielpgomez/.emacs.d/elpa/slime-20151110.1649/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-..
 22: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #1=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {1003FA0833}>) (*STANDARD-INPUT* . #2=#<SWANK/GRAY::SLIME-INPUT-STREAM {1002E15833}>) (*TRACE-OUTPUT* . #1#) (*ERR..
 23: (SWANK::HANDLE-REQUESTS #<SWANK::SINGLETHREADED-CONNECTION {10031CED73}> T)
 24: ((LABELS SWANK/SBCL::RUN :IN SWANK/BACKEND:ADD-FD-HANDLER) 8)
 25: (SB-IMPL::SUB-SUB-SERVE-EVENT NIL NIL)
 26: (SB-IMPL::SUB-SERVE-EVENT NIL NIL NIL)
 27: (SB-SYS:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL T)
 28: (SB-IMPL::REFILL-INPUT-BUFFER #<SB-SYS:FD-STREAM for "standard input" {10064BC373}>)
 29: (SB-IMPL::INPUT-CHAR/ASCII #<SB-SYS:FD-STREAM for "standard input" {10064BC373}> NIL 0)
 30: ((LAMBDA (&REST REST) :IN SB-IMPL::GET-EXTERNAL-FORMAT) #<SB-SYS:FD-STREAM for "standard input" {10064BC373}> NIL 0)
 31: (READ-CHAR #<SB-SYS:FD-STREAM for "standard input" {10064BC373}> NIL 0 #<unused argument>)
 32: (READ-CHAR #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {10001A25A3}> NIL 0 #<unused argument>)
 33: (SB-IMPL::%READ-PRESERVING-WHITESPACE #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {10001A25A3}> NIL (NIL) T)
 34: (SB-IMPL::%READ-PRESERVING-WHITESPACE #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {10001A25A3}> NIL (NIL) NIL)
 35: (READ #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {10001A25A3}> NIL (NIL) NIL)
 36: (SB-IMPL::REPL-READ-FORM-FUN #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {10001A25A3}> #<unavailable argument>)
 37: (SB-IMPL::REPL-FUN NIL)
 38: ((LAMBDA NIL :IN SB-IMPL::TOPLEVEL-REPL))
 39: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA NIL :IN SB-IMPL::TOPLEVEL-REPL) {1004A6241B}>)
 40: (SB-IMPL::TOPLEVEL-REPL NIL)
 41: (SB-IMPL::TOPLEVEL-INIT)
 42: ((FLET #:WITHOUT-INTERRUPTS-BODY-85 :IN SB-EXT:SAVE-LISP-AND-DIE))
 43: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE))

1 个答案:

答案 0 :(得分:4)

问题是复合的。 Matlisp在printing routine of base tensor期间遇到了问题。从我的测试中,只有最新的提交提出了这个问题。由于某种原因,这会使史莱姆的swank-repl :: repl-eval绊倒。它不会发生在sly上。

您应该在matlisp的问题跟踪器上报告打印错误,并且您可以使用之前的提交,例如6f7d1dc,或者使用Sly。