Skip to content

Instantly share code, notes, and snippets.

@snmsts
snmsts / clhs.ros
Last active August 29, 2015 14:24 — forked from fukamachi/clhs.ros
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
A Roswell script to open the HyperSpec page of a specified symbol in the default browser.
@snmsts
snmsts / posix-tests.patch
Created June 17, 2015 15:01
patch for OSX japanese problem
---
+++ contrib/sb-posix/posix-tests.lisp
@@ -536,7 +536,7 @@
nil)
(deftest readdir.1
- (let ((dir (sb-posix:opendir "/")))
+ (let ((dir (sb-posix:opendir "/")) (sb-alien::*default-c-string-external-format* :utf-8))
(unwind-protect
(block dir-loop
@snmsts
snmsts / console_log
Created June 15, 2015 23:44
再現実験
$ ls /
Applications
Library
Network
System
Users
Volumes
bin
cores
dev
@snmsts
snmsts / sig.ros
Created June 10, 2015 10:56
wait for safepoint
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -L sbcl -- $0 "$@"
|#
(ql:quickload :bordeaux-threads)
(defvar *should-finish* nil)
(defvar *finished* nil)
@snmsts
snmsts / qlot.ros
Created May 21, 2015 11:00
qlot.ros
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -L sbcl-bin -Q -- $0 "$@"
|#
(defun main (&optional $1 &rest argv)
(declare (ignorable argv))
(cond ((equal "install" $1)
(ros:exec '("ros" "-Q" "-s" "qlot" "-e" "(qlot:install)")))
;; 1
(defun f (x)
(loop :with result := 0
:for i :in x
:do (incf result i)
:finally (return result)))
(defun f (x)
(loop :with result := 0
:for i :from 0 :to (1- (length x))
@snmsts
snmsts / gist:740b714893888a7a16a3
Last active August 29, 2015 14:20
directory name survey for roswell
$ pwd
/home/vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/software
$ ls */bin
clack-20150407-git/bin:
clackup
common-lisp-stat-20140826-git/bin:
GetRepos.sh cls.lisp
@snmsts
snmsts / test.lisp
Created March 10, 2015 20:00
how to use ros dump executable
$ ros -l test.lisp -E cl-user::main dump executable hoge
To load "clack":
Load 1 ASDF system:
clack
; Loading "clack"
...................
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into hoge:
writing 5824 bytes from the read-only space at 0x20000000
writing 3168 bytes from the static space at 0x20100000
@snmsts
snmsts / hoge.lisp
Created January 25, 2015 15:45
cffi-grovel-test
(ql:quickload :cffi-grovel)
(defparameter *pwd* (make-pathname :name nil :type nil :defaults *load-pathname*))
(defpackage :hoge.ffi)
(with-open-file (out (merge-pathnames "tmp.lisp" *pwd*)
:direction :output
:if-does-not-exist :create
:if-exists :supersede)
(format out "~{~S~%~}" '((in-package :hoge.ffi)
@snmsts
snmsts / hoge.ros
Created January 16, 2015 09:58
example of '+Q' in script.
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros +Q -- $0 "$@"
|#
(defun main (&rest argv)
(declare (ignorable argv))
#1=(progn (apropos "quick")
(format t "~&----------------------------------~%"))
(ros:quicklisp)