Graal and Truffle
Have you fellows checked out these projects? I imagine that the graal vm would make hosting common lisp a lot easier on the jvm.
I had looked at Graal and Truffle from the presentation given at the 2015 (?) JVM summit, but am not sure about the other developers (not like we are that coherent of a group at the moment). At the time, the work was an experimental add-on, not to be included in the mainline OpenJDK. As I understand it, that is still the current plan. So, while using Graal and Truffle may give some advantages, moving ABCL over to it would either require us to support two codebases, or to greatly restrict the JVM runtimes that our implementation runs upon.
Honestly, I think the challenges of getting ABCL to run on OpenJDK 9 will be large and pressing enough to suck most of such new development cycles away.
Are there any compelling features of Graal/Truffle that you would specifically like to take advantage of in ABCL?
Graal allows languages to cross communicate in ways that I have never seen before. Sulong is a project where llvm bit code runs on Graal, allowing any language to directly communicate with c/c++. I think this would make it a lot easier for common lisp to communicate with not only java but javascript, c, c++, ruby, etc. The use cases for such things would be enormous.
When Java 9 comes out it will be easy to include graal.
On Wed, Aug 2, 2017 at 8:01 AM, Mark Evenson [email protected] wrote:
I had looked at Graal and Truffle from the presentation given at the 2015 (?) JVM summit, but am not sure about the other developers (not like we are that coherent of a group at the moment). At the time, the work was an experimental add-on, not to be included in the mainline OpenJDK. As I understand it, that is still the current plan. So, while using Graal and Truffle may give some advantages, moving ABCL over to it would either require us to support two codebases, or to greatly restrict the JVM runtimes that our implementation runs upon.
Honestly, I think the challenges of getting ABCL to run on OpenJDK 9 will be large and pressing enough to suck most of such new development cycles away.
Are there any compelling features of Graal/Truffle that you would specifically like to take advantage of in ABCL?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-319651914, or mute the thread https://github.com/notifications/unsubscribe-auth/ADfnjDwwRgYTwaMwbyMFZcAR7w_ZycmEks5sUGUXgaJpZM4OqAP0 .
Have you checked out graal recently? I would like to know your thoughts on it as it is today since you said that the last time you looked into it was 2015. For example, I saw a fellows blog where he implemented tail call optimizations using graal; it just seems like graal could get common lisp a lot closer to what it is meant to be.
As I wrote above, I have not checked out Graal lately.
(Apologies in advance if I am hijacking this thread)
I have been thinking lately in bootstraping SBCL and create an IR interepreter in GraalVM using Truffle. I am pretty newbie in regard to SBCL or ABCL to hack it in a week but I'd love to at least create the initial scaffolding for others to contribute. That includes the IR to AST and a very very simple interpreter perhaps. If any developers out there would like to help, I'd appreciate.
There is also another route, and that would be using @robert-strandh excellent SICL and translate the HIR to higher level AST nodes in order to interpret them on Truffle.
Would I use ABCL to bootstrap SBCL in the JVM?
As I told before, I am not too familiar with SBCL internals, nor ABCL, to do this without some guidance or at least some time. I read though SBCL could be bootstrapped from many other lisps at their porting page.
So last optional question: has anyone tried to bootstrap SBCL from ABCL? I would like to know up to what stage you can get by without involving the GC, and the C runtime, and also if a custom platform would be enough to emit intermediate code; or if we shall bootstrap up to what stage, and hook into the IR repr.
At one point, ABCL could indeed be used to perform the SBCL bootstrap compilation (maybe abcl-1.3.x?), as it was one of the ways I tested. I kind of fell out the habit of doing that, so it should be doable with perhaps too much effort.
SICL would be a very interesting approach as well, especially as it has matured.
But I really don't understand how SBCL would help in creating an IR interpreter in the GraalVM, but mainly as I don't understand the whole Truffle architecture that well.
In any case, you might be interested in continuing this discussion on the ABCL mailing list where you would arguable get your questions out in front of more of the current ABCL community.
(Apologies in advance if I am hijacking this thread)
No, no, by all means, continue.
The whole point of this thread was to spark interest in a cl-truffle so that we could have a holy graal in the form of common lisp =)
On Tue, May 1, 2018 at 1:52 PM, Mark Evenson [email protected] wrote:
At one point, ABCL could indeed be used to perform the SBCL bootstrap compilation (maybe abcl-1.3.x?), as it was one of the ways I tested. I kind of fell out the habit of doing that, so it should be doable with perhaps too much effort.
SICL would be a very interesting approach as well, especially as it has matured.
But I really don't understand how SBCL would help in creating an IR interpreter in the GraalVM, but mainly as I don't understand the whole Truffle architecture that well.
In any case, you might be interested in continuing this discussion on the ABCL mailing list https://mailman.common-lisp.net/listinfo/armedbear-devel where you would arguable get your questions out in front of more of the current ABCL community.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-385739242, or mute the thread https://github.com/notifications/unsubscribe-auth/ADfnjMOf0r-S3o9vsPvrtSHs7jPs63Ufks5tuKDhgaJpZM4OqAP0 .
I'm interested as well. I had started to write some minimal Lisp (which in my dreams could have been used to bootstrap a full CL) in Truffle but didn't go very far due to lack of energy. I would love to see this go somewhere, and even if I still struggle with simpler projects, I might lend a hand.
On 1 May 2018 at 20:06, JacobGood1 [email protected] wrote:
(Apologies in advance if I am hijacking this thread)
No, no, by all means, continue.
The whole point of this thread was to spark interest in a cl-truffle so that we could have a holy graal in the form of common lisp =)
On Tue, May 1, 2018 at 1:52 PM, Mark Evenson [email protected] wrote:
At one point, ABCL could indeed be used to perform the SBCL bootstrap compilation (maybe abcl-1.3.x?), as it was one of the ways I tested. I kind of fell out the habit of doing that, so it should be doable with perhaps too much effort.
SICL would be a very interesting approach as well, especially as it has matured.
But I really don't understand how SBCL would help in creating an IR interpreter in the GraalVM, but mainly as I don't understand the whole Truffle architecture that well.
In any case, you might be interested in continuing this discussion on the ABCL mailing list https://mailman.common-lisp.net/listinfo/armedbear-devel where you would arguable get your questions out in front of more of the current ABCL community.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-385739242, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADfnjMOf0r- S3o9vsPvrtSHs7jPs63Ufks5tuKDhgaJpZM4OqAP0>
.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-385743189, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9dtoY4mgZowbhvNYA_qNWhsD12iKAGks5tuKQwgaJpZM4OqAP0 .
BTW, Robert Strandh(the creator of SICL) hangs out in the irc clasp channel a lot if you wish to get in touch with him easily.
On Tue, May 1, 2018 at 4:31 PM, Alessio Stalla [email protected] wrote:
I'm interested as well. I had started to write some minimal Lisp (which in my dreams could have been used to bootstrap a full CL) in Truffle but didn't go very far due to lack of energy. I would love to see this go somewhere, and even if I still struggle with simpler projects, I might lend a hand.
On 1 May 2018 at 20:06, JacobGood1 [email protected] wrote:
(Apologies in advance if I am hijacking this thread)
No, no, by all means, continue.
The whole point of this thread was to spark interest in a cl-truffle so that we could have a holy graal in the form of common lisp =)
On Tue, May 1, 2018 at 1:52 PM, Mark Evenson [email protected] wrote:
At one point, ABCL could indeed be used to perform the SBCL bootstrap compilation (maybe abcl-1.3.x?), as it was one of the ways I tested. I kind of fell out the habit of doing that, so it should be doable with perhaps too much effort.
SICL would be a very interesting approach as well, especially as it has matured.
But I really don't understand how SBCL would help in creating an IR interpreter in the GraalVM, but mainly as I don't understand the whole Truffle architecture that well.
In any case, you might be interested in continuing this discussion on the ABCL mailing list <https://mailman.common-lisp.net/listinfo/armedbear-devel
where you would arguable get your questions out in front of more of the current ABCL community.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-385739242, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADfnjMOf0r- S3o9vsPvrtSHs7jPs63Ufks5tuKDhgaJpZM4OqAP0>
.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-385743189, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA9dtoY4mgZowbhvNYA_ qNWhsD12iKAGks5tuKQwgaJpZM4OqAP0>
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-385780868, or mute the thread https://github.com/notifications/unsubscribe-auth/ADfnjMmYTQSpY1DKkxSSNgxxZqCyVjywks5tuMYPgaJpZM4OqAP0 .
Sorry I couldn't answer before but I wanted to dive deeper before posting.
I have thought the many scenarios (SBCL's IR to Graal IR, SBCL to LLVM IR (this part was some time ago tried) to Graal IR - Sulong, and finally, and chosen, SICL IR to Truffle interpreter).
To this avail I'm starting a CL project using ABCL to bootstrap SICL and creating, as well in CL, a Truffle interpreter. I wish I'd promise a great outcome but I am pretty sure it will be a bit crappy - I am not a long time lisper but I know my way around the JVM.
The first step towards this end is writing an ABCL environment. SICL's SBCL environment uses sb-cltl2, I have seen ABCL's equivalent is lisp:.
I didn't yet hook up ABCL's sources into an editor. That is to say I am starting with baby steps and all help is really appreciated. Once I have a sensible approach I will post here the repository url so everyone interested can hopefully take a look to help improve it and extend it.
Thanks :)
Sounds good!
On Wed, May 2, 2018 at 2:23 PM, Guillermo C [email protected] wrote:
Sorry I couldn't answer before but I wanted to dive deeper before posting.
I have thought the many scenarios (SBCL's IR to Graal IR, SBCL to LLVM IR (this part was some time ago tried) to Graal IR - Sulong, and finally, and chosen, SICL IR to Truffle interpreter).
To this avail I'm starting a CL project using ABCL to bootstrap SICL and creating, as well in CL, a Truffle interpreter. I wish I'd promise a great outcome but I am pretty sure it will be a bit crappy - I am not a long time lisper but I know my way around the JVM.
The first step towards this end is writing an ABCL environment. SICL's SBCL environment uses sb-cltl2, I have seen ABCL's equivalent is lisp:.
I didn't yet hook up ABCL's sources into an editor. That is to say I am starting with baby steps and all help is really appreciated. Once I have a sensible approach I will post here the repository url so everyone interested can hopefully take a look to help improve it and extend it.
Thanks :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62#issuecomment-386074101, or mute the thread https://github.com/notifications/unsubscribe-auth/ADfnjMW3_rdBS9YUcAxkHnWRhsMiHSMAks5tufmsgaJpZM4OqAP0 .
-
Truffle/GraalandRPythonare self-optimising interpreter generators. - Both can produce standalone JITing VMs from simple AST interpreters.
-
Graal.jsis an optimized JS VM developed using T/G, andPyPyis an optimized Python VM developed using RPython. - Implementing a fast VM takes lesser effort in
RPythonthanTruffle/Graal, and both converge towards similar performance characteristics. [1] - A benefit of
Truffle/Graalis the possibility of interacting with other languages running onGraal, though this comes at a cost.
The ecosystem for graal will be/is greater than that of pypy. As far as performance goes, the garbage collectors for java are top notch and getting even better.
On Mon, Jun 3, 2019 at 6:30 AM Divyansh Prakash [email protected] wrote:
- Truffle/Graal and RPython are self-optimising interpreter generators.
- Both can produce standalone JITing VMs from simple AST interpreters.
- Graal.js provides an optimized JS VM, and PyPy provides an optimized Python VM.
- Implementing a fast VM takes lesser effort in RPython than Truffle/ Graal, and both converge towards similar performance characteristics. [ 1 https://www.slideshare.net/gron/tracing-versus-partial-evaluation-which-metacompilation-approach-is-better-for-selfoptimizing-interpreters ]
- A benefit of Truffle/Graal is the possibility of interaction with other languages running on Graal, though this comes at a cost.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/armedbear/abcl/issues/62?email_source=notifications&email_token=AA36PDHTOLBYGG6NPYKRO6DPYTXDDA5CNFSM4DVIAP2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWY7S6I#issuecomment-498203001, or mute the thread https://github.com/notifications/unsubscribe-auth/AA36PDALTLUOPQHYHQQQWVTPYTXDDANCNFSM4DVIAP2A .