development release version 9.0 2
development release version 9.0 2
• HTTP mode now working on Win32
• other bugfixes and additions
For files and changes notes see
http://newlisp.org/downloads/development/
Lutz
• other bugfixes and additions
For files and changes notes see
http://newlisp.org/downloads/development/
Lutz
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Lutz,
I just built 9.0.2 on Linux and the end of 'qa-dot' says:
Should I worry? --Ricky
I just built 9.0.2 on Linux and the end of 'qa-dot' says:
Code: Select all
TESTING FINISHED WITH ERRORS:
>>>> pipe failed nil
(λx. x x) (λx. x x)
I also have a question:
When using 'mat':
> (mat * '((1 2) (3 4)) 2)
((2 4) (6 8))
I would like to exchange operators to something else using 'op':
'op' is a function:
> (set 'op +)
+ <40B246>
> (mat op '((1 2) (3 4)) 2)
illegal parameter type in function mat : '((1 2) (3 4))
'op' is a symbol:
> (set 'op '+)
+
> (mat op '((1 2) (3 4)) 2)
illegal parameter type in function mat : '((1 2) (3 4))
How does 'mat' work with + - * and / ???
Thanks, Fanda
PS: New 'explode' on lists is great!
When using 'mat':
> (mat * '((1 2) (3 4)) 2)
((2 4) (6 8))
I would like to exchange operators to something else using 'op':
'op' is a function:
> (set 'op +)
+ <40B246>
> (mat op '((1 2) (3 4)) 2)
illegal parameter type in function mat : '((1 2) (3 4))
'op' is a symbol:
> (set 'op '+)
+
> (mat op '((1 2) (3 4)) 2)
illegal parameter type in function mat : '((1 2) (3 4))
How does 'mat' work with + - * and / ???
Thanks, Fanda
PS: New 'explode' on lists is great!
... I found the way, but I wish it was easier:
And here is the reason, why I needed it :-)
Fanda
Code: Select all
(set 'op '+) => +
(eval (list 'mat op ''((1 2) (3 4)) 2)) => ((3 4) (5 6))
(eval (list mat op ''((1 2) (3 4)) 2)) => ((3 4) (5 6))
(set 'op '*) => *
(eval (list mat op ''((1 2) (3 4)) 2)) => ((2 4) (6 8))
(set 'op '/) => /
(eval (list mat op ''((1 2) (3 4)) 2)) => ((0.5 1) (1.5 2))
Code: Select all
(define-macro (vec op u v)
(setq u (list (eval u)))
(setq v (eval v))
(unless (number? v)
(setq v (list v)))
(first (eval (list mat op 'u 'v))))
Code: Select all
(vec + '(1 2) '(3 4)) => (4 6)
(vec * '(1 2) '(3 4)) => (3 8)
(vec - '(1 2) '(3 4)) => (-2 -2)
(vec / '(1 2) '(3 4)) => (0.3333333333 0.5)
(vec + '(1 2) 5) => (6 7)
There is an easier way:
Lutz
Code: Select all
(define (vec op u v) (map op u v))
(vec + '(1 2) '(3 4)) => (4 6)
This might be even better:Lutz wrote:There is an easier way:
Code: Select all
(define (vec op u v) (map op u v)) (vec + '(1 2) '(3 4)) => (4 6)
Code: Select all
(define vec map)
(λx. x x) (λx. x x)
Don't worry. I just rechecked Debian 3.1 and Fedora FC2 and they are both fine. Probably the timing was too short. Try again or change (sleep 1000) to (sleep 2000) in function 'test-pipe'.I just built 9.0.2 on Linux and the end of 'qa-dot' says:
Code:
TESTING FINISHED WITH ERRORS:
>>>> pipe failed nil
Should I worry? --Rick
Yes this is the best, they really do both the same thing.(define vec map)
Lutz