Welcome kwccoin

10 views
Skip to first unread message

Steve Nunez

unread,
Mar 26, 2022, 11:20:58 PM3/26/22
to lisp...@googlegroups.com

Hi Kwccoin,

 

Welcome. There’s a few folks that were previously xlisp-stat users on this list. Two resources you might find helpful:

 

Reddit/learn lisp

XLisp-Stat code repository

 

The latter contains code you’ll probably find familiar. Much could be ported to CLS without too much trouble.

 

 

KWC Coin

unread,
Mar 27, 2022, 11:01:44 AM3/27/22
to Common Lisp Statistics
Seems one of my minor questions is not yet published.  But I think there is something wrong of the tutorial and not sure why others can go through it but I cannot.

I refer to 

; --- using p.145 of lisp-stat the book ("LISP-STAT: AN OBJECT-ORIENTED ENVIRONMENT FOR STATISTICAL COMPUTING AND DYNAMIC GRAPHICS")

```

(setf x (make-array '(3 2)

                    :initial-contents '((1 2 ) (3 4) (5 6))))

(select x '(0 1) 1). ; (surprise books say #2a((2) (4)) but lisp-stat just return #(2 4) not #2a((2) (4))

(setf (select x '(0 1) 1) '#(x y);hence the code has to be modified here, not '2a((x) (y))

x

; strangely the book code is NOT working using the lisp-stat software here and has to be amended as above
; still the select including sub-list work

```

```
; for the tutorial, I am not sure if the object is a list it will work but array does:

(def y #(3 7 5 9 12 3 14 2))

(setf (aref y 1) 11)

(setf (select y 1) 12)

(setf (select y (list 0 2)) '#(18 19))

y

; update all ok
```

```
; how if If you try using list i.e.

(def x (list 3 7 5 9 12 3 14 2))

x

(select x 1) ; ok

(setf (select x 1) 11 )  ; this does not work  (11 (3 7 5 9 12 3 14 2) 1).

(setf (select x (list 0 2)) (list 15 16))

``` 
I moved on

KWC Coin

unread,
Mar 27, 2022, 11:28:27 AM3/27/22
to Common Lisp Statistics
Continue my tutorial :

(defun delete-case (x i) (select x (remove i (iota (- (length x) 1)))))

should it be

(defun delete-case1 (x i)

  (select x (remove i (iota (length x)))))


Seems to lost the last element


Reply all
Reply to author
Forward
0 new messages