Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
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")))
|
Select appropriate elements of the DEFGENERIC form. | (cl:in-package #:sicl-boot)
(defun define-defgeneric-c1 (boot)
(setf (sicl-genv:macro-function 'defgeneric (c1 boot))
(lambda (form environment)
(declare (ignore environment))
`(progn (sicl-genv:fmakunbound ',(car form) ,(r1 boot))
(ensure-generic-function
',(car form)
:name ',(car form)
:l... | (cl:in-package #:sicl-boot)
(defun define-defgeneric-c1 (boot)
(setf (sicl-genv:macro-function 'defgeneric (c1 boot))
(lambda (form environment)
(declare (ignore environment))
`(progn (sicl-genv:fmakunbound ',(second form) ,(r1 boot))
(ensure-generic-function
',(second form)
:name ',(second form... |
Load a file containing the SETF macro. | (cl:in-package #:sicl-extrinsic-hir-compiler)
(defun rp (filename)
(asdf:system-relative-pathname :sicl-extrinsic-hir-compiler filename))
(load (rp "../../Environment/lambda.lisp"))
(load (rp "../../Environment/multiple-value-bind.lisp"))
| (cl:in-package #:sicl-extrinsic-hir-compiler)
(defun rp (filename)
(asdf:system-relative-pathname :sicl-extrinsic-hir-compiler filename))
(load (rp "../../Environment/lambda.lisp"))
(load (rp "../../Environment/multiple-value-bind.lisp"))
(load (rp "../../Environment/setf.lisp"))
|
Fix broken build due to undeclared dependency on cartesian-product-switch. | (asdf:defsystem #:place-modifiers
:author "Jean-Philippe Paradis <hexstream@gmail.com>"
;; See the UNLICENSE file for details.
:license "Public Domain"
:description "Essentially gives access to hundreds of modify macros with one single symbol: MODIFY."
:depends-on (#:map-bind)
:version "2.0"
:serial ... | (asdf:defsystem #:place-modifiers
:author "Jean-Philippe Paradis <hexstream@gmail.com>"
;; See the UNLICENSE file for details.
:license "Public Domain"
:description "Essentially gives access to hundreds of modify macros with one single symbol: MODIFY."
:depends-on (#:map-bind
#:cartesian-pr... |
Change syntax to include slot specs. | (in-package #:sicl-clos)
(define-built-in-class sequence (t))
(define-built-in-class list (sequence))
(defclass symbol ()
((%name :initarg :name :reader symbol-name)
(%package :initarg :package :reader symbol-package)
(%plist :initform '() :accessor symbol-plist)))
(define-built-in-class null (symbol list))... | (in-package #:sicl-clos)
(define-built-in-class sequence (t)
())
(define-built-in-class list (sequence)
())
(define-built-in-class symbol ()
((%name :initarg :name :reader symbol-name)
(%package :initarg :package :reader symbol-package)))
(define-built-in-class null (symbol list)
())
|
Use explicit package prefix for IN-PACKAGE. | (in-package #:sicl-package)
(defclass package (t)
((%name
:initarg :name
:accessor name)
(%nicknames
:initarg :nicknames
:initform '()
:accessor nicknames)
(%use-list
:initarg :use-list
:initform '()
:accessor use-list)
(%used-by-list
:initarg :used-by-list
:initform ... | (cl:in-package #:sicl-package)
(defclass package (t)
((%name
:initarg :name
:accessor name)
(%nicknames
:initarg :nicknames
:initform '()
:accessor nicknames)
(%use-list
:initarg :use-list
:initform '()
:accessor use-list)
(%used-by-list
:initarg :used-by-list
:initfo... |
Remove :AFTER methods. What they did is now in the :AROUND method. | (cl:in-package #:sicl-clos)
(defmethod initialize-instance :after
((class regular-class) &rest initargs &key &allow-other-keys)
(apply #'initialize-instance-after-regular-class-default
class initargs))
(defmethod shared-initialize :around
((class real-class)
slot-names
&rest initargs
&key
... | (cl:in-package #:sicl-clos)
(defmethod shared-initialize :around
((class real-class)
slot-names
&rest initargs
&key
&allow-other-keys)
(apply #'shared-initialize-around-real-class-default
#'call-next-method
class
slot-names
initargs))
|
Define system in package ASDF-USER. | ;;; -*- Mode: Lisp -*-
;;; (c) copyright 2008 by
;;; Troels Henriksen (athas@sigkill.dk)
;;;
;;; 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 th... | ;;; -*- Mode: Lisp -*-
;;; (c) copyright 2008 by
;;; Troels Henriksen (athas@sigkill.dk)
;;;
;;; 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 th... |
Use explicit package prefix for IN-PACKAGE, and define system in package ASDF-USER. | (in-package #:cl-user)
(asdf:defsystem :sicl-sequences-small
:depends-on ("sicl-additional-types"
"sicl-additional-conditions"
"cleavir-code-utilities")
:components
((:file "packages" :depends-on ())
(:file "sequences" :depends-on ("packages"))))
| (cl:in-package #:asdf-user)
(defsystem :sicl-sequences-small
:depends-on ("sicl-additional-types"
"sicl-additional-conditions"
"cleavir-code-utilities")
:components
((:file "packages" :depends-on ())
(:file "sequences" :depends-on ("packages"))))
|
Define system with option :SERIAL T. | (cl:in-package #:asdf-user)
(defsystem :sicl-sequences-small
:depends-on (:sicl-additional-types
:sicl-additional-conditions
:cleavir-code-utilities)
:components
((:file "packages" :depends-on ())
(:file "sequences" :depends-on ("packages"))))
| (cl:in-package #:asdf-user)
(defsystem :sicl-sequences-small
:depends-on (:sicl-additional-types
:sicl-additional-conditions
:cleavir-code-utilities)
:serial t
:components
((:file "packages")
(:file "sequences")))
|
Complete rewrite using a state machine. | (cl:in-package #:clump-binary-tree)
(defgeneric iterative-traversal (tree enter leave))
(defmethod iterative-traversal ((tree node-with-parent) enter leave)
(let ((current-node tree))
(loop do (if (or (not (funcall enter current-node))
(and (null (left current-node))
(null (right current-node))))
... | (cl:in-package #:clump-binary-tree)
(defgeneric iterative-traversal (tree pre in post))
(defmethod iterative-traversal ((tree node-with-parent) pre in post)
(let ((current-node tree))
(tagbody
pre
(if (funcall pre current-node)
(let ((left (left current-node)))
(if (null left)
(go in)
... |
Apply package to setter function names. | ;;;; TRE environment
;;;; Copyright (c) 2005-2008,2010 Sven Klose <pixel@copei.de>
; Check and return keyword argument or NIL.
(%defun %defun-arg-keyword (args)
(let a (car args)
(let d (and (cdr args)
(cadr args))
(if (%arg-keyword? a)
(if d
(if (%arg-keyword? d)
... | ;;;; tré - Copyright (c) 2005-2008,2010-2011 Sven Klose <pixel@copei.de>
; Check and return keyword argument or NIL.
(%defun %defun-arg-keyword (args)
(let a (car args)
(let d (and (cdr args)
(cadr args))
(if (%arg-keyword? a)
(if d
(if (%arg-keyword? d)
(%error "... |
Define ASDF system in package ASDF-USER. | (cl:in-package #:common-lisp-user)
(asdf:defsystem :sicl-compiler-test-utilities
:depends-on (:sicl-compiler-utilities)
:components
((:file "packages")
(:file "test-utilities" :depends-on ("packages"))))
| (cl:in-package #:asdf-user)
(defsystem :sicl-compiler-test-utilities
:depends-on (:sicl-compiler-utilities)
:components
((:file "packages")
(:file "test-utilities" :depends-on ("packages"))))
|
Define a parser for FOR-AS-ACROSS. | ;;;; Copyright (c) 2014
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The user of
... | ;;;; Copyright (c) 2014
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The user of
... |
Fix for old name mismatch | #|
This file is a part of grouping-stack
(c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu)
Author: Nicolas Hafner <shinmera@tymoon.eu>
|#
(in-package #:org.shirakumo.grouping-stack)
(defclass balancer ()
())
(defclass inactive-balancer (balancer)
())
(defmethod balance ((stack grouping-stack) (balance... | #|
This file is a part of grouping-stack
(c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu)
Author: Nicolas Hafner <shinmera@tymoon.eu>
|#
(in-package #:org.shirakumo.grouping-stack)
(defclass balancer ()
())
(defclass inactive-balancer (balancer)
())
(defmethod balance ((stack grouping-stack) (balance... |
Simplify by factoring methods to specilize on REGULAR-CLASS. | (cl:in-package #:sicl-clos)
(defmethod reader-method-class
((class standard-class)
(direct-slot standard-direct-slot-definition)
&rest initargs)
(apply #'reader-method-class-default class direct-slot initargs))
(defmethod reader-method-class
((class funcallable-standard-class)
(direct-slot st... | (cl:in-package #:sicl-clos)
(defmethod reader-method-class
((class regular-class)
(direct-slot standard-direct-slot-definition)
&rest initargs)
(apply #'reader-method-class-default class direct-slot initargs))
(defmethod writer-method-class
((class regular-class)
(direct-slot standard-direct-... |
Implement "help" command only as a symbol macro, not as a function | ;;;; Eval-bot --- An IRC bot for evaluating Common Lisp expressions
;; Copyright (C) 2013 Teemu Likonen <tlikonen@iki.fi>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either ver... | ;;;; Eval-bot --- An IRC bot for evaluating Common Lisp expressions
;; Copyright (C) 2013 Teemu Likonen <tlikonen@iki.fi>
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either ver... |
Fix the structure names of INSERT and UPDATE. | (in-package :cl-user)
(defpackage sxql.statement
(:use :cl
:sxql.sql-type)
(:import-from :sxql.operator
:find-constructor
:detect-and-convert))
(in-package :sxql.statement)
(cl-syntax:use-syntax :annot)
(defstruct (select-statement (:include sql-composed-statement (name "SE... | (in-package :cl-user)
(defpackage sxql.statement
(:use :cl
:sxql.sql-type)
(:import-from :sxql.operator
:find-constructor
:detect-and-convert))
(in-package :sxql.statement)
(cl-syntax:use-syntax :annot)
(defstruct (select-statement (:include sql-composed-statement (name "SE... |
Use explicit package marker for IN-PACKAGE. | (in-package #:sicl-compiler)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Function COMPILE-FILE.
(defun compile-file (input-file &key
(output-file nil output-file-p)
(verbose *compile-verbose*)
(print *compile-print*)
(external-format :default))
(declare (ig... | (cl:in-package #:sicl-compiler)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Function COMPILE-FILE.
(defun compile-file (input-file &key
(output-file nil output-file-p)
(verbose *compile-verbose*)
(print *compile-print*)
(external-format :default))
(declare ... |
Use package ASDF-USER for defining system. | (cl:in-package #:common-lisp-user)
(asdf:defsystem :sicl-simple-environment
:depends-on (:sicl-global-environment)
:serial t
:components
((:file "packages")
(:file "environment")
(:file "methods")))
| (cl:in-package #:asdf-user)
(defsystem :sicl-simple-environment
:depends-on (:sicl-global-environment)
:serial t
:components
((:file "packages")
(:file "environment")
(:file "methods")))
|
Check if :LIMIT and :OFFSET are used together. | ;;;;; Caroshi – Copyright (c) 2009–2013 Sven Michael Klose <pixel@copei.de>
(defun sql-clause-where (alst)
(!? alst
(+ " WHERE "
(? (string? !)
!
(alist-assignments ! :padding " AND ")))))
(defun sql-clause-select (&key table (fields nil) (where nil) (limit nil) (offset nil) (... | ;;;;; Caroshi – Copyright (c) 2009–2013 Sven Michael Klose <pixel@copei.de>
(defun sql-clause-where (alst)
(!? alst
(+ " WHERE "
(? (string? !)
!
(alist-assignments ! :padding " AND ")))))
(defun sql-clause-select (&key table (fields nil) (where nil) (limit nil) (offset nil) (... |
Add a note about ideal avoiding funcall at lambda expressions material | ;; Common Lisp Script
;; Manoel Vilela
;; higher-order function sigma-sum
;; func must be a lambda(x) expression
(defun sigma-sum (func a b &key (next #'1+))
(if (> a b)
0
(+ (funcall func a)
(sigma-sum func (funcall next a) b))))
(defun square (x)
(* x x))
(sigma-sum #'(lambda(x) (/ 1 x)) ... | ;; Common Lisp Script
;; Manoel Vilela
;; higher-order function sigma-sum
;; func must be a lambda(x) expression
(defun sigma-sum (func a b &key (next #'1+))
(if (> a b)
0
(+ (funcall func a)
(sigma-sum func (funcall next a) b))))
;; I would like to avoid the use of 'funcall' for calling
;; la... |
Define ASDF system in the package ASDF-USER. | (cl:in-package #:common-lisp-user)
(asdf:defsystem :sicl-arithmetic
:serial t
:components
((:file "packages")
(:file "support")))
| (cl:in-package #:asdf-user)
(defsystem :sicl-arithmetic
:serial t
:components
((:file "packages")
(:file "support")))
|
Use package ASDF-USER for defining system. | (cl:in-package #:common-lisp-user)
(asdf:defsystem :sicl-conditions
:components
((:file "packages")
(:file "support"
:depends-on ("packages"))))
| (cl:in-package #:asdf-user)
(defsystem :sicl-conditions
:components
((:file "packages")
(:file "support"
:depends-on ("packages"))))
|
Define new class 2-NODE for the nodes with 2 children of the 2-3 tree. | (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)))
(defclass node ()
((%parent :initarg :parent :accessor parent)))
(defclass leaf (node)
((%contents :initarg :contents :accessor contents)))
| (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)))
(defclass node ()
((%parent :initarg :parent :accessor parent)))
(defclass leaf (node)
((%contents :initarg :contents :accessor contents)))
(defclass 2-node (node)
((%left :initarg :left :accessor left)
(%r... |
Use option :SERIAL T to simplify system. | (cl:in-package #:asdf-user)
(defsystem :cleavir-dominance
:depends-on (:cleavir-utilities
:cleavir-meter)
:components
((:file "packages" :depends-on ())
(:file "dominance" :depends-on ("packages"))))
| (cl:in-package #:asdf-user)
(defsystem :cleavir-dominance
:depends-on (:cleavir-utilities
:cleavir-meter)
:serial t
:components
((:file "packages")
(:file "dominance")))
|
Add English condition reporter for LEFT-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)))
(defmethod acclima... | (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... |
Define method on UNREAD-CHAR specialized to SOURCE-TRACKING-STREAM. | (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... |
Use suffix -PARSER for parser functions. | ;;;; Copyright (c) 2014
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The user of
... | ;;;; Copyright (c) 2014
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The user of
... |
Check for sb-core-compression feature before turning on compression for 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
... |
Print failures and errors when performing ASDF:TEST-SYSTEM. | (in-package "BASIC-BINARY-IPC.TESTS")
(defmethod asdf:perform ((operation asdf:test-op) (component (eql (asdf:find-system "basic-binary-ipc-tests"))))
(lisp-unit:run-tests :all "BASIC-BINARY-IPC.TESTS"))
| (in-package "BASIC-BINARY-IPC.TESTS")
(defmethod asdf:perform ((operation asdf:test-op) (component (eql (asdf:find-system "basic-binary-ipc-tests"))))
(dolist (pkg (list "BASIC-BINARY-IPC.TESTS"))
(let ((report (lisp-unit:run-tests :all pkg)))
(print-failures report)
(print-errors report))))
|
Set the temp symbol immediately, for consistent with our other languages. | ;; Tested on SBCL
(defmacro swap (x y)
(let ((tmp-sym (gensym)))
`(let (,tmp-sym)
(setf ,tmp-sym ,x)
(setf ,x ,y)
(setf ,y ,tmp-sym))))
(defun use-swap ()
(let ((a 1)
(b 2))
(swap a b)
(format t "a: ~A, b: ~A~%" a b))
(let ((my-list (list 3 4)))
(swap (first my-list)... | ;; Tested on SBCL
(defmacro swap (x y)
(let ((tmp-sym (gensym)))
`(let ((,tmp-sym ,x))
(setf ,x ,y)
(setf ,y ,tmp-sym))))
(defun use-swap ()
(let ((a 1)
(b 2))
(swap a b)
(format t "a: ~A, b: ~A~%" a b))
(let ((my-list (list 3 4)))
(swap (first my-list) (second my-list))
... |
Add twist and displacement to project. | ;;;; lisphys.asd
(asdf:defsystem #:lisphys
:serial t
:description "Describe lisphys here"
:author "Guillaume <guillaume.saupin@gmail.com>"
:license "Specify license here"
:depends-on (#:clunit
#:alexandria)
:components ((:file "infpre")
(:file "package")
(:file "memoization")
... | ;;;; lisphys.asd
(asdf:defsystem #:lisphys
:serial t
:description "Describe lisphys here"
:author "Guillaume <guillaume.saupin@gmail.com>"
:license "Specify license here"
:depends-on (#:clunit
#:alexandria)
:components ((:file "infpre")
(:file "package")
(:file "memoization")
... |
Change from :INITFORM to :INITARG in leaf contents slot. | (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)))
(defclass node ()
((%parent :initarg :parent :accessor parent)))
(defclass leaf (node)
((%contents :initform nil :accessor contents)))
| (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)))
(defclass node ()
((%parent :initarg :parent :accessor parent)))
(defclass leaf (node)
((%contents :initarg :contents :accessor contents)))
|
Add method specialized to UNWIND-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... |
Include mu-session-id header in sparql requests | (in-package :mu-support)
;;; repository definition
(defun server-location ()
(if (find :docker *features*)
(progn (format t "~&running inside a docker~%")
"http://database:8890")
(progn (format t "~&running on localhost~%")
"http://localhost:8890")))
(defparameter *repository*
(make-... | (in-package :mu-support)
;;; repository definition
(defun server-location ()
(if (find :docker *features*)
(progn (format t "~&running inside a docker~%")
"http://database:8890")
(progn (format t "~&running on localhost~%")
"http://localhost:8890")))
(defclass mu-semtech-repository (cl... |
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
... |
Load a file containing support code for ENSURE-GENERIC-FUNCTION-USING-CLASS. | (cl:in-package #:sicl-boot)
(defun customize-r2 (boot)
(define-make-instance boot)
(define-direct-slot-definition-class boot)
(define-find-class boot))
| (cl:in-package #:sicl-boot)
(defun customize-r2 (boot)
(let ((c (c1 boot))
(r (r2 boot)))
(define-make-instance boot)
(define-direct-slot-definition-class boot)
(define-find-class boot)
(ld "../CLOS/ensure-generic-function-using-class-support.lisp" c r)))
|
Add method on REPORT-CONDITION specialized to MULTIPLE-OBJECTS-FOLLOWING-DOT. | (cl:in-package #:sicl-read)
(defmethod cleavir-i18n:report-condition
((condition unmatched-right-parenthesis)
stream
(language cleavir-i18n:english))
(format stream "Unmatched right parenthesis found."))
(defmethod cleavir-i18n:report-condition
((condition only-dots-in-token)
stream
(lan... | (cl:in-package #:sicl-read)
(defmethod cleavir-i18n:report-condition
((condition unmatched-right-parenthesis)
stream
(language cleavir-i18n:english))
(format stream "Unmatched right parenthesis found."))
(defmethod cleavir-i18n:report-condition
((condition only-dots-in-token)
stream
(lan... |
Fix definition of primep for 1. | ;;; Common functions for solving problems
(defun primep (n)
"Predicate to test the primality of N. If composite, the second
return value is the lowest factor."
(loop for i from 2 to (sqrt n)
when (= 0 (mod n i)) return (values nil i) finally (return t)))
(defun factors (n)
"Return the prime factors of N."
... | ;;; Common functions for solving problems
(defun primep (n)
"Predicate to test the primality of N. If composite, the second
return value is the lowest factor."
(when (> n 1)
(loop for i from 2 to (sqrt n)
when (= 0 (mod n i)) return (values nil i) finally (return t))))
(defun factors (n)
"Return the ... |
Use the :serial option in the asd file | ;; -*- mode: common-lisp -*-
(defsystem lispkit
:version "0.0.1"
:description "Lispy browser"
:licence "BSD"
:components ((:file "lispkit" :depends-on ("macros" "packages" "keys"))
(:file "keys" :depends-on ("packages" "browser" "events" "commands"))
(:file "browser" :depends-on ("... | ;; -*- mode: common-lisp -*-
(defsystem lispkit
:version "0.0.1"
:description "Lispy browser"
:licence "BSD"
:serial t
:components ((:file "packages")
(:file "user")
(:file "settings")
(:file "commands")
(:file "macros")
(:file "jumps"... |
Use option :SERIAL T to simplify system definition. | (cl:in-package #:asdf-user)
(defsystem :clobber
:components
((:file "packages")
(:file "clobber" :depends-on ("packages"))
(:file "demo" :depends-on ("clobber"))
(:file "demo2" :depends-on ("clobber"))))
| (cl:in-package #:asdf-user)
(defsystem :clobber
:serial t
:components
((:file "packages")
(:file "clobber")
(:file "demo")
(:file "demo2")))
|
Add :description to system definition. | ;;; -*- Lisp -*-
(defsystem :split-sequence
:version "1.0"
:maintainer "Sharp Lispers <sharplispers@googlegroups.com>"
:components ((:file "split-sequence"))
:in-order-to ((asdf:test-op (asdf:load-op :split-sequence-tests)))
:perform (asdf:test-op :after (op c)
(funcall (intern (symbol-name '#:r... | ;;; -*- Lisp -*-
(defsystem :split-sequence
:version "1.0"
:description "Splits a sequence into a list of subsequences
delimited by objects satisfying a test."
:maintainer "Sharp Lispers <sharplispers@googlegroups.com>"
:components ((:file "split-sequence"))
:in-order-to ((asdf:test-op (asdf:load-op :split... |
Make .asd file nicer for ASDF 3 | ;;; -*- Mode: Lisp ; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
(defsystem "fare-memoization"
:description "memoizing functions the correct, portable way"
:long-description "define memoized functions and memoize previously defined functions"
:license "MIT"
:author "Francois-Rene Rideau"
:version "1.0.0"
:compo... | ;;; -*- Mode: Lisp ; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
(defsystem "fare-memoization"
:description "memoizing functions the correct, portable way"
:long-description "define memoized functions and memoize previously defined functions"
:license "MIT"
:author "Francois-Rene Rideau"
:version "1.0.0"
:compo... |
Define method on DELETE specialized to LEAF. | (cl:in-package #:clump-2-3-tree)
(defgeneric delete (leaf))
(defgeneric delete-child (parent child))
| (cl:in-package #:clump-2-3-tree)
(defgeneric delete (leaf))
(defgeneric delete-child (parent child))
(defmethod delete ((leaf leaf))
(delete-child (parent leaf) leaf))
|
Add description, author and licence information to .asd file | (defsystem :eval-bot
:depends-on (:bordeaux-threads :trivial-irc :alexandria :split-sequence
:babel)
:components
((:file "sandbox-impl" :depends-on ("common"))
(:file "sandbox-extra" :depends-on ("common" "sandbox-impl" "sandbox-cl"))
(:file "sandbox-cl" :depends-on ("sandbo... | (defsystem "eval-bot"
:description "An IRC bot for Common Lisp code evaluation"
:author "Teemu Likonen <tlikonen@iki.fi>"
:licence "GNU Affero General Public License version 3"
:depends-on ("bordeaux-threads"
"trivial-irc" "alexandria" "split-sequence" "babel")
:components
((:file "sandbox-im... |
Add writer for the EXPRESSION slot. | (cl:in-package #:cleavir-cst)
(defclass cst ()
(;; This slot contains the Common Lisp expression that is
;; represented by the CST. It is guaranteed that there is sharing
;; between the expression of a CST and the expression of each child
;; of the CST.
(%expression :initarg :expression :reader expressi... | (cl:in-package #:cleavir-cst)
(defclass cst ()
(;; This slot contains the Common Lisp expression that is
;; represented by the CST. It is guaranteed that there is sharing
;; between the expression of a CST and the expression of each child
;; of the CST.
(%expression :initarg :expression :accessor expres... |
Load a file containing the definition of the class STANDARD-OBJECT. | (cl:in-package #:sicl-boot)
(defun create-bridge-classes (boot)
(let ((c (c1 boot))
(r (r2 boot)))
(ld "../CLOS/t-defclass.lisp" c r)))
| (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)))
|
Add missing dependencies to ERLANGEN system. | ;;;; System definition for ERLANGEN.
(defsystem erlangen
:description
"Distributed asychronous message passing system for Common Lisp."
:author "Max Rottenkolber <max@mr.gy>"
:license "Not licensed"
:components ((:file "conditions")
(:file "mailbox")
(:file "algorithms")
... | ;;;; System definition for ERLANGEN.
(defsystem erlangen
:description
"Distributed asychronous message passing system for Common Lisp."
:author "Max Rottenkolber <max@mr.gy>"
:license "Not licensed"
:components ((:file "conditions")
(:file "mailbox")
(:file "algorithms")
... |
Add support for OS X | (cl:in-package :%open-asset-import-library)
(define-foreign-library assimp
(:windows "assimp.dll" );; :calling-convention :stdcall ?
#++(:unix "libassimp.so")
(:unix (:or "libassimp.so.3" "libassimp3.0.so" "libassimp.so")))
(use-foreign-library assimp)
| (cl:in-package :%open-asset-import-library)
(define-foreign-library assimp
(:darwin "libassimp.dylib")
(:windows "assimp.dll" );; :calling-convention :stdcall ?
#++(:unix "libassimp.so")
(:unix (:or "libassimp.so.3" "libassimp3.0.so" "libassimp.so")))
(use-foreign-library assimp)
|
Use existing FORM-MIXIN class as a superclass. | ;;;; Copyright (c) 2014
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The user of
... | ;;;; Copyright (c) 2014
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The user of
... |
Use keyword symbol to name system. | (cl:in-package #:common-lisp-user)
(asdf:defsystem #:cleavir-eliminate-typeq
:depends-on (:cleavir-mir)
:serial t
:components
((:file "packages")
(:file "eliminate-typeq")))
| (cl:in-package #:common-lisp-user)
(asdf:defsystem :cleavir-eliminate-typeq
:depends-on (:cleavir-mir)
:serial t
:components
((:file "packages")
(:file "eliminate-typeq")))
|
Add :iterate as an explicit dep | (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))
| (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 :sqlite :iterate))
|
Add an ability to override parsed URI component values. | (in-package :cl-user)
(defpackage :dipper.uri
(:use :cl :alexandria :dipper.util)
(:export :database-uri
:parse-database-uri
:database-uri-scheme
:database-uri-subprotocol
:database-uri-host
:database-uri-port
:database-uri-path
:database-... | (in-package :cl-user)
(defpackage :dipper.uri
(:use :cl :alexandria :dipper.util)
(:export :database-uri
:parse-database-uri
:database-uri-scheme
:database-uri-subprotocol
:database-uri-host
:database-uri-port
:database-uri-path
:database-... |
Return NIL for all error situations. | (in-package :brreg)
(push (cons "application" "json") drakma:*text-content-types*)
(defun get-jsonhash (orgnummer)
(when (and (every #'digit-char-p orgnummer)
(= (length orgnummer) 9))
(multiple-value-bind (response status)
(drakma:http-request
(format nil "http://data.brreg.no/en... | (in-package :brreg)
(push (cons "application" "json") drakma:*text-content-types*)
(defun get-jsonhash (orgnummer)
(when (and (every #'digit-char-p orgnummer)
(= (length orgnummer) 9))
(multiple-value-bind (response status)
(drakma:http-request
(format nil "http://data.brreg.no/en... |
Remove obsolete :REPORT option from condition BAG-CONTAINS-NON-CHARACTER. | ;;;; Copyright (c) 2014, 2015
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The us... | ;;;; Copyright (c) 2014, 2015
;;;;
;;;; Robert Strandh (robert.strandh@gmail.com)
;;;;
;;;; all rights reserved.
;;;;
;;;; Permission is hereby granted to use this software for any
;;;; purpose, including using, modifying, and redistributing it.
;;;;
;;;; The software is provided "as-is" with no warranty. The us... |
Add :description to .asd file | (when (asdf:find-system :local-time nil) (pushnew :js-dates *features*))
(asdf:defsystem :cl-js
:depends-on (:parse-js :cl-ppcre #+js-dates :local-time)
:serial t
:components
((:file "package")
(:file "utils")
(:file "js")
(:file "jsos")
(:file "url-encode")
(:file "json")
(:file "deflib")
... | (when (asdf:find-system :local-time nil) (pushnew :js-dates *features*))
(asdf:defsystem :cl-js
:description "JavaScript-to-CL compiler and runtime"
:depends-on (:parse-js :cl-ppcre #+js-dates :local-time)
:serial t
:components
((:file "package")
(:file "utils")
(:file "js")
(:file "jsos")
(:file... |
Define :AFTER method on 3-NODE-SIZE that computes sum of child sizes. | (cl:in-package #:clump-test)
(defclass size-mixin ()
((%size :initarg :size :reader size)))
(defclass leaf-size (size-mixin clump-2-3-tree:leaf)
()
(:default-initargs :size 1))
(defclass 2-node-size (size-mixin clump-2-3-tree:2-node)
())
(defmethod initialize-instance :after ((object 2-node-size) &key)
(r... | (cl:in-package #:clump-test)
(defclass size-mixin ()
((%size :initarg :size :reader size)))
(defclass leaf-size (size-mixin clump-2-3-tree:leaf)
()
(:default-initargs :size 1))
(defclass 2-node-size (size-mixin clump-2-3-tree:2-node)
())
(defmethod initialize-instance :after ((object 2-node-size) &key)
(r... |
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")))
|
Add predicate to determine if two nodes are neighbours | ; 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... |
Update asdf file for test-server | ;;;; site-generator.asd
(asdf:defsystem #:site-generator
:serial t
:description "Describe site-generator here"
:author "Alex Charlton <alex.n.charlton@gmail.com>"
:license "BSD-2"
:depends-on (:let-plus :alexandria :iterate :hunchentoot :com.dvlsoft.clon :inferior-shell :cl-ppcre :cl-fad)
:components ((:fi... | ;;;; site-generator.asd
(asdf:defsystem #:site-generator
:serial t
:description "Describe site-generator here"
:author "Alex Charlton <alex.n.charlton@gmail.com>"
:license "BSD-2"
:depends-on (:let-plus :alexandria :iterate :hunchentoot :com.dvlsoft.clon :inferior-shell :cl-ppcre :cl-fad :bordeaux-threads :o... |
Add a dependency to js-mode on xml-mode. | (defsystem "lem-js-mode"
:depends-on ("lem-core")
:serial t
:components ((:file "js-mode")))
| (defsystem "lem-js-mode"
:depends-on ("lem-core"
"lem-xml-mode")
:serial t
:components ((:file "js-mode")))
|
Add :Lispdo command (lisp equivalent of :pydo) | (in-package :cl-user)
(defpackage #:lisp-interface
(:use #:cl #:cl-neovim)
(:shadowing-import-from #:cl #:defun #:eval))
(in-package :lisp-interface)
(defmacro echo-output (&body forms)
(let ((output (gensym)))
`(let ((,output (with-output-to-string (*standard-output*)
,@forms)))
... | (in-package :cl-user)
(defpackage #:lisp-interface
(:use #:cl #:cl-neovim)
(:shadowing-import-from #:cl #:defun #:eval))
(in-package :lisp-interface)
(defmacro echo-output (&body forms)
(let ((output (gensym)))
`(let ((,output (with-output-to-string (*standard-output*)
,@forms)))
... |
Test if first item has a string key. | (fn object? (x)
(is_object x))
(fn assoc-array? (x)
(& (not (array? x))
(is_array x)
(is_int (key x))))
| (fn object? (x)
(is_object x))
(fn assoc-array? (x)
(& (is_array x)
(is_string (key x))))
|
Allow LAMBDA keyword in function value. | ;;;; nix operating system project
;;;; list processor environment
;;;; Copyright (C) 2005-2008 Sven Klose <pixel@copei.de>
(defmacro with (alst &rest body)
; Make new WITH for rest of assignment list.
(labels ((sub ()
(if (cddr alst)
`((with ,(cddr alst) ,@body))
body... | ;;;; nix operating system project
;;;; list processor environment
;;;; Copyright (C) 2005-2008 Sven Klose <pixel@copei.de>
(defmacro with (alst &rest body)
; Make new WITH for rest of assignment list.
(labels ((sub ()
(if (cddr alst)
`((with ,(cddr alst) ,@body))
body... |
Add description to .asd file. | ;;
;; Copyright (c) 2009-2010, Gigamonkeys Consulting All rights reserved.
;;
(defsystem com.gigamonkeys.json
:author "Peter Seibel <peter@gigamonkeys.com>"
:components
((:file "packages")
(:file "json" :depends-on ("packages"))
(:file "json-builder" :depends-on ("packages")))
:depend... | ;;; Copyright (c) 2009-2011, Peter Seibel.
;;; All rights reserved. See COPYING for details.
(defsystem com.gigamonkeys.json
:author "Peter Seibel <peter@gigamonkeys.com>"
:description "Library for reading and writing JSON-formatted data."
:components
((:file "packages")
(:file "json" :depends... |
Bump patch version for accurate doc and use of digit-char-p. | ;;; -*- Mode: Lisp -*-
(defpackage #:bencode-system (:use #:asdf #:cl))
(in-package #:bencode-system)
(defsystem #:bencode
:description "Bencode"
:version "3.0.0"
:author "Johan Andersson <nilsjohanandersson@gmail.com>"
:license "MIT"
:components ((:file "package")
(:file "dictionary" :depend... | ;;; -*- Mode: Lisp -*-
(defpackage #:bencode-system (:use #:asdf #:cl))
(in-package #:bencode-system)
(defsystem #:bencode
:description "Bencode"
:version "3.0.1"
:author "Johan Andersson <nilsjohanandersson@gmail.com>"
:license "MIT"
:components ((:file "package")
(:file "dictionary" :depend... |
Rename files to lower case and add vector2d file | (defsystem #:lindsey
;;:depends-on ()
:serial t
:components ((:file "package")
(:file "Point2D")
;(:file "Vector2D")
;(:file "Polynomial")
;(:file "Intersections")
))
| (defsystem #:lindsey
;;:depends-on ()
:serial t
:components ((:file "package")
(:file "point2d")
(:file "vector2d")
;;(:file "Polynomial")
;;(:file "Intersections")
))
|
Work around Firefox hash bug. | ;;;;; TRE transpiler
;;;;; Copyright (c) 2009 Sven Klose <pixel@copei.de>
(defun number-sym (x)
(with (digit
(fn (if (< _ 24)
(+ #\a _)
(+ (- #\0 24) _)))
rec
(fn (unless (= 0 _)
(with (m (mod _ 34))
(cons (digit m)
(rec (/ (- _ m) 34)))))))
(make-symbol (list-string (cons... | ;;;;; TRE transpiler
;;;;; Copyright (c) 2010 Sven Klose <pixel@copei.de>
(defun number-sym (x)
(with (digit
(fn (if (< _ 24)
(+ #\a _)
(+ (- #\0 24) _)))
rec
(fn (unless (= 0 _)
(with (m (mod _ 34))
(cons (digit m)
(rec (/ (- _ m) 34)))))))
(make-symbol (list-string (ncon... |
Delete :me package before compiling and loading. | (sys.int::cal "home/me/package.lisp")
(sys.int::cal "home/me/line.lisp")
(sys.int::cal "home/me/mark.lisp")
(sys.int::cal "home/me/editor.lisp")
(sys.int::cal "home/me/buffer.lisp")
(sys.int::cal "home/me/point.lisp")
(sys.int::cal "home/me/minibuffer.lisp")
(sys.int::cal "home/me/redisplay.lisp")
(sys.int::cal "home/m... | (delete-package :me)
(sys.int::cal "home/me/package.lisp")
(sys.int::cal "home/me/line.lisp")
(sys.int::cal "home/me/mark.lisp")
(sys.int::cal "home/me/editor.lisp")
(sys.int::cal "home/me/buffer.lisp")
(sys.int::cal "home/me/point.lisp")
(sys.int::cal "home/me/minibuffer.lisp")
(sys.int::cal "home/me/redisplay.lisp")... |
Load using specific SONAME in :unix | (in-package :sdl2)
(defctype sdl2-ffi::size-t :unsigned-int)
(define-foreign-library libsdl2
(t (:default "libSDL2")))
#+-(use-foreign-library libsdl2)
| (in-package :sdl2)
(defctype sdl2-ffi::size-t :unsigned-int)
(define-foreign-library libsdl2
(:unix (:or "libSDL2-2.0.so.0" "libSDL2"))
(t (:default "libSDL2")))
(use-foreign-library libsdl2)
|
Use FALSE instead of (is eq nil) | (cl:defpackage #:definitions-systems_tests
(:use #:cl #:parachute))
(cl:in-package #:definitions-systems_tests)
(defmacro are (comp expected form &optional description &rest format-args)
`(is ,comp ,expected (multiple-value-list ,form) ,description ,@format-args))
(define-test "main"
(flet ((basic-tests (syste... | (cl:defpackage #:definitions-systems_tests
(:use #:cl #:parachute))
(cl:in-package #:definitions-systems_tests)
(defmacro are (comp expected form &optional description &rest format-args)
`(is ,comp ,expected (multiple-value-list ,form) ,description ,@format-args))
(define-test "main"
(flet ((basic-tests (syste... |
Define system in package ASDF-USER. | ;;; -*- lisp -*-
(defpackage :clouseau.system
(:use :cl :asdf))
(in-package :clouseau.system)
(defsystem :clouseau
:depends-on (:mcclim)
:serial t
:components
((:module "Apps/Inspector"
:pathname #.(make-pathname :directory '(:relative "Apps" "Inspector"))
:components
... | ;;; -*- lisp -*-
(cl:in-package :asdf-user)
(defsystem :clouseau
:depends-on (:mcclim)
:serial t
:components
((:module "Apps/Inspector"
:pathname #.(make-pathname :directory '(:relative "Apps" "Inspector"))
:components
((:file "package")
(:file "disassembly" ... |
Use new convert entry point. | (in-package #:sicl-compiler)
(defun compile-file (input-file &key
(output-file nil output-file-p)
(verbose *compile-verbose*)
(print *compile-print*)
(external-format :default))
(with-open-file (stream input-file
:direction :input
:external-format external-format)
(let* ((*compile-fi... | (in-package #:sicl-compiler)
(defun compile-file (input-file &key
(output-file nil output-file-p)
(verbose *compile-verbose*)
(print *compile-print*)
(external-format :default))
(with-open-file (stream input-file
:direction :input
:external-format external-format)
(let* ((*compile-fi... |
Load a file containing function definitions for class finalization. | (cl:in-package #:sicl-boot)
(defclass header ()
((%class :initarg :class :accessor class)
(%rack :initarg :rack :reader rack)))
(defun define-allocate-general-instance (env)
(setf (sicl-genv:fdefinition 'sicl-clos:allocate-general-instance env)
(lambda (class size)
(make-instance 'header
:class class
... | (cl:in-package #:sicl-boot)
(defclass header ()
((%class :initarg :class :accessor class)
(%rack :initarg :rack :reader rack)))
(defun define-allocate-general-instance (env)
(setf (sicl-genv:fdefinition 'sicl-clos:allocate-general-instance env)
(lambda (class size)
(make-instance 'header
:class class
... |
Refactor add-str to use add-char instead of change-attributes | (in-package :de.anvi.croatoan)
;; first attempt to create add-string with attributes and colors
;; without adding a complex-string type first.
(defun add-string (window string &key attributes color-pair y x n)
"Add the unrendered string to the window.
If n is given, write at most n chars from the string. If n is -1... | (in-package :de.anvi.croatoan)
(defun add-string (window string &key attributes color-pair y x n)
"Add the unrendered string to the window.
If n is given, write at most n chars from the string. If n is -1, as
many chars will be added that will fit on the line.
If the coordinates y and x are given, move to the dest... |
Expand binding test to cover all subenvs. | (in-package :clutter)
(def-suite environments :in clutter)
(in-suite environments)
(test stack-frame)
(test *stack*)
(test binding
(let* ((ns (make-namespace))
(symbol (make-clutter-symbol :name "test" :namespace ns))) ;TODO: clutter-gensym to ensure no collision
(is (not (clutter-boundp symbol :lexic... | (in-package :clutter)
(def-suite environments :in clutter)
(in-suite environments)
(test stack-frame)
(test *stack*)
(test binding
(mapc #'(lambda (env)
(let* ((ns (make-namespace))
(symbol (make-clutter-symbol :name "test" :namespace ns))) ;TODO: clutter-gensym to ensure no collisio... |
Use keywords for system names, and explicitly specify ASDF:DEFSYSTEM. | ;;;; See the LICENSE file for licensing information.
(defsystem minion
:name "minion"
:author "Brian Mastenbrook"
:version "0.1.0"
:licence "MIT"
:description "IRC bot for SBCL"
:depends-on
(:cl-irc :cl-ppcre :split-sequence
:irc-bot drakma)
:properties ((#:author-email . "cl-irc-devel@common-lisp.... | ;;;; See the LICENSE file for licensing information.
(asdf:defsystem :minion
:name "minion"
:author "Brian Mastenbrook"
:version "0.1.0"
:licence "MIT"
:description "IRC bot for SBCL"
:depends-on
(:cl-irc :cl-ppcre :split-sequence
:irc-bot :drakma)
:properties ((#:author-email . "cl-irc-devel@commo... |
Allow for the child to be NIL. | (cl:in-package #:clump-binary-tree)
;;; Make CHILD the left child of NODE.
(defgeneric link-left (parent child))
(defmethod link-left ((parent node) (child node))
(setf (left parent) child))
(defmethod link-left ((parent node-with-parent) (child node-with-parent))
(call-next-method)
(setf (parent child) parent... | (cl:in-package #:clump-binary-tree)
;;; Make CHILD the left child of NODE.
(defgeneric link-left (parent child))
(defmethod link-left ((parent node) child)
(setf (left parent) child))
(defmethod link-left ((parent node-with-parent) (child node-with-parent))
(call-next-method)
(setf (parent child) parent))
;;;... |
Include clws server file in project. | ;;;; bukvonesis.asd
(asdf:defsystem #:bukvonesis
:serial t
:description "Growing cyrillic characters for latin-only fonts."
:author "Boian Tzonev <boiantz@gmail.com>"
:license "Apache License, Version 2.0"
:depends-on ("hunchentoot" "parenscript" "ponon" "lparallel" "closure-template" "clws") ;;todo remove p... | ;;;; bukvonesis.asd
(asdf:defsystem #:bukvonesis
:serial t
:description "Growing cyrillic characters for latin-only fonts."
:author "Boian Tzonev <boiantz@gmail.com>"
:license "Apache License, Version 2.0"
:depends-on ("hunchentoot" "parenscript" "ponon" "lparallel" "closure-template" "clws") ;;todo remove p... |
Fix typo (copy-paste single quotes). | (describe simple-let
(== (let ())
nil)
(== (let ()
42)
42))
(describe let-with-multiple-expr-body
(== (let ()
1
2)
2))
(describe let-bindings
(== (let* ((x 1)
(y 2))
... | (describe simple-let
(== (let ())
nil)
(== (let ()
42)
42))
(describe let-with-multiple-expr-body
(== (let ()
1
2)
2))
(describe let-bindings
(== (let* ((x 1)
(y 2))
... |
Load macros before the functions that use them | (defsystem :map
:serial t
:description "Octave-like functionality for lisp!"
:version "0.1.0"
:author "Matt Novenstern <fisxoj@gmail.com>"
:components ((:file "package")
(:file "conditions")
(:module utilities
:components ((:file "printing")
(:file "missing-functions")))
(:... | (defsystem :map
:serial t
:description "Octave-like functionality for lisp!"
:version "0.1.0"
:author "Matt Novenstern <fisxoj@gmail.com>"
:components ((:file "package")
(:file "conditions")
(:module utilities
:components ((:file "printing")
(:file "missing-functions")))
(:... |
Make component names match real file names. | (in-package #:asdf-user)
(defsystem :sicl-iteration
:depends-on (:cleavir-code-utilities
:cleavir-internationalization
:sicl-iteration-support)
:serial t
:components
((:file "dotimes")
(:file "dolist")
(:file "iteration")))
| (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")))
|
Remove deftemplate from exported symbols | ;;;; package.lisp
(defpackage #:spinneret
(:use #:cl #:parenscript #:alexandria)
(:export #:with-html #:with-html-string #:html
#:*html* #:*html-fill-column* #:*html-min-room*
#:*html-lang* #:*html-charset*
#:*html-path*
#:deftemplate #:do-elements
#:deftag
... | ;;;; package.lisp
(defpackage #:spinneret
(:use #:cl #:parenscript #:alexandria)
(:export #:with-html #:with-html-string #:html
#:*html* #:*html-fill-column* #:*html-min-room*
#:*html-lang* #:*html-charset*
#:*html-path*
#:do-elements
#:deftag
#:*un... |
Define new class LEAF for the leaves of the 2-3 tree. | (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)))
(defclass node ()
((%parent :initarg :parent :accessor parent)))
| (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)))
(defclass node ()
((%parent :initarg :parent :accessor parent)))
(defclass leaf (node)
((%contents :initform nil :accessor contents)))
|
Add version.sexp as static file | ;;; -*- Lisp -*-
(defsystem :split-sequence
:author "Arthur Lemmens <alemmens@xs4all.nl>"
:maintainer "Sharp Lispers <sharplispers@googlegroups.com>"
:description "Splits a sequence into a list of subsequences
delimited by objects satisfying a test."
:license "public domain"
:version (:read-file-form "vers... | ;;; -*- Lisp -*-
(defsystem :split-sequence
:author "Arthur Lemmens <alemmens@xs4all.nl>"
:maintainer "Sharp Lispers <sharplispers@googlegroups.com>"
:description "Splits a sequence into a list of subsequences
delimited by objects satisfying a test."
:license "public domain"
:version (:read-file-form "vers... |
Set {COMPILE,LOAD}-VERBOSE to T when compiling IOLIB-SOURCE-FILEs | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; --- ASDF component classes
;;;
(in-package :iolib.base)
(defclass :iolib-muffled-source-file (asdf:cl-source-file) ())
(macrolet ((with-muffled-output (&body body)
`(let ((*load-print* nil)
(*load-verbose* t)
... | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; --- ASDF component classes
;;;
(in-package :iolib.base)
(defclass :iolib-muffled-source-file (asdf:cl-source-file) ())
(macrolet ((with-muffled-output (&body body)
`(let ((*load-print* nil)
(*load-verbose* nil)
... |
Load a file containing the definition of the 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)
... |
Fix call to non-CPS function from CPS function. | ;;;;; tré – Copyright (c) 2008–2010,2013 Sven Michael Klose <pixel@copei.de>
(dont-obfuscate apply call)
(declare-cps-exception apply %nconc last butlast)
(declare-native-cps-function apply)
(defun apply (fun &rest lst)
(when-debug
(| (function? fun)
(error "First argument ~A is not a function." fun))
(| (... | ;;;;; tré – Copyright (c) 2008–2010,2013 Sven Michael Klose <pixel@copei.de>
(dont-obfuscate apply call)
(declare-cps-exception apply %nconc last butlast)
(declare-native-cps-function apply)
(defun apply (fun &rest lst)
(when-debug
(| (function? fun)
(error "First argument ~A is not a function." fun))
(| (... |
Switch on assertions with *ASSERT*. | ;;;;; tré – Copyright (c) 2008–2012 Sven Michael Klose <pixel@copei.de>
(defun transpiler-make-expex (tr)
(let ex (make-expex)
(= (transpiler-expex tr) ex
(expex-transpiler ex) tr
(expex-function-collector ex)
(lx (tr)
#'((fun args)
(transpiler-add-wanted-function ,tr fun)))
... | ;;;;; tré – Copyright (c) 2008–2012 Sven Michael Klose <pixel@copei.de>
(defun transpiler-make-expex (tr)
(let ex (make-expex)
(= (transpiler-expex tr) ex
(expex-transpiler ex) tr
(expex-function-collector ex)
(lx (tr)
#'((fun args)
(transpiler-add-wanted-function ,tr fun)))
... |
Load file containing macro DEFUN. | (cl:in-package #:sicl-extrinsic-hir-compiler)
(defun rp (filename)
(asdf:system-relative-pathname :sicl-extrinsic-hir-compiler filename))
(load (rp "../../Evaluation-and-compilation/lambda.lisp"))
(load (rp "../../Environment/multiple-value-bind.lisp"))
(load (rp "../../Data-and-control-flow/setf.lisp"))
| (cl:in-package #:sicl-extrinsic-hir-compiler)
(defun rp (filename)
(asdf:system-relative-pathname :sicl-extrinsic-hir-compiler filename))
(load (rp "../../Evaluation-and-compilation/lambda.lisp"))
(load (rp "../../Environment/multiple-value-bind.lisp"))
(load (rp "../../Data-and-control-flow/setf.lisp"))
(load (rp ... |
Handle post click more carefully (but still in ugly way) | (in-package :stupid-chyat)
(defvar *acceptor*)
(define-easy-handler (root :uri "/") ()
(generate-html-response))
(define-easy-handler (postmsg :uri "/postmsg") ((message :real-name "msg"))
(let ((ua-stripped (strip-tags (user-agent)))
(message-stripped (strip-tags message)))
(cond
((and (string... | (in-package :stupid-chyat)
(defvar *acceptor*)
(define-easy-handler (root :uri "/") ()
(generate-html-response))
(define-easy-handler (postmsg :uri "/postmsg") ((message :real-name "msg"))
(let ((ua-stripped (strip-tags (user-agent)))
(message-stripped (strip-tags message)))
(cond
((or (null me... |
Use file suffix for loading. | (cl:in-package #:sicl-boot)
(defun define-validate-superclass (boot)
(setf (sicl-genv:fdefinition 'sicl-clos:validate-superclass (r2 boot))
(constantly t)))
(defun customize-r2 (boot)
(let ((c (c1 boot))
(r (r2 boot)))
(define-make-instance boot)
(define-direct-slot-definition-class boot)
(define-fi... | (cl:in-package #:sicl-boot)
(defun define-validate-superclass (boot)
(setf (sicl-genv:fdefinition 'sicl-clos:validate-superclass (r2 boot))
(constantly t)))
(defun customize-r2 (boot)
(let ((c (c1 boot))
(r (r2 boot)))
(define-make-instance boot)
(define-direct-slot-definition-class boot)
(define-fi... |
Exclude (and sbcl windows) from depending on static-vectors | (defpackage :glkit.asdf
(:use #:cl #:asdf))
(in-package :glkit.asdf)
#+(or sbcl 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")
:license "MIT"
:version "0... | (defpackage :glkit.asdf
(:use #:cl #:asdf))
(in-package :glkit.asdf)
#+(or (and sbcl (not 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")
:license... |
Fix typo in docstring of TIMEOUT. | ;;;; Generic conditions.
(in-package :erlangen.conditions)
(define-condition timeout (error) ()
(:documentation
"*Description:*
Describes an error condition that can occur when using functions with
a timeout. It denotes a that the operations was unable to
successfully complete within a given duratio... | ;;;; Generic conditions.
(in-package :erlangen.conditions)
(define-condition timeout (error) ()
(:documentation
"*Description:*
Describes an error condition that can occur when using functions with
a timeout. It denotes a that the operation was unable to
successfully complete within a given duration... |
Add in the html foundation | (defpackage :fu-er-com
(:use :cl :hunchentoot :cl-who :parenscript)
(:export :start-server :stop-server))
(in-package :fu-er-com)
(defparameter *server* nil)
(defun stop-server ()
(when *server*
(stop *server*)
(setq *server* nil)))
(defun start-server ()
(stop-server)
(start (make-instance 'easy-a... | (defpackage :fu-er-com
(:use :cl :hunchentoot :cl-who :parenscript)
(:export :start-server :stop-server))
(in-package :fu-er-com)
(defparameter *server* nil)
(defun stop-server ()
(when *server*
(stop *server*)
(setq *server* nil)))
(defun start-server ()
(stop-server)
(start (make-instance 'easy-a... |
Update cal to directly invoke the continue restart. | (defun cal (file)
(handler-bind
;; automatically choose 'smash existing class' when loading
((t (lambda (c)
(let ((restart (find-restart 'continue)))
(when restart (invoke-restart restart))))))
(sys.int::cal file)))
(cal "home/med/package.lisp")
(cal "home/med/line.lisp")
(cal... | (defun cal (file)
(handler-bind
;; automatically choose 'smash existing class' when loading
((t (lambda (c)
(invoke-restart 'continue))))
(sys.int::cal file)))
(cal "home/med/package.lisp")
(cal "home/med/line.lisp")
(cal "home/med/mark.lisp")
(cal "home/med/editor.lisp")
(cal "home/med/bu... |
Define ASDF system in package ASDF-USER. | (cl:in-package #:common-lisp-user)
(asdf:defsystem :cleavir-reaching-definitions
:depends-on (:cleavir-utilities)
:components
((:file "packages")
(:file "reaching-definitions" :depends-on ("packages"))))
| (cl:in-package #:asdf-user)
(defsystem :cleavir-reaching-definitions
:depends-on (:cleavir-utilities)
:components
((:file "packages")
(:file "reaching-definitions" :depends-on ("packages"))))
|
Add method on REPLACE-CHILD specialized to NODE. | (cl:in-package #:clump-binary-tree)
(defgeneric replace-child (node old-child new-child))
(defmethod replace-child ((node null) (old-child node) new-child)
new-child)
| (cl:in-package #:clump-binary-tree)
(defgeneric replace-child (node old-child new-child))
(defmethod replace-child ((node null) (old-child node) new-child)
new-child)
(defmethod replace-child ((node node) (old-child node) new-child)
(cond ((eq old-child (left node))
(setf (left node) new-child))
((eq old-chil... |
Add new file to asdf description. | ;;;; turtle-geometry.asd
(asdf:defsystem #:turtle-geometry
:description "Describe turtle-geometry here"
:author "Name <your@email.com>"
:license "Licenceless Rider"
:depends-on (#:err)
:serial t
:pathname "src/"
:components ((:file "package")
(:file "globals")
(:file "utils"... | ;;;; turtle-geometry.asd
(asdf:defsystem #:turtle-geometry
:description "Describe turtle-geometry here"
:author "Name <your@email.com>"
:license "Licenceless Rider"
:depends-on (#:err)
:serial t
:pathname "src/"
:components ((:file "package")
(:file "globals")
(:file "utils"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.