Re: questions about groovysh's doc

Xeno Amess <[email protected]> Sat, 19 Jul 2025 17:40:08 +0800
Newsgroups gmane.comp.lang.groovy.user
Message-ID <CAFF4x5JjJgUcZOcdAUKzm7Ata4bY-Q45mgE34gi_aDa+AMXVTA@mail.gmail.com>
--000000000000edbcfc063a450703
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

question 1 and 2 is cleared.
still, I'm uncertain about question 3
3. also another question, I binded several variables, and injected some
functions, how can I save the whole context, and load it for use when next
time(something like squeak if you know it)


Paul King <[email protected]> =E4=BA=8E2025=E5=B9=B47=E6=9C=8816=E6=97=A5=
=E5=91=A8=E4=B8=89 21:57=E5=86=99=E9=81=93=EF=BC=9A

>
>
> On Wed, Jul 16, 2025 at 6:07=E2=80=AFPM Xeno Amess <[email protected]> =
wrote:
>
>> I see
>> https://github.com/apache/groovy/blob/master/subprojects/groovy-groovysh=
/src/spec/doc/groovysh.adoc
>>
>> and still have several questions...
>>
>> 1. it said 'Features: No need for *go* command to execute buffer.'
>> what be the *go* here mean?
>> and what the *go* do with groovy/groovysh?
>> I just feel somehow confused.
>>
>
> That is a little outdated. In very old versions of groovysh, I believe yo=
u
> entered commands and then typed "go" to execute them.
>
>
>> 2. what is *the buffer* mean in this doc...
>> (and save/load)
>>
>
> The current version (but changing in 5.0.0-beta-2) of Groovysh has the
> idea of a buffer where part lines are added until a complete compilable
> snippet is obtained. Once the buffer (potentially empty) plus the last
> entered line together are compilable, the code is compiled and the buffer
> reset.
>
>
>> 3. also another question, I binded several variables, and injected some
>> functions, how can I save the whole context, and load it for use when ne=
xt
>> time(something like squeak if you know it)
>> I ask as it seems not the same save/load you provided as command...
>>
>
> You should check out the new version coming in 5.0.0-beta-2.
>
> Paul.
>
>

--000000000000edbcfc063a450703
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">question 1 and 2 is cleared.<div>still, I&#39;m uncertain =
about question 3=C2=A0</div><div><span style=3D"color:rgb(23,43,77);font-fa=
mily:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ub=
untu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot=
;,sans-serif;font-size:14px">3.=C2=A0</span><span style=3D"color:rgb(23,43,=
77);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Robot=
o,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetic=
a Neue&quot;,sans-serif;font-size:14px">also another question, I binded sev=
eral variables, and injected some functions, how can I save the whole conte=
xt, and load it for use when next time(something like squeak if you know it=
)</span></div><div><br></div></div><br><div class=3D"gmail_quote gmail_quot=
e_container"><div dir=3D"ltr" class=3D"gmail_attr">Paul King &lt;<a href=3D=
"mailto:[email protected]">[email protected]</a>&gt; =E4=BA=8E2025=E5=B9=
=B47=E6=9C=8816=E6=97=A5=E5=91=A8=E4=B8=89 21:57=E5=86=99=E9=81=93=EF=BC=9A=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr=
"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr=
" class=3D"gmail_attr">On Wed, Jul 16, 2025 at 6:07=E2=80=AFPM Xeno Amess &=
lt;<a href=3D"mailto:[email protected]" target=3D"_blank">xenoamess@gmail=
.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1=
ex"><div dir=3D"ltr">I see <a href=3D"https://github.com/apache/groovy/blob=
/master/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc" target=3D"_=
blank">https://github.com/apache/groovy/blob/master/subprojects/groovy-groo=
vysh/src/spec/doc/groovysh.adoc</a>=C2=A0<div>and still have several questi=
ons...</div><div><br></div><div>1.=C2=A0<span style=3D"color:rgb(23,43,77);=
font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Ox=
ygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Ne=
ue&quot;,sans-serif;font-size:14px">it said &#39;Features: No need for=C2=
=A0</span><b style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMa=
cSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;=
,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14p=
x">go</b><span style=3D"color:rgb(23,43,77);font-family:-apple-system,Blink=
MacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quo=
t;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:1=
4px">=C2=A0command to execute buffer.&#39;</span></div><span style=3D"color=
:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&=
quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&qu=
ot;Helvetica Neue&quot;,sans-serif;font-size:14px">what be the=C2=A0</span>=
<b style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFon=
t,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Dro=
id Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">go</b><=
span style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemF=
ont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;D=
roid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">=C2=
=A0here mean?</span><br style=3D"color:rgb(23,43,77);font-family:-apple-sys=
tem,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira=
 Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;fo=
nt-size:14px"><span style=3D"color:rgb(23,43,77);font-family:-apple-system,=
BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira San=
s&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-s=
ize:14px">and what the=C2=A0</span><b style=3D"color:rgb(23,43,77);font-fam=
ily:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubu=
ntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;=
,sans-serif;font-size:14px">go</b><span style=3D"color:rgb(23,43,77);font-f=
amily:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,U=
buntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quo=
t;,sans-serif;font-size:14px">=C2=A0do with groovy/groovysh?</span><br styl=
e=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,&quot=
;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans=
&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px"><span style=3D=
"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,&quot;Seg=
oe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quo=
t;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">I just feel someho=
w confused.</span></div></blockquote><div><br></div><div>That is a little o=
utdated. In very old versions of groovysh, I believe=C2=A0you entered comma=
nds and then typed &quot;go&quot; to execute them.</div><div>=C2=A0</div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-le=
ft:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><span=
 style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,=
&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid=
 Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">2.=C2=A0<=
/span><span style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMac=
SystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,=
&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px=
">what is=C2=A0</span><b style=3D"color:rgb(23,43,77);font-family:-apple-sy=
stem,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fir=
a Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;f=
ont-size:14px">the buffer</b><span style=3D"color:rgb(23,43,77);font-family=
:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu=
,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sa=
ns-serif;font-size:14px">=C2=A0mean in this doc...</span></div><span style=
=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,&quot;=
Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans&=
quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">(and save/load)=
</span></div></blockquote><div><br></div><div><font color=3D"#172b4d" face=
=3D"-apple-system, system-ui, Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, =
Droid Sans, Helvetica Neue, sans-serif">The current version (but changing i=
n 5.0.0-beta-2) of Groovysh has the idea of a buffer where part lines are a=
dded until a=C2=A0complete compilable snippet is obtained. Once the buffer =
(potentially empty) plus the last entered line together are compilable, the=
 code is compiled and the buffer reset.</font></div><div>=C2=A0</div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><span sty=
le=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,&quo=
t;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid San=
s&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">3.=C2=A0</spa=
n><span style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSyst=
emFont,&quot;Segoe UI&quot;,Roboto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quo=
t;Droid Sans&quot;,&quot;Helvetica Neue&quot;,sans-serif;font-size:14px">al=
so another question, I binded several variables, and injected some function=
s, how can I save the whole context, and load it for use when next time(som=
ething like squeak if you know it)</span></div><span style=3D"color:rgb(23,=
43,77);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Ro=
boto,Oxygen,Ubuntu,&quot;Fira Sans&quot;,&quot;Droid Sans&quot;,&quot;Helve=
tica Neue&quot;,sans-serif;font-size:14px">I ask as it seems not the same s=
ave/load you provided as command...</span></div></blockquote><div><br></div=
><div><font color=3D"#172b4d" face=3D"-apple-system, system-ui, Segoe UI, R=
oboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, Helvetica Neue, sans-serif">Y=
ou should check out the new version coming in 5.0.0-beta-2.</font></div><di=
v><br></div><div><font color=3D"#172b4d" face=3D"-apple-system, system-ui, =
Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, Helvetica Neue, sa=
ns-serif">Paul.</font></div><div>=C2=A0</div></div></div>
</blockquote></div>

--000000000000edbcfc063a450703--