edicl / cl-interpol Goto Github PK
View Code? Open in Web Editor NEWCommon Lisp surface syntax niceties
Home Page: http://edicl.github.io/cl-interpol/
Common Lisp surface syntax niceties
Home Page: http://edicl.github.io/cl-interpol/
It used to work with SBCL 2.0.5. Now I get this stacktrace:
Invoking sbcl: "/gnu/store/08mkgwcib4rnlaxnq7dw9q9hzchz65lf-sbcl-2.0.6/bin/sbcl" "--non-interactive" "--eval" "(require :asdf)" "--eval" "(asdf:load-asd (truename \"/gnu/store/d1w4mkf8iprcqgz2xdl427fh1lmxhnvx-sbcl-cl-interpol-0.2.6-1.1fd288d/share/common-lisp/sbcl-source/cl-interpol/cl-interpol.asd\") :name \"cl-interpol\")" "--eval" "(asdf:operate (quote asdf:compile-bundle-op) \"cl-interpol\")"
This is SBCL 2.0.6, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
WARNING: System definition file #P"/gnu/store/d1w4mkf8iprcqgz2xdl427fh1lmxhnvx-sbcl-cl-interpol-0.2.6-1.1fd288d/share/common-lisp/sbcl-source/cl-interpol/cl-interpol.asd" contains definition for system "cl-interpol-test". Please only define "cl-interpol" and secondary systems with a name starting with "cl-interpol/" (e.g. "cl-interpol/test") in that file.
WARNING: PARSE-VERSION: "0.9-2.64bd53f" doesn't follow asdf version numbering convention
WARNING: Invalid :version specifier "0.9-2.64bd53f" for component "named-readtables" from file #P"/gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables.asd", using NIL instead
WARNING: Invalid :version specifier "0.9-2.64bd53f" for component "named-readtables" from file #P"/gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables.asd", using NIL instead
;;; Computing Hangul syllable namesUnhandled TYPE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
{10009F0083}>:
The value
0
is not of type
LIST
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10009F0083}>
0: (SB-IMPL:DISPATCH-TABLES #<error printing a READTABLE: #<UNDEFINED-FUNCTION READTABLE-NAME {10022CE0D3}>> T)
1: (%MAKE-READTABLE-ITERATOR #<error printing a READTABLE: #<UNDEFINED-FUNCTION READTABLE-NAME {10022D12F3}>>)
2: (%CLEAR-READTABLE #<error printing a READTABLE: #<UNDEFINED-FUNCTION READTABLE-NAME {10022D4293}>>)
3: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for "file /gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables--system.fasl" {100222C0B3}> :TABLE #(899 SET *PACKAGE* "EDITOR-HINTS.NAMED-READTABLES" #<PACKAGE "SB-C"> SB-C::%DEFMACRO #<PACKAGE "EDITOR-HINTS.NAMED-READTABLES"> DEFREADTABLE #<PACKAGE "SB-VM"> SB-VM::CONS->R11 SB-VM::CONS->RNN REMOVE-IF-NOT ...) :STACK #(3 SB-IMPL::%DEFVAR *EMPTY-READTABLE* #S(SB-C:DEFINITION-SOURCE-LOCATION :NAMESTRING "/gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/share/common-lisp/sbcl-source/named-readtables/src/named-readtables.lisp" :INDICES 753665) %CLEAR-READTABLE #<error printing a READTABLE: #<UNDEFINED-FUNCTION READTABLE-NAME {10022DB003}>> NIL SB-KERNEL:%FUN-NAME 124361 FDEFINITION 117449 FDEFINITION ...) :NAME-BUFFER #("\0" "%STANDARD-READTABLEACRO-CLOSURE-NAME-P-P") :DEPRECATED-STUFF NIL :SKIP-UNTIL NIL) NIL)
4: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables--system.fasl" {100222C0B3}> NIL NIL)
5: ((FLET SB-FASL::THUNK :IN LOAD))
6: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<CLOSURE (FLET SB-FASL::THUNK :IN LOAD) {7FFFF797690B}> #<SB-SYS:FD-STREAM for "file /gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables--system.fasl" {100222C0B3}>)
7: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables--system.fasl" {100222C0B3}> T)
8: (LOAD #P"/gnu/store/aqjnndhn5q4fdx7jl1daib6wqlqb4izc-sbcl-named-readtables-0.9-2.64bd53f/lib/sbcl/named-readtables--system.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T :EXTERNAL-FORMAT :DEFAULT)
9: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CLOSURE (LAMBDA NIL :IN UIOP/LISP-BUILD:LOAD*) {100222AD0B}> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-FINALIZERS)))
10: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/BUNDLE:COMPILED-FILE "named-readtables" "named-readtables--system">)
11: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
12: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/BUNDLE:COMPILED-FILE "named-readtables" "named-readtables--system">) [fast-method]
13: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {10054BE813}>) [fast-method]
14: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
15: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {10054BE813}>) [fast-method]
16: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/BUNDLE:COMPILE-BUNDLE-OP > #<ASDF/SYSTEM:SYSTEM "cl-interpol"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
17: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/BUNDLE:COMPILE-BUNDLE-OP > #<ASDF/SYSTEM:SYSTEM "cl-interpol">)
18: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
19: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/BUNDLE:COMPILE-BUNDLE-OP > #<ASDF/SYSTEM:SYSTEM "cl-interpol">) [fast-method]
20: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/BUNDLE:COMPILE-BUNDLE-OP "cl-interpol")
21: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
22: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/BUNDLE:COMPILE-BUNDLE-OP "cl-interpol") [fast-method]
23: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<CLOSURE (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {10054AC5BB}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
24: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
25: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<CLOSURE (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {100548E64B}> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
26: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/BUNDLE:COMPILE-BUNDLE-OP "cl-interpol") [fast-method]
27: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/OPERATE:OPERATE (QUOTE ASDF/BUNDLE:COMPILE-BUNDLE-OP) "cl-interpol") #<NULL-LEXENV>)
28: (EVAL (ASDF/OPERATE:OPERATE (QUOTE ASDF/BUNDLE:COMPILE-BUNDLE-OP) "cl-interpol"))
29: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(require :asdf)") (:EVAL . "(asdf:load-asd (truename \"/gnu/store/d1w4mkf8iprcqgz2xdl427fh1lmxhnvx-sbcl-cl-interpol-0.2.6-1.1fd288d/share/common-lisp/sbcl-source/cl-interpol/cl-interpol.asd\") :name \"cl-interpol\")") (:EVAL . "(asdf:operate (quote asdf:compile-bundle-op) \"cl-interpol\")") (:QUIT)))
30: (SB-IMPL::TOPLEVEL-INIT)
31: ((FLET SB-UNIX::BODY :IN SB-EXT:SAVE-LISP-AND-DIE))
32: ((FLET "WITHOUT-INTERRUPTS-BODY-14" :IN SB-EXT:SAVE-LISP-AND-DIE))
33: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE))
Named-readtables are more convenient because it's in-readtable
can be recognized by SLIME and SLY and they will use it information when evaluating regions of the code in the buffer.
I suggest to add something like that into the cl-interpol
package along with existing enable-interpol-syntax
macro:
(defpackage #:cl-interpol
(:use #:cl)
(:import-from #:named-readtables
#:defreadtable))
(defreadtable :interpol-syntax
(:merge :standard)
(:dispatch-macro-char #\# #\? #'cl-interpol:interpol-reader))
After that anybody can use it in his code like that:
(defpackage #:my-package
(:use #:cl)
(:import-from #:named-readtables
#:in-readtable))
(in-readtable :interpol-syntax)
(format t #?"The package: ${*package*}")
I'll make a pull-request if you agreed.
Hello,
I have this macro in my code:
(defmacro interpol (string)
(with-input-from-string (s (prin1-to-string string))
(cl-interpol:interpol-reader s nil nil :recursive-p nil)))
So I don't need to use the reader syntax. I just use the macro.
What do you think of including in cl-interpol?
#?"\xe9\x87\x8f\xe4\xbb\xb7"
=>
"�价"
correct result should be "量价"
My temp solution is:
(babel:octets-to-string
(make-array 6
:element-type '(unsigned-byte 8)
:initial-contents (mapcar #'char-code
(coerce #?"\xe9\x87\x8f\xe4\xbb\xb7"
'list)))
:encoding :utf-8)
=>
"量价"
Would you please consider adding a :description option to your system definition of cl-interpol?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.