Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocate-instance without breaks on va-class #288

Open
Yehouda opened this issue Dec 10, 2024 · 4 comments
Open

Allocate-instance without breaks on va-class #288

Yehouda opened this issue Dec 10, 2024 · 4 comments

Comments

@Yehouda
Copy link

Yehouda commented Dec 10, 2024

(defmethod allocate-instance ((this-class va-class) &rest params)

On LispWorks, calling allocate-instance on *va-class breaks. It happens when some code calls (class-prototype 'va-class), so it needs to work.

In our tst code. I changed this definition to:

(defmethod allocate-instance ((this-class va-class) &rest params)
  "Extend allocation logic for all virtual array classes. This function acts as an interface to the extend-allocator functions (mostly found in combinatorics.lisp) which provide for special allocation behavior of virtual array classes; specifically the potential for their allocation to return a modified form of the base object rather than an instance of their actual class."
  (or (and  params  ; class-prototype 
            (let ((fname (intern (format nil "EXTEND-ALLOCATOR-~a" (string-upcase (class-name this-class)))
                                 *package-name-string*)))
              ;; TODO: make the EXTEND-ALLOCATOR- symbol part of the classes so this
              ;; string processing is not needed with every allocation
              (when  (fboundp fname) (apply (symbol-function fname) params))))
      (call-next-method)))
@phantomics
Copy link
Owner

Thanks for testing April with LispWorks, are you testing LW with different popular libraries? I changed the allocate-instance code, can you try it now? Also, a friend who tested LW in the past had problems with some of the library tests, could you try running those? You can do that by running (load-libs) (run-lib-tests) in the April package. Appreciate it.

@Yehouda
Copy link
Author

Yehouda commented Dec 11, 2024

I am not really testing it. We try to load and compile "all" of quicklisp systems, and when we find easy to run tests also run them.
This issue caused the LispWorks compiler to error, because it uses class-prototype when computing the acceptable initargs when compiling (make-ins

I just ran (april::load-libs) and (april::run-lib-tests). It filled my shell with various stuff, and claimed that there was one failure.

@phantomics
Copy link
Owner

Could you find out where the failure was? You can tell by the × symbol at the left edge of the test output. Successful tests are indicated by the character while × indicates failure, so it should be easy to find doing a text search. Keep in mind that × is a functional character in APL too, so it's important to check that the character is at the left edge of the text output and not in the middle of a code string.

Last time I had a friend test April with LW there were a few failures, mostly relating to trigonometry and complex numbers. Would be good to get April fully working with LW. Thanks.

@Yehouda
Copy link
Author

Yehouda commented Dec 12, 2024

april-output.txt

The failure is in line 39.
For markers that you want to search for, you really should use only charcters that are available on a typical english keyboard. Something like "-->>" make it easy to find both by search and visually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants