Skip to content
Snippets Groups Projects
Commit 16489fee authored by Liam M. Healy's avatar Liam M. Healy Committed by Liam M. Healy
Browse files

Antik user package symbol shadowing and package use

Define symbols to be shadowed and packages to be used for convenience
and conflict resolution in the Antik user packages.
parent 52cc09fe
No related branches found
No related tags found
No related merge requests found
;; Basis splines. ;; Basis splines.
;; Liam Healy 2008-02-18 14:43:20EST basis-splines.lisp ;; Liam Healy 2008-02-18 14:43:20EST basis-splines.lisp
;; Time-stamp: <2011-01-10 10:30:07EST basis-splines.lisp> ;; Time-stamp: <2011-01-13 10:24:59EST basis-splines.lisp>
;; ;;
;; Copyright 2008, 2009, 2011 Liam M. Healy ;; Copyright 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
(in-package :gsl) (in-package :gsl)
;;; antik:knots means "nautical miles per hour" but there's no conflict
;;; here with the function #'gsl:knots, so we shadow import the symbol
;;; from antik.
(shadowing-import 'antik:knots)
;;; /usr/include/gsl/gsl_bspline.h ;;; /usr/include/gsl/gsl_bspline.h
;;; Should be subclass of interpolation? ;;; Should be subclass of interpolation?
......
;; Load GSL ;; Load GSL
;; Liam Healy Sat Mar 4 2006 - 18:53 ;; Liam Healy Sat Mar 4 2006 - 18:53
;; Time-stamp: <2011-01-12 00:35:16EST init.lisp> ;; Time-stamp: <2011-01-13 09:38:45EST init.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009, 2010, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -19,23 +19,36 @@ ...@@ -19,23 +19,36 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(defpackage gsll (defpackage gsll
(:nicknames :gsl) (:nicknames :gsl)
(:use :common-lisp :cffi) (:use :common-lisp :cffi)
(:import-from :grid #:dim0 #:dim1 #:^ #:copy) (:import-from :grid #:dim0 #:dim1 #:^ #:copy)
(:export #:dim0 #:dim1 #:copy)) (:export #:dim0 #:dim1 #:copy)
;; No actual conflict due to different usage of symbols:
;; antik:psi means "pounds per square inch" vs. function #'gsl:psi
;; antik:knots means "nautical miles per hour" vs. function #'gsl:knots
;; antik:acceleration refers to the time derivative of velocity vs. object 'gsl:acceleration.
;; si units symbol-macro vs. GSLL's sine integral.
(:shadowing-import-from :antik #:psi #:knots #:acceleration #:si))
;;; Where there is a symbol conflict, take the other one. (setf
(shadow '#:row :antik-user) ; conflict with grid:row; they are equivalent antik::*antik-user-shadow-symbols*
(shadow '#:column :antik-user) ; conflict with grid:column; they are equivalent (append antik::*antik-user-shadow-symbols*
(shadow '#:sum :antik-user) ; conflict of histogram function with iterate:sum, both pretty obscure ;; Where there is a symbol conflict between GSLL and other packages,
(shadow '#:multiply :antik-user) ; conflict if GSL's duplicate '* with iterate:multiply '(
(shadow '#:si :antik-user) ; si units symbol-macro vs. GSLL's sine integral; technically not a conflict ;; take from the other package
(shadow '#:polar-to-rectangular :antik-user) ; GSLL's doesn't use vectors grid:row ; GSLL alternate is equivalent
(shadow '#:rectangular-to-polar :antik-user) ; GSLL's doesn't use vectors grid:column ; GSLL alternate is equivalent
;;; Where there is a symbol conflict, take GSLL's iterate:sum ; GSLL histogram function, both pretty obscure
(shadowing-import 'gsl::iterate :antik-user) ; conflict with iterate:iterate, but iterate:iter is a synonym iterate:multiply ; GSLL function duplicates '*
antik:polar-to-rectangular ; GSLL's doesn't use vectors
antik:rectangular-to-polar ; GSLL's doesn't use vectors
;; taken from GSLL
gsll::iterate ; conflict with iterate:iterate, but iterate:iter is a synonym
))
antik::*antik-user-use-packages*
(cons '#:gsll antik::*antik-user-use-packages*))
(use-package :gsll :antik-user) (antik:make-user-package :antik-user) ; Add the new use package and shadow symbols to :antik-user
(in-package :gsl) (in-package :gsl)
......
;; Index lookup and acceleration ;; Index lookup and acceleration
;; Liam Healy, Sun Nov 4 2007 - 18:09 ;; Liam Healy, Sun Nov 4 2007 - 18:09
;; Time-stamp: <2011-01-10 10:29:57EST lookup.lisp> ;; Time-stamp: <2011-01-13 10:24:57EST lookup.lisp>
;; ;;
;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy ;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
(in-package :gsl) (in-package :gsl)
;;; antik:acceleration refers to the time derivative of velocity but
;;; there's no conflict here with the object 'gsl:acceleration, so we
;;; shadow import the symbol from antik.
(shadowing-import 'antik:acceleration)
(defmobject acceleration "gsl_interp_accel" (defmobject acceleration "gsl_interp_accel"
() ()
"acceleration for interpolation" "acceleration for interpolation"
......
;; Psi (digamma) functions ;; Psi (digamma) functions
;; Liam Healy, Mon May 1 2006 - 22:11 ;; Liam Healy, Mon May 1 2006 - 22:11
;; Time-stamp: <2011-01-10 10:21:07EST psi.lisp> ;; Time-stamp: <2011-01-13 10:25:00EST psi.lisp>
;; ;;
;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy ;; Copyright 2006, 2007, 2008, 2009, 2011 Liam M. Healy
;; Distributed under the terms of the GNU General Public License ;; Distributed under the terms of the GNU General Public License
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
(in-package :gsl) (in-package :gsl)
;;; antik:psi means "pounds per square inch" but there's no conflict
;;; here with the function #'gsl:psi, so we shadow import the symbol
;;; from antik.
(shadowing-import 'antik:psi)
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Digamma Function ;;;; Digamma Function
;;;;**************************************************************************** ;;;;****************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment