Re: Guile VM interpreter in GraalVM Truffle framework
Le 23/12/2022 à 18:06, Arvydas Silanskas a écrit : Good day, I have aspirations to run scheme on graalvm's truffle framework. And on superficial research, it seems implementing a Guile VM bytecode interpreter could be easiest path. I just want to inquire, if someone already had similar ideas and in secrecy is working or planning to on this? If you're familiar with truffle (I'm not), any insights on "guile on graal" would also be welcome. I don't know anything about Truffle, but call/cc and delimited continuations strike me as feature that could be hard to implement on such a thing. At least, it seems so from https://www.graalvm.org/latest/reference-manual/ruby/Compatibility/ On the other hand, upwards-only continuations, aka escape continuations, which are just a different way to do exceptions, should be doable, so you could probably ship a version of call/cc where the "cont" value in (call/cc (lambda (cont) ...)) can only be used inside of the lambda. Same for prompts. Best, Jean OpenPGP_signature Description: OpenPGP digital signature
Re: Guile VM interpreter in GraalVM Truffle framework
On Fri, Dec 23, 2022 at 09:51:11PM +0100, Maxime Devos wrote: > On 23-12-2022 18:06, Arvydas Silanskas wrote: > > Good day, > > > > I have aspirations to run scheme on graalvm's truffle framework. And on > > superficial research, it seems implementing a Guile VM bytecode > > interpreter could be easiest path. I just want to inquire, if someone > > already had similar ideas and in secrecy is working or planning to on > > this? If you're familiar with truffle (I'm not), any insights on "guile > > on graal" would also be welcome. > > > > Best regards > > > > Arvydas > > Scheme has a notion of ephemerons and weak hash tables. Perhaps relevant in this context: https://wingolog.org/archives/2022/11/28/are-ephemerons-primitive (disclaimer: my vision tends to blur on those things :-) Cheers -- t signature.asc Description: PGP signature
Re: Guile VM interpreter in GraalVM Truffle framework
On 23-12-2022 21:51, Maxime Devos wrote: [... problems ...] ... you could of course choose to simply _not_ support ephemerons. 'Guile (minus the ephemerons) on top of GraalVM' still sounds interesting even if missing a tiny bit of functionality. Greetings, Maxime. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Re: Guile VM interpreter in GraalVM Truffle framework
On 23-12-2022 18:06, Arvydas Silanskas wrote: Good day, I have aspirations to run scheme on graalvm's truffle framework. And on superficial research, it seems implementing a Guile VM bytecode interpreter could be easiest path. I just want to inquire, if someone already had similar ideas and in secrecy is working or planning to on this? If you're familiar with truffle (I'm not), any insights on "guile on graal" would also be welcome. Best regards Arvydas Scheme has a notion of ephemerons and weak hash tables. Java (last time I checked, which is quite some time ago) does not have a notion of ephemerons. While it does have a notion of 'weak hash tables', it is a different notion -- in the Scheme variant(*), the value is neither a strong nor a weak reference, in the sense that if the key is alive then the value is alive, but even if the value keeps a reference to the key then the ephemeron (/ hash table entry) this does not imply the key is alive when the ephemeron is alive (unlike if the key is weak and the value is strong). As (IIUC) GraalVM is a Java thing (and hence, no ephemerons), consequently you can't implement (bug-free and without missing features) Guile on top of GraalVM. (*) Actually, Guile implements Java's kind of hash tables and doesn't implement ephemerons, but that's a bug to be fixed with the new GC of Guile that is being developed. At least, maybe the old hash tables are kept, but IIUC we'll get access to the new kind of hash tables too. Greetings, Maxime. OpenPGP_0x49E3EE22191725EE.asc Description: OpenPGP public key OpenPGP_signature Description: OpenPGP digital signature
Guile VM interpreter in GraalVM Truffle framework
Good day, I have aspirations to run scheme on graalvm's truffle framework. And on superficial research, it seems implementing a Guile VM bytecode interpreter could be easiest path. I just want to inquire, if someone already had similar ideas and in secrecy is working or planning to on this? If you're familiar with truffle (I'm not), any insights on "guile on graal" would also be welcome. Best regards Arvydas