This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================================================== | |
1 -> (slime-autodoc) | |
| 2 -> (slime-autodoc--parse-context) | |
| 2 <- slime-autodoc--parse-context: ("defun" "load-mock" ("config") ("declare" ("ignore" "config")) ("format" "*debug-io*" swank::%cursor-marker%)) | |
| 2 -> (slime-autodoc--cache-get ("defun" "load-mock" ("config") ("declare" ("ignore" "config")) ("format" "*debug-io*" swank::%cursor-marker%))) | |
| 2 <- slime-autodoc--cache-get: nil | |
| 2 -> (slime-background-activities-enabled-p) | |
| | 3 -> (slime-current-connection) | |
| | 3 <- slime-current-connection: #<process SLIME Lisp> | |
| | 3 -> (slime-busy-p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 接続が失われた後で slime-auto-select-connection を拒否すると以下が出る。 | |
Warning (slime): Caught error during fontification while searching for forms | |
that are suppressed by reader-conditionals. The error was: (error "No default connection selected."). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* | |
int main() { | |
int i; | |
for (i = 1; i <= 100; ++i) { | |
if (i % 15 == 0) { | |
printf("FizzBuzz\n"); | |
} else if (i % 3 == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :cl-user) | |
(ql:quickload "split-sequence") | |
(defparameter *test-file* "/tmp/progv_test.csv") | |
(defun write-test-csv () | |
(with-open-file (out *test-file* :direction :output :if-does-not-exist :create | |
:if-exists :rename) | |
(format out "col1,col2,col3~%") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void __attribute__((noinline)) fizzbuzz_basic (void){ | |
int i; | |
for (i = 1; i <= 100; ++i) { | |
if (i % 15 == 0) { | |
printf("FizzBuzz\n"); | |
} else if (i % 3 == 0) { | |
printf("Fizz\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* #{ -> ` -> #{ をネストできるように | |
* flet や handler-case や with-open-file で遊ぶと nest の例できそう | |
* struct 対応 | |
* vacietis に触れる |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :cl-user) | |
(defmacro with-repl-variables (&body body) | |
"BODY 中の式を、REPL 変数の `*', `+', `/', `-' 等を bind しながら順次実行する。" | |
(let ((form-results (gensym))) | |
`(let ((* *) (** **) (*** ***) | |
(+ +) (++ ++) (+++ +++) (- -) | |
(/ /) (// //) (/// ///)) | |
,@(loop for form in body | |
collect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 毎回 setf する (lambda と相性悪い) | |
(defmacro progn-$_ (&body forms) | |
`(let ($_) | |
,@(mapcar | |
(lambda (form) | |
`(setf $_ ,form)) | |
forms))) | |
#| | |
CL-USER> (progn-$_ 1 2 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package :cl-user) | |
(defmacro power-assert (form) | |
(assert (listp form)) | |
(let ((op (first form)) | |
(result (gensym)) | |
binding | |
eval-form) | |
(assert (fboundp op) () | |
"Operator must be fbound. (op is ~A)" op) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; http://programcat.hatenablog.com/entry/2018/09/13/213126 | |
(in-package :cl-user) | |
;;; この定義すごい!、というかパッと読めない・・ | |
(defun game-read () | |
(let ((cmd (read-from-string | |
(concatenate 'string "(" (read-line) ")")))) | |
(flet ((quote-it (x) | |
(list 'quote x))) |