Groovy WebStart?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovy WebStart?

tugwilson
Earlier this week I was investigating some Java Wiki implementations  
and was most impressed by the SnipSnap site which allowed me to try  
out SnipSmap as a WebStart app.

I wonder if it would be an idea to offer the same thing to Groovy  
users from the CodeHaus site?

Does anybody have experience with building WebStart packages and, if  
so, would you be prepared to help with this?


John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

RE: Groovy WebStart?

Dierk König
At Canoo we package the UIEngine of www.canoo.com/ulc via JWS (see
the demo pages). That's pretty easy.

Question is: what application shell be deployed:
- the currently still broken groovyConsole
- groovysh
?

Mittie

> -----Original Message-----
> From: John Wilson [mailto:[hidden email]]
> Sent: Freitag, 10. Marz 2006 17:26
> To: [hidden email]
> Subject: [groovy-dev] Groovy WebStart?
>
>
> Earlier this week I was investigating some Java Wiki implementations  
> and was most impressed by the SnipSnap site which allowed me to try  
> out SnipSmap as a WebStart app.
>
> I wonder if it would be an idea to offer the same thing to Groovy  
> users from the CodeHaus site?
>
> Does anybody have experience with building WebStart packages and, if  
> so, would you be prepared to help with this?
>
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
>
Reply | Threaded
Open this post in threaded view
|

Re: Groovy WebStart?

tugwilson

On 10 Mar 2006, at 16:39, Dierk Koenig wrote:

> Question is: what application shell be deployed:
> - the currently still broken groovyConsole
> - groovysh
> ?


There was talk of a lightweight Console/IDE being contributed. If  
that happens we could use that.



John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Problem with collection loops (closures?)

Edson Tirelli

    Dear Sirs,

    I recently migrated from jsr04 to jsr05 and was having a very
anoying problem. Today I was able to isolate it and I report it bellow.
    Look at the following groovy script:

def list1 = ["A", "B"]
def list2 = ["1"]
def list3 = ["X"]
def list4 = ["9"]

list1.each() { item1 ->
  println "level 1: "+item1
  list2.each() { item2 ->
    println "level 2: "+item1+" / "+item2
    list3.each() { item3 ->
      println "level 3: "+item1+" / "+item2+" / " + item3
      list4.each() { item4 ->
        println "level 4: "+item1+" / "+item2+" / " + item3+" / "+item4
      }
    }
  }
}

   This script will work fine in JSR04 printing each item correctly no
matter how inner is the print statement.
   Although, in JSR05, the one I migrated to, seems that each inner loop
is only able to resolve references to its own variables and the ones
from its direct outer loop. So, when the above script is run against
JSR05, the result is the following:

level 1: A
level 2: A / 1
level 3: groovy.lang.Reference@1d1cdf7 / 1 / X
level 4: groovy.lang.Reference@8730b8 / groovy.lang.Reference@18fb397 /
X / 9
level 1: B
level 2: B / 1
level 3: groovy.lang.Reference@157b39f / 1 / X
level 4: groovy.lang.Reference@d1918a / groovy.lang.Reference@aa10fc / X / 9

   As you can see, level 1 and 2 works correctly, but on level 3 it
apparently creates a new indirect reference or something to the "item1"
reference, on level 4 it also creates another of this references to
"item2" reference and so on. I would say it may be a problem in
resolving indirect references, but I don't know groovy internals.

   As a workaround, what I did to get my system working was to define a
set of top level variables and inside each loop, I assign the local
variable to the top level one and use only top level, but this, of
course, complicates the whole algorithm.

def list1 = ["A", "B"]
def list2 = ["1"]
def list3 = ["X"]
def list4 = ["9"]

def gitem1 = null
def gitem2 = null
def gitem3 = null
def gitem4 = null

list1.each() { item1 ->
  gitem1 = item1
  println "level 1: "+gitem1
  list2.each() { item2 ->
    gitem2 = item2
    println "level 2: "+gitem1+" / "+gitem2
    list3.each() { item3 ->
      gitem3 = item3
      println "level 3: "+gitem1+" / "+gitem2+" / " + gitem3
      list4.each() { item4 ->
        gitem4 = item4
        println "level 4: "+gitem1+" / "+gitem2+" / " + gitem3+" / "+gitem4
      }
    }
  }
}

   And now, it works fine:

level 1: A
level 2: A / 1
level 3: A / 1 / X
level 4: A / 1 / X / 9
level 1: B
level 2: B / 1
level 3: B / 1 / X
level 4: B / 1 / X / 9

   I dont know if there is a jira for this already (I couldn't find
one), but in case you want me, I can open it.

   Regards,
     Edson

 
  ---
  Edson Tirelli
  Auster Solutions do Brasil
  @ www.auster.com.br
  +55 11 5096-2277 / +55 11 9218-4151


Reply | Threaded
Open this post in threaded view
|

Re: Problem with collection loops (closures?)

tugwilson

On 10 Mar 2006, at 19:04, Edson Tirelli wrote:

>
>    Dear Sirs,
>
>    I recently migrated from jsr04 to jsr05 and was having a very  
> anoying problem. Today I was able to isolate it and I report it  
> bellow.
>    Look at the following groovy script:


Please open a JIRA issue, Edson.

Thanks for producing such a good demonstration of the problem - it  
helps tremendously.



John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Re: Problem with collection loops (closures?)

Edson Tirelli
   John,

   I opened GROOVY-1268.

   Thanks for your support.

   Regards,
        Edson
 

John Wilson wrote:

>
> On 10 Mar 2006, at 19:04, Edson Tirelli wrote:
>
>>
>>    Dear Sirs,
>>
>>    I recently migrated from jsr04 to jsr05 and was having a very  
>> anoying problem. Today I was able to isolate it and I report it  bellow.
>>    Look at the following groovy script:
>
>
>
> Please open a JIRA issue, Edson.
>
> Thanks for producing such a good demonstration of the problem - it  
> helps tremendously.
>
>
>
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk
>
>
>
>


--
  ---
  Edson Tirelli
  Auster Solutions do Brasil
  @ www.auster.com.br
  +55 11 5096-2277 / +55 11 9218-4151


Reply | Threaded
Open this post in threaded view
|

Re: Problem with collection loops (closures?)

Jochen Theodorou
In reply to this post by Edson Tirelli
Edson Tirelli wrote:
>
>    Dear Sirs,
>
>    I recently migrated from jsr04 to jsr05 and was having a very anoying
> problem. Today I was able to isolate it and I report it bellow.
[...]
> level 3: groovy.lang.Reference@1d1cdf7 / 1 / X

it is always a bug when groovy.lang.Reference is visible. I remember I
fixed a bug with this, that was not covered by the tests and so it got
through. So you could try a CVS HEAD build (you need maven 1.0.2 for
this and do "maven rebuild" in the checkout directory for groovy-core)

[...]
> I would say it may be a problem in
> resolving indirect references, but I don't know groovy internals.

the references are there. In fact you see the references. The bug is,
that you see them, normally they should not be visible as every access
is unpacked. Unfortunatly there was a bug in the class generation when
marking such a variable as reference. It resulted in creating the
refrence, but as the sublayers didn't know it is such a reference, the
reference is directly used instead of the object stored inside.... ok,
longish explanation ;) Anyway, please fill a JIRA issue for this. even
if this is fixed in HEAD we still need to add a test to avoid this
happening again.

bye blackdrag
Reply | Threaded
Open this post in threaded view
|

RE: Groovy WebStart?

LARSON, BRIAN (SBCSI)-2
In reply to this post by tugwilson
That would be nice to let people quickly play with it.  We use JWS to
deploy our application which lets users do Groovy scripting.  We embed
jEdit's JEditTextArea for the base code editor and created a simple
TokenMarker for Groovy.  You could also use
http://groovy.codehaus.org/JEdit+Plugin.

Was the talk of a lightweight Console/IDE considering jEdit?  It would
be great to do some simple things like code completion in jEdit.  This
would be attractive to applications like ours that embed Groovy.  Who is
considering working on that?

One issue (or limitation) with JWS is that the application would have to
be signed to have "all-permissions" for doing things like file i/o, etc
(or restricted from doing those things).

On the Codehaus side, the http server would need to register the jnlp
mime type.

-----Original Message-----
From: John Wilson [mailto:[hidden email]]
Sent: Friday, March 10, 2006 10:45 AM
To: [hidden email]
Subject: Re: [groovy-dev] Groovy WebStart?



On 10 Mar 2006, at 16:39, Dierk Koenig wrote:

> Question is: what application shell be deployed:
> - the currently still broken groovyConsole
> - groovysh
> ?


There was talk of a lightweight Console/IDE being contributed. If  
that happens we could use that.



John Wilson
The Wilson Partnership
http://www.wilson.co.uk