The interface sleep.interfaces.Evaluation is deprectated in sleep 2.1

19 views
Skip to first unread message

Shashidhar Gaurav

unread,
Jan 5, 2013, 4:04:21 AM1/5/13
to sleep-de...@googlegroups.com
Hi,

The interface sleep.interfaces.Evaluation is deprecated in 2.1. We are currently using sleep 2.0 and trying to upgrade to sleep 2.1 however since this interface is not present we cannot do an upgrade to 2.1. Could some one clarify that why this interface was removed or it is there with some different name?

Thanks
Shashidhar

Raphael Mudge

unread,
Jan 5, 2013, 12:14:05 PM1/5/13
to sleep-de...@googlegroups.com
Hi Shashidhar,
I barely remember the Evaluation bridge, it was probably there to redefine the `backtick` expressions. I believe it may have been considered redundant and replaced with __EXEC__ mapped to a function in the global environment table. Notice __EXEC__ without an &. Here's an example of how it works:


I think this is a rough approximation of what you're looking for.

public MyEvalBridge implements Function, Loadable {
    public void scriptLoaded(ScriptInstance si) {
        /* install this bridge */
        si.getScriptEnvironment().getEnvironment().put("__EXEC__", this);
    }

    public Scalar evaluate(String name, ScriptInstance script, Stack args) {
          /* this gets executed whenever a `backtick expression` is evaluated */
          return SleepUtils.getEmptyScalar();
    }
}

-- Raphael


Shashidhar

--
-----
To post to this group, send email to sleep-de...@googlegroups.com
To unsubscribe from this group, send email to sleep-develope...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sleep-developers?hl=en
 
The Sleep Scripting Project: http://sleep.dashnine.org/

Shashidhar Gaurav

unread,
Jan 7, 2013, 12:31:24 AM1/7/13
to sleep-de...@googlegroups.com
Thanks alot Raphael, I will try that. 

Andrew Hurd

unread,
Mar 22, 2013, 11:37:08 AM3/22/13
to sleep-de...@googlegroups.com
Next week Sleep makes its debut at SUNY Albany.  

I am teaching the Programming Languages Class and I am going to introduce the language to the class.

Raphael,
   Do you have any presentations you've done in the past on the language?

Does anyone else have any presentations?

Best wishes,
Andy Hurd

Raphael Mudge

unread,
Mar 22, 2013, 3:31:26 PM3/22/13
to sleep-de...@googlegroups.com
Hi Andy,
This is pretty cool. The last time I gave a presentation on Sleep,
stand-alone, was 2007. Here is the slide deck:

http://sleep.dashnine.org/download/sleep_cdjdn_jun07.pdf

Several articles that I wrote are also at:

http://sleep.dashnine.org/documentation.html

Sleep lives though. DARPA funded several extensions to Sleep through
the Cortana effort under their Cyber Fast Track Program. Here is the
info on that:

http://blog.strategiccyber.com/2012/08/03/cortana-real-time-collaborative-hacking-with-bots/
http://blog.strategiccyber.com/2012/08/29/cortana-rise-of-the-automated-red-team-defcon-20-video/

It' part of my secret effort to sneak Sleep in to other people's lives. Teehee.

-- Raphael
> --
> --
> -----
> To post to this group, send email to sleep-de...@googlegroups.com
> To unsubscribe from this group, send email to
> sleep-develope...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sleep-developers?hl=en
>
> The Sleep Scripting Project: http://sleep.dashnine.org/
> ---
> You received this message because you are subscribed to the Google Groups
> "Sleep Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sleep-develope...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages