Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add file compile-time-compile.lisp. Depend on system sicl-type.
(cl:in-package #:common-lisp-user) (asdf:defsystem :sicl-compiler :depends-on (:sicl-code-utilities :sicl-compiler-utilities :sicl-compiler-basic-blocks :sicl-compiler-dominance :sicl-compiler-liveness :sicl-compiler-reaching-definitions :sicl-compiler-def-use-chains ...
(cl:in-package #:common-lisp-user) (asdf:defsystem :sicl-compiler :depends-on (:sicl-code-utilities :sicl-compiler-utilities :sicl-compiler-basic-blocks :sicl-compiler-dominance :sicl-compiler-liveness :sicl-compiler-reaching-definitions :sicl-compiler-def-use-chains ...
Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment
;;;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * Portable lexical environment access ;;;; ** OpenMCL #+openmcl (defun environment-p (environment) (subtypep (class-of environment) 'ccl::lexical-environment)) #+openmcl (defun lexical-variables (environment) (loop for env = environment then (ccl::lexenv...
;;;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * Portable lexical environment access ;;;; ** OpenMCL #+openmcl (defun environment-p (environment) (subtypep (class-of environment) 'ccl::lexical-environment)) #+openmcl (defun lexical-variables (environment) (loop for env = environment then (c...
Rename stream argument and give it a reasonable default value.
(cl:in-package #:sicl-reader) (defparameter *syntax-trees* '()) (defun read (&optional (input-stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil)) (let ((*preserve-whitespace* recursive-p) (*syntax-trees* (cons (list nil) *syntax-trees*))) (let ((result (r...
(cl:in-package #:sicl-reader) (defparameter *syntax-trees* '()) (defun read (&optional (input-stream *standard-input*) (eof-error-p t) (eof-value nil) (recursive-p nil)) (let ((*preserve-whitespace* recursive-p) (*syntax-trees* (cons (list nil) *syntax-trees*))) (let ((result (r...
Use = insteal of %%%=.
;;;;; TRE transpiler environment ;;;;; Copyright (c) 2008-2009 Sven Klose <pixel@copei.de> (defun eq (x y) (%%%eq x y)) (defun eql (x y) (unless x ; Convert falsity to 'null'. (setq x nil)) (unless y (setq y nil)) (or (eq x y) (%%%= x y)))
;;;;; TRE transpiler environment ;;;;; Copyright (c) 2008-2009,2011 Sven Klose <pixel@copei.de> (defun eq (x y) (%%%eq x y)) (defun eql (x y) (unless x ; Convert falsity to 'null'. (setq x nil)) (unless y (setq y nil)) (or (%%%eq x y) (= x y)))
Add default SETF expander to extrinsic environment.
(cl:in-package #:sicl-extrinsic-environment) (loop for symbol being each external-symbol in '#:common-lisp when (special-operator-p symbol) do (setf (sicl-env:special-operator symbol *environment*) t)) (setf (sicl-env:constant-variable t *environment*) t) (setf (sicl-env:constant-variable nil *environment*) ni...
(cl:in-package #:sicl-extrinsic-environment) (loop for symbol being each external-symbol in '#:common-lisp when (special-operator-p symbol) do (setf (sicl-env:special-operator symbol *environment*) t)) (setf (sicl-env:constant-variable t *environment*) t) (setf (sicl-env:constant-variable nil *environment*) ni...
Rename parameter in preparation for adding another.
(cl:in-package #:clump-binary-tree) (defgeneric iterative-traversal (tree visit)) (defmethod iterative-traversal ((tree node-with-parent) visit) (let ((current-node tree)) (loop do (if (or (not (funcall visit current-node)) (and (null (left current-node)) (null (right current-node)))) (loop for p...
(cl:in-package #:clump-binary-tree) (defgeneric iterative-traversal (tree enter)) (defmethod iterative-traversal ((tree node-with-parent) enter) (let ((current-node tree)) (loop do (if (or (not (funcall enter current-node)) (and (null (left current-node)) (null (right current-node)))) (loop for p...
Use LISP-UNIT:RUN-TESTS rather than LISP-UNIT:RUN.
(in-package "BASIC-BINARY-PACKET.TESTS") (defmethod asdf:perform ((op asdf:test-op) (component (eql (asdf:find-system "basic-binary-packet-tests")))) (lisp-unit:run :all "BASIC-BINARY-PACKET.TESTS"))
(in-package "BASIC-BINARY-PACKET.TESTS") (defmethod asdf:perform ((op asdf:test-op) (component (eql (asdf:find-system "basic-binary-packet-tests")))) (lisp-unit:run-tests :all "BASIC-BINARY-PACKET.TESTS"))
Remove unnecessary :use statement from defpackage
(asdf:defsystem #:neo4cl-test :serial t :license "MIT license" :author "James Fleming <james@electronic-quill.net>" :description "Test suite for neo4cl" :depends-on (#:neo4cl #:fiveam) :components ((:file "neo4cl-test"))) (defpackage #:neo4cl-test (:use #:cl #:neo4cl) (:export ne...
(asdf:defsystem #:neo4cl-test :serial t :license "MIT license" :author "James Fleming <james@electronic-quill.net>" :description "Test suite for neo4cl" :depends-on (#:neo4cl #:fiveam) :components ((:file "neo4cl-test"))) (defpackage #:neo4cl-test (:use #:cl) (:export neo4cl))
Remove the :ENVIRONMENT keyword argument before calling MAKE-INSTANCE.
(cl:in-package #:sicl-boot) (defun define-ensure-generic-function-r1 (boot) (setf (sicl-genv:fdefinition 'ensure-generic-function (r1 boot)) (lambda (function-name &rest arguments) (if (sicl-genv:fboundp function-name (r1 boot)) (sicl-genv:fdefinition function-name (r1 boot)) (setf (sicl-genv:fdefi...
(cl:in-package #:sicl-boot) (defun define-ensure-generic-function-r1 (boot) (setf (sicl-genv:fdefinition 'ensure-generic-function (r1 boot)) (lambda (function-name &rest arguments) (let ((args (copy-list arguments))) (loop while (remf args :environment)) (if (sicl-genv:fboundp function-name (r1 boot)) ...
Change parameter type for finalization
(in-package :freetype2-ffi) ;; Initialization (defcfun ("FT_Init_FreeType" ft-init-freetype) ft-error (library (:pointer ft-library))) (export 'ft-init-freetype) (defcfun ("FT_Done_FreeType" ft-done-freetype) ft-error (library ft-library)) (export 'ft-done-freetype)
(in-package :freetype2-ffi) ;; Initialization (defcfun ("FT_Init_FreeType" ft-init-freetype) ft-error (library (:pointer ft-library))) (export 'ft-init-freetype) ;; This takes an FT_Library, which is natively a pointer, but if ;; we make it ft-library here, CFFI will expect a wrapper, which ;; is undesirable in...
Use keyword instead of optional arguments
(defpackage :docker/images (:use :common-lisp :docker/request) (:export #:list-images)) (in-package :docker/images) (defun list-images (&optional all) (request-json (format nil "/images/json~@[?all=1~]" all))) (defun inspect-images (name) (request-json (format nil "/images/~a/json" name))) (defun image-hist...
(defpackage :docker/images (:use :common-lisp :docker/request) (:export #:list-images)) (in-package :docker/images) (defun list-images (&key all) (request-json (format nil "/images/json~:[~;?all=1~]" all))) (defun inspect-images (name) (request-json (format nil "/images/~a/json" name))) (defun image-history...
Use COMMON-LISP package in mysqlnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; Free Software published under an MIT-like license. See LICENSE ;;; ;;; ;;; ;;; Copyright (c) 2012 Googl...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; Free Software published under an MIT-like license. See LICENSE ;;; ;;; ;;; ;;; Copyright (c) 2012 Googl...
Update tests for new cpu passing.
(in-package :6502-tests) (def-suite opcodes :in 6502-tests) (in-suite opcodes) (deftest brk-sets-flags "brk flag (4) and disable interrupts flag (2) must be set." (6502::brk #x00) (is (plusp (status-bit :break cpu))) (is (plusp (status-bit :interrupt cpu)))) (deftest brk-adds-3-bytes-to-stack "Program Coun...
(in-package :6502-tests) (def-suite opcodes :in 6502-tests) (in-suite opcodes) (deftest brk-sets-flags "brk flag (4) and disable interrupts flag (2) must be set." (6502::brk #x00 cpu) (is (plusp (status-bit :break cpu))) (is (plusp (status-bit :interrupt cpu)))) (deftest brk-adds-3-bytes-to-stack "Program ...
Check that generic function has been properly defined in R3.
(cl:in-package #:sicl-boot) (defun define-validate-superclass (boot) (setf (sicl-genv:fdefinition 'sicl-clos:validate-superclass (r2 boot)) (constantly t))) (defun define-ensure-generic-function (boot) (setf (sicl-genv:fdefinition 'ensure-generic-function (r2 boot)) (lambda (function-name &rest arguments) (d...
(cl:in-package #:sicl-boot) (defun define-validate-superclass (boot) (setf (sicl-genv:fdefinition 'sicl-clos:validate-superclass (r2 boot)) (constantly t))) (defun define-ensure-generic-function (boot) (setf (sicl-genv:fdefinition 'ensure-generic-function (r2 boot)) (lambda (function-name &rest arguments) (d...
Increment column count in default case.
(cl:in-package #:sicl-source-tracking-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%co...
(cl:in-package #:sicl-source-tracking-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%co...
Add iterate macro clause for growing sequences.
;;;; tools.lisp ;;;; Copyright (c) 2015 Thayne McCombs <astrothayne@gmail.com> (uiop:define-package :garten/tools (:use :cl :garten/grower) (:import-from :alexandria :with-gensyms) (:export #:with-grower)) (in-package :garten/tools) (defmacro with-grower ((feeder type &rest args) &body body) "Execute BODY...
;;;; tools.lisp ;;;; Copyright (c) 2015 Thayne McCombs <astrothayne@gmail.com> (uiop:define-package :garten/tools (:use :cl :garten/grower :iterate) (:import-from :alexandria #:with-gensyms) (:export #:with-grower #:growing #:feeding)) (in-package :garten/tools) (defmacro with-grower ((feeder typ...
Add SLEEP-UNTIL, for future rate limiting perhaps.
;;;; utils.lisp (in-package #:githappy) (defun url-encode (string) (drakma:url-encode string :utf-8)) (defun utf8-string (octets) (trivial-utf-8:utf-8-bytes-to-string octets)) (defun jref (json key) "Extract KEY from JSON. If KEY is an integer, use ELT; if it's a string, use GETHASH; if it's a list, call jr...
;;;; utils.lisp (in-package #:githappy) (defun url-encode (string) (drakma:url-encode string :utf-8)) (defun utf8-string (octets) (trivial-utf-8:utf-8-bytes-to-string octets)) (defun jref (json key) "Extract KEY from JSON. If KEY is an integer, use ELT; if it's a string, use GETHASH; if it's a list, call jr...
Use PATHNAME as a rope
(in-package :robray) (defun scene-file-type (filename) (let ((filetype (file-type filename))) (if filetype (string-case (string-downcase filetype) ("urdf" :urdf) (("robray" "curly") :curly) (otherwise (error "Unrecognized scene file suffix: ~A" filetype))) :curly))) ...
(in-package :robray) (defun scene-file-type (filename) (let ((filetype (file-type filename))) (if filetype (string-case (string-downcase filetype) ("urdf" :urdf) (("robray" "curly") :curly) (otherwise (error "Unrecognized scene file suffix: ~A" filetype))) :curly))) ...
Create a one-char buffer for UNREAD-CHAR.
(cl:in-package #:sicl-source-tracking-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%co...
(cl:in-package #:sicl-source-tracking-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%co...
Change version from RC2 to RC3.
;;; Copyright 2008 Gabor Balazs ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed...
;;; Copyright 2008 Gabor Balazs ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed...
Reduce over-nesting not be needed
(in-package :cl-user) (defpackage cl-emoji-test (:use :cl :cl-emoji :prove)) (in-package :cl-emoji-test) ;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp. (with-open-file (s (asdf:system-relative-pathname :cl-emoji (pathname (format nil "data/emoji_~a.lisp" ...
(in-package :cl-user) (defpackage cl-emoji-test (:use :cl :cl-emoji :prove)) (in-package :cl-emoji-test) ;; NOTE: To run this test file, execute `(asdf:test-system :cl-emoji)' in your Lisp. (with-open-file (s (asdf:system-relative-pathname :cl-emoji (pathname (format nil "data/emoji_~a.lisp" ...
Add the 'with-server-socket' macro to the list of exported symbols.
;;;; $Id$ ;;;; $URL$ ;;;; See the LICENSE file for licensing information. (in-package :cl-user) #+lispworks (require "comm") (eval-when (:execute :load-toplevel :compile-toplevel) (defpackage :usocket (:use :cl) (:export #:socket-connect ; socket constructors and methods #:socket-listen ...
;;;; $Id$ ;;;; $URL$ ;;;; See the LICENSE file for licensing information. (in-package :cl-user) #+lispworks (require "comm") (eval-when (:execute :load-toplevel :compile-toplevel) (defpackage :usocket (:use :cl) (:export #:socket-connect ; socket constructors and methods #:socket-listen ...
Use bikelis.com as default host
;; Common Lisp Script ;; Manoel Vilela (defpackage :lisp-chat/config (:use :cl) (:export :*debug* :*host* :*port*)) (in-package :lisp-chat/config) (defparameter *debug* t "Run application in debug mode with extra info in terminal") (defparameter *host* "localhost" "Host used in server and c...
;; Common Lisp Script ;; Manoel Vilela (defpackage :lisp-chat/config (:use :cl) (:export :*debug* :*host* :*port*)) (in-package :lisp-chat/config) (defparameter *debug* t "Run application in debug mode with extra info in terminal") (defparameter *host* "bikelis.com" "Host used in server and...
Add new component to system definition.
(cl:in-package #:asdf-user) (defsystem cleavir-type-inference :depends-on (:cleavir-hir) :serial t :components ((:file "packages") (:file "dictionary") (:file "type-descriptor") (:file "sanity-checks") (:file "filter") (:file "bag-equal") (:file "bag-join") (:file "update") (:file "tran...
(cl:in-package #:asdf-user) (defsystem cleavir-type-inference :depends-on (:cleavir-hir) :serial t :components ((:file "packages") (:file "dictionary") (:file "type-descriptor") (:file "sanity-checks") (:file "filter") (:file "bag-equal") (:file "bag-join") (:file "update") (:file "tran...
Add assertion that the var is null at the top level.
(in-package #:spinneret) (declaim (stream *html*)) (defparameter *html* (make-synonym-stream '*standard-output*) "Output stream for HTML generation.") (declaim (string *html-lang* *html-charset*)) (defparameter *html-lang* "en") (defparameter *html-charset* "UTF-8") (declaim (type (integer -1 #.(1- most-positiv...
(in-package #:spinneret) (declaim (stream *html*)) (defparameter *html* (make-synonym-stream '*standard-output*) "Output stream for HTML generation.") (declaim (string *html-lang* *html-charset*)) (defparameter *html-lang* "en") (defparameter *html-charset* "UTF-8") (declaim (type (integer -1 #.(1- most-positiv...
Move dependency on cffi-grovel into :defsystem-depends-on
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- #+(or allegro cmu ecl sbcl) (eval-when (:compile-toplevel :load-toplevel :execute) (asdf:oos 'asdf:load-op :cffi-grovel)) (asdf:defsystem :static-vectors :description "Create vectors allocated in static memory." :author "Stelian Ionescu <sionescu@cddr.org>" :vers...
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (defsystem :static-vectors :description "Create vectors allocated in static memory." :author "Stelian Ionescu <sionescu@cddr.org>" :version "1.0" :licence "MIT" :defsystem-depends-on (#+(or allegro cmu ecl sbcl) :cffi-grovel) :depends-on (:alexandria :cffi) ...
Add comment on how to use the generated file.
; bender – Copyright (c) 2014–2015 Sven Michael Klose <pixel@copei.de> (defun make-vice-commands (out-name) (format t "Writing VICE monitor commands to '~A'.~%" out-name) (with-output-file o out-name (adolist ((+ (reverse *previous-labels*) *next-labels*)) (format o "al ~A .~A~%" (print-hexword .! nil) !...
; bender – Copyright (c) 2014–2015 Sven Michael Klose <pixel@copei.de> (defun make-vice-commands (out-name) (format t "Writing VICE monitor commands to '~A'.~%" out-name) (with-output-file o out-name (format o "; For VICE with command line option -moncommands ~A" out-name) (adolist ((+ (reverse *previous-l...
Fix typo in parameter name.
(cl:in-package #:cleavir-environment) (defmethod acclimation:report-condition ((condition no-variable-info) stream (langauge acclimation:english)) (let ((*package* (find-package '#:keyword))) (format stream "Undefined variable named ~s" (name condition)))) (defmethod acclimation:report-condition ((condi...
(cl:in-package #:cleavir-environment) (defmethod acclimation:report-condition ((condition no-variable-info) stream (language acclimation:english)) (let ((*package* (find-package '#:keyword))) (format stream "Undefined variable named ~s" (name condition)))) (defmethod acclimation:report-condition ((condi...
Swap direction of buffer movement keybindings
(in-package :next) (defvar *dw-keymap* (make-keymap) "Keymap for `dw-mode'.") (define-mode dw-mode () "Custom mode for the custom key bindings in `*dw-keymap*'." ((keymap-schemes :initform (list :emacs-map *dw-keymap* :vi-normal *dw-keymap*)))) ;; Gimmie that Qutebrowser feel...
(in-package :next) (defvar *dw-keymap* (make-keymap) "Keymap for `dw-mode'.") (define-mode dw-mode () "Custom mode for the custom key bindings in `*dw-keymap*'." ((keymap-schemes :initform (list :emacs-map *dw-keymap* :vi-normal *dw-keymap*)))) ;; Gimmie that Qutebrowser feel...
Add default directory pathname global variables, to be set in RSN app config files
;;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RSN-MTG; Base: 10 -*- file: packages.lisp ;;;; Copyright (c) 2013 "the Phoeron" Colin J.E. Lupton <//thephoeron.com> ;;;; See LICENSE for additional information. (in-package :cl-user) (defpackage #:rsn-mtg (:nicknames #:mtg) (:use :cl :hunchentoot ...
;;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: RSN-MTG; Base: 10 -*- file: packages.lisp ;;;; Copyright (c) 2013 "the Phoeron" Colin J.E. Lupton <//thephoeron.com> ;;;; See LICENSE for additional information. (in-package :cl-user) (defpackage #:rsn-mtg (:nicknames #:mtg) (:use :cl :hunchentoot ...
Define ASDF system in package ASDF-USER.
(cl:in-package #:common-lisp-user) (asdf:defsystem :cleavir-reaching-definitions-test :depends-on (:cleavir-utilities :cleavir-test-utilities :cleavir-reaching-definitions) :components ((:file "test-packages") (:file "test-reaching-definitions" :depends-on ("test-packages"))))
(cl:in-package #:asdf-user) (defsystem :cleavir-reaching-definitions-test :depends-on (:cleavir-utilities :cleavir-test-utilities :cleavir-reaching-definitions) :components ((:file "test-packages") (:file "test-reaching-definitions" :depends-on ("test-packages"))))
Define root class for optimize ASTs.
(cl:in-package #:cleavir-ast)
(cl:in-package #:cleavir-ast) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Class OPTIMIZE-AST. (defclass optimize-ast (ast) ((%child-ast :initarg :child-ast :reader child-ast))) (defun make-optimize-ast (child-ast &key origin) (make-instance 'optimize-ast :origin origin :child-ast child-ast...
Add new component to system definition.
(cl:in-package #:asdf-user) ;;;; A CONCRETE SYNTAX TREE (or CST for short) is a representation of ;;;; a Common Lisp expression such that the source location of each ;;;; object in the expression can be associated with that object. ;;;; ;;;; This system contains functions for manipulating such ;;;; representations in ...
(cl:in-package #:asdf-user) ;;;; A CONCRETE SYNTAX TREE (or CST for short) is a representation of ;;;; a Common Lisp expression such that the source location of each ;;;; object in the expression can be associated with that object. ;;;; ;;;; This system contains functions for manipulating such ;;;; representations in ...
Use explicit package marker with IN-PACKAGE.
(in-package #:sicl-global-environment) (proclaim '(ftype (function (datum &rest arguments) nil) error)) (proclaim '(ftype (function (number &rest more-numbers) t) >)) (proclaim '(ftype (function (number &rest more-numbers) t) <)) (proclaim '(ftype (function (number &rest more-numbers) t) >=)) (...
(cl:in-package #:sicl-global-environment) (proclaim '(ftype (function (datum &rest arguments) nil) error)) (proclaim '(ftype (function (number &rest more-numbers) t) >)) (proclaim '(ftype (function (number &rest more-numbers) t) <)) (proclaim '(ftype (function (number &rest more-numbers) t) >=))...
Use documentation strings instead of comments
;;;; p34.lisp ;;;; Calculate Euler's totient function phi(m) (in-package :99-questions) ;;; Evaluates to the amount of relatively price numbers less than or equql to ;;; the given integer (defun totient-phi (number) (loop for candidate from 1 to number count (coprimep number candidate)))
;;;; p34.lisp ;;;; Calculate Euler's totient function phi(m) (in-package :99-questions) (defun totient-phi (number) "Evaluates to the amount of relatively prime numbers less than or equal to the given integer" (loop for candidate from 1 to number count (coprimep number candidate)))
Use explicit package marker with IN-PACKAGE.
(in-package #:sicl-clos) (defmethod class-prototype :before ((class class)) (unless (class-finalized-p class) (error "the class is not finalized")))
(cl:in-package #:sicl-clos) (defmethod class-prototype :before ((class class)) (unless (class-finalized-p class) (error "the class is not finalized")))
Change system name to correspond to file name.
(cl:in-package #:asdf-user) (defsystem :sicl-sequences :depends-on (:lisp-unit) :serial t :components ((:file "packages") (:file "conditions") (:file "sequences") (:file "condition-reporters-en") (:file "docstrings-en")))
(cl:in-package #:asdf-user) (defsystem :sicl-sequence :depends-on (:lisp-unit) :serial t :components ((:file "packages") (:file "conditions") (:file "sequences") (:file "condition-reporters-en") (:file "docstrings-en")))
Define system in package ASDF-USER.
;; -*- Mode: Lisp; -*- (in-package :common-lisp-user) (asdf:defsystem :conditional-commands :depends-on (:mcclim) :components ((:file "package") (:file "command-and-command-table-utilities" :depends-on ("package")) (:file "creating-assoc" :depends-on ("package")) (:fil...
;; -*- Mode: Lisp; -*- (in-package #:asdf-user) (defsystem :conditional-commands :depends-on (:mcclim) :components ((:file "package") (:file "command-and-command-table-utilities" :depends-on ("package")) (:file "creating-assoc" :depends-on ("package")) (:file "entity-e...
Fix SWAP-BYTES-64 on SBCL x86_64
;;; -*- Mode: Lisp -*- ;;; This software is in the public domain and is ;;; provided with absolutely no warranty. (in-package :swap-bytes) #+(or x86 x86-64) (defun swap-bytes-16 (integer) (declare (type (unsigned-byte 16) integer)) (swap-bytes-16 integer)) #+(or x86 x86-64) (defun swap-bytes-32 (integer) (dec...
;;; -*- Mode: Lisp -*- ;;; This software is in the public domain and is ;;; provided with absolutely no warranty. (in-package :swap-bytes) #+(or x86 x86-64) (defun swap-bytes-16 (integer) (declare (type (unsigned-byte 16) integer)) (swap-bytes-16 integer)) #+(or x86 x86-64) (defun swap-bytes-32 (integer) (dec...
Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment
;;;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * Portable lexical environment access ;;;; ** OpenMCL #+openmcl (defun environment-p (environment) (subtypep (class-of environment) 'ccl::lexical-environment)) #+openmcl (defun lexical-variables (environment) (loop for env = environment then (ccl::lexenv...
;;;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * Portable lexical environment access ;;;; ** OpenMCL #+openmcl (defun environment-p (environment) (subtypep (class-of environment) 'ccl::lexical-environment)) #+openmcl (defun lexical-variables (environment) (loop for env = environment then (c...
Use :SERIAL T for a simpler system.
(cl:in-package :common-lisp-user) (asdf:defsystem :sicl-clos :depends-on (:sicl-additional-types :sicl-additional-conditions :cleavir-code-utilities) :components ((:file "packages" :depends-on ())))
(cl:in-package :common-lisp-user) (asdf:defsystem :sicl-clos :depends-on (:sicl-additional-types :sicl-additional-conditions :cleavir-code-utilities) :serial t :components ((:file "packages")))
Update component locations according to new file orgainzation.
(cl:in-package #:asdf-user) (defsystem :sicl-sequence-tiny :depends-on (:lisp-unit) :serial t :components ((:file "packages") (:file "conditions") (:file "Tiny/sequences-tiny") (:file "condition-reporters-en") (:file "docstrings-en")))
(cl:in-package #:asdf-user) (defsystem :sicl-sequence-tiny-support :serial t :components ((:file "Common/packages") (:file "Common/conditions") (:file "Common/condition-reporters-en") (:file "Common/docstrings-en") (:file "Common/utilities") (:file "Tiny/utilities") (:file "Tiny/find") (:fil...
Add English condition reporter for RIGHT-SUBTREE-MUST-BE-NON-NIL.
(cl:in-package #:clump-binary-tree) (defmethod acclimation:report-condition ((condition invalid-binary-tree) stream (language acclimation:english)) (format stream "A binary tree was expected,~@ but instead the following was found:~@ ~s" (tree condition)))
(cl:in-package #:clump-binary-tree) (defmethod acclimation:report-condition ((condition invalid-binary-tree) stream (language acclimation:english)) (format stream "A binary tree was expected,~@ but instead the following was found:~@ ~s" (tree condition))) (defmethod acclima...
Support for gps points (ie, gpsd).
;;;; package.lisp (defpackage #:aviation-formulary (:nicknames :af) (:use #:cl) (:export :2d-point :3d-point :spot-point :pp :point-lat :point-lon :message-type :battery-state :unix-time :point-user :point-generated :point-gps :point-spot :creation-source :...
;;;; package.lisp (defpackage #:aviation-formulary (:nicknames :af) (:use #:cl) (:export :2d-point :3d-point :spot-point :gps-point :pp :point-lat :point-lon :message-type :battery-state :unix-time :point-user :point-generated :point-gps :point-spot :creati...
Fix a bug by always throwing a string error
(in-package #:event-loop) (defclass future () ((finished :initarg :finished :accessor finishedp :initform NIL) (result :initarg :result :accessor result :initform NIL) (err :initarg :error :accessor err :initform NIL) (event-loop :initarg :event-loop :accessor event-loop :initform (error "Must specify even...
(in-package #:event-loop) (defclass future () ((finished :initarg :finished :accessor finishedp :initform NIL) (result :initarg :result :accessor result :initform NIL) (err :initarg :error :accessor err :initform NIL) (event-loop :initarg :event-loop :accessor event-loop :initform (error "Must specify even...
Exclude forms reliant on external definitions
(defpackage :autowrap.test (:use #:cl #:autowrap)) (in-package :autowrap.test) (eval-when (:compile-toplevel :load-toplevel :execute) (cffi-sys:%load-foreign-library :libtest (merge-pathnames "libtest.so" (asdf-path 'cl-autowrap-test)))) (c-include '(cl-autowrap-test "test.h") :spec-path '(cl-autow...
(defpackage :autowrap.test (:use #:cl #:autowrap)) (in-package :autowrap.test) (eval-when (:compile-toplevel :load-toplevel :execute) (cffi-sys:%load-foreign-library :libtest (merge-pathnames "libtest.so" (asdf-path 'cl-autowrap-test)))) (c-include '(cl-autowrap-test "test.h") :spec-path '(cl-autow...
Update with latest documentation research.
;;;; $Id$ ;;;; $Source$ ;;;; See LICENSE for licensing information. (in-package :usocket) (defun handle-condition (condition &optional (socket nil)) "Dispatch correct usocket condition." (typecase condition (condition (error 'usocket-error :real-condition condition ...
;;;; $Id$ ;;;; $Source$ ;;;; See LICENSE for licensing information. (in-package :usocket) (defun handle-condition (condition &optional (socket nil)) "Dispatch correct usocket condition." (typecase condition (condition (error 'usocket-error :real-condition condition ...
Set *package* when trying to find definition.
(in-package :med) (defvar *mark-stack* ()) (defun function-source-file (function-symbol) (read-from-string (sixth (sys.int::function-pool-object (symbol-function function-symbol) 1)))) (defun function-top-level-form-number (function-symbol) (seventh (sys.int::function-pool-object (symbol-function functio...
(in-package :med) (defvar *mark-stack* ()) (defun function-source-file (function-symbol) (read-from-string (sixth (sys.int::function-pool-object (symbol-function function-symbol) 1)))) (defun function-top-level-form-number (function-symbol) (seventh (sys.int::function-pool-object (symbol-function functio...
Call (print result) on root-test so we get the result of the test run.
;;; Copyright 2012-2020 Google LLC ;;; ;;; Use of this source code is governed by an MIT-style ;;; license that can be found in the LICENSE file or at ;;; https://opensource.org/licenses/MIT. (in-package #:cl-protobufs.test) ;;; A suite to contain all other test suites so there's an easy entry point to ;;; run all te...
;;; Copyright 2012-2020 Google LLC ;;; ;;; Use of this source code is governed by an MIT-style ;;; license that can be found in the LICENSE file or at ;;; https://opensource.org/licenses/MIT. (in-package #:cl-protobufs.test) ;;; A suite to contain all other test suites so there's an easy entry point to ;;; run all te...
Define class FUNCTION using DEFCLASS rather than obsolete macro DEFINE-BUILT-IN-CLASS.
(cl:in-package #:sicl-clos) (define-built-in-class function (t) ((%entry-point :initarg :entry-point) (%linkage-rack :initarg :linkage-rack) (%environment :initform nil :initarg :environment)))
(cl:in-package #:sicl-clos) (defclass function (t) ((%entry-point :initarg :entry-point) (%linkage-rack :initarg :linkage-rack) (%environment :initform nil :initarg :environment)) (:metaclass built-in-class))
Load a file containing the definition of EFFECTIVE-SLOT-DEFINITION.
(cl:in-package #:sicl-boot) (defun create-bridge-classes (boot) (let ((c (c1 boot)) (r (r2 boot))) (ld "../CLOS/t-defclass.lisp" c r) (ld "../CLOS/standard-object-defclass.lisp" c r) (ld "../CLOS/metaobject-defclass.lisp" c r) (ld "../CLOS/method-combination-defclass.lisp" c r) (ld "../CLOS/slot...
(cl:in-package #:sicl-boot) (defun create-bridge-classes (boot) (let ((c (c1 boot)) (r (r2 boot))) (ld "../CLOS/t-defclass.lisp" c r) (ld "../CLOS/standard-object-defclass.lisp" c r) (ld "../CLOS/metaobject-defclass.lisp" c r) (ld "../CLOS/method-combination-defclass.lisp" c r) (ld "../CLOS/slot...
Call TEMPORARY-ENSURE-METHOD rather than ENSURE-METHOD.
(cl:in-package #:sicl-clos) ;;;; This definition of the macro DEFMETHOD is less general than the ;;;; normal definition. It is only guaranteed to work when the ;;;; generic function is of type STANDARD-GENERIC-FUNCTION, and the ;;;; method to be created can be of type STANDARD-METHOD. ;;;; ;;;; The advantage of this ...
(cl:in-package #:sicl-clos) ;;;; This definition of the macro DEFMETHOD is less general than the ;;;; normal definition. It is only guaranteed to work when the ;;;; generic function is of type STANDARD-GENERIC-FUNCTION, and the ;;;; method to be created can be of type STANDARD-METHOD. ;;;; ;;;; The advantage of this ...
Use explicit package prefix for IN-PACKAGE.
(in-package #:asdf-user) (defsystem :sicl-iteration :depends-on (:cleavir-code-utilities :cleavir-internationalization :sicl-iteration-support) :serial t :components ((:file "dotimes-defmacro") (:file "dolist-defmacro") (:file "do-dostar-defmacro")))
(cl:in-package #:asdf-user) (defsystem :sicl-iteration :depends-on (:cleavir-code-utilities :cleavir-internationalization :sicl-iteration-support) :serial t :components ((:file "dotimes-defmacro") (:file "dolist-defmacro") (:file "do-dostar-defmacro")))
Return list starting with found element.
;;;;; TRE environment ;;;;; Copyright (C) 2005-2006,2008 Sven Klose <pixel@copei.de> (defun %member-r (elm lst) (dolist (i lst) (when (equal elm i) (return i)))) (defun member (elm &rest lsts) (dolist (i lsts) (awhen (%member-r elm i) (return !))))
;;;;; TRE environment ;;;;; Copyright (C) 2005-2006,2008,2011 Sven Klose <pixel@copei.de> (defun %member-r (elm lst) (while lst nil (when (equal elm lst.) (return lst)) (setf lst .lst))) (defun member (elm &rest lsts) (dolist (i lsts) (awhen (%member-r elm i) (return !))))
Load type inference definitions in the right order.
(defsystem "petalisp.type-inference" :author "Marco Heisig <marco.heisig@fau.de>" :license "AGPLv3" :depends-on ("alexandria" "trivia" "trivial-arguments") :in-order-to ((test-op (test-op "petalisp.test-suite"))) :serial t :components ((:file "packages") (:file "auxiliary-types") (:file "...
(defsystem "petalisp.type-inference" :author "Marco Heisig <marco.heisig@fau.de>" :license "AGPLv3" :depends-on ("alexandria" "trivia" "trivial-arguments") :in-order-to ((test-op (test-op "petalisp.test-suite"))) :serial t :components ((:file "packages") (:file "auxiliary-types") (:file "...
Define system in package ASDF-USER.
;;; -*- Mode: Lisp -*- ;;; (c) copyright 2009 by ;;; Cyrus Harmon (ch-lisp@bobobeach.com) ;;; ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Library General Public ;;; License as published by the Free Software Foundation; either ;;; version 2 of t...
;;; -*- Mode: Lisp -*- ;;; (c) copyright 2009 by ;;; Cyrus Harmon (ch-lisp@bobobeach.com) ;;; ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Library General Public ;;; License as published by the Free Software Foundation; either ;;; version 2 of t...
Add chdir to enable git
(ql:quickload "quicklisp-slime-helper") (let ((swank::*loopback-interface* (sb-unix:unix-gethostname))) (swank:create-server :dont-close t)) (load "/piserv/piserv.asd") (ql:quickload "piserv") (piserv:start-server 8080) (loop (sleep 5))
(ql:quickload "quicklisp-slime-helper") (let ((swank::*loopback-interface* (sb-unix:unix-gethostname))) (swank:create-server :dont-close t)) (sb-posix:chdir #P"/piserv/") (load "/piserv/piserv.asd") (ql:quickload "piserv") (piserv:start-server 8080) (loop (sleep 5))
Return associative arrays instead of objects.
(fn json-encode (x) (json_encode x)) (fn json-decode (x) (json_decode x))
(fn json-encode (x) (json_encode x)) (fn json-decode (x) (json_decode x t))
Enable static-vectors support on sbcl/windows.
(defpackage :glkit.asdf (:use #:cl #:asdf)) (in-package :glkit.asdf) #+(or (and sbcl (not (or win32 windows))) ccl cmucl ecl lispworks allegro) (eval-when (:compile-toplevel :load-toplevel :execute) (pushnew :glkit-sv *features*)) (defsystem :glkit :description "Various utilities for OpenGL" :author ("rpav")...
(defpackage :glkit.asdf (:use #:cl #:asdf)) (in-package :glkit.asdf) #+(or allegro ccl cmu ecl lispworks sbcl) (eval-when (:compile-toplevel :load-toplevel :execute) (pushnew :glkit-sv *features*)) (defsystem :glkit :description "Various utilities for OpenGL" :author ("rpav") :license "MIT" :version "0.0...
Remove printf() control code from alert text.
(div :class "imageform" (input :type "hidden" :name "id[]" :value ,(param 'id)) (a :href ,(param 'link-image-large) (img :src ,(param 'image-src))) (textarea :rows "2" :name "title[]" ,(param 'title)) (select :name "country[]" ,(flag-options (param 'country))) (input :type "text" :name "price[]" :size "8"...
(div :class "imageform" (input :type "hidden" :name "id[]" :value ,(param 'id)) (a :href ,(param 'link-image-large) (img :src ,(param 'image-src))) (textarea :rows "2" :name "title[]" ,(param 'title)) (select :name "country[]" ,(flag-options (param 'country))) (input :type "text" :name "price[]" :size "8"...
Define constructor for new AST class.
(cl:in-package #:cleavir-ast) (defclass scope-ast (ast) ((%child-ast :initarg :child-ast :reader child-ast) (%variable-ast :initarg :variable-ast :reader variable-ast))) (cleavir-io:define-save-info scope-ast (:child-ast child-ast) (:variable-ast variagble-ast))
(cl:in-package #:cleavir-ast) (defclass scope-ast (ast) ((%child-ast :initarg :child-ast :reader child-ast) (%variable-ast :initarg :variable-ast :reader variable-ast))) (cleavir-io:define-save-info scope-ast (:child-ast child-ast) (:variable-ast variable-ast)) (defun make-scope-ast (variable-ast child-ast ...
Load files relative to new boot system.
(cl:in-package #:sicl-boot) (defun ld (filename environment1 environment2) (format *trace-output* "Loading file ~a~%" filename) (finish-output *trace-output*) (sicl-extrinsic-environment:load-source-with-environments (asdf:system-relative-pathname :sicl-boot-phase1 filename) environment1 environment2))
(cl:in-package #:sicl-boot) (defun ld (filename environment1 environment2) (format *trace-output* "Loading file ~a~%" filename) (finish-output *trace-output*) (sicl-extrinsic-environment:load-source-with-environments (asdf:system-relative-pathname :sicl-boot filename) environment1 environment2))
Remove system :CLUMP-SPLAY-TREE from :DEPENDS-ON list.
(cl:in-package #:asdf-user) (defsystem clump :depends-on (:clump-binary-tree :clump-splay-tree))
(cl:in-package #:asdf-user) (defsystem clump :depends-on (:clump-binary-tree))
Add a test for positive numbers in prime-list
;;;; p31.lisp ;;;; Determine whether a given integer number is prime (in-package :99-questions) (defun primep (n) (= n (first (last (prime-list n))))) ;;; Sieve of Eratosthenes (defun prime-list (max) (let ((numbers (make-array (1+ max) :initial-element t))) (loop for contender from 2 to max when (are...
;;;; p31.lisp ;;;; Determine whether a given integer number is prime (in-package :99-questions) (defun primep (n) (= n (first (last (prime-list n))))) (defun prime-list (max) "Evaluates to a list of all prime numbers smaller or equal to max using the Sieve of Eratosthenes algorithm." (when (plusp max) (...
Print failed and wanted result of test.
;;;; nix operating system project ;;;; list processor environment ;;;; Copyright (C) 2006 Sven Klose <pixel@copei.de> (defvar *tests* nil) (%defun punchcard-equal (x y) (cond ((atom x) (eql x y)) ((atom y) (eql x y)) ((punchcard-equal (car x) (car y)) (punchcard-equal (cdr x) (cdr y))))) (%d...
;;;; nix operating system project ;;;; list processor environment ;;;; Copyright (C) 2006 Sven Klose <pixel@copei.de> (defvar *tests* nil) (%defun punchcard-equal (x y) (cond ((atom x) (eql x y)) ((atom y) (eql x y)) ((punchcard-equal (car x) (car y)) (punchcard-equal (cdr x) (cdr y))))) (%d...
Add the new math file to the system.
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (asdf:defsystem glaw :license "MIT" :version "git" :description "Game programming utilities" :depends-on (:cl-opengl :cl-openal :cl-alc) :components ((:module "src" :serial t :components ((:file "package") (:fil...
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- (asdf:defsystem glaw :license "MIT" :version "git" :description "Game programming utilities" :depends-on (:cl-opengl :cl-openal :cl-alc) :components ((:module "src" :serial t :components ((:file "package") (:fil...
Use compression when building executable with SBCL.
(ros:include "util") (defpackage :roswell.dump.sbcl (:use :cl :roswell.util)) (in-package :roswell.dump.sbcl) (defun dump-executable (cmds out script) (declare (ignore script)) (sb-ext:save-lisp-and-die out ;; no need to do GC because of :purify t by default ;; however, this only affects old cheyneyGC ...
(ros:include "util") (defpackage :roswell.dump.sbcl (:use :cl :roswell.util)) (in-package :roswell.dump.sbcl) (defun dump-executable (cmds out script) (declare (ignore script)) (sb-ext:save-lisp-and-die out ;; no need to do GC because of :purify t by default ;; however, this only affects old cheyneyGC ...
Define function in run-time environment rather than in compilation environment.
(cl:in-package #:sicl-global-environment) (defmacro defun (&environment env name lambda-list &body body) (multiple-value-bind (declarations documentation forms) (cleavir-code-utilities:separate-function-body body) (let ((global-env (cleavir-env:global-environment env)) (arg-type (cleavir-code-utili...
(cl:in-package #:sicl-global-environment) (defmacro defun (&environment env name lambda-list &body body) (multiple-value-bind (declarations documentation forms) (cleavir-code-utilities:separate-function-body body) (let ((global-env (cleavir-env:global-environment env)) (arg-type (cleavir-code-utili...
Add a test about str
(defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) (plan 3) (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") (diag "satisfy") (flet ((pred (char) (eq char #\a))) (is (parse (satisfy #'pred) "a...
(defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) (plan 4) (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") (is-error (parse (str "foo") "barfoo") 'parse-error "fails parsing invalid ...
Patch to teach ACL inline functions, though commented out.
;;; -*- Mode: Lisp; Package: User -*- (in-package :common-lisp-user) ;;; Needed to keep ACL from issuing warnings about toplevel (shadow ...) forms (setq comp:*cltl1-compile-file-toplevel-compatibility-p* nil) (defpackage :clim-mop (:use :clos) (:import-from :common-lisp #:class-name) (:export #:class-name))...
;;; -*- Mode: Lisp; Package: User -*- (in-package :common-lisp-user) ;;; Needed to keep ACL from issuing warnings about toplevel (shadow ...) forms (setq comp:*cltl1-compile-file-toplevel-compatibility-p* nil) (defpackage :clim-mop (:use :clos) (:import-from :common-lisp #:class-name) (:export #:class-name))...
Change version from RC2 to RC3.
;;; Copyright 2008 Gabor Balazs ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed...
;;; Copyright 2008 Gabor Balazs ;;; Licensed under the Apache License, Version 2.0 (the "License"); ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; http://www.apache.org/licenses/LICENSE-2.0 ;;; ;;; Unless required by applicable law or agreed...
Update with latest documentation research.
;;;; $Id$ ;;;; $Source$ ;;;; See LICENSE for licensing information. (in-package :usocket) (defun handle-condition (condition &optional (socket nil)) "Dispatch correct usocket condition." (typecase condition (condition (error 'usocket-error :real-condition condition ...
;;;; $Id$ ;;;; $Source$ ;;;; See LICENSE for licensing information. (in-package :usocket) (defun handle-condition (condition &optional (socket nil)) "Dispatch correct usocket condition." (typecase condition (condition (error 'usocket-error :real-condition condition ...
Create a one-char buffer for UNREAD-CHAR.
(cl:in-package #:sicl-source-tracking-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%co...
(cl:in-package #:sicl-source-tracking-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%co...
Load file containing definition of class STANDARD-OBJECT.
(cl:in-package #:sicl-boot-phase1) (defun ld (filename environment) (format *trace-output* "Loading file ~a~%" filename) (finish-output *trace-output*) (sicl-extrinsic-environment:load-source-with-environments filename (compilation-environment environment) environment)) (defun fill-environment (environment) ...
(cl:in-package #:sicl-boot-phase1) (defun ld (filename environment) (format *trace-output* "Loading file ~a~%" filename) (finish-output *trace-output*) (sicl-extrinsic-environment:load-source-with-environments filename (compilation-environment environment) environment)) (defun fill-environment (environment) ...
Remove initial low-level operations in favor of Cleavir PRIMOPs.
(cl:in-package #:common-lisp-user) (defpackage #:sicl-cons (:use #:common-lisp) (:export ;; The symbols LOAD-CAR, LOAD-CDR, STORE-CAR, and STORE-CDR name ;; special operators. The operators LOAD-CAR and LOAD-CDR are ;; similar to the functions CAR and CDR, except that they require ;; that the argument...
(cl:in-package #:common-lisp-user) (defpackage #:sicl-cons (:use #:common-lisp) (:export ))
Define method on STREAM-READ-CHAR specialized to SOURCE-TRACKING-STREAM.
(cl:in-package #:sicl-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%contents :initform...
(cl:in-package #:sicl-reader) (defun make-contents () (make-array 10 :fill-pointer 0 :element-type 'character :adjustable t)) (defclass source-tracking-stream (trivial-gray-streams:fundamental-character-input-stream) ((%original :initarg :original :reader original) (%contents :initform...
Add dependencies. Also, fixed the rest of the mess
(defpackage #:info.isoraqathedh.umpns.asdf (:use #:cl #:asdf)) (in-package #:info.isoraqathedh.umpns.asdf) (defsystem my-project :name "UMPNS-based Minor Planet Namer" :version "0.1" :license "MIT" :components ((:file "unified-minor-planet-naming-system") (:module "sub-directory" ...
(defpackage #:info.isoraqathedh.umpns.asdf (:use #:cl #:asdf)) (in-package #:info.isoraqathedh.umpns.asdf) (defsystem umpns :name "UMPNS-based Minor Planet Namer" :version "0.1" :license "MIT" :components ((:file "unified-minor-planet-naming-system")) :depends-on (:cl-ppcre :cl-sqlite))
Remove invalid :email keyword and add :descrption @ asdf definition
;; Common Lisp Script ;; Manoel Vilela (asdf/defsystem:defsystem :lisp-chat :author "Manoel Vilela" :email "manoel_vilela@engineer.com" :version "0.1" :license "MIT" :depends-on ("usocket") :components ((:file "config") (:file "client" :depends-on ("config")) (:file "server" ...
;; Common Lisp Script ;; Manoel Vilela (asdf/defsystem:defsystem :lisp-chat :author "Manoel Vilela" :description "An experimental chat irc-like" :version "0.1" :license "MIT" :depends-on ("usocket") :components ((:file "config") (:file "client" :depends-on ("config")) (:file ...
Add an OPTIMIZE-TEST similar to that in famiclom to cl-6502.
(in-package :6502-tests) (eval-when (:compile-toplevel :load-toplevel :execute) (require 'sb-sprof)) (def-suite performance :in 6502-tests) (in-suite performance) (defun profile-klaus-suite (&key (mode :time)) "MODE may be :TIME, :CPU, or :ALLOC. Load Klaus' test suite and use SBCL's statistical profiler to obse...
(in-package :6502-tests) (eval-when (:compile-toplevel :load-toplevel :execute) (require 'sb-sprof)) (def-suite performance :in 6502-tests) (in-suite performance) (defun profile-klaus-suite (&key (mode :time)) "MODE may be :TIME, :CPU, or :ALLOC. Load Klaus' test suite and use SBCL's statistical profiler to obse...
Add existing component utilities to system definition.
(cl:in-package #:asdf-user) (defsystem :sicl-sequence-support :serial t :components ((:file "packages") (:file "find") (:file "position")))
(cl:in-package #:asdf-user) (defsystem :sicl-sequence-support :serial t :components ((:file "packages") (:file "utilities") (:file "find") (:file "position")))
Write own version of member predicate called appears-in
; find the shortest path between two nodes in an unweighted graph ; ie perform a breadth first search ; the graph is a list of nodes ; a node is a list whose first element is the name of the node ; and whose remaining elements are the names of any neighbours ; (set-graph '((a b c) (b a) (c a))) (setq graph nil) (defu...
; find the shortest path between two nodes in an unweighted graph ; ie perform a breadth first search ; the graph is a list of nodes ; a node is a list whose first element is the name of the node ; and whose remaining elements are the names of any neighbours ; (set-graph '((a b c) (b a) (c a))) (setq graph nil) (defu...
Use MAPCAR instead of @.
(fn list-string-0 (x) (apply #'string-concat (@ #'string x))) (fn list-string (x) ; TODO: Cleanup. (apply #'string-concat (@ #'list-string-0 (group x 16384))))
(fn list-string-0 (x) (apply #'string-concat (mapcar #'string x))) (fn list-string (x) (apply #'string-concat (mapcar #'list-string-0 (group x 16384))))
Access a lexical variable in the current process.
(cl:in-package #:sicl-extrinsic-hir-interpreter) (defclass enter-instruction (cleavir-ir:enter-instruction) ((%owned-variables :initarg :owned-variables :reader owned-variables)))
(cl:in-package #:sicl-extrinsic-hir-interpreter) (defclass enter-instruction (cleavir-ir:enter-instruction) ((%owned-variables :initarg :owned-variables :reader owned-variables))) (defun lexical-value (lexical-variable process) (loop for table in (static-env (stack process)) do (multiple-value-bind (value presen...
Introduce the concept of a PAINTABLE point.
;;; (c) copyright 2016 by ;;; Robert Strandh (robert.strandh@gmail.com) ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Library General Public ;;; License as published by the Free Software Foundation; either ;;; version 2 of the License, or (at you...
;;; (c) copyright 2016 by ;;; Robert Strandh (robert.strandh@gmail.com) ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Library General Public ;;; License as published by the Free Software Foundation; either ;;; version 2 of the License, or (at you...
Use HTTPS for the Google jump
(in-package :lispkit) (defparameter *jumps* (make-hash-table :test #'equal)) (defun defjump (place prefix url) (setf (gethash prefix place) url)) (defjump *jumps* "g" "http://google.com/search?q=~a") (defjump *jumps* "gh" "https://github.com/search?&q=~a") (defjump *jumps* "y" "https://www.youtube.com/results?sea...
(in-package :lispkit) (defparameter *jumps* (make-hash-table :test #'equal)) (defun defjump (place prefix url) (setf (gethash prefix place) url)) (defjump *jumps* "g" "https://google.com/search?q=~a") (defjump *jumps* "gh" "https://github.com/search?&q=~a") (defjump *jumps* "y" "https://www.youtube.com/results?se...
Use proper argument order for IS.
(cl:defpackage #:anaphoric-variants_tests (:use #:cl #:parachute) (:import-from #:anaphoric-variants #:anaphoric)) (cl:in-package #:anaphoric-variants_tests) (define-test "featured examples" (is equal (anaphoric tail (when (member 'b '(a b c d)) (cdr tail))) '(c d)) (is equal ...
(cl:defpackage #:anaphoric-variants_tests (:use #:cl #:parachute) (:import-from #:anaphoric-variants #:anaphoric)) (cl:in-package #:anaphoric-variants_tests) (define-test "featured examples" (is equal '(c d) (anaphoric tail (when (member 'b '(a b c d)) (cdr tail)))) (is equal '(0 list ...
Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment
;;;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * Portable lexical environment access ;;;; ** OpenMCL #+openmcl (defun environment-p (environment) (subtypep (class-of environment) 'ccl::lexical-environment)) #+openmcl (defun lexical-variables (environment) (loop for env = environment then (ccl::lexenv...
;;;; -*- lisp -*- (in-package :it.bese.arnesi) ;;;; * Portable lexical environment access ;;;; ** OpenMCL #+openmcl (defun environment-p (environment) (subtypep (class-of environment) 'ccl::lexical-environment)) #+openmcl (defun lexical-variables (environment) (loop for env = environment then (c...
Handle metaclasses so that we can define funcallable classes.
(cl:in-package #:sicl-clos) (defun ensure-class (name &rest arguments &key direct-superclasses &allow-other-keys) (let* ((generated-name (gensym)) (environment (sicl-genv:global-environment)) (new-arguments (copy-list arguments)) (new-superclasses (loop for superclass-name in (remove t...
(cl:in-package #:sicl-clos) (defun ensure-class (name &rest arguments &key direct-superclasses metaclass &allow-other-keys) (let* ((generated-name (gensym)) (environment (sicl-genv:global-environment)) (new-arguments (copy-list arguments)) (new-superclasses (loop for superclass-name in...
Add test code to the asd
(defsystem "mezzano-virgl" :components ((:file "package") (:file "virgl-protocol") (:file "virgl") (:file "tgsi")))
(defsystem "mezzano-virgl" :serial t :components ((:file "package") (:file "virgl-protocol") (:file "virgl") (:file "tgsi") (:file "test")))
Add formerly transitive dependency, cl-ppcre. Thanks Xach!
(defsystem #:coleslaw :name "coleslaw-core" :description "Flexible Lisp Blogware" :version "0.7" :license "BSD" :author "Brit Butler <redline6561@gmail.com>" :pathname "src/" :depends-on (:closure-template :3bmd :3bmd-ext-code-blocks :alexandria ...
(defsystem #:coleslaw :name "coleslaw-core" :description "Flexible Lisp Blogware" :version "0.7" :license "BSD" :author "Brit Butler <redline6561@gmail.com>" :pathname "src/" :depends-on (:closure-template :3bmd :3bmd-ext-code-blocks :alexandria ...
Put in-package in correct place
(format t "loading xml-rpc...~%") #+allegro (require :xml-rpc) #+allegro (progn (in-package :common-lisp-user) (defvar *xml-rpc-server-id*) (defun start-xml-rpc-server (port) (let ((start-args (list :port port))) (progn (setq *xml-rpc-server-id* (net.xml-rpc:make-xml-rpc-server :start...
(in-package :common-lisp-user) (format t "loading xml-rpc...~%") #+allegro (require :xml-rpc) #+allegro (progn (defvar *xml-rpc-server-id*) (defun start-xml-rpc-server (port) (let ((start-args (list :port port))) (progn (setq *xml-rpc-server-id* (net.xml-rpc:make-xml-rpc-server :start s...
Define method on REPLACE specialized to TREE.
(cl:in-package #:clump-2-3-tree) ;;; This generic function can be used only on an empty tree. (defgeneric insert (object tree)) (defmethod insert :before (object (tree tree)) (unless (null (contents tree)) (error "Do this error message better."))) (defmethod insert (object (tree tree)) (setf (contents tree) ...
(cl:in-package #:clump-2-3-tree) ;;; This generic function can be used only on an empty tree. (defgeneric insert (object tree)) (defmethod insert :before (object (tree tree)) (unless (null (contents tree)) (error "Do this error message better."))) (defmethod insert (object (tree tree)) (setf (contents tree) ...
Add the accidentally omitted alpha* function alias.
;;;; © 2016-2020 Marco Heisig - license: GNU AGPLv3 -*- coding: utf-8 -*- (in-package #:petalisp.api) (defalias a α) (defalias a* α*) (defalias alpha α) (defalias α* α*) (defalias b β) (defalias b* β*) (defalias beta β) (defalias beta* β*) (defalias tau τ)
;;;; © 2016-2020 Marco Heisig - license: GNU AGPLv3 -*- coding: utf-8 -*- (in-package #:petalisp.api) (defalias a α) (defalias a* α*) (defalias alpha α) (defalias alpha* α*) (defalias b β) (defalias b* β*) (defalias beta β) (defalias beta* β*) (defalias tau τ)
Add test for a simple connection
(defpackage #:cqlcl-test (:use :cl :cqlcl :lisp-unit)) (in-package #:cqlcl-test) (define-test parse-options-header (labels ((hash-equal (h1 h2) (maphash (lambda (k v) (assert-equal (gethash k h2) (values v t))) h1))) (let* ((packet #(129 0 0 6 0 0 0 52 0 2 0 11 67 81 76 9...
(defpackage #:cqlcl-test (:use :cl :cqlcl :lisp-unit)) (in-package #:cqlcl-test) (define-test parse-options-header (labels ((hash-equal (h1 h2) (maphash (lambda (k v) (assert-equal (gethash k h2) (values v t))) h1))) (let* ((packet #(129 0 0 6 0 0 0 52 0 2 0 11 67 81 76 9...
Deal with location of .text section in section header table correctly
(in-package :vsanalizer) (defun string-at-offset (table offset) "Retrieves a string from the string table TABLE starting from offset OFFSET" (let ((end-pos (position 0 table :start offset))) (map 'string #'code-char (subseq table offset end-pos)))) (defun get-funcs (elf-obj &key dynamicp) "Returns a list...
(in-package :vsanalizer) (defun sym-name (str-table symbol) "Retrieves the name of a SYMBOL from the string table STR-TABLE" (let ((table-data (data str-table)) (beg-pos (name symbol))) (map 'string #'code-char (subseq table-data beg-pos (position 0 table-data :star...
Adjust package export list according to recent modifications of classes.
(cl:in-package #:common-lisp-user) (defpackage #:cleavir-cst (:use #:common-lisp) (:export #:canonicalize-declaration-specifier #:cst-is-declaration-p #:cst-is-literal-string-p #:separate-ordinary-body #:separate-function-body #:optional-or-keyword-parameter #:variables-cst #:init-form-cst ...
(cl:in-package #:common-lisp-user) (defpackage #:cleavir-cst (:use #:common-lisp) (:export #:canonicalize-declaration-specifier #:cst-is-declaration-p #:cst-is-literal-string-p #:separate-ordinary-body #:separate-function-body #:facultative-parameter #:variables-cst #:init-form-cst #:sup...
Add method specialized to FUNCALL-INSTRUCTION.
(cl:in-package #:cleavir-remove-useless-instructions) (defgeneric instruction-may-be-removed-p (instruction)) (defmethod instruction-may-be-removed-p (instruction) (and (= (length (cleavir-ir:successors instruction)) 1) (loop for output in (cleavir-ir:outputs instruction) always (null (cleavir-ir:using...
(cl:in-package #:cleavir-remove-useless-instructions) (defgeneric instruction-may-be-removed-p (instruction)) (defmethod instruction-may-be-removed-p (instruction) (and (= (length (cleavir-ir:successors instruction)) 1) (loop for output in (cleavir-ir:outputs instruction) always (null (cleavir-ir:using...
Add an :AFTER method on (SETF RIGHT) specialized to NODE-WITH-PARENT.
(cl:in-package #:clump-binary-tree) (defgeneric left (node)) (defgeneric right (node)) (defgeneric (setf left) (new-left node)) (defgeneric (setf right) (new-right node)) (defclass node () ((%left :initarg :left :initform nil :accessor left) (%right :initarg :right :initform nil :accessor right))) (defgeneric n...
(cl:in-package #:clump-binary-tree) (defgeneric left (node)) (defgeneric right (node)) (defgeneric (setf left) (new-left node)) (defgeneric (setf right) (new-right node)) (defclass node () ((%left :initarg :left :initform nil :accessor left) (%right :initarg :right :initform nil :accessor right))) (defgeneric n...
Define method on DELETE-CHILD specialized to 2-NODE.
(cl:in-package #:clump-2-3-tree) (defgeneric delete (leaf)) (defgeneric delete-child (parent child)) (defgeneric replace-and-shrink (parent child)) (defmethod delete ((leaf leaf)) (delete-child (parent leaf) leaf)) (defmethod delete-child ((tree tree) child) (declare (ignore child)) (setf (contents tree) nil...
(cl:in-package #:clump-2-3-tree) (defgeneric delete (leaf)) (defgeneric delete-child (parent child)) (defgeneric replace-and-shrink (parent child)) (defmethod delete ((leaf leaf)) (delete-child (parent leaf) leaf)) (defmethod delete-child ((tree tree) child) (declare (ignore child)) (setf (contents tree) nil...
Use MAPCAR instead of @.
(fn props-alist (x) (@ [. _ (slot-value x _)] (property-names x))) (fn alist-props (x) (& x (aprog1 (new) (@ (i x) (= (slot-value ! i.) .i))))) (fn merge-props (a b) (aprog1 (new) (@ (i (property-names a)) (= (slot-value ! i) (slot-value a i))) (@ (i (property-names b)) ...
(fn props-alist (x) (mapcar [. _ (slot-value x _)] (property-names x))) (fn alist-props (x) (& x (aprog1 (new) (@ (i x) (= (slot-value ! i.) .i))))) (fn merge-props (a b) (aprog1 (new) (@ (i (property-names a)) (= (slot-value ! i) (slot-value a i))) (@ (i (property-names b)) ...