id int64 0 45.1k | file_name stringlengths 4 68 | file_path stringlengths 14 193 | content stringlengths 32 9.62M | size int64 32 9.62M | language stringclasses 1
value | extension stringclasses 6
values | total_lines int64 1 136k | avg_line_length float64 3 903k | max_line_length int64 3 4.51M | alphanum_fraction float64 0 1 | repo_name stringclasses 779
values | repo_stars int64 0 882 | repo_forks int64 0 108 | repo_open_issues int64 0 90 | repo_license stringclasses 8
values | repo_extraction_date stringclasses 146
values | sha stringlengths 64 64 | __index_level_0__ int64 0 45.1k | exdup_ids_cmlisp_stkv2 listlengths 1 47 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23,600 | chapter-04.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-04.lisp | ;; chapter 4
;;top loop
(loop
(terpri)
(princ 'ready>)
(print (eval (read))))
(defun quadratic-roots (a b c)
"Returns the roots of a quadratic equation aX^2 + bX + c = 1"
(let ((discriminant (- (* b b ) (* 4 a c))))
(values
(/ (+ (- b) (sqrt discriminant)) (* 2 a))
(/ (- (- b) (sqrt dis... | 3,671 | Common Lisp | .lisp | 123 | 25.910569 | 70 | 0.603522 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 3fe61ca76724e97bd3dd4521386d52086ec48096103fe2d9611c74d53e6e5b47 | 23,600 | [
-1
] |
23,601 | chapter-06.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-06.lisp | (defstruct foo-struct a b c)
(let ((foo-1 (make-foo-struct :a 1 :b "two")))
(print (foo-struct-a foo-1))
(print (foo-struct-b foo-1))
(values))
(defstruct (ship
(:print-function
(lambda (struct stream depth)
(declare (ignore depth))
(format stream "[ship ~A of ~A at (~D, ~D) moving (~D, ~D)]"
... | 2,004 | Common Lisp | .lisp | 88 | 19.215909 | 64 | 0.627181 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 9a4980a1723eee0342ce883694ae6067384a6f6f007f25dadc24718c68837d27 | 23,601 | [
-1
] |
23,602 | chapter-10.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-10.lisp | ;;********************
(apropos "length")
;;********************
(describe 'length)
(describe "length")
(describe #'length)
;;********************
(inspect 'length)
(inspect #'length)
(inspect "length")
;;********************
(documentation 'length 'function)
(documentation 'fn-a 'function)
(defun a-function-with-d... | 426 | Common Lisp | .lisp | 17 | 23.588235 | 53 | 0.595062 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | fed1c377096255150ef90783381abc46ab5de282416d55b49b0b90eba23e5e67 | 23,602 | [
-1
] |
23,603 | chapter-05.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-05.lisp | (loop
(print "Look, I'm looping"))
(loop
(print (eval (read))))
(loop
(print "Here I am.")
(return 17)
(print "I never got here."))
(let ((n 0))
(loop
(when (> n 10) (return))
(print n) (prin1 (* n n))
(incf n)))
(dotimes (n 11 r)
(print n) (prin1 (* n n))
(setf r (* n N)))
;;... | 712 | Common Lisp | .lisp | 29 | 21.551724 | 53 | 0.547337 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 0908039c7b86aa6019a1da47de4d4880ce52763828465741a96ce31dcd469b4c | 23,603 | [
-1
] |
23,604 | chapter-16.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-16.lisp | (defun add1 (n) (1+ n))
(disassemble 'add1)
; disassembly for ADD1
; Size: 25 bytes. Origin: #xCB7DFE4
; E4: BF04000000 MOV EDI, 4 ; no-arg-parsing entry point
; E9: 8BD3 MOV EDX, EBX
; EB: E8502148F4 CALL #x1000140 ; GENERIC-+
; F0: ... | 1,781 | Common Lisp | .lisp | 51 | 32.666667 | 90 | 0.431475 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 534b2e94c1deaaa6eb406a21b2a80a175a624127d78dc51d12d442009b7e8214 | 23,604 | [
-1
] |
23,605 | chapter-22.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-22.lisp | (defun fibonacci (n)
(if (<= n 1)
1
(+ (fibonacci (- n 2)) (fibonacci (1- n)))))
(advise fibonacci
(when (zerop (first arglist)) (break))
:when :before
:name :break-on-zero)
| 192 | Common Lisp | .lisp | 8 | 20.75 | 50 | 0.590164 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 20f12f399feb93292ed90eeddb84ed5efe5f7cf8aa484a892a6149bcdf5f82b4 | 23,605 | [
-1
] |
23,606 | chapter-03.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-03.lisp | 3
;; Lesson 3
;;let
(let ((a 3)
(b 4)
(* (+ a b) c)))
(let ((p 52.8)
(q 35.9)
(r (f 12.07))))
(setq a 89)
(let ((a 3))
(+ a 2))
(setq w 77)
(let ((w 8)
(x w))
(+ w x))
;;let*
(setq u 37)
(let* ((v 4)
(u v))
(+ u v))
;;cond
(let ((a 1)
(b 2)
(c 1)
(... | 4,550 | Common Lisp | .lisp | 190 | 21.447368 | 64 | 0.607042 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 5ed66a3d1d929e797fc65af4cd83fd3abdbfb2cac3b289300894edd42b405ca0 | 23,606 | [
-1
] |
23,607 | chapter-20.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-20.lisp | `(The sum of 17 and 83 is ,(+ 17 83))
`(The sum of 17 and 83 is (+ 17 83))
(defmacro swap (a b)
`(let ((temp ,a))
(setf ,a ,b)
(setf ,b temp)))
(let ((x 3)
(y 7))
(swap x y)
(list x y))
(pprint (macroexpand-1 '(swap x y)))
;; * (pprint (macroexpand-1 '(swap x y)))
;; (LET ((TEMP X))
;; (SE... | 4,338 | Common Lisp | .lisp | 161 | 24.503106 | 77 | 0.625091 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | bd4016b7a9950cc9b63f534f46399b434c4e9d7e009184c3cc29eebd6f8561ff | 23,607 | [
-1
] |
23,608 | chapter-08.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-08.lisp | (defparameter *my-special-variable* 17)
(defun show-my-special ()
(declare (special *my-special-variable*))
(print *my-special-variable*)
nil)
(defun do-something-else ()
(show-my-special))
(defun dynamically-shadow-my-special ()
(let ((*my-special-variable* 8))
(do-something-else))
(show-my-special)... | 355 | Common Lisp | .lisp | 12 | 26.916667 | 43 | 0.719764 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 0dc57baa6547209eec542518abd135e7fdadb1497452775adbc5f43c8db039ec | 23,608 | [
-1
] |
23,609 | chapter-28.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-28.lisp | (defun sum-list-bad-1 (list)
(let ((result 0))
(dotimes (i (length list))
(incf result (elt list i)))
result))
;; (let ((list (make-list 10000 :initial-element 1)))
;; (time (sum-list-bad-1 list)))
;; Evaluation took:
;; 0.288 seconds of real time
;; 0.288000 seconds of total run time (0.288000 u... | 3,114 | Common Lisp | .lisp | 95 | 29.821053 | 74 | 0.633524 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | bebc822abfbed2500778de884574fa966d303d65fedd36b70195994bd0cc997c | 23,609 | [
-1
] |
23,610 | run-checks-tests.lisp | namoamitabha_study-common-lisp/successful-lisp/run-checks-tests.lisp | #! /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(load "lisp-unit")
(use-package :lisp-unit)
(setq *print-summary* t)
(setq *print-failures* t)
(setq *print-errors* t)
(load "... | 404 | Common Lisp | .lisp | 15 | 24.333333 | 61 | 0.691099 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | eca4c8680dad2ee940b143d1801db3ff123315ed92c74776d72ab108478ae0ce | 23,610 | [
-1
] |
23,611 | chapter-12.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-12.lisp | (mapcar #'atom (list 1 '(2) "foo" nil))
(mapcar #'+ (list 1 2 3) (list 4 5 6))
(mapc #'(lambda (x y) (print (* x y)))
(list 1 0 2) (list 3 4 5))
(mapcan #'list (list 1 2 3) (list 4 5 6))
(mapcan #'(lambda (a b) (list (cons a b)))
(list 1 2 3) (list 4 5 6))
;;********************
(maplist #'list (list 1 2 3) ... | 1,810 | Common Lisp | .lisp | 50 | 33.5 | 72 | 0.539481 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | b953e48d7f6a4d59fcc77abb4d944a0c30a7f194d6a028ca3a8e551d38ed45bb | 23,611 | [
-1
] |
23,612 | chapter-23.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-23.lisp | (defun divide (numerator denominator)
(when (zerop denominator)
(error "Sorry, you can't divide by zero"))
(/ numerator denominator))
(divide 4 3)
(divide 4 0)
;;********************
(define-condition whats-wrong (error)
((what :initarg :what :initform "something" :reader what))
(:report (lambda (conditio... | 6,019 | Common Lisp | .lisp | 174 | 30.022989 | 75 | 0.661668 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | de523a6422784357602905330ca1da3ce3dfea055440ed87e88269d48013313a | 23,612 | [
-1
] |
23,613 | chapter-14.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-14.lisp | (defmethod op2 ((x number) (y number))
(format t "method1: x=~a,y=~a~%" x y))
(defmethod op2 ((x float) (y float))
(format t "method2: x=~a, y=~a~%" x y))
(defmethod op2 ((x integer) (y integer))
(format t "method3: x=~a, y=~a~%" x y))
(defmethod op2 ((x float) (y number))
(format t "method4: x=~a, y=~a~%" x... | 4,442 | Common Lisp | .lisp | 168 | 24.363095 | 99 | 0.637444 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | cd2ff6162b7964b084553ddc86e032784496f8e6706cd2efe14cad5cf134867f | 23,613 | [
-1
] |
23,614 | chapter-15.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-15.lisp | (let ((password nil)
(secret nil))
(defun set-password (new-password)
(if password
'|Can't - already set|
(setq password new-password)))
(defun change-password (old-password new-password)
(if (eq old-password password)
(setq password new-password)
'|Not changed|))
(defun set-secret (passwd new-s... | 2,194 | Common Lisp | .lisp | 81 | 24.222222 | 57 | 0.658537 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 2a644aa48bb94dfb4bca06433033b09d544554616db3fc4b2099ec23387a5562 | 23,614 | [
-1
] |
23,615 | chapter-03-package-client.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-03-package-client.lisp | (defpackage client
(:use common-lisp)
(:import-from util1 func1)
(:import-from util2 func2))
(in-package client)
(defun init () 'client-init)
(util1:init)
(util2:init)
(init)
(func1)
(func2)
| 201 | Common Lisp | .lisp | 11 | 16.363636 | 29 | 0.725806 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | e43cd694b25b3007de455398bedccc0ce104cbc3053137d6c22385789254e178 | 23,615 | [
478497
] |
23,616 | chapter-09.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-09.lisp | ;;********************
(let ((file-name ""))
(catch 'test
(unwind-protect
(progn
(print "a")
(throw 'test "done"))
(print "clean resource"))
(print "outer")))
;;********************
(defun block-demo (flag)
(print 'before-outer)
(block outer
(print 'before-inner)
(print (block inn... | 1,337 | Common Lisp | .lisp | 68 | 16.338235 | 35 | 0.523506 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 6a063bf8d84a512ea35c17f768f56aec017999616a35812c9f58a35f83bc10e7 | 23,616 | [
-1
] |
23,617 | chapter-13.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-13.lisp | ;;concatenate
*(concatenate 'list)
NIL
* (concatenate 'vector)
#()
* (concatenate 'list '(1 2 3) '(4 5))
(1 2 3 4 5)
* (concatenate 'vector #(1 2 3) #(4 5))
#(1 2 3 4 5)
* (concatenate 'list #(1 2 3) #(4 5))
(1 2 3 4 5)
* (concatenate 'list #(1 2 3) '(4 5))
(1 2 3 4 5)
* (concatenate 'vector #(1 2 3) '(4 5))
#(1... | 1,137 | Common Lisp | .lisp | 48 | 21.854167 | 76 | 0.499526 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | e8d16696ec465cfa9d9aa378092ff0543b120f83758ad43339b618fb0425ecf0 | 23,617 | [
-1
] |
23,618 | util2.lisp | namoamitabha_study-common-lisp/successful-lisp/util2.lisp | (defpackage util2
(:export init func1 func2)
(:use common-lisp))
(in-package util2)
(defun init () 'util2-init)
(defun func1 () 'util2-func1)
(defun func2 () 'util2-func2)
| 179 | Common Lisp | .lisp | 7 | 23.571429 | 29 | 0.710059 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 6ef05535d47fe38df37bad8c023cfbfc0597fc57fbd5cbf1953f4d7e06541071 | 23,618 | [
64961
] |
23,619 | checks.lisp | namoamitabha_study-common-lisp/successful-lisp/checks.lisp | (defvar *checks* (make-array 100 :adjustable t :fill-pointer 0))
(defconstant +first-check-number+ 100
"The number of the first check.")
(defvar *next-check-number* +first-check-number+
"The number of the next check.")
(defvar *payees* (make-hash-table :test #'equal)
"Payees with checks paid to each.")
(set-m... | 2,793 | Common Lisp | .lisp | 87 | 28.321839 | 79 | 0.665672 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | a6682dee405821260f3d33dc8aace8b6e5bbdcbb3645c05ba07ca3fee3b6bacd | 23,619 | [
-1
] |
23,620 | chapter-07.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-07.lisp | (defclass empty-object () ())
(make-instance 'empty-object)
(find-class 'empty-object)
(make-instance (find-class 'empty-object))
;;********************
(defclass 3d-point () (x y z))
(defstruct 3d-point-struct x y z)
(let ((a-point (make-instance '3d-point)))
(setf (slot-value a-point 'x) 2)
(slot-value a-po... | 2,910 | Common Lisp | .lisp | 85 | 31.352941 | 63 | 0.62281 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | fd32d32fe5576c15f57f8c8d6837b42b396b541f09568e126a9f9f80d02fa752 | 23,620 | [
-1
] |
23,621 | chapter-18.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-18.lisp | (defun safe-elt (sequence index)
(and (< -1 index (length sequence))
(values (elt sequence index) t)))
(safe-elt #(1 2 3) 3)
(elt #(1 2 3) 3)
(safe-elt #(1 2 3) 2)
;;********************
(boole boole-and 15 7)
(boole boole-ior 2 3)
(boole boole-set 99 55)
(boole boole-andc2 7 4)
;;********************
(lo... | 1,154 | Common Lisp | .lisp | 59 | 18.101695 | 40 | 0.595745 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 042982cc4f4556545004f34be9286ad8c7af446177c6e7850d909013213c29d3 | 23,621 | [
-1
] |
23,622 | def-io.lisp | namoamitabha_study-common-lisp/successful-lisp/def-io.lisp | (defmacro def-i/o (writer-name reader-name (&rest vars))
(let ((file-name (gensym))
(var (gensym))
(stream (gensym)))
`(progn
(defun ,writer-name (,file-name)
(let ((*print-readably* t))
(with-open-file (,stream ,file-name
:direction :output
:if-exists :supersede)
(dolist (,va... | 1,033 | Common Lisp | .lisp | 29 | 31.068966 | 99 | 0.632265 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | f2139a5b46715eaeccfd46a44358d9c4ed64f6e6af2a6ff256e96d2dedefbb22 | 23,622 | [
-1
] |
23,623 | chapter-26.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-26.lisp | ;;chapter 26 Put on a Happy Face:Interface Builders
;;CLIM
;;Garnet
;;ref:
;;Building a Common Lisp GUI with CommonQt
;;https://gorkovchanin.wordpress.com/2015/05/02/building-a-common-lisp-gui-with-commonqt/
;;commonqt example:
;;https://github.com/namoamitabha/study-common-lisp/tree/master/commonqt-example
| 310 | Common Lisp | .lisp | 8 | 37.625 | 89 | 0.797342 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 864a3d805208dd01066ac38a6c60b216898d141f5ec3a7b6cd92b72902e6dd84 | 23,623 | [
-1
] |
23,624 | chapter-21.lisp | namoamitabha_study-common-lisp/successful-lisp/chapter-21.lisp | (defun keyword-sample-1 (a b c &key d e f)
(list a b c d e f))
(keyword-sample-1 1 2 3)
(keyword-sample-1 1 2 3 :d 4)
(keyword-sample-1 1 2 3 :e 5)
(keyword-sample-1 1 2 3 :f 6 :d 4 :e 5)
;; (1 2 3 NIL NIL NIL)
;; *
;; (1 2 3 4 NIL NIL)
;; *
;; (1 2 3 NIL 5 NIL)
;; *
;; (1 2 3 4 5 6)
;; *
;;********************
(de... | 2,963 | Common Lisp | .lisp | 118 | 22.805085 | 67 | 0.570163 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 2a92ef18c7238979153e901f2d9071187ae200ce3347ae8fe25e5193a21a3022 | 23,624 | [
-1
] |
23,625 | dolist.lisp | namoamitabha_study-common-lisp/pcl/ch07/dolist.lisp | (dolist
(x '(1 2 3))
(print x))
(dolist
(x '(1 2 3 4 5 6 7 8 9 10))
(print x)
(if (evenp x)
(return)))
| 126 | Common Lisp | .lisp | 8 | 11.875 | 31 | 0.461538 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 1889920ff480d86a6d71299c3df001b691b1175440d1a0fb334d70b1f52b0b90 | 23,625 | [
-1
] |
23,626 | notes.lisp | namoamitabha_study-common-lisp/pcl/ch07/notes.lisp | (if (> 2 3)
"Yup"
"Nope")
(if (> 2 3) "Yup")
(if (> 3 2) "Yup" "Nope")
(defmacro when0 (condition &rest body)
`(if ,condition (progn ,@body)))
(defmacro unless0 (condition &rest body)
`(if (not ,condition) (progn ,@body)))
(not nil)
(not (= 1 1))
(and (= 1 2) (= 3 3))
(or (= 1 2) (= 3 3))
(dolist (... | 1,397 | Common Lisp | .lisp | 51 | 24.27451 | 64 | 0.56354 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 045f83a0662a5dae547b1d7d7fdffc2fb10db12079f76e91f16a781069880a8c | 23,626 | [
-1
] |
23,627 | progn.lisp | namoamitabha_study-common-lisp/pcl/ch07/progn.lisp | (if (> 1 2)
(print "1 > 2")
(progn
(print "1 < ")
(print "2")))
| 84 | Common Lisp | .lisp | 5 | 11.8 | 20 | 0.35443 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 6bcee673a6d7aee922b6f5ad764b059e6de68db31fea114fdea60caf8e91f946 | 23,627 | [
-1
] |
23,628 | do.lisp | namoamitabha_study-common-lisp/pcl/ch07/do.lisp | (print
(do ((n 0 (1+ n))
(cur 0 next)
(next 1 (+ cur next)))
((= 10 n) cur)))
(do ((i 0 (1+ i)))
((>= i 4))
(print i))
(setq *some-future-date* 3638686605)
(do ()
((> (get-universal-time) *some-future-date*))
(format t "Waiting 5s~%")
(sleep 5))
| 283 | Common Lisp | .lisp | 13 | 17.923077 | 49 | 0.5 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | c7f1919d4b9e24332e6af6ad217a9cb73e984a23aa51eaa33490b2a81e80d345 | 23,628 | [
-1
] |
23,629 | unless.lisp | namoamitabha_study-common-lisp/pcl/ch07/unless.lisp | (unless (> 1 2)
(print "1")
(print ">")
(print "2"))
| 59 | Common Lisp | .lisp | 4 | 12.25 | 15 | 0.454545 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 9381de4b26e5352f5c554780b73bcfcc3d446b0924bbb82b16ec1d52abe680e9 | 23,629 | [
-1
] |
23,630 | loop.lisp | namoamitabha_study-common-lisp/pcl/ch07/loop.lisp | (loop
(print "looping...")
(sleep 1))
(loop for x from 1 to 10 collecting x)
(loop for x from 1 to 10 summing (expt x 2))
(loop for x across "the quick brown fox jumps over the lazy dog"
counting (find x "aeiou"))
| 232 | Common Lisp | .lisp | 7 | 29.571429 | 64 | 0.668182 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 35a531ee5811329bc6dfacc90a2efcd1c525b6686b6b8562f07202e17c906ad1 | 23,630 | [
-1
] |
23,631 | when.lisp | namoamitabha_study-common-lisp/pcl/ch07/when.lisp | (when (> 2 1)
(print "2")
(print ">")
(print "1"))
| 57 | Common Lisp | .lisp | 4 | 11.75 | 14 | 0.433962 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | b1fe32eaaf8e1400249a7cfe88433bb6472b5cdb380b97cd581c77239432975e | 23,631 | [
-1
] |
23,632 | output-notes.lisp | namoamitabha_study-common-lisp/pcl/ch07/output-notes.lisp | This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING ... | 455,660 | Common Lisp | .lisp | 558 | 814.327957 | 208,988 | 0.988503 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 1b42f72f4e072f2626ffad381fa11115513870c2a3bfb12bd08785b3ff7f766c | 23,632 | [
-1
] |
23,633 | notes.lisp | namoamitabha_study-common-lisp/pcl/ch06/notes.lisp | (defun foo (x)
(format t "Parameter: ~a~%" x)
(let ((x 2))
(format t "Outer LET: ~a~%" x)
(let ((x 3))
(format t "Inner LET: ~a~%" x))
(format t "Outer LET: ~a~%" x))
(format t "Parameter: ~a~%" x))
(let* ((x 10)
(y (+ x 10)))
(list x y))
(let ((x 10))
(let ((y (+ x 10)))
(lis... | 1,128 | Common Lisp | .lisp | 53 | 18.132075 | 47 | 0.522901 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 41acda93435fcd70446f9a68a8845cfef58895a88a37d757b26edb2b268bc2a5 | 23,633 | [
-1
] |
23,634 | output.note.lisp | namoamitabha_study-common-lisp/pcl/ch06/output.note.lisp | This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING ... | 9,504 | Common Lisp | .lisp | 529 | 16.41966 | 116 | 0.646487 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 758d4c4e62dab2acc44f715636d6fdcfe2b1314948d5483bce651face4b04449 | 23,634 | [
-1
] |
23,635 | tmp.lisp | namoamitabha_study-common-lisp/pcl/ch03/tmp.lisp |
[1]> (list 1 2 3)
(1 2 3)
[2]> (list :a 1 :b 2 :c 3)
(:A 1 :B 2 :C 3)
[3]> (getf (list :a 1 :b 2 :c 3) :a)
1
[4]> (getf (list :a 1 :b 2 :c 3) :c)
3
[5]>
(format nil "~r" 1606938044258990275541962092)
| 203 | Common Lisp | .lisp | 10 | 19 | 46 | 0.528796 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 017c393294460c4e95df818378612972d4ad22bce12c8d0844f6e5dba22999ac | 23,635 | [
-1
] |
23,636 | notes.lisp | namoamitabha_study-common-lisp/pcl/ch08/notes.lisp | (defun primep (number)
(when (> number 1)
(loop for fac from 2 to (isqrt number) never (zerop (mod number fac)))))
(defun next-prime (number)
(loop for n from number when (primep n) return n))
(do-primes (p 0 19)
(format t "~d " p))
(do ((p (next-prime 0) (next-prime (1+ p))))
((> p 19))
(format t "... | 3,021 | Common Lisp | .lisp | 82 | 33.097561 | 76 | 0.59849 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | bc9a70c438d83bdcadae1a7fca8a31bf1e1d77159920a26a6e0e2e5b2741f29e | 23,636 | [
-1
] |
23,637 | output.lisp | namoamitabha_study-common-lisp/pcl/ch08/output.lisp | This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING ... | 13,087 | Common Lisp | .lisp | 389 | 31.308483 | 189 | 0.645284 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 47bd8e95ee3cd143a141b3bb7a0ee3380c14681220a416ef0be3962990973ac7 | 23,637 | [
-1
] |
23,638 | ch11.lisp | namoamitabha_study-common-lisp/pcl/ch11/ch11.lisp | (defpackage pcl-ch11
(:use :common-lisp)
(:export :my-true))
(in-package :pcl-ch11)
(defun my-true ()
t)
| 113 | Common Lisp | .lisp | 6 | 16.5 | 22 | 0.666667 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 3052fc7f36e477400bb619e66371160640287a80a0fd7044f9c9524bae81003a | 23,638 | [
-1
] |
23,639 | run-tests.lisp | namoamitabha_study-common-lisp/pcl/ch11/run-tests.lisp | #! /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(load "../../lisp-unit.lisp")
(use-package :lisp-unit)
(setq *print-summary* t)
(setq *print-failures* t)
(setq *print-errors*... | 413 | Common Lisp | .lisp | 13 | 29 | 61 | 0.687817 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 294017d9560a9e93f847bb7a3e70b518f8da774aabdf699e62f45f167a2e3e9c | 23,639 | [
-1
] |
23,640 | ch11-tests.lisp | namoamitabha_study-common-lisp/pcl/ch11/ch11-tests.lisp | (defpackage pcl-ch11-tests
(:use :common-lisp :pcl-ch11 :lisp-unit))
(in-package :pcl-ch11-tests)
(define-test test-sample
(:tag :unittest)
(assert-true t)
(assert-true (my-true)))
(define-test test-vector
(:tag :unittest)
(assert-equality #'equalp
#(1 2 3 4 5)
(... | 8,394 | Common Lisp | .lisp | 228 | 27.416667 | 74 | 0.503129 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 7ddd08e39cee708edd0b46c069eb1536fea88d10534b771a5f69108f18dcb069 | 23,640 | [
-1
] |
23,641 | run-tests.lisp | namoamitabha_study-common-lisp/pcl/ch13/run-tests.lisp | #! /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(load "../../lisp-unit.lisp")
(use-package :lisp-unit)
(setq *print-summary* t)
(setq *print-failures* t)
(setq *print-errors*... | 413 | Common Lisp | .lisp | 13 | 29 | 61 | 0.687817 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | c6e4156dfbf239b3d613bc46412ed990d8564ec4019084b08711adfeede96d1d | 23,641 | [
-1
] |
23,642 | ch13-tests.lisp | namoamitabha_study-common-lisp/pcl/ch13/ch13-tests.lisp | (defpackage pcl-ch13-tests
(:use :common-lisp :pcl-ch13 :lisp-unit))
(in-package :pcl-ch13-tests)
(define-test test-sample
(:tag :unittest)
(assert-true t)
(assert-true (my-true)))
(define-test test-Trees
(:tag :unittest)
(assert-equality #'equalp
'(10 2 (3 2 10) ((10 10) (2 2)))
... | 4,387 | Common Lisp | .lisp | 121 | 24.438017 | 86 | 0.4278 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 8c25191689a28b59163c9658bca4c10e56e2fec2a3749b17b7c38919d56ed360 | 23,642 | [
-1
] |
23,643 | ch13.lisp | namoamitabha_study-common-lisp/pcl/ch13/ch13.lisp | (defpackage pcl-ch13
(:use :common-lisp)
(:export :my-true))
(in-package :pcl-ch13)
(defun my-true ()
t)
| 113 | Common Lisp | .lisp | 6 | 16.5 | 22 | 0.666667 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | e77ebe9b90d1a0cc9d8be8b654d7f1b82714847de3fb19498cfb47cd8a8ea55b | 23,643 | [
-1
] |
23,644 | ch12-tests.lisp | namoamitabha_study-common-lisp/pcl/ch12/ch12-tests.lisp | (defpackage pcl-ch12-tests
(:use :common-lisp :pcl-ch12 :lisp-unit))
(in-package :pcl-ch12-tests)
(define-test test-sample
(:tag :unittest)
(assert-true t)
(assert-true (my-true)))
(define-test test-There-Is-No-List
(:tag :unittest)
(assert-equal '(1 . 2)
(cons 1 2))
(assert-equal 1... | 7,050 | Common Lisp | .lisp | 234 | 20.350427 | 64 | 0.462375 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | dc8937e36d8e62d41d684a174c1249fabf35df489618770c894fe28d513840a7 | 23,644 | [
-1
] |
23,645 | run-tests.lisp | namoamitabha_study-common-lisp/pcl/ch12/run-tests.lisp | #! /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(load "../../lisp-unit.lisp")
(use-package :lisp-unit)
(setq *print-summary* t)
(setq *print-failures* t)
(setq *print-errors*... | 413 | Common Lisp | .lisp | 13 | 29 | 61 | 0.687817 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 030f2ff93ed4d8ad9ce4acb760687df8549ed81df39e4dd6bcb21d4fd0595be2 | 23,645 | [
-1
] |
23,646 | ch12.lisp | namoamitabha_study-common-lisp/pcl/ch12/ch12.lisp | (defpackage pcl-ch12
(:use :common-lisp)
(:export :my-true))
(in-package :pcl-ch12)
(defun my-true ()
t)
| 113 | Common Lisp | .lisp | 6 | 16.5 | 22 | 0.666667 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 2dfe702de7fde6647196b4919cdc76f64c8ba6f37c63af0e73e083a7af67b788 | 23,646 | [
-1
] |
23,647 | write-string.lisp | namoamitabha_study-common-lisp/pcl/ch14/write-string.lisp | (let ((out (open "tmp-write-string.txt~"
:direction :output
:if-exists :supersede)))
(when out
(dotimes (i 256)
(write-string (write-to-string i) out))
(close out)))
| 185 | Common Lisp | .lisp | 7 | 22.714286 | 42 | 0.634831 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 5f9bc44fadc853bdd2a5ae2eb89a18211dc5cbb83a11c9a88097e805ff4e2f5d | 23,647 | [
-1
] |
23,648 | with-open-file02.lisp | namoamitabha_study-common-lisp/pcl/ch14/with-open-file02.lisp | (with-open-file (stream "ps.txt"
:if-does-not-exist nil)
(when stream
(loop for line = (read-line stream nil)
while line do
(print line))))
| 155 | Common Lisp | .lisp | 6 | 22.333333 | 43 | 0.662162 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 8d94d598d5e9dfaa99102f46c734ce0fadc7c01e1b89ae8e9153b64e05c3e7ba | 23,648 | [
-1
] |
23,649 | ch14-tests.lisp | namoamitabha_study-common-lisp/pcl/ch14/ch14-tests.lisp | (defpackage pcl-ch14-tests
(:use :common-lisp :pcl-ch14 :lisp-unit))
(in-package :pcl-ch14-tests)
(define-test test-sample
(:tag :unittest)
(assert-true t)
(assert-true (my-true)))
(define-test test-How-Pathnames-Represent-Filenames
(:tag :unittest)
(let ((pathname "/foo/bar/baz.txt"))
... | 2,394 | Common Lisp | .lisp | 55 | 32.309091 | 74 | 0.544559 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 1acafec61be2defe60f2a6ee30e3e242c75a9e35c1a8e698634378c948336303 | 23,649 | [
-1
] |
23,650 | write-char.lisp | namoamitabha_study-common-lisp/pcl/ch14/write-char.lisp | (let ((out (open "tmp-write-char.txt~"
:direction :output
:if-exists :supersede)))
(when out
(dotimes (i 256)
(write-char (code-char i) out))
(close out)))
| 175 | Common Lisp | .lisp | 7 | 21.285714 | 39 | 0.619048 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | d38b659b1c8fe77e1d83311f3c5652394d467d86b56ec375c6dd97b8db9f18d8 | 23,650 | [
-1
] |
23,651 | ch14.lisp | namoamitabha_study-common-lisp/pcl/ch14/ch14.lisp | (defpackage pcl-ch14
(:use :common-lisp)
(:export :my-true))
(in-package :pcl-ch14)
(defun my-true ()
t)
| 113 | Common Lisp | .lisp | 6 | 16.5 | 22 | 0.666667 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 1f29d9f4115fa429495c66214d9d6e6002b09bc94f355dab760d615c1b5b915b | 23,651 | [
-1
] |
23,652 | run-tests.lisp | namoamitabha_study-common-lisp/pcl/ch14/run-tests.lisp | #! /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(load "../../lisp-unit.lisp")
(use-package :lisp-unit)
(setq *print-summary* t)
(setq *print-failures* t)
(setq *print-errors*... | 413 | Common Lisp | .lisp | 13 | 29 | 61 | 0.687817 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 2930caafd0120a689b0ba69d772bc3dababec942edf9a6de364e07feec6acbd9 | 23,652 | [
-1
] |
23,653 | open-non-existing-file.lisp | namoamitabha_study-common-lisp/pcl/ch14/open-non-existing-file.lisp | (let ((in (open "none-existing-file.txt" :if-does-not-exist nil)))
(when in
(loop for line = (read-line in nil)
while line do (format t "~a~%" line))
(close in)))
| 175 | Common Lisp | .lisp | 5 | 31.6 | 66 | 0.617647 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | db420cbd518943042474aeb7609b325bb5aaaf48191824e325ee6520ad29cdb2 | 23,653 | [
-1
] |
23,654 | write.lisp | namoamitabha_study-common-lisp/pcl/ch14/write.lisp | (let ((out (open "tmp-write.txt~"
:direction :output
:if-exists :supersede)))
(when out
(dotimes (i 256)
(write i :stream out))
(close out))
)
| 168 | Common Lisp | .lisp | 8 | 16.875 | 34 | 0.5875 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 7875aef3ddb64b28380cc424800f450b4ac09445c830d993153d1f4f2862ba42 | 23,654 | [
-1
] |
23,655 | bulk-read.lisp | namoamitabha_study-common-lisp/pcl/ch14/bulk-read.lisp | (defvar *data* (make-array 15 :initial-element nil))
(values
(read-sequence *data*
(make-string-input-stream "test string"))
*data*)
| 140 | Common Lisp | .lisp | 5 | 25.6 | 52 | 0.703704 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 5da815e27a6029b340181b882dcc6bdb369004c5ebcc980c1f66b15380d65360 | 23,655 | [
-1
] |
23,656 | with-open-file01.lisp | namoamitabha_study-common-lisp/pcl/ch14/with-open-file01.lisp | (with-open-file (stream "tmp-with-open-file01.txt~"
:direction :output
:if-exists :supersede)
(when stream
(dotimes (i 256)
(write-string (write-to-string i) stream))))
| 188 | Common Lisp | .lisp | 6 | 27.166667 | 52 | 0.67033 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | eda6019c088a6887da924dc8df7513f41423aa82c1727bbbb9158da0c8965339 | 23,656 | [
-1
] |
23,657 | read-line-test.lisp | namoamitabha_study-common-lisp/pcl/ch14/read-line-test.lisp | (let ((in (open "ps.txt")))
(format t "~a~%" (read-line in))
(close in))
| 77 | Common Lisp | .lisp | 3 | 23.333333 | 34 | 0.527027 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 73fbd087372d333ae43510859d0f07d554a8bada3f0830d5848a1cf5cf091083 | 23,657 | [
-1
] |
23,658 | read-test.lisp | namoamitabha_study-common-lisp/pcl/ch14/read-test.lisp | (let ((in (open "s-expression.txt" :if-does-not-exist nil)))
(when in
(loop for line = (read in nil)
while line do (print line))
(close in)))
| 155 | Common Lisp | .lisp | 5 | 27.4 | 60 | 0.624161 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 05c35988e483694daf304df75f3af3d4fdfe66c7804df84dc9e69fdeeb971c49 | 23,658 | [
-1
] |
23,659 | write-line.lisp | namoamitabha_study-common-lisp/pcl/ch14/write-line.lisp | (let ((out (open "tmp-write-line.txt~"
:direction :output
:if-exists :supersede)))
(when out
(dotimes (i 256)
(write-line (write-to-string i) out))
(close out)))
| 181 | Common Lisp | .lisp | 7 | 22.142857 | 40 | 0.626437 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 2f3d114384eaf022583f69a7f9e0dbd729c529e7954ec6bbf50a17c28ddc0b5e | 23,659 | [
-1
] |
23,660 | read-binary-data.lisp | namoamitabha_study-common-lisp/pcl/ch14/read-binary-data.lisp | (let ((in (open "ps.txt"
:if-does-not-exist nil
:element-type '(unsigned-byte 8))))
(when in
(loop for byte = (read-byte in nil)
while byte do (print byte))
(close in)))
| 188 | Common Lisp | .lisp | 7 | 23.285714 | 39 | 0.618785 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 5eff678c9b8c12898e22ce1ca292d9ef93599fc31a8ad3b16ddf99d694c2e452 | 23,660 | [
-1
] |
23,661 | output.lisp | namoamitabha_study-common-lisp/pcl/ch10/output.lisp | This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING ... | 8,239 | Common Lisp | .lisp | 445 | 16.88764 | 109 | 0.682615 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | e23fe82cb71011962ec11ca29c18ce00bd69d5a99db86dbc4841a07644560a9a | 23,661 | [
-1
] |
23,662 | note.lisp | namoamitabha_study-common-lisp/pcl/ch09/note.lisp | (defvar *test-name* nil)
(defun report-result (result form)
"Report the results of a single test case. Called by 'check'."
(format t "~:[FAIL~;PASS~] ...~a: ~a~%" result *test-name* form)
result)
(defmacro with-gensyms ((&rest names) &body body)
`(let ,(loop for n in names collect `(,n (gensym)))
,@body)... | 1,400 | Common Lisp | .lisp | 46 | 26.869565 | 70 | 0.606106 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 2a851707c961ce1faa5497ece0d8dcf6a4103e7911b204b46e706e28bf1bdad9 | 23,662 | [
-1
] |
23,663 | notes.lisp | namoamitabha_study-common-lisp/pcl/ch05/notes.lisp | ;;;required parameter
(defun verbose-sum (x y)
"Sum any two numbers after printing a message."
(format t "Summing ~d and ~d.~%" x y)
(+ x y))
;;;optional parameter
(defun foo (a b &optional c d)
(list a b c d))
(defun foo (a &optional (b 10))
(list a b))
(defun make-rectangle (width &optional (height wid... | 1,364 | Common Lisp | .lisp | 45 | 27.466667 | 74 | 0.617169 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | ad8faf021b098a60ea69e2285df066b55e6a4a78649d71b34a39b3ba08d82ae9 | 23,663 | [
-1
] |
23,664 | out-put-notes-02.lisp | namoamitabha_study-common-lisp/pcl/ch05/out-put-notes-02.lisp | This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING ... | 6,264 | Common Lisp | .lisp | 210 | 28.228571 | 135 | 0.631474 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 53ba330ad06a324d3fdb90ca85344d2b03a949d52df8d981baf049cd7d173e7f | 23,664 | [
-1
] |
23,665 | out-put-notes.lisp | namoamitabha_study-common-lisp/pcl/ch05/out-put-notes.lisp | (defun verbose-sum (x y)
"Sum any two numbers after printing a message."
(format t "Summing ~d and ~d.~%" x y)
(+ x y))
VERBOSE-SUM
* (verbose-sum 2 3)
Summing 2 and 3.
5
* (documentation 'verbose-sum 'function)
"Sum any two numbers after printing a message."
* call-arguments-limit
4611686018427387903
* (defu... | 5,330 | Common Lisp | .lisp | 212 | 23.448113 | 112 | 0.674598 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 5e65898b17e3e1de37cdefc26d8f2753aea2bdd200fcd2db17c9db06d95e772a | 23,665 | [
-1
] |
23,666 | multi-thread-server.lisp | namoamitabha_study-common-lisp/socket-practice/multi-thread-server.lisp | ;; Utility: if Bordeaux Threads are available make the function call in a
;; separate process and return from try-make-thread immediately.
(defun try-make-thread (name function)
#+bordeaux-threads
(bt:make-thread function :name name)
#-bordeaux-threads
(funcall function))
(defun handle-request (stream)
(let... | 1,833 | Common Lisp | .lisp | 45 | 36.777778 | 75 | 0.713483 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 59a17b12d95e256ba6ead11f72ccd5943075aa55e2652def92a0e53891749de4 | 23,666 | [
-1
] |
23,667 | lisp-socket-client.lisp | namoamitabha_study-common-lisp/socket-practice/lisp-socket-client.lisp | (defun simple-test (port string)
(let* ((socket (usocket:socket-connect #(127 0 0 1) port))
(stream (usocket:socket-stream socket)))
(write-line string stream)
(force-output stream)
(let ((result (read-line stream)))
(close stream)
(usocket:socket-close socket)
result)))
| 306 | Common Lisp | .lisp | 9 | 29.222222 | 60 | 0.6633 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | e7bb86f3ca6db804bab580964cd1d7c3e413ec1cf6b6ef2208d4b145c0d0ef07 | 23,667 | [
-1
] |
23,668 | one-shot-server.lisp | namoamitabha_study-common-lisp/socket-practice/one-shot-server.lisp | (defun one-shot-server (port)
(let ((socket (usocket:socket-listen usocket:*wildcard-host*
port
:reuse-address t)))
(usocket:wait-for-input socket)
(let ((stream (usocket:socket-stream (usocket:socket-accept socket))))
(handle-request stream)
(close stream)
(usocket:soc... | 492 | Common Lisp | .lisp | 14 | 29.785714 | 74 | 0.662474 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 394b27b1aac01ad3e868c7482182f439b5c0c5b561db2fb15ea7526973b013c0 | 23,668 | [
-1
] |
23,669 | chapter-04.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-04.lisp | ;;4.1 Birth of a Utility
(defun all-nicknames (names)
(if (null names)
nil
(nconc (nicknames (car names))
(all-nicknames (cdr names)))))
(mapcan #'nicknames people)
(defun bookshops (town)
nil)
(let ((town (find-if #'bookshops towns)))
(values town (bookshops town)))
(defun find-books ... | 8,432 | Common Lisp | .lisp | 261 | 24.888889 | 60 | 0.492101 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 972e83af7a221e5e9970be53a65ae5d020ef34fb3be2fb83b800dc249131f2bd | 23,669 | [
-1
] |
23,670 | chapter-06.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-06.lisp | (defstruct node contents yes no)
(defvar *nodes* (make-hash-table))
(defun defnode (name conts &optional yes no)
(setf (gethash name *nodes*)
(make-node :contents conts
:yes yes
:no no)))
(defnode 'people "Is the person a man?" 'male 'female)
(defnode 'ma... | 2,319 | Common Lisp | .lisp | 79 | 22.531646 | 55 | 0.513465 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 8b8913496eaf554bddcb2ce2e65b3baf8915483cd6b12297d673c809f4c98532 | 23,670 | [
-1
] |
23,671 | util.lisp | namoamitabha_study-common-lisp/on-lisp/util.lisp | (defpackage on-lisp.util
(:use :common-lisp)
(:export
:mklist))
(in-package :on-lisp.util)
(defun mklist (obj)
(if (listp obj) obj (list obj)))
| 155 | Common Lisp | .lisp | 7 | 19.571429 | 34 | 0.671233 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | f77b24a30947089f7646fc2449421c6eba3537de49c7d2ec6ba3bfaa4b3dd40b | 23,671 | [
-1
] |
23,672 | chapter-05.tests.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-05.tests.lisp | (defpackage on-lisp.ch05.tests
(:use :common-lisp :lisp-unit :on-lisp.ch05))
(in-package :on-lisp.ch05.tests)
(define-test test-join
(:tag :unittest)
(assert-equal (join 1 2 3 4 5) 15)
(assert-equal (join '(a) '(b) '(c) '(d) '(e))
'(a b c d e)))
(define-test test-list-unit
(:tag :unitte... | 4,262 | Common Lisp | .lisp | 128 | 27.429688 | 76 | 0.519329 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | cf747da6a25c8c7a8bdb21148c890ae9b7e40bd62aad6d5d28d55297d9c570ba | 23,672 | [
-1
] |
23,673 | chapter-05.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-05.lisp | (defpackage on-lisp.ch05
(:use :common-lisp :on-lisp.util)
(:export
:join
:joiner
:complement1
:!
:memoize
:compose
:fif
:fint
:fun
:lrec
:our-copy-tree
:count-leaves
:flatten
:rfind-if
:ttrav
:trec))
(in-package on-lisp.ch05)
;;5.1 Common Lisp Evolves
(defun join (... | 4,115 | Common Lisp | .lisp | 143 | 20.916084 | 66 | 0.49645 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 67b79945df19fef65bf5587bfc39b6a8c7867f22205c156b7109f2a5f8975980 | 23,673 | [
-1
] |
23,674 | run-tests.lisp | namoamitabha_study-common-lisp/on-lisp/run-tests.lisp | #! /usr/bin/sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(load "../lisp-unit.lisp")
(use-package :lisp-unit)
(setq *print-summary* t)
(setq *print-failures* t)
(setq *print-errors* t)... | 551 | Common Lisp | .lisp | 17 | 29.882353 | 61 | 0.702857 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | c253a5f7394cb96ac303b53fe517511333250af18a7fd6453152566230692f9b | 23,674 | [
-1
] |
23,675 | chapter-03.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-03.lisp | ;;3.1 Functional Design
(defun good-reverse (lst)
(labels ((rev (lst acc)
(if (null lst)
acc
(rev (cdr lst) (cons (car lst) acc)))))
(rev lst nil)))
(setq lst '(a b c))
(good-reverse lst)
(reverse lst)
(setq lst (reverse lst))
(setq lst '(a b c))
(nreverse lst)
ls... | 1,420 | Common Lisp | .lisp | 57 | 22.070175 | 56 | 0.646097 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 89d0957163924e67199d8f3c96d140d627bd815aed21a6dd02e15c3130fd99e6 | 23,675 | [
-1
] |
23,676 | chapter-04-excise.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-04-excise.lisp | ;;4.3
(proclaim '(inline last1 single append1 conc1 mklist))
(defun last1 (lst)
"Return last element value of list"
(car (last lst)))
(assert (= (last1 '(1 2 3 4)) 4))
(assert (eq (last1 nil) nil))
(defun single (lst)
"Whether list contains only one element"
(if (null lst)
nil
(and (car lst) (nu... | 3,869 | Common Lisp | .lisp | 105 | 29.038095 | 102 | 0.519133 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 06adb7218f43d2880eb1c3ecf9c47532e02d937a84bc89cf04dad656f65231e1 | 23,676 | [
-1
] |
23,677 | chapter-02.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-02.lisp | (proclaim '(optimize speed))
;;2.2
(defun double (x) (* x 2))
(double 1)
#'double
(eq #'double (car (list #'double)))
(lambda (x) (* x 2))
#'(lambda (x) (* x 2))
(double 3)
((lambda (x) (* x 2)) 3)
(setq double 2)
(double double)
(symbol-value 'double)
(symbol-function 'double)
(setq x #'append)
(eq (symbol-... | 3,890 | Common Lisp | .lisp | 156 | 20.75641 | 59 | 0.541621 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | b1516c4fe251846904fd02e1a83aadb968df0936da0021bb6be7a82edb7921b0 | 23,677 | [
-1
] |
23,678 | chapter-08.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-08.lisp | ;;8.1 When Nothing Else Will Do
(defun 1+ (x) (+ 1 x))
(defmacro 1+ (x) `(+ 1 ,x))
(defmacro while (test &body body)
`(do ()
((not ,test))
,@body))
;;8.2 Macro or Function?
(defun avg (&rest args)
(/ (apply #'+ args) (length args)))
(defmacro avg (&rest args)
`(/ (+ ,@args) ,(length args)))
| 314 | Common Lisp | .lisp | 12 | 23.333333 | 37 | 0.560403 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | a4e79f1ba1c29667c9b85474560db5a92c41e98ee5f8f8dbc216e6a7c6f58ea7 | 23,678 | [
-1
] |
23,679 | chapter-07.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-07.lisp | (defpackage on-lisp.ch07
(:use :common-lisp)
(:export
:nil!0
:nil!
:nil!1
:nif
:nif1
:our-when
:greet
:memq
:while
:our-dolist
:our-and
:our-andb))
(in-package :on-lisp.ch07)
;;7.2 backquote
(defun nil!0 (var)
(setq var nil))
(defmacro nil! (var)
(list 'setq var nil))
(de... | 5,129 | Common Lisp | .lisp | 206 | 20.160194 | 61 | 0.519893 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 6ae4fac8e544284505fe4a881fe0b54ce85ec2a60d8bbed78ff02ad7911fb20b | 23,679 | [
-1
] |
23,680 | chapter-07.tests.lisp | namoamitabha_study-common-lisp/on-lisp/chapter-07.tests.lisp | (defpackage on-lisp.ch07.tests
(:use
:common-lisp
:lisp-unit
:on-lisp.ch07))
(in-package :on-lisp.ch07.tests)
(define-test test-backquote
(:tag :unittest)
(assert-equal '(1 2 3) `(1 2 3))
(assert-equal (list 'a 'b 'c) `(a b c))
;;(assert-equal (list 'a b 'c d) `(a ,b c ,d))
)
;; >> (setq a 1 b... | 2,887 | Common Lisp | .lisp | 99 | 22.181818 | 68 | 0.487559 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 7203a1a4dda37f9282b137ddd605e6084084d296291c8ed6388cc0f0544ec50d | 23,680 | [
-1
] |
23,681 | dlist.lisp | namoamitabha_study-common-lisp/data-structure/dlist.lisp | ;;; $Id: dlist.lisp,v 1.3 2011/08/06 09:06:03 mmondor Exp $
#|
Copyright (c) 2011, Matthew Mondor
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above... | 10,703 | Common Lisp | .lisp | 303 | 31.257426 | 77 | 0.686481 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | d1d7daa59d6683f0b5df18b1dabb960c8dc61b290689af94b4cfcc696c09e07b | 23,681 | [
-1
] |
23,682 | QGridLayout-example.lisp | namoamitabha_study-common-lisp/commonqt-example/QGridLayout-example.lisp | (ql:quickload :qt)
(in-package :qt)
(named-readtables:in-readtable :qt)
(defclass hello-name-app ()
((name-edit :accessor name-edit)
(name-button :accessor name-button)
(name-label :accessor name-label))
(:metaclass qt-class)
(:qt-superclass "QWidget")
(:slots ("show-name()" show-name)))
(defmethod init... | 1,559 | Common Lisp | .lisp | 37 | 36.648649 | 71 | 0.651285 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 71ca70fe91d72001f97d7197ce066ee1d5fc8e16abada84a077d8e9b50b3ee27 | 23,682 | [
-1
] |
23,683 | helloname.lisp | namoamitabha_study-common-lisp/commonqt-example/helloname.lisp | (ql:quickload :qt)
(in-package :qt)
(named-readtables:in-readtable :qt)
(defclass hello-name-app ()
((name-edit :accessor name-edit)
(name-button :accessor name-button)
(name-label :accessor name-label))
(:metaclass qt-class)
(:qt-superclass "QWidget")
(:slots ("show-name()" show-name)))
(defmethod init... | 1,442 | Common Lisp | .lisp | 35 | 35.857143 | 70 | 0.649786 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | ca62b6ef4cf180d102d24fdd352d2c62c9fd84a78d490b664a3068b32eff323d | 23,683 | [
-1
] |
23,684 | Building-a-Common-Lisp-GUI-with-CommonQt.lisp | namoamitabha_study-common-lisp/commonqt-example/Building-a-Common-Lisp-GUI-with-CommonQt.lisp | (require 'qt)
(defpackage :qt-kepler
(:use :cl :qt)
(:export :kepler-main))
(in-package :qt-kepler)
(named-readtables:in-readtable :qt)
(defclass orbit-view ()
((excentricity :initform 0.0d0 :accessor excentr)
(excenttric-anomaly :initform 0.0d0 :accessor anomaly))
(:metaclass qt-class)
(:qt-superclass "Q... | 7,177 | Common Lisp | .lisp | 166 | 34.421687 | 79 | 0.589934 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | a70905982237b8bf7deb5da6fda747598b9b0950cf5301c4457b4cada0eaa753 | 23,684 | [
-1
] |
23,685 | helloworld.lisp | namoamitabha_study-common-lisp/commonqt-example/helloworld.lisp | (ql:quickload :qt)
(in-package :qt)
(named-readtables:in-readtable :qt)
(defclass hello-world-app () ()
(:metaclass qt-class)
(:qt-superclass "QWidget"))
(defmethod initialize-instance :after
((instance hello-world-app) &key)
(new instance))
(defmethod initialize-instance :after
((instance hello-world-... | 519 | Common Lisp | .lisp | 16 | 29.875 | 60 | 0.73494 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | eb19abfe2036e803cdf8bb4e7fb30af88271d3dcfe8ab64ddf3fc88391f60691 | 23,685 | [
-1
] |
23,686 | QBoxLayout-example.lisp | namoamitabha_study-common-lisp/commonqt-example/QBoxLayout-example.lisp | (ql:quickload :qt)
(in-package :qt)
(named-readtables:in-readtable :qt)
(defclass hello-name-app ()
((name-edit :accessor name-edit)
(name-button :accessor name-button)
(name-label :accessor name-label))
(:metaclass qt-class)
(:qt-superclass "QWidget")
(:slots ("show-name()" show-name)))
(defmethod init... | 1,923 | Common Lisp | .lisp | 47 | 35.914894 | 73 | 0.644575 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | fe940bfb5ce795f27169a64d906f3ad062c230b0d199f74ebc09f5c49f23bccb | 23,686 | [
-1
] |
23,687 | Menu-StatusBar-example.lisp | namoamitabha_study-common-lisp/commonqt-example/Menu-StatusBar-example.lisp | (ql:quickload :qt)
(in-package :qt)
(named-readtables:in-readtable :qt)
(defclass status-bar-app ()
((name-edit :accessor name-edit)
(reverse-button :accessor reverse-button)
(capital-button :accessor capital-button)
(result-label :accessor result-label))
(:metaclass qt-class)
(:qt-superclass "QMainWind... | 2,902 | Common Lisp | .lisp | 62 | 40.354839 | 79 | 0.659372 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 8293f620af4b6652da6db7f05c8c9346166e0d1920999a89e9ff8330675318a6 | 23,687 | [
-1
] |
23,688 | Common-Lisp-GUI-with-scientific-plots.lisp | namoamitabha_study-common-lisp/commonqt-example/Common-Lisp-GUI-with-scientific-plots.lisp | (require 'qt)
;;(ql:quickload :qt)
(defpackage :qt-approx
(:use :cl :qt)
(:export :approx-main))
(in-package :qt-approx)
(named-readtables:in-readtable :qt)
(defun find-child (object name)
(let ((children (#_children object)))
(or
(loop for child in children
when (equal name (#_objectName ... | 6,506 | Common Lisp | .lisp | 154 | 31.915584 | 111 | 0.534447 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 817ce1d6f282205445b7c5bfa6efb149b2e17a562e0209a01cef9eb46200bf49 | 23,688 | [
-1
] |
23,690 | python-socket-client.py | namoamitabha_study-common-lisp/socket-practice/python-socket-client.py | #code sameple from http://www.binarytides.com/python-socket-programming-tutorial/
import socket #for sockets
import sys #for exit
try:
#create an AF_INET, STREAM socket (TCP)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error, msg:
print 'Failed to create socket. Error code: ' + str(... | 1,112 | Common Lisp | .cl | 37 | 27.675676 | 96 | 0.717248 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 70900b73894ac6b5963c6146c2cbecc740ac378049515e3a268cc2ff6e081e6e | 23,690 | [
-1
] |
23,720 | study-log.org | namoamitabha_study-common-lisp/pcl/study-log.org | * Notes
** TODO Practical Common Lisp
CLOCK: [2015-04-14 Tue 16:01]--[2015-04-14 Tue 18:01] => 2:00
CLOCK: [2015-04-14 Tue 07:41]--[2015-04-14 Tue 16:00] => 8:19
1. [X] Ch01 Introduction: Why Lisp?
2. [X] Ch02 Lather, Rinse, Repeat: A Tour of the REPL
3. [-] Ch03 Practical: A Simple Database
1. [... | 1,807 | Common Lisp | .l | 38 | 43.552632 | 70 | 0.682872 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 299b690660e4249a048e14765eb90fb87e0fc7f1d1dc4d36df60d5faeb9396ee | 23,720 | [
-1
] |
23,729 | dotimes.list | namoamitabha_study-common-lisp/pcl/ch07/dotimes.list | (dotimes (i 4)
(print i))
(dotimes (x 10)
(dotimes (y 10)
(format t "~3d " (* (1+ x) (1+ y))))) | 103 | Common Lisp | .l | 5 | 18.2 | 39 | 0.489796 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | db4c69393002b42fc39b5a4ff6b469004206fd6e1aa7c07836e0a854aa1253b3 | 23,729 | [
-1
] |
23,735 | hello-world.fas | namoamitabha_study-common-lisp/pcl/ch02/hello-world.fas | (|SYSTEM|::|VERSION| '(20080430.))
#0Y_ #0Y |CHARSET|::|UTF-8|
#Y(#:|1 2 (DEFUN HELLO-WORLD NIL ...)-1|
#20Y(00 00 00 00 00 00 00 00 20 01 DA 2F 01 DA DC 32 9C C5 19 01)
(|COMMON-LISP-USER|::|HELLO-WORLD| |SYSTEM|::|REMOVE-OLD-DEFINITIONS|
#Y(|COMMON-LISP-USER|::|HELLO-WORLD|
#18Y(00 00 00 00 00 00 00 ... | 783 | Common Lisp | .l | 15 | 45.733333 | 73 | 0.558594 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | da6708e20e545fbad8862357944176d59ab2414e1f0797d12024d264ff3bf935 | 23,735 | [
-1
] |
23,765 | multi-thread-server.note | namoamitabha_study-common-lisp/socket-practice/multi-thread-server.note | This is SBCL 1.2.4.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING ... | 3,169 | Common Lisp | .l | 104 | 27.509615 | 75 | 0.712266 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 89bc8d0ebacd3e736fd312d197d10e8fed28720411f49a2fbdb3dee2e544faa6 | 23,765 | [
-1
] |
23,782 | loop-file-in-directory.sh | namoamitabha_study-common-lisp/bash/loop-file-in-directory.sh | #!/bin/bash
FILES="./*"
for f in $FILES
do
echo "check $f..."
done
| 72 | Common Lisp | .l | 6 | 10.166667 | 22 | 0.6 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 181a33809ae1d8b9dacc3833f754262a8d3102925025b654e5f28e0df177671b | 23,782 | [
-1
] |
23,783 | global-local-variables.sh | namoamitabha_study-common-lisp/bash/global-local-variables.sh | #!/bin/bash
VAR="global variable"
function bash {
local VAR="local variable"
echo $VAR
}
echo $VAR
bash
echo $VAR
| 123 | Common Lisp | .l | 9 | 11.666667 | 30 | 0.725664 | namoamitabha/study-common-lisp | 1 | 0 | 0 | GPL-2.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 40997d89af15e31365a6ec677ef33e5fc7d10a8078bf6cbc4056a5d2d258fabf | 23,783 | [
-1
] |
23,805 | helpers.lisp | cbaggers_spring-lisp-gamejam/helpers.lisp | (in-package :vacuum)
(defun path (x)
(local-path x :vacuum))
(defun nrgb (r g b)
(v! (/ r 255.0)
(/ g 255.0)
(/ b 255.0)))
(defun rotate-v2 (x ang)
(s~ (m3:*v (m3:rotation-z ang) (v! x 0)) :xy))
(defmacro vbind (vars value-form &body body)
;; {TODO} handle declare forms properly. It is complicat... | 2,151 | Common Lisp | .lisp | 55 | 35.090909 | 72 | 0.589423 | cbaggers/spring-lisp-gamejam | 1 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | c38c4d9e0abf96916e71f02c06f80d707e11813f8f82aa699e2714fd53d3a17d | 23,805 | [
-1
] |
23,806 | shipping.lisp | cbaggers_spring-lisp-gamejam/shipping.lisp | (in-package #:vacuum)
(def-shipping-manifest :vacuum vacuum
:compression -1
:libs-to-include (cl-soil::soil
(sdl2-mixer::libsdl2-mixer :recur)
(sdl2::libsdl2 :recur))
"media/")
| 224 | Common Lisp | .lisp | 7 | 24.285714 | 54 | 0.592593 | cbaggers/spring-lisp-gamejam | 1 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 1e16a9632f4330897918db38f78c899d2c70c4fe40e684389d4010a9a200cbed | 23,806 | [
-1
] |
23,807 | package.lisp | cbaggers_spring-lisp-gamejam/package.lisp | ;;;; package.lisp
(defpackage vacuum
(:use #:cl #:cepl #:temporal-functions
#:varjo-lang #:rtg-math #:structy-defclass
#:dendrite #:cepl-utils #:skitter.sdl2.mouse-buttons
#:skitter.sdl2.keys #:shipshape
#:livesupport #:named-readtables #:rtg-math.base-maths)
(:import-from #:rtg-mat... | 372 | Common Lisp | .lisp | 10 | 30.7 | 63 | 0.631579 | cbaggers/spring-lisp-gamejam | 1 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | a538521fcb57b22bfab3d863d75f32b5aae1980e77d2a7c0eb5d868dae200f88 | 23,807 | [
-1
] |
23,808 | types.lisp | cbaggers_spring-lisp-gamejam/types.lisp | (in-package #:vacuum)
(in-readtable fn:fn-reader)
;;----------------------------------------------------------------------
(deftclass game-state
(level 0)
(stage 0))
;;----------------------------------------------------------------------
(deftclass actoroid
;;
;; gpu stuff
(kind nil :type symbol)
(stre... | 3,583 | Common Lisp | .lisp | 102 | 31.617647 | 72 | 0.584682 | cbaggers/spring-lisp-gamejam | 1 | 0 | 0 | GPL-3.0 | 9/19/2024, 11:28:28 AM (Europe/Amsterdam) | 77daa8d9c97f0c6c9c8e6df1e06bde920646296683e4a0bb9e7ef30531ac20b7 | 23,808 | [
-1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.