-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Lem with other CL implementations #686
Lem with other CL implementations #686
Conversation
I had better luck with CCL, which works quite better, except for some errors here and there, it's usable 👍 |
So, loading the ncurses front-end, I realize that ABCL and ECL have the same problem, no response from the user input. I debug the Maybe a library that I missed ❓ |
That's wonderful, thank you! ECL should have worked before, maybe there is a problem around threads |
- These need to be adapted for the new bt library
ECL is failing a lot of tests, so it might not work without going through that one. |
Yeah, I had some problems with ECL, specially the annoying ASDF version error (not related to Lem), so I think I'm going to focus on ABCL, I think it's the one with more potential uses (open the Java ecosystem) |
- Modify timer and the tests to reflect the changes
I did a couple of things in the last commit c047386 :
I still didn't manage to make it work with ABCL tho, but I think I'm in the right direction here 👍 |
Maybe the mailbox library can be separated in a separate repository? |
It's might be good. |
I added some documentation more detail on how the progress in the tests is going (using this branch as reference) |
OK, I think I found THE problem: So, the thing is when calling So, why it works in SBCL? Because is seems like it's doing some wrapping around the classes, let's see the call to the function (this functions returns a list, in this case, I'm inspecting the first element):
In ABCL happens the same as in Clasp. So, in the first case, it can be signal without any problem, but in the second it cannot be coerce. I guess the odd (or clever) behaviour is in SBCL. Not sure what to do here, so calling for some help (@cxxxr) |
Hmm, this seems to be a deep-seated problem. |
@Sasanidas |
Oh! seems very interesting, I'll merge the branch and try it 👍 |
Even tho ECL works really well (maybe the best aside from SBCL) I wasn't been able to dump the image to an executable. Running https://ecl.common-lisp.dev/static/manual/System-building.html#Compiling-with-ASDF does creates an executable, but it the stack crashes when I try to run it. |
Using (#756) to document different implementations, some of the results are now in https://lem-project.github.io/lem-page/development/implementations-details/ |
OK, seems like the CCL display bug was because in the micros backend, the function-name implementation was returning a symbol instead of a string, to ensure that this also works with other implementations, I format the function name to a string 👍 |
At this point, CCL works as well as SBCL (except for lsp, but that's because of the sb-concurrency library usage, which I think it's a problem for other issue 👍 ) |
I think what is left in this issue is to test both ECL and Clasp, upload the results and create a few specific issues for implementation (here we can also use github labels), let me know what do you think. |
Yes, it might be a good idea to merge at a reasonable point for now, and separate the pull requests. |
Great! I'll ping you when the test are ready 👍 |
OK, so I have to tweak a little bit the script to make it work with Clasp, but I think this issue is ready to merge 👍 (ping @cxxxr ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very attractive change!
I am very thankful.
I just need a few more corrections 🙏
src/system.lisp
Outdated
@@ -5,7 +5,7 @@ | |||
(defun lem-relative-pathname (pathname) | |||
(when *deployed* | |||
(truename (merge-pathnames pathname | |||
(uiop:pathname-directory-pathname (first sb-ext:*posix-argv*)))))) | |||
(uiop:pathname-directory-pathname "/home"))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this environment-dependent?
#+sbcl | ||
(with-output-to-string (stream) | ||
(uiop:run-program "git rev-parse --short HEAD" | ||
:output stream))))))) | ||
:output stream)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the run-program portable?
src/common/timer.lisp
Outdated
(start-timer-thread timer ms repeat-p) | ||
timer) | ||
|
||
(defmethod stop-timer ((timer timer)) | ||
(stop-timer-thread timer)) | ||
|
||
(defun start-timer-thread (timer ms repeat-p) | ||
(let ((stop-mailbox (sb-concurrency:make-mailbox)) | ||
(let ((stop-mailbox (lem-mailbox::make-mailbox)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you export symbols for mailboxes?
Let me know if there's anything more to change 👍 (@cxxxr ) |
Thank you very much. |
So, this is the first try of making Lem compile/work with other implementations, I manage to make it compile the ncurses front-end with abcl,:
![abcl](https://private-user-images.githubusercontent.com/26670956/243243385-a6af6c85-04e9-4654-b45e-b93b9b67acf6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0Nzk5MzAsIm5iZiI6MTcyMDQ3OTYzMCwicGF0aCI6Ii8yNjY3MDk1Ni8yNDMyNDMzODUtYTZhZjZjODUtMDRlOS00NjU0LWI0NWUtYjkzYjliNjdhY2Y2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDIzMDAzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ2ZTBkMTZjNTU4ODU2NTYyZDg1NTJjZGMxM2FlYTFiZmQzN2Q3YzQ1NGU0YzFlMDIyYTkxMzc4OWM4NDk3ZjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.goOh2kK-NSvmm85fWFXgEK7ss6Gg-W0qMRNFLGWBUs4)
(It should of course also work with SBCL)
Compilation progress (make the :lem system compile)
Most tests green
Front-end ncurses progress (run the system)
"Usable state" (it can be used like sbcl)