Skip to content

Instantly share code, notes, and snippets.


Eitaro Fukamachi fukamachi

View GitHub Profile
View quicklisp-badges.markdown

Quicklisp badge now provides project badges for Quicklisp projects. It shows Quicklisp dist version when the project was updated last.

Once the project owner adds this badge to their README file, it will inform the project is ready for Quicklisp and its documentation is available on


It's available, however it was just added in this morning at whim and it may still have issues. Please try it and tell @nitro_idiot if you encountered any issues.

fukamachi /
Last active Dec 1, 2019
Common Lisp Seminar 2019 ログ by fukamachi

Common Lisp Seminar 2019

2019/08/24 本町オープンソースラボ(大阪府大阪市中央区瓦町3-4-9)

@fukamachi が聴いた質問をまとめました。

Q. 自分のプロジェクトを .roswell/local-projects 置くのは一般的なのか?

fukamachi / ccl
Created Jun 23, 2011
Clozure CL launcher script
View ccl
# Change the definition of CCL_DEFAULT_DIRECTORY below to refer to
# your Clozure CL installation directory. The lisp will use this
# environment variable to set up translations for the CCL: logical
# host.
# Any definition of CCL_DEFAULT_DIRECTORY already present in the
# environment takes precedence over definition made below.
fukamachi /
Last active Aug 15, 2019
Common Lisp Scripting with Roswell (Draft)

Common Lisp Scripting with Roswell

"Roswell Script" is implementation-independent Common Lisp scripting program which uses Roswell. Although Roswell itself is a unified interface to Common Lisp implementations, it also encourages writing scripts with it.

To start writing it, run ros init in your terminal:

$ ros init
Usage: ros init [template] name [options...]
fukamachi /
Last active Jun 9, 2019
Using Travis CI with Roswell

Using Travis CI with Roswell

Travis CI is the most prevalent cloud CI service. Though it has no Common Lisp support officially, by using Roswell, you can test your Common Lisp product with a few efforts.

WARNING: This document is based on Roswell v0.0.3.42 (not released yet) or above.

Enabling Travis CI

To use Travis CI, you must sign up and enable testing for your repository at your profile page.

fukamachi / gist:6364983
Last active May 1, 2019
A Common Lisp function to extract a tarball (.tar.gz) file to a directory (*default-pathname-defaults*).
View gist:6364983
(ql:quickload '(chipz archive))
(defun extract-tarball (pathname)
"Extract a tarball (.tar.gz) file to a directory (*default-pathname-defaults*)."
(with-open-file (tarball-stream pathname
:direction :input
:element-type '(unsigned-byte 8))
(archive:open-archive 'archive:tar-archive
(chipz:make-decompressing-stream 'chipz:gzip tarball-stream)
fukamachi / hoge.asd
Created Feb 18, 2019
ASDF package-inferred-system sample with :pathname
View hoge.asd
(defsystem "hoge"
:class :package-inferred-system
:pathname "src"
:depends-on ("hoge/main")
:in-order-to ((test-op (test-op "hoge/tests"))))
(defsystem "hoge/tests"
:pathname "tests"
:depends-on ("hoge")
View upload-test.lisp
(ql:quickload '(:clack :http-body))
(defvar *handler*)
(setf *handler*
(clack:clackup (lambda (env)
(if (eq (getf env :request-method) :get)
'(200 (:content-type :text-html)
("<html><head></head><body><form method='post' enctype='multipart/form-data'><input type='file' name='upload'><input type='submit' value='Upload'></form></body></html>"))
`(200 () (,(prin1-to-string (http-body:parse (getf env :content-type) (getf env :content-length) (getf env :raw-body)))))))
fukamachi / keys.lisp
Created Aug 17, 2018
Generating RSA key pairs in DER format
View keys.lisp
(in-package :cl-user)
(ql:quickload '(:ironclad :asn1))
(defun generate-rsa-key-pair (num-bits)
"Same as (ironclad:generate-key-pair :rsa :num-bits num-bits) except returning in DER format."
(check-type num-bits integer)
(let ((l (floor num-bits 2)))
(multiple-value-bind (p q n)
(loop for a = (ironclad:generate-prime (- num-bits l))
fukamachi / fntype-annot.lisp
Created Jun 24, 2018
Type annotation for functions in Common Lisp
View fntype-annot.lisp
(annot:defannotation fntype (args result form)
(:arity 3)
(let* ((last-form (cl-annot.util:progn-form-last form))
(symbol (cl-annot.util:definition-form-symbol last-form)))
`(progn (declaim (ftype (function ,args ,result) ,symbol))
;; Usage:
;; (ql:quickload :cl-syntax)
;; (syntax:use-syntax :annot)
You can’t perform that action at this time.