Iterating calculator

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Iterating calculator

Gheorghe Postelnicu
Hi,

I would like to create a calculator in the spirit of those presented
in the examples I have come seen. However, I would like that
calculator to be applied iteratively on images (this would perform
image arithmetics like Photoshop does it)

I am completely new to Spirit, so any help would be great!

Thanks,
--
Gheorghe Postelnicu, PhD
MGH, Harvard Medical School


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Iterating calculator

Carl Barron

On Feb 28, 2006, at 11:44 AM, Gheorghe Postelnicu wrote:

> Hi,
>
> I would like to create a calculator in the spirit of those presented
> in the examples I have come seen. However, I would like that
> calculator to be applied iteratively on images (this would perform
> image arithmetics like Photoshop does it)
>
> I am completely new to Spirit, so any help would be great!
>
> Thanks,
>
  You need to create a virtual machine for your scripting language,
you need to execute the code for your virtual machine created by a
a parse of your input language, and execute that code created by
the parser, for each element of your image.

see dscript and yac in the spirit repository for examples of parsers
creating code for a virtual machine and
executing it. Perhaps dscript  code can be used if the result of the
parse is saved and executed
for each element of your image.   Also spirit provides tree generation
and if you walk the tree
you create over the elements of your image.


 
 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: Iterating calculator

Albert Wessel
>
> On Feb 28, 2006, at 11:44 AM, Gheorghe Postelnicu wrote:
>
>> Hi,
>>
>> I would like to create a calculator in the spirit of those presented
>> in the examples I have come seen. However, I would like that
>> calculator to be applied iteratively on images (this would perform
>> image arithmetics like Photoshop does it)
>>
>> I am completely new to Spirit, so any help would be great!
>>
>> Thanks,
>>
>   You need to create a virtual machine for your scripting language,
> you need to execute the code for your virtual machine created by a
> a parse of your input language, and execute that code created by
> the parser, for each element of your image.
>
> see dscript and yac in the spirit repository for examples of parsers
> creating code for a virtual machine and
> executing it. Perhaps dscript  code can be used if the result of the
> parse is saved and executed
> for each element of your image.   Also spirit provides tree generation
> and if you walk the tree
> you create over the elements of your image.


I do not recommend using spirit for generating the tree as it's mega-slow
due to issues with the tree generation implementation (at least the
ast-tree generation is not usable) Maybe this is fixed in spirit-2.....

Just a warning up-front.

Albert Wessel





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general