eval(scala code) capability
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=20cf303640b390ecf704c80c1662
--20cf303640b390ecf704c80c1662
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
I looked through the google code page and didnt see anything about
security or sandboxing, which imho is one of the #1 priorities with
scripts.
Does it provide anything on top of the java security managers? E.g. It
would be nice to strictly limit access to a set of pre-defined
variables the script can work with, preventing a script from
side-effecting all over the place. Things that Jvm/process security
policies are too coarse grained for.
From: Nils Kilden-Pedersen
Sent: 8/24/2012 8:22 PM
To: Kostas kougios
Cc:
scala...@googlegroups.com
Subject: Re: [scala-user] ANNOUNCE: ScalaScriptEngine 1.1.0 released
with eval(scala code) capability
Doesn't look like it implements JSR-223. Any reason for that?
On Fri, Aug 24, 2012 at 7:04 PM, Kostas kougios wrote:
> Hi,
>
> I am happy to announce the 1.1.0 version of ScalaScriptEngine, the
> Scala library that allows dynamic evaluation of Scala code.
>
> 1.1.0 adds eval() capability to the library,i.e.
>
> // creates a factory for instantiating a function (Float, Double) => Double
> // as (i1:Float,i2:Double)=>i1+i2
> val ect = EvalCode[(Float, Double) => Double]("i1" :: "i2" :: Nil, "i1 +
> i2")
>
> // create a new instance of the function
> val x = ect.newInstance
>
> // and apply it
> x(12.5f, 2.5) should be === 15.0
>
>
> Regards,
>
> Kostas
>
>
--20cf303640b390ecf704c80c1662
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<html><head><meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Cont=
ent-Type"></head><body><div><div style=3D"font-family: Calibri,sans-serif; =
font-size: 11pt;">I looked through the google code page and didnt see anyth=
ing about security or sandboxing, which imho is one of the #1 priorities wi=
th scripts. <br><br>Does it provide anything on top of the java security ma=
nagers? E.g. It would be nice to strictly limit access to a set of pre-defi=
ned variables the script can work with, preventing a script from side-effec=
ting all over the place. Things that Jvm/process security policies are too =
coarse grained for.<br></div></div><hr><span style=3D"font-family: Tahoma,s=
ans-serif; font-size: 10pt; font-weight: bold;">From: </span><span style=3D=
"font-family: Tahoma,sans-serif; font-size: 10pt;">Nils Kilden-Pedersen</sp=
an><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font=
-weight: bold;">Sent: </span><span style=3D"font-family: Tahoma,sans-serif;=
font-size: 10pt;">8/24/2012 8:22 PM</span><br><span style=3D"font-family: =
Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">To: </span><span st=
yle=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">Kostas kougios</sp=
an><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; font=
-weight: bold;">Cc: </span><span style=3D"font-family: Tahoma,sans-serif; f=
ont-size: 10pt;">
scala...@googlegroups.com</span><br><span style=3D"font-=
family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">Subject: </=
span><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">Re: [=
scala-user] ANNOUNCE: ScalaScriptEngine 1.1.0 released with eval(scala code=
) capability</span><br><br></body></html>Doesn't look like it implement=
s=C2=A0JSR-223. Any reason for that?<br><br><div class=3D"gmail_quote">On F=
ri, Aug 24, 2012 at 7:04 PM, Kostas kougios=C2=A0wrote:<br><blockquote clas=
s=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pad=
ding-left:1ex">
Hi,<br><br>=C2=A0=C2=A0 I am happy to announce the 1.1.0 version of ScalaSc=
riptEngine, the Scala library that allows dynamic evaluation of Scala code.=
<br><br>1.1.0 adds eval() capability to the library,i.e.<br><br>// creates=
a factory for instantiating a function (Float, Double) =3D> Double<br>
// as (i1:Float,i2:Double)=3D>i1+i2<br>val ect =3D EvalCode[(Float, Doub=
le) =3D> Double]("i1" :: "i2" :: Nil, "i1 + i2&=
quot;)<br><br>// create a new instance of the function<br>val x =3D
ect.new=
Instance<br>
<br>// and apply it<br>x(12.5f, 2.5) should be =3D=3D=3D 15.0<br><br><br>Re=
gards,<br><br>Kostas<br><br></blockquote></div><br>
--20cf303640b390ecf704c80c1662--