bugKawa - Bugs: bug #13573, comparisons using kawa in clisp...

 
 

bug #13573: comparisons using kawa in clisp mode

Submitted by:  Nigel Galloway <nigel_galloway>
Submitted on:  Wed 29 Jun 2005 03:34:30 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Unexpected resultStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 30 Jun 2005 05:52:53 AM UTC, comment #1:

The problem is the difference between Scheme and Common Lisp true/false.

I fixed the immediate problems. Now:
(if (> (+ 1 4) 7) (+ 1 2) (+ 5 6)) => 11, as expected.

I also fixed a problem with the eq function.

list? is (as you say) a Scheme function, rather than a Common Lisp function, so it's not clear if it should return Scheme true/false or whether the "Scheme boolean" should be coerced to "Lisp boolean".

In any, the right thing to do is implement listp. The listp function is implemented for ELisp, but in a way that may need a little bit of tweaking. In any case, "type predicates" and related matters are one of the main things I'm planning on doing after Kawa 1.8 is released, so I'd rather not deal with this now. (I'm assuming you're just experimenting with Kawa/CL at this point, rather than trying to do real work.)

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 29 Jun 2005 03:34:30 PM UTC, original submission:

> java -jar kawa-1.7.90.jar

#|kawa:1|# (if (list? '(a b c)) (+ 1 2) (+ 5 6))
3
#|kawa:2|# (if (list? 27) (+ 1 2) (+ 5 6))
11
#|kawa:3|# (exit)
Process java exited with code 0

In common Lisp mode list? is always true.

> java -jar kawa-1.7.90.jar --clisp

#|kawa:1|# (if (list? '(a b c)) (+ 1 2) (+ 5 6))
3
#|kawa:2|# (if (list? 27) (+ 1 2) (+ 5 6))
3
#|kawa:3|# (exit)

Being concerned that list? should really be listp I tried >

> java -jar kawa-1.7.90.jar

#|kawa:1|# (if (> (+ 1 4) 3) (+ 1 2) (+ 5 6))
3
#|kawa:2|# (if (> (+ 1 4) 7) (+ 1 2) (+ 5 6))
11
#|kawa:3|# (exit)
Process java exited with code 0

> java -jar kawa-1.7.90.jar --clisp

#|kawa:1|# (if (> (+ 1 4) 3) (+ 1 2) (+ 5 6))
3
#|kawa:2|# (if (> (+ 1 4) 7) (+ 1 2) (+ 5 6))
3
#|kawa:3|# (exit)
Process java exited with code 0

But still the condition always seems to be true

Nigel Galloway <nigel_galloway>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 30 Jun 2005 05:52:53 AM UTCbothnerStatusNone=>Fixed
  Assigned toNone=>bothner
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1