This file contains 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
; $ sbcl --load a.cl --eval '(sb-ext:save-lisp-and-die "a.out" :toplevel #'\''main :executable t)' && time ( echo 100000000 | ./a.out > /dev/null ) | |
; ( echo 100000000 | ./a.out > /dev/null; ) 10.75s user 0.15s system 99% cpu 10.931 total | |
; $ sbcl --version | |
; SBCL 1.2.6 | |
(defun main () | |
(declare (optimize (speed 3) (debug 0) (safety 0) (compilation-speed 0))) | |
(let* ((n (1+ (the fixnum (read)))) | |
(is-prime (make-array n :element-type 'boolean :initial-element t))) |
This file contains 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
;; anything-ari.el - Show animated Ari. | |
;; Copyright (C) 2010 Eitarow Fukamachi <fukamachi_e@ariel-networks.com> | |
;; Author: Eitarow Fukamachi <fukamachi_e@ariel-networks.com> | |
;; Twitter: http://twitter.com/nitro_idiot | |
;; Blog: http://e-arrows.sakura.ne.jp/ | |
;; | |
;; Created: Dec 9, 2010 | |
;; Version: 0.0.1 |
This file contains 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回 Scheme コードバトン | |
;; | |
;; ■ これは何か? | |
;; Scheme のコードをバトンのように回していき面白い物ができあがるのを楽しむ遊びです。 | |
;; 次回 Shibuya.lisp で成果を発表します。 | |
;; Scheme 初心者のコードを書くきっかけに、中級者には他人のコードを読む機会になればと思います。 | |
;; | |
;; ■ 2 つのルール | |
;; | |
;; (1)自分がこれだと思える変更をコードに加えて2日以内に次の人にまわしてください。 |
This file contains 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
;; -*- Mode: Lisp; Syntax: Common-Lisp -*- | |
;;; Package Management | |
(in-package :cl-user) | |
(defpackage :hige | |
(:use :cl | |
:drakma | |
:cl-ppcre) | |
#+ABCL (:shadow :y-or-n-p) |