Skip to content

Instantly share code, notes, and snippets.

$ diff -u -r c\:/Users/Vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/cffi_0.14.0/ c\:/Users/Vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/software/cffi_0.14.0/
diff -u -r c:/Users/Vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/cffi_0.14.0/grovel/grovel.lisp c:/Users/Vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/software/cffi_0.14.0/grovel/grovel.lisp
--- c:/Users/Vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/cffi_0.14.0/grovel/grovel.lisp 2014-09-10 05:06:56.000000000 +0900
+++ c:/Users/Vagrant/.roswell/impls/ALL/ALL/quicklisp/dists/quicklisp/software/cffi_0.14.0/grovel/grovel.lisp 2014-12-29 01:04:07.059990500 +0900
@@ -279,12 +279,13 @@
,@*cc-flags*
;; add the cffi directory to the include path to make common.h visible
,(format nil "-I~A"
- (directory-namestring
+ (namestring
@snmsts
snmsts / roswell.rb
Created October 19, 2014 14:51
homebrew test
require "formula"
class Roswell < Formula
homepage ""
url "https://github.com/snmsts/roswell/archive/v0.0.2.11.tar.gz"
version '0.0.2.11'
sha1 "02154cf0ea908ccc52af0382c730f3f7304c0c1f"
depends_on 'libarchive'
depends_on "autoconf" => :build
@snmsts
snmsts / clack.websocket.lisp
Created August 23, 2014 18:04
websocket test implementation
(ql:quickload '(:clack :cl-async))
(defpackage websocket.test
(:use :cl
:clack))
(in-package :websocket.test)
(defvar *handler*
(clackup
(defun ymdhms (&optional (universal-time (get-universal-time)))
(or (ignore-errors (format nil "~{~2,'0d~#[~;:~;:~;_~:;/~]~}"
(cdddr (nreverse (multiple-value-list (decode-universal-time universal-time))))))
"not-universaltime"))
(defun eltstr->sexp (eltstr base-expr)
(loop :with x := base-expr
:with gensym := (gensym)
:for i :in (mapcar #'(lambda (x) (mapcar (lambda (x) (or (= (length x) 0)
(parse-integer x))) (split-sequence:split-sequence #\_ x)))
(split-sequence:split-sequence #\/ eltstr))
:do (setq x (cond ((eql (length i) 1)
(if (minusp (first i))
`(let ((,gensym ,x))
(nth (+ (length ,gensym) ,(first i)) ,gensym))
(ql:quickload '(:cffi :cl-ppcre))
(with-output-to-string (*standard-output*)
(handler-bind
((cffi:load-foreign-library-error
#'(lambda (c)
(declare (ignore c))
(invoke-restart 'cffi::use-value "libncursesw.so.5"))))
(ql:quickload :cl-charms)))
@snmsts
snmsts / shlyfile
Created January 17, 2014 17:15
test
;; -*- lisp -*-
(defvar *current-dir* (make-pathname :type nil :name nil :defaults *load-pathname*))
(push (merge-pathnames "quickdocs/" *current-dir*)
asdf:*central-registry*)
(defvar *output-dir* (merge-pathnames "out/1st/" *current-dir*))
(ql:quickload '(:quickdocs :iolib.syscalls))
(defun doc (a)
@snmsts
snmsts / gist:6761725
Created September 30, 2013 10:00
print runtime environment
(format t "~&~@{~{~A~^ ~}~^~%~}"
`("Lisp:" ,(lisp-implementation-type) ,(lisp-implementation-version))
#+quicklisp `("Quicklisp:" "Version",(quicklisp-client::local-version) ,(ql-dist:all-dists))
#-quicklisp `("Quicklisp:" "Not installed"))
@snmsts
snmsts / shlyfile
Created September 27, 2013 10:49
test with shlyfile
(defun which (bin &key a)
(let* ((paths (mapcar #'(lambda (x) (make-pathname :defaults (format nil "~A/" x)))
(asdf::split-string (asdf::getenv "PATH") :separator '(#\:))))
found)
(setq found (flet ((test (x y)
(cl-fad:file-exists-p (merge-pathnames x y))))
(if a
(remove bin paths :test (complement #'test))
(find bin paths :test #'test))))
@snmsts
snmsts / hello world
Created September 4, 2013 04:17
generate "Hello World" without including any literal.
(defmacro def-print-string (name string)
`(defun ,name ()
(let ((one (count t'(t))))
(print
(coerce
(mapcar #'code-char
(list
,@(loop :for i :across string
:collect
`(+ ,@(loop :for j := (char-code i) :then (floor j #.(count t'(t t)))