unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Guile VM interpreter in GraalVM Truffle framework
@ 2022-12-23 17:06 Arvydas Silanskas
  2022-12-23 20:51 ` Maxime Devos
  2022-12-24 13:10 ` Jean Abou Samra
  0 siblings, 2 replies; 5+ messages in thread
From: Arvydas Silanskas @ 2022-12-23 17:06 UTC (permalink / raw)
  To: guile-devel

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile VM interpreter in GraalVM Truffle framework
  2022-12-23 17:06 Guile VM interpreter in GraalVM Truffle framework Arvydas Silanskas
@ 2022-12-23 20:51 ` Maxime Devos
  2022-12-24  0:42   ` Maxime Devos
  2022-12-24  5:48   ` tomas
  2022-12-24 13:10 ` Jean Abou Samra
  1 sibling, 2 replies; 5+ messages in thread
From: Maxime Devos @ 2022-12-23 20:51 UTC (permalink / raw)
  To: Arvydas Silanskas, guile-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1581 bytes --]

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.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile VM interpreter in GraalVM Truffle framework
  2022-12-23 20:51 ` Maxime Devos
@ 2022-12-24  0:42   ` Maxime Devos
  2022-12-24  5:48   ` tomas
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2022-12-24  0:42 UTC (permalink / raw)
  To: Arvydas Silanskas, guile-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 284 bytes --]



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.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile VM interpreter in GraalVM Truffle framework
  2022-12-23 20:51 ` Maxime Devos
  2022-12-24  0:42   ` Maxime Devos
@ 2022-12-24  5:48   ` tomas
  1 sibling, 0 replies; 5+ messages in thread
From: tomas @ 2022-12-24  5:48 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile VM interpreter in GraalVM Truffle framework
  2022-12-23 17:06 Guile VM interpreter in GraalVM Truffle framework Arvydas Silanskas
  2022-12-23 20:51 ` Maxime Devos
@ 2022-12-24 13:10 ` Jean Abou Samra
  1 sibling, 0 replies; 5+ messages in thread
From: Jean Abou Samra @ 2022-12-24 13:10 UTC (permalink / raw)
  To: Arvydas Silanskas, guile-devel; +Cc: Maxime Devos, tomas


[-- Attachment #1.1: Type: text/plain, Size: 1059 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-24 13:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23 17:06 Guile VM interpreter in GraalVM Truffle framework Arvydas Silanskas
2022-12-23 20:51 ` Maxime Devos
2022-12-24  0:42   ` Maxime Devos
2022-12-24  5:48   ` tomas
2022-12-24 13:10 ` Jean Abou Samra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).