For Programmers: Free Programming Magazines  


Home > Archive > Scheme > October 2004 > ann: Pysch, Scheme runtime environment in Python









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ann: Pysch, Scheme runtime environment in Python
Oleg Paraschenko

2004-10-07, 4:00 pm

Hello,

I'd like to announce addition to the list of Scheme
interpreters written in the Python language.

Pysch:
http://pysch.sourceforge.net/

I wrote Pysch for my own research goals, but I think
that it may be useful for general public.

Pysch relies on Bigloo to preprocess a source code of
Scheme programs (expand macros) and to save the result
as XML. Pysch interprets only the refined XML.

Pysch supports only a subset of the Scheme functions
library. Anyway, the subset is big enough to run
SXPath and SXSLT code.

Regards, Oleg
David Rush

2004-10-08, 3:58 pm

olepar@gmail.com (Oleg Paraschenko) writes:
> Pysch:
> http://pysch.sourceforge.net/
>
> Pysch relies on Bigloo to preprocess a source code of
> Scheme programs (expand macros) and to save the result
> as XML. Pysch interprets only the refined XML.


This should get listed as the most bizarre implementation methodolgy
ever adopted. I think you have definitively showed the equivalence
between s-exprs and XML, if nothing else.

And for the tone-of-voice challenged, I do not intend to convey
sarcasm. Rather I am amazed that such an approach works well
enough to:

> Pysch supports only a subset of the Scheme functions
> library. Anyway, the subset is big enough to run
> SXPath and SXSLT code.


How fast?

david rush
--
With guns, we are citizens. Without them, we are subjects.
-- YZGuy, IPL
Jens Axel Søgaard

2004-10-08, 3:58 pm

David Rush wrote:
> olepar@gmail.com (Oleg Paraschenko) writes:


[color=darkred]
> This should get listed as the most bizarre implementation methodolgy
> ever adopted.=20


Is that a challenge?

--=20
Jens Axel S=F8gaard


Oleg Paraschenko

2004-10-09, 4:23 pm

Hello David,

David Rush <kumoyuki@gmail.com> wrote in message
news:<ck65nd$9vf$1@pixie.nscp.aoltw.net>...

> And for the tone-of-voice challenged, I do not intend to convey
> sarcasm. Rather I am amazed that such an approach works well
> enough to:


I'm interested in generative programming and virtual machines.
One of the my suggestions is that it is reasonable to use
a minimal lisp-like core system and scheme-like library as
an universal virtual machine. Indeed, Pysch was a test if this
approach works. Hm, maybe I should write an article now?

>
> How fast?


As slow as possible. Speed was sacrificed in order to produce
a correctly working prototype as soon as possible.

On my Linux computer (PII 450MHz, 512Mb RAM),
calculation of the Ackermann(3,4) gives:

$ time sh -c '(cat ack.xml | (cd ../pysch/pysch/vm; python eval.py))'
Ackermann(3,4) is 125
#unspecified
56.59user 0.26system 1:10.39elapsed 80%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (1020major+791minor)pagefaults 0swaps

--
Oleg
David Rush

2004-10-11, 4:00 pm

Jens Axel Søgaard <usenet@soegaard.net> writes:
> David Rush wrote:
>
>
>
> Is that a challenge?


As long as you're not using yaks and rope for processing and storage, yes.

And no bootstrapping from an existing Scheme implementation. My intent
is to rule out Oleg Kiselyov's syntactic lambdas, which arguably
deserves the second-place prize.

david rush
--
I mean really, why not?
Oleg Paraschenko

2004-10-28, 3:57 am

Hello,

olepar@gmail.com (Oleg Paraschenko) wrote in message
news:<1e015c2a.0410070804.6e84016d@posting.google.com>...
....
>
> I'd like to announce addition to the list of Scheme
> interpreters written in the Python language.
>
> Pysch:
> http://pysch.sourceforge.net/
>


New version is appeared recently. I improved environment lookup code
and big Scheme programs now run 3 times faster. But it is not very
important.

More interesting is representation of Python AST as XML (indeed, SXML)
and transformation of AST using XSLT (in fact, SXSLT). I think that
SXML and SXSLT users may find it interesting:

http://pysch.sourceforge.net/ast.html

--
Oleg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com