Skip to content

Instantly share code, notes, and snippets.

@fukamachi
fukamachi / hoge.asd
Created February 18, 2019 04:16
ASDF package-inferred-system sample with :pathname
(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")
:components
@fukamachi
fukamachi / seminar2019.md
Last active October 7, 2023 15:02
Common Lisp Seminar 2019 ログ by fukamachi

Common Lisp Seminar 2019

2019/08/24 本町オープンソースラボ(大阪府大阪市中央区瓦町3-4-9) https://tcool.connpass.com/event/117789/

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

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

@fukamachi
fukamachi / gist:6364983
Last active May 8, 2022 03:04
A Common Lisp function to extract a tarball (.tar.gz) file to a directory (*default-pathname-defaults*).
(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::extract-files-from-archive
(archive:open-archive 'archive:tar-archive
(chipz:make-decompressing-stream 'chipz:gzip tarball-stream)
@fukamachi
fukamachi / Dockerfile
Last active September 1, 2021 13:36
Dockerfile example to build Common Lisp app with Qlot
# syntax=docker/dockerfile:experimental
ARG SBCL_VERSION=2.1.8
ARG QLOT_VERSION=0.11.4
FROM fukamachi/qlot:${QLOT_VERSION}
WORKDIR /app
COPY qlfile /app
COPY qlfile.lock /app
@fukamachi
fukamachi / quicklisp-badges.markdown
Last active July 19, 2021 21:26
Quicklisp badge

Quicklisp badge

Quickdocs.org 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 Quickdocs.org.

Stability

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
fukamachi / using-travis-ci-with-roswell.md
Last active May 28, 2021 03:36
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
fukamachi / clhs.ros
Last active May 5, 2021 06:54
A Roswell script for opening HyperSpec page describing a given symbol in the default browser.
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
A Roswell script to open the HyperSpec page of a specified symbol in the default browser.
@fukamachi
fukamachi / common-lisp-scripting-with-roswell.md
Last active April 10, 2021 16:39
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
fukamachi / ccl
Created June 23, 2011 12:04
Clozure CL launcher script
#!/bin/sh
#
# 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.
(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)))))))