[Cuis] [SOLVED] Re: Copy vs Clone

Juan Vuletich juan at jvuletich.org
Mon May 18 20:08:01 CDT 2015


Hi Ken,

On 5/17/2015 11:22 AM, Ken.Dickey wrote:
> On Sat, 16 May 2015 18:01:23 -0300
> Juan Vuletich<juan at jvuletich.org>  wrote:
>
>>> Closures and Objects are in a sense duals.  One can implement Scheme in Smalltalk or Smalltalk in Scheme. I did an implementation of R5RS Scheme in Squeak which passed the test suite.  So call me linguistically promiscuous.
>> Thanks. This made me read a bit about this duality. It was enlightening.
>>
>> Wow! is that Scheme available somewhere? Please port it to Cuis!
> Juan, you may be the only person in the world interested in this -- especially after I explain the details.
>
> I had intended to compile to bytecodes, but the Squeak compiler was in its perennial state of flux, so I did a translator.
>
> I wrote a very small kernel for Scheme runtime support in Smalltalk, wrote a file based translator from Scheme->SqueakSmalltalk in Scheme.  This included a full R5RS Scheme reader in Scheme.
>
> Using a Scheme system, I ran the Scheme translator code to translated the translator into Smalltalk.  The resulting translator, running in Smalltalk, then could translate itself.
>
> I used the translated translator to translate the R5RS test suite into Smalltalk.  The entire test suite passed except for two small edge cases.  Note that the passing tests included Call/CC.

I'm surprised you haven't published this before. It is seriously cool.

> If you are seriously interested in the above, it is a good time ad I am moving to a smaller house and giving or throwing away most of my old computing texts, papers, proceedings, computers, and back-up disks.  I will need to grovel through a pile of backups to find the code.

If I lived closer to your place, I'd offer to help sorting your old 
stuff in exchange for a couple of interesting things I'm sure I'd find :)

In any case, as usual, I think it would be good to rescue and publish 
valuable stuff you created. I wasn't interested in learning Scheme, but 
this is tempting. If you'd like to see your creation have a chance of 
going on, I'd help with the port.

> The Scheme->Smalltalk translator generated Squeak .st code files, which probably need some tweaks for Cuis, but I could probably get things working again with a small bit of work.
>
> Not being integrated into the tool chain makes the translator a bit of an academic exercise.  If someone were to look at Pharo's RIng model and newer compiler -- the compiler is always in a state of flux -- it might be a starting point for bytecode generaton and toolset integration.  But I fear that Scheme is another dying language these days.  Not sure there would be enough interest to be worthwhile.
>
> Anyway, let me know if I should hunt for the code.

If I were teaching a course on Programming Paradigms, I'd love to use 
this to show and compare OO and Functional in the same environment. But 
I'm not. So many interesting things, and so little time! It's up to you. 
If you do, I'll help with the port, and if ok with you, will host it at 
the Cuis repo.

Thanks,
Juan Vuletich





More information about the Cuis mailing list