The code is actually stored in a GitHub Gist, rather than in the playground
itself, which makes it completely stateless.

Of course, since this is a web service (i.e. not your computer ! :) ),
there are
a few limitations :

- Your code cannot run for more than 2 seconds, or it will get SIGKILL'd
- It cannot use more than 16 megabytes of RAM (it segfaults if you use too
much)
- You cannot make any network access whatsoever (there are no network
cards,
and the process does not have permission to open sockets).
- You *can* read, write or delete any file, but all changes to the
filesystem
are discarded when the process ends.
- There are probably a few edge cases I didn't think of, so please don't
abuse
it. :)

However, a few components are available, just add the USE instruction to
load
it, just like you would in a Gambas script. Here is an example :

(Basically, any component that doesn't depend on networking or GUI, tell
me if
any is missing :) )

Behind the scenes, it is a simple Gambas application serving a REST API,
which takes the code as input. It then spins up a Docker container, which
has
a simple "runner" Gambas application as its init process, which takes the
code,
feeds it to the Gambas Scripter (gbs3) and then returns its output.

The app is still a bit rough on the edges (for instance, I should make a
proper
Gambas highlighter for the editor, instead of using the VBScript one :p),
but I think it is good enough to see some use.

Tell me if you have some ideas to improve it, and have fun with it ! :)

Re: Gambas Playground

Am Sonntag, den 16.07.2017, 01:37 +0200 schrieb Adrien Prokopowicz:

> Hello Everyone !
>
> These past few days I had fun putting together an online playground for
> Gambas !
> You can find it here : https://gambas-playground.proko.eu/ :)
>
> The playground is a little place to write and run Gambas code snippets,
> which I
> think could be very useful in the mailing-list where codes flies around
> everywhere. :)
>
> You can also directly share a link of your code in the playground using the
> "Share" button, which will generate a link like this :
>
> https://gambas-playground.proko.eu/?gist=07db52169ef8b747d26f8bee4a4a19e9>
> The code is actually stored in a GitHub Gist, rather than in the playground
> itself, which makes it completely stateless.
>
> Of course, since this is a web service (i.e. not your computer ! :) ),
> there are
> a few limitations :
>
> - Your code cannot run for more than 2 seconds, or it will get SIGKILL'd
> - It cannot use more than 16 megabytes of RAM (it segfaults if you use too
> much)
> - You cannot make any network access whatsoever (there are no network
> cards,
> and the process does not have permission to open sockets).
> - You *can* read, write or delete any file, but all changes to the
> filesystem
> are discarded when the process ends.
> - There are probably a few edge cases I didn't think of, so please don't
> abuse
> it. :)
>
> However, a few components are available, just add the USE instruction to
> load
> it, just like you would in a Gambas script. Here is an example :
>
> https://gambas-playground.proko.eu/?gist=8a49aae5f5e24569c3f7f7e55c619f05>
> The following components are available in the playground :
>
> gb.args, gb.clipper, gb.complex, gb.compress, gb.data, gb.debug, gb.draw,
> gb.eval, gb.eval.highlight, gb.geom, gb.image.effect, gb.image,
> gb.inotify,
> gb.markdown, gb.option, gb.settings, gb.signal, gb.term, gb.util,
> gb.util.web,
> gb.vb, gb.xml, gb.xml.html
>
> (Basically, any component that doesn't depend on networking or GUI, tell
> me if
> any is missing :) )
>
> Behind the scenes, it is a simple Gambas application serving a REST API,
> which takes the code as input. It then spins up a Docker container, which
> has
> a simple "runner" Gambas application as its init process, which takes the
> code,
> feeds it to the Gambas Scripter (gbs3) and then returns its output.
>
> The app is still a bit rough on the edges (for instance, I should make a
> proper
> Gambas highlighter for the editor, instead of using the VBScript one :p),
> but I think it is good enough to see some use.
>
> Tell me if you have some ideas to improve it, and have fun with it ! :)
>

> Am Sonntag, den 16.07.2017, 01:37 +0200 schrieb Adrien Prokopowicz:
> > Hello Everyone !
> >
> > These past few days I had fun putting together an online playground for
> > Gambas !
> > You can find it here : https://gambas-playground.proko.eu/ :)
> >
> > The playground is a little place to write and run Gambas code snippets,
> > which I
> > think could be very useful in the mailing-list where codes flies around
> > everywhere. :)
> >
> > You can also directly share a link of your code in the playground using
> the
> > "Share" button, which will generate a link like this :
> >
> > https://gambas-playground.proko.eu/?gist=07db52169ef8b747d26f8bee4a4a19> e9
> >
> > The code is actually stored in a GitHub Gist, rather than in the
> playground
> > itself, which makes it completely stateless.
> >
> > Of course, since this is a web service (i.e. not your computer ! :) ),
> > there are
> > a few limitations :
> >
> > - Your code cannot run for more than 2 seconds, or it will get SIGKILL'd
> > - It cannot use more than 16 megabytes of RAM (it segfaults if you use
> too
> > much)
> > - You cannot make any network access whatsoever (there are no network
> > cards,
> > and the process does not have permission to open sockets).
> > - You *can* read, write or delete any file, but all changes to the
> > filesystem
> > are discarded when the process ends.
> > - There are probably a few edge cases I didn't think of, so please don't
> > abuse
> > it. :)
> >
> > However, a few components are available, just add the USE instruction to
> > load
> > it, just like you would in a Gambas script. Here is an example :
> >
> > https://gambas-playground.proko.eu/?gist=8a49aae5f5e24569c3f7f7e55c619f> 05
> >
> > The following components are available in the playground :
> >
> > gb.args, gb.clipper, gb.complex, gb.compress, gb.data, gb.debug,
> gb.draw,
> > gb.eval, gb.eval.highlight, gb.geom, gb.image.effect, gb.image,
> > gb.inotify,
> > gb.markdown, gb.option, gb.settings, gb.signal, gb.term, gb.util,
> > gb.util.web,
> > gb.vb, gb.xml, gb.xml.html
> >
> > (Basically, any component that doesn't depend on networking or GUI, tell
> > me if
> > any is missing :) )
> >
> > Behind the scenes, it is a simple Gambas application serving a REST API,
> > which takes the code as input. It then spins up a Docker container, which
> > has
> > a simple "runner" Gambas application as its init process, which takes the
> > code,
> > feeds it to the Gambas Scripter (gbs3) and then returns its output.
> >
> > The app is still a bit rough on the edges (for instance, I should make a
> > proper
> > Gambas highlighter for the editor, instead of using the VBScript one :p),
> > but I think it is good enough to see some use.
> >
> > Tell me if you have some ideas to improve it, and have fun with it ! :)
> >
>
> Salut Adrien,
>
> now we can discuss 'Best ways to format float values' like this
>
> look here you can test Nando's way
>
> https://gambas-playground.proko.eu/?gist=037e17d22f3ac93cd3da3d6ad681f713>
> Thanks
> --
> Amicalement
> Charlie
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot> _______________________________________________
> Gambas-user mailing list
> [hidden email]> https://lists.sourceforge.net/lists/listinfo/gambas-user>

You can't edit anonymous Gists once they are created, but a bit of extra
code is
no big deal, you can just edit your code in the playground and generate a
new link.
(GitHub has plenty of storage space. :) )

As a side note, if you happen to accidentally share sensitive data inside
a code link
(such as passwords), you can contact the GitHub team[0] and ask them to
delete it.
The playground itself does not store anything, so you don't need to worry
about it.

Re: Gambas Playground

> Le Sun, 16 Jul 2017 15:10:55 +0200, Gianluigi <[hidden email]> a
> écrit:
>
> Thanks Adrien,
>> I was able to mistake my first insertion (I left useless code) :(.
>> Can I fix it? [0]
>>
>> Regards
>> Gianluigi
>>
>> [0]
>> http://gambas.8142.n7.nabble.com/Best-ways-to-format-float-v>> alues-td59733.html
>>
>>
> Hi Gianluigi,
>
> You can't edit anonymous Gists once they are created, but a bit of extra
> code is
> no big deal, you can just edit your code in the playground and generate a
> new link.
> (GitHub has plenty of storage space. :) )
>
> As a side note, if you happen to accidentally share sensitive data inside
> a code link
> (such as passwords), you can contact the GitHub team[0] and ask them to
> delete it.
> The playground itself does not store anything, so you don't need to worry
> about it.
>
> If, in the future, you want to share some code on the playground and be
> able to edit
> it later, you can log in in GitHub, create a Gist from there and then
> manually craft
> a link to the playground like this :
> https://gambas-playground.proko.eu/?gist=your_gist_id_here>
> Hope this helps. :)
>
> [0] https://help.github.com/articles/deleting-an-anonymous-gist/> --
> Adrien Prokopowicz
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot> _______________________________________________
> Gambas-user mailing list
> [hidden email]> https://lists.sourceforge.net/lists/listinfo/gambas-user>

Re: Gambas Playground

> good made it! its good to know more and more of gambas are happened
>
> two things>
>
> 1) the playground seems only applies most to gambas scripts rather thant
> other gambas things
> 2) wheres its the code that generates the service, i mean url post here!
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com>

I'm not sure I can understand you correctly, but I'll try my best. :)

If by "other gambas things" you mean "full projects", then yes, the
playground
is only intended to run Gambas scripts, since it is designed for quick
tests and prototyping, and sharing/running code on Gambas mailing-lists and
forums.
But since Gambas scripts are no different from a regular project (except
that
every class/module is in a single file), I don't see how it is a problem.

Re: Gambas Playground

> I'm not sure I can understand you correctly, but I'll try my best. :)
>
yes your are right, sorry for my english

>
> If by "other gambas things" you mean "full projects", then yes, the
> playground
> is only intended to run Gambas scripts, since it is designed for quick
> tests and prototyping, and sharing/running code on Gambas mailing-lists and
> forums.
> But since Gambas scripts are no different from a regular project (except
> that
> every class/module is in a single file), I don't see how it is a problem.
>

its not a problem, its only to clarify, and its make sense due GUI are
difficult to "lauch" from web..

Re: Gambas Playground

>
>> And for the code, I just pushed it to a GitLab repository. You'll find it
>> here :
>> https://gitlab.com/prokopyl/gambas-playground>
> good made, better than the old-comlex svn.. thanks
>
i found seeds and some traces, but have private non-opensource repositoryes
in both github and gilab, please be share/open

does not gambas are open/free software for you ? give same back to
community .. thanks in advance!

Re: Gambas Playground

> 2017-07-19 6:11 GMT-04:00 PICCORO McKAY Lenz <[hidden email]>:
>
>>
>>> And for the code, I just pushed it to a GitLab repository. You'll find
>>> it
>>> here :
>>> https://gitlab.com/prokopyl/gambas-playground>>
>> good made, better than the old-comlex svn.. thanks
>>
> i found seeds and some traces, but have private non-opensource
> repositoryes
> in both github and gilab, please be share/open
>
> does not gambas are open/free software for you ? give same back to
> community .. thanks in advance!
>

The repository I linked was indeed private, that was not intended.
It is now fixed, everyone should now be able to access it.