Hi all,
I managed to get Nils M. Holm's PS/Tk running on Gambit.
I had to account for a subtle R5RS incompatibility in Gambit, which is that colon-terminated identifiers are keywords -- a set disjoint from the set of symbols. PS/Tk uses such identifiers to indicate options passed to wish for the creation of widgets.
That said, it's an interesting hack, and it works well once this discrepancy has been addressed. Now we can enjoy a quick and easy way to get a GUI for our Gambit applications!
The complete source file is at:
http://ii-0-ii.com/parodycheck/software/tk-gambit.scm
--Jeff
Afficher les réponses par date
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2-Dec-06, at 6:57 PM, Jeff Read wrote:
Hi all,
I managed to get Nils M. Holm's PS/Tk running on Gambit.
I had to account for a subtle R5RS incompatibility in Gambit, which is that colon-terminated identifiers are keywords -- a set disjoint from the set of symbols. PS/Tk uses such identifiers to indicate options passed to wish for the creation of widgets.
That said, it's an interesting hack, and it works well once this discrepancy has been addressed. Now we can enjoy a quick and easy way to get a GUI for our Gambit applications!
The complete source file is at:
Thanks for your contribution. You might not have noticed, but there is also an interface to Tcl/Tk in the Gambit examples (examples/ tcltk), which uses the C interface FFI. On the other hand your version uses a wish subprocess and this has the advantage that it is more portable. Have you considered using cond-expand to make your code usable directly in all the implementations of Scheme mentioned in the source code? If someday there is a central repository for portable Scheme packages, and that may happen soon, that version would be a very interesting contribution.
Marc
On 12/3/06, Marc Feeley feeley@iro.umontreal.ca wrote:
Thanks for your contribution. You might not have noticed, but there is also an interface to Tcl/Tk in the Gambit examples (examples/ tcltk), which uses the C interface FFI. On the other hand your version uses a wish subprocess and this has the advantage that it is more portable. Have you considered using cond-expand to make your code usable directly in all the implementations of Scheme mentioned in the source code? If someday there is a central repository for portable Scheme packages, and that may happen soon, that version would be a very interesting contribution.
My changes have been rolled into Nils's official PS/Tk distribution at this URL:
Please use that version, and not the version I linked to before, from now on.
I will pass your cond-expand suggestion, along with some hacks, on to Nils.
--Jeff
On 12/3/06, Jeff Read bitwize@gmail.com wrote:
I will pass your cond-expand suggestion, along with some hacks, on to Nils.
...On second thought, cond-expand is not supported by Scheme48, which is also now an implementation supported by PS/Tk.
--Jeff