Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. #| -*- lisp -*-
  2. exec sbcl --script $0 $* # |#
  3. ;;≈ç√Ωπøπøˆøˆˆ©ƒ√∂
  4. (set-dispatch-macro-character
  5. #\# #\/ (lambda(stream subchar arg)
  6. (declare (ignore subchar arg))
  7. (list (quote quote) (read stream t nil t))))
  8. (defun concat(&rest r) (apply #'concatenate #/string r))
  9. (import #/(sb-impl::quasiquote sb-impl::unquote-splice
  10. sb-impl::unquote-nsplice sb-impl::unquote))
  11. (set-dispatch-macro-character
  12. #\# #\` (lambda(stream subchar arg)
  13. (declare (ignore subchar arg))
  14. (list #/quasiquote (read stream t nil t))))
  15. (set-dispatch-macro-character
  16. #\# #\, (lambda(s subchar arg)
  17. (declare (ignore subchar arg))
  18. (case (peek-char nil s)
  19. (#\@ (read-char s) (unquote-splice (read s t nil t)))
  20. (#\. (read-char s) (unquote-nsplice (read s t nil t)))
  21. (t (unquote (read s t nil t))))))
  22. (print (unquote 100))
  23. (print (unquote-splice 100))
  24. (print (unquote-nsplice 100))
  25. (print (quasiquote (quasiquote 100)))
  26. (print '`,(1 2))
  27. (print '`#,(1 2))
  28. (terpri)
  29. (eval `(format ,@(list t "qwert~d~%" 9991)))
  30. (eval `(format ,@(list t "qwert~d~%" 9992)))
  31. (eval `(format ,@(list t "qwert~d~%" 9993)))
  32. (print ' `( ,format ,.(list t) ,@(list t "qwert~d ~s~%" 9994 '|q|w)))
  33. (print '#`(#,format #,.(list t) #,@(list t "qwert~d ~s~%" 9994 '\qw)))
  34. (print '#`(#,format #,.(list t) #,@(list t "qwert~d ~s~%" 9994 #/ \qw)))
  35. (print #/#`(#,format #,.(list t) #,@(list t "qwert~d ~s~%" 9994 #/|q|w)))
  36. (print #/(\/\/\/w\/w\hw))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement