[plt-scheme] macros and eval
Are you saying you want to write an interpreter for your VMLanguage
or do you want to have a set of macros that compile VMLanguge into
executables? These are two radically different tasks (though I assume
you know it).
I am conjecturing that the answer is:
PLT Scheme (mzscheme) is your interpreter
and VMLanguage is just an extension of Scheme.
So I'd recommend that you create a language in v4 (3.99.....) and
then people can write
#lang vmware-backup
... everything here is in your language ...
and then people just run mzscheme on this file (or your prefix
the file with shell incantations.) Since mzscheme has a jit
compiler, that should do fine.
-- Matthias
On Mar 14, 2008, at 6:15 AM, jomirez wrote:
> Hi, i'm trying to create my own mini-language for backup purposes.
>
> I defined a couple of functions for starting & stopping services,
> vmware-server instances, mountning and unmounting of windows shares
> etc.
>
> For even sleeker syntax, i created a couple of macros so i can write
> my backup-jobs like
>
> (job "vmware-backup"
> (with-stopped-vmware-image "c:\\images\\test\\test.vmx"
> (with-share "x:" "\\\\backserver\\vmware"
> (copy "c:\\images\\test" "x:\\"))))
>
> .......
>
> When i stick the code into the body of the "main" source file, all
> works fine But i want to compile it into executable (for
> deployability) and use that as an interpreter for the job files. I
> tried evaling/loading the file with job definitions from within the
> main code, and the macros won't get expanded (complaining "reference
> to undefined identifier: job")
>
> Do i have to execute the transformation process manualy, or is there
> even better solution ?
>
> thanks in advance,
>
> j.
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme