[soc2008-general] schemepy suggestion for students...
Chiyuan Zhang
pluskid at gmail.com
Mon Mar 24 08:07:28 CET 2008
2008/3/24, Tim Ansell <mithro at mithis.com>:
> On Mon, 2008-03-24 at 14:29 +0800, Chiyuan Zhang wrote:
> > 2008/3/24, Tim Ansell <mithro at mithis.com>:
> > > Scheme does not have a "killer" library or anything a long those lines
> > > (that I know of). The core of the language is very portable however,
> > > there are implementations for almost every language (both native and
> > > bindings to popular C libraries), it is also fairly easy to write a full
> > > scheme implementation from scratch.
> > Hmm, I think so. In fact, I do love the clean syntax of scheme. As
> > you said, implement a scheme interpreter is fairly easy. I wrote one
> > last winter (http://code.google.com/p/kid-scheme/) . However, a highly
> > optimized production-ready VM and compiler is not easy.
>
>
> The idea with schemepy is that you can choose any compatible scheme
> library.
Ah, I see. This can be awesome.
>
> Use a simple pure python implementation for testing and small scale
> deployments and then switch to using much faster implementations like
> Guile or Chicken. All while having a compatible interface and requiring
> no code changes.
>
> It would be really cool if schemepy was even compatible with Jython and
> used a pure Java scheme implementation under that.
>
>
> > > This makes it ideal for a "cross platform" logic. Thousand Parsec uses
> > > scheme to communicate game logic as we need to support Python, PHP,
> > > Java, C and C++, etc.
> > >
> > > Scheme also has quite a few interesting properties that can be useful
> > > for many tasks. It excels at creating AI systems and doing other
> > > interesting tasks.
> > I used to think Parsec the Haskell parsing library. Then I finally find
> > that "Thousand Parsec" is the framework for turn based space empire
> > building games.
>
>
> He he :) Yes we are both a framework and a set of games. We got a really
Seems interesting. :) I'll look at the game later.
> cool ruleset out of GSoC last year and hopefully we will get some more
> cool rulesets out of GSoC this year.
>
>
> > However, as to AI and "cross platform", Lua is designed
> > for this. Maybe as well as schemepy, LuaPy can also be an interesting
> > project. :)
>
>
> Embedding Lua in python (when we choose to use scheme) was pretty hard
> (things like ctypes didn't even exist then!). It is also does not have
> pure python or java implementations.
Yes, pure python or java implementation may be hard. But I think Lua
VM is stack based where there's no type in C that can be used to
represent Lua Value. Everything in Lua World should be put in the
Lua stack. This make things easy and GC can be also more compact.
Then it should be easy to use Lua VM in many language. For example,
one might start Lua VM in Java through JNI, but this isn't pure
Java now. :p
>
>
> > > Lastly it's just a really fun thing to do :) Running scheme code in
> > > Python is pretty cool.
> > Yeah! :D
>
>
> Schemepy already has bindings for guile and some start of mzscheme. It
> also includes pyscheme an older pure python implementation of a scheme
> interpreter.
>
> I'm also slowly building up a test suite to check compliance, but I just
> don't have the time to work on it at the moment (as I've been
> concentrating on the client where scheme performance is not an issue).
I think I'd like to try to apply this project. So I need to check
schemepy for some more details at first. Maybe I should hurry, since
the committing date is approaching. :)
>
> Tim 'Mithro' Ansell
>
>
More information about the soc2008-general
mailing list