Re: questions about groovysh's doc
Paul King <[email protected]> Wed, 16 Jul 2025 23:56:53 +1000
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <CAMbkE7Snvwh=X9p3RN6Dak9WDWp_tswUOyT=ok4ToQrVdVfU1Q@mail.gmail.com> |
--000000000000a7602f063a0c44fe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 16, 2025 at 6:07=E2=80=AFPM Xeno Amess <[email protected]> wr= ote: > 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 you 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 nex= t > 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. --000000000000a7602f063a0c44fe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 16,= 2025 at 6:07=E2=80=AFPM Xeno Amess <<a href=3D"mailto:[email protected]= om">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_= quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,= 204);padding-left:1ex"><div dir=3D"ltr">I see <a href=3D"https://github.com= /apache/groovy/blob/master/subprojects/groovy-groovysh/src/spec/doc/groovys= h.adoc" target=3D"_blank">https://github.com/apache/groovy/blob/master/subp= rojects/groovy-groovysh/src/spec/doc/groovysh.adoc</a>=C2=A0<div>and still = have several questions...</div><div><br></div><div>1.=C2=A0<span style=3D"c= olor:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe= UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans"= ,"Helvetica Neue",sans-serif;font-size:14px">it said 'Feature= s: No need for=C2=A0</span><b style=3D"color:rgb(23,43,77);font-family:-app= le-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,&quo= t;Fira Sans","Droid Sans","Helvetica Neue",sans-se= rif;font-size:14px">go</b><span style=3D"color:rgb(23,43,77);font-family:-a= pple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,&q= uot;Fira Sans","Droid Sans","Helvetica Neue",sans-= serif;font-size:14px">=C2=A0command to execute buffer.'</span></div><sp= an style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFon= t,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Dro= id Sans","Helvetica Neue",sans-serif;font-size:14px">what be= the=C2=A0</span><b style=3D"color:rgb(23,43,77);font-family:-apple-system,= BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira San= s","Droid Sans","Helvetica Neue",sans-serif;font-s= ize:14px">go</b><span style=3D"color:rgb(23,43,77);font-family:-apple-syste= m,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira S= ans","Droid Sans","Helvetica Neue",sans-serif;font= -size:14px">=C2=A0here mean?</span><br style=3D"color:rgb(23,43,77);font-fa= mily:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ub= untu,"Fira Sans","Droid Sans","Helvetica Neue"= ;,sans-serif;font-size:14px"><span style=3D"color:rgb(23,43,77);font-family= :-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu= ,"Fira Sans","Droid Sans","Helvetica Neue",sa= ns-serif;font-size:14px">and what the=C2=A0</span><b style=3D"color:rgb(23,= 43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Ro= boto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helve= tica Neue",sans-serif;font-size:14px">go</b><span style=3D"color:rgb(2= 3,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",= Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Hel= vetica Neue",sans-serif;font-size:14px">=C2=A0do with groovy/groovysh?= </span><br style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacS= ystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans",&= quot;Droid Sans","Helvetica Neue",sans-serif;font-size:14px"= ><span style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSyste= mFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","= ;Droid Sans","Helvetica Neue",sans-serif;font-size:14px">I j= ust feel somehow confused.</span></div></blockquote><div><br></div><div>Tha= t is a little outdated. In very old versions of groovysh, I believe=C2=A0yo= u entered commands and then typed "go" to execute them.</div><div= >=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left: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,Blin= kMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans&qu= ot;,"Droid Sans","Helvetica Neue",sans-serif;font-size:= 14px">2.=C2=A0</span><span style=3D"color:rgb(23,43,77);font-family:-apple-= system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"F= ira Sans","Droid Sans","Helvetica Neue",sans-serif= ;font-size:14px">what is=C2=A0</span><b style=3D"color:rgb(23,43,77);font-f= amily:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,U= buntu,"Fira Sans","Droid Sans","Helvetica Neue&quo= t;,sans-serif;font-size:14px">the buffer</b><span style=3D"color:rgb(23,43,= 77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Robot= o,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetic= a Neue",sans-serif;font-size:14px">=C2=A0mean in this doc...</span></d= iv><span style=3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSys= temFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans",&qu= ot;Droid Sans","Helvetica Neue",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 (b= ut changing in 5.0.0-beta-2) of Groovysh has the idea of a buffer where par= t lines are added until a=C2=A0complete compilable snippet is obtained. Onc= e the buffer (potentially empty) plus the last entered line together are co= mpilable, the code is compiled and the buffer reset.</font></div><div>=C2= =A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e= x;border-left: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,BlinkMac= SystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans",= "Droid Sans","Helvetica Neue",sans-serif;font-size:14px= ">3.=C2=A0</span><span style=3D"color:rgb(23,43,77);font-family:-apple-syst= em,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira = Sans","Droid Sans","Helvetica Neue",sans-serif;fon= t-size:14px">also another question, I binded several variables, and injecte= d some functions, how can I save the whole context, and load it for use whe= n next time(something like squeak if you know it)</span></div><span style= =3D"color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"= Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans&= quot;,"Helvetica Neue",sans-serif;font-size:14px">I ask as it see= ms not the same save/load you provided as command...</span></div></blockquo= te><div><br></div><div><font color=3D"#172b4d" face=3D"-apple-system, syste= m-ui, Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, Helvetica Ne= ue, sans-serif">You should check out the new version coming in 5.0.0-beta-2= .</font></div><div><br></div><div><font color=3D"#172b4d" face=3D"-apple-sy= stem, system-ui, Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, H= elvetica Neue, sans-serif">Paul.</font></div><div>=C2=A0</div></div></div> --000000000000a7602f063a0c44fe--