Scheme as a virtual machine?

namekuseijin namekuseijin at gmail.com
Thu Nov 25 11:11:19 EST 2010


On 25 nov, 09:23, Elena <egarr... at gmail.com> wrote:
> On Oct 13, 9:09 pm, namekuseijin <namekusei... at gmail.com> wrote:
>
>
>
>
>
> > On 11 out, 08:49, Oleg  Parashchenko <ole... at gmail.com> wrote:
>
> > > Hello,
>
> > > I'd like to try the idea that Scheme can be considered as a new
> > > portable assembler. We could code something in Scheme and then compile
> > > it to PHP or Python or Java or whatever.
>
> > > Any suggestions and pointers to existing and related work are welcome.
> > > Thanks!
>
> > > My current approach is to take an existing Scheme implementation and
> > > hijack into its backend. At this moment Scheme code is converted to
> > > some representation with a minimal set of bytecodes, and it should be
> > > quite easy to compile this representation to a target language. After
> > > some research, the main candidates are Gambit, Chicken and CPSCM:
>
> > >http://uucode.com/blog/2010/09/28/r5rs-scheme-as-a-virtual-machine-i/...
>
> > > If there is an interest in this work, I could publish progress
> > > reports.
>
> > > --
> > > Oleg Parashchenko  olpa at http://uucode.com/http://uucode.com/blog/ XML, TeX, Python, Mac, Chess
>
> > it may be assembler, too bad scheme libs are scattered around written
> > in far too many different flavors of assembler...
>
> > It warms my heart though to realize that Scheme's usual small size and
> > footprint has allowed for many quality implementations targetting many
> > different backends, be it x86 assembly, C, javascript or .NET.  Take
> > python and you have a slow c bytecode interpreter and a slow
> > bytecode .NET compiler.  Take haskell and its so friggin' huge and
> > complex that its got its very own scary monolithic gcc.  When you
> > think of it, Scheme is the one true high-level language with many
> > quality perfomant backends -- CL has a few scary compilers for native
> > code, but not one to java, .NET or javascript that I know of...
>
> Take R5RS Scheme and you get a language which doesn't allow you to get
> things done.
>
> Scheme is as far from Assembly as one language can be.  Assembly
> exists to get things done, R5RS Scheme does not even allows you load
> native libraries of the underlying operating-system, does it?  It's
> easy to stay small and clean when you don't have to dirty your hands
> with such crap as real-world applications development.- Ocultar texto das mensagens anteriores -

assembly in the sense that it's what other languages could compile
to.  Like many are targetting javascript, the de facto assembly of the
web...

In any case, the original poster was advocating the opposite:  to code
in Scheme and compile it to more common backends, such as PHP or
javascript... I misunderstood his point.  But the flamewars that
followed were far more entertaining anyway... :)



More information about the Python-list mailing list