3 ;;; Time-stamp: <2009-09-21 22:53:53 tony>
4 ;;; Creation: <2008-09-08 08:06:30 tony>
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c) 2007-2008, AJ Rossini <blindglobe@gmail.com>. BSD.
8 ;;; Purpose: Stuff that needs to be made working sits inside the
9 ;;; progns... This file contains the current challenges to
10 ;;; solve, including a description of the setup and the work
13 ;;; What is this talk of 'release'? Klingons do not make software
14 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
15 ;;; designers and quality assurance people in its wake.
25 ;;(asdf:oos 'asdf:load-op 'lisp-matrix)
26 ;;(asdf:oos 'asdf:compile-op 'cls :force t)
27 (asdf:oos
'asdf
:load-op
'cls
)
30 (asdf:oos
'asdf
:load-op
'cl-cairo2-x11
)
31 (asdf:oos
'asdf
:load-op
'cl-2d
)
34 (asdf:oos
'asdf
:load-op
'cl-pdf
)
35 (asdf:oos
'asdf
:load-op
'cl-typesetting
))
39 (in-package :lisp-stat-unittests
)
41 ;; tests = 80, failures = 7, errors = 21
42 (run-tests :suite
'lisp-stat-ut
)
43 (describe (run-tests :suite
'lisp-stat-ut
))
45 (describe 'lisp-stat-ut
)
46 (documentation 'lisp-stat-ut
'type
)
48 ;; FIXME: Example: currently not relevant, yet
49 ;; (describe (lift::run-test :test-case 'lisp-stat-unittests::create-proto
50 ;; :suite 'lisp-stat-unittests::lisp-stat-ut-proto))
52 (describe (lift::run-tests
:suite
'lisp-stat-ut-dataframe
))
53 (lift::run-tests
:suite
'lisp-stat-ut-dataframe
)
55 (describe (lift::run-test
56 :test-case
'lisp-stat-unittests
::create-proto
57 :suite
'lisp-stat-unittests
::lisp-stat-ut-proto
))
61 ;;; Tasks working on...
65 ;; use of extension packages supporting versioning and validation of
67 (asdf:oos
'asdf
:load-op
'versioned-objects
)
68 (asdf:oos
'asdf
:load-op
'validations
))
72 ;; Syntax examples using lexical scope, closures, and bindings to
73 ;; ensure a clean communication of results
74 (with-data dataset
((dsvarname1 [usevarname1])
75 (dsvarname2 [usevarname2]))
79 (defparameter *df-test*
80 (make-instance 'dataframe-array
81 :storage #2A (('a "test0" 0 0d0)
87 :case-labels (list "0" "1" "2" "3" "4")
88 :var-labels (list "symbol" "string" "integer" "double-float")
89 :var-types (list 'symbol 'string 'integer 'double-float)))
91 *df-test* ; but with SBCL, ints become floats?
93 (defun check-var (df colnum)
94 (let ((nobs (xdim df 0)))
96 (check-type (xref df i colnum) (elt (var-types df) i)))))
98 (check-var *df-test* 0)
102 (integerp (xref *df-test* 1 2))
103 (floatp (xref *df-test* 1 2))
104 (integerp (xref *df-test* 1 3))
105 (type-of (xref *df-test* 1 3))
106 (floatp (xref *df-test* 1 3))
108 (type-of (vector 1 1d0))
117 (xref *df-test* 1 '*)
119 ;;; Experiments with cl-variates
121 ;; (asdf:oos 'asdf:compile-op 'cl-variates :force t)
122 ;; (asdf:oos 'asdf:compile-op 'cl-variates-test :force t)
123 ;; (asdf:oos 'asdf:load-op 'lift)
124 ;; (asdf:oos 'asdf:load-op 'cl-variates)
125 (asdf:oos 'asdf:load-op 'cl-variates-test)
127 (in-package :cl-variates-test)
129 (run-tests :suite 'cl-variates-test)
130 (describe (run-tests :suite 'cl-variates-test))
132 (in-package :cl-variates-user)
134 (defparameter state (make-random-number-generator))
135 (setf (random-seed state) 44)
137 (loop for i from 1 to 10 collect
138 (random-range state 0 10))
139 ;; => (1 5 1 0 7 1 2 2 8 10)
140 (setf (random-seed state) 44)
141 (loop for i from 1 to 10 collect
142 (random-range state 0 10))
143 ;; => (1 5 1 0 7 1 2 2 8 10)
145 (setf (random-seed state) 44)
147 (loop for i from 1 to 10 collect
148 (normal-random state 0 1))
150 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
151 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
152 ;; 0.20750134211656893 -0.14501914108452274)
154 (setf (random-seed state) 44)
155 (loop for i from 1 to 10 collect
156 (normal-random state 0 1))
158 ;; (-1.2968656102820426 0.40746363934173213 -0.8594712469518473 0.8795681301148328
159 ;; 1.0731526250004264 -0.8161629082481728 0.7001813608754809 0.1078045427044097
160 ;; 0.20750134211656893 -0.14501914108452274)
163 ;;; experiments with LLA
164 (in-package :cl-user)
165 (asdf:oos 'asdf:load-op 'lla)