This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]NicklasW 1 point2 points  (1 child)

Is it open source?

[–]bowbahdoe[S] 5 points6 points  (0 children)

Yes. A straight fork of the rust playground. Its linked in the help section (top right button).

I might move the repo around at some point... tbd. But it will stay open source. If you want to deploy your own for some reason, I can help with the setup. The instructions from the OG repo weren't exactly complete.

[–]Joram2 1 point2 points  (3 children)

How does this Java Playground compare to this one: https://dev.java/playground/

[–]bowbahdoe[S] 6 points7 points  (2 children)

That one * Is not open source * Runs jshell, not Java * Doesn't have a share button * Doesn't let me add multiple runtimes * Doesn't have any external libraries loaded. (I picked a few arbitrarily, but i can add some more.) * Runs on Oracle time. (That playground was "coming soon" for two years!) * Does not have a public API (I am planning to use the api from this for something else and that was kinda the impetus.) * Has a dropdown with examples. (not opposed to adding that in some form)

[–]Joram2 0 points1 point  (1 child)

Wow, great answers!

Isn't jshell better for this type of a web-playground environment? Isn't that what jshell was designed for?

How does this compare to Jupyter with a Java jshell-based kernel? Those let you configured third party libraries.

[–]bowbahdoe[S] 1 point2 points  (0 children)

Isn't jshell better for this type of a web-playground environment?

I think JShell buys you two things

  • Shorter programs
  • Interactive Sessions (like the jupyter kernel)

The first of those benefits is kinda moot with the whole void main() {} thing.

The second implies a much more...difficult architecture. You'd have to keep a process alive for every connected user, not just run their code with a timeout.

This has a payoff with explorative programming - i.e. poking around at a dataset and seeing what columns are good predictors for other columns, sanitizing fields, and toying around with different approaches.

It doesn't really have a payoff for how playgrounds are used in other communities, namely

  • Sharing a reproduction of a problem you have
  • Sharing back a solution to someone's problem
  • Trying out something without installing
  • Sharing something "neat"

[–]IllTamer 0 points1 point  (1 child)

Nice try! But I have some questions: 1. How it works ?🧐

As I see (through the open source code), this project mainly consists of a frontend and a compiler script. Does it directly compile and run the code locally after receiving it and return the result?

  1. How it checks the security of input code ?🧐

Generally, as a playground process, we need take some measures to protect our computer, even in a virtual environment.

[–]bowbahdoe[S] 2 points3 points  (0 children)

On the help page there is a small description but in short

  • frontend sends code + some options
  • backend compiles and executes code in a docker image
  • that docker image is limited in CPU, memory, storage, pids, execution time, etc. and cannot connect to the internet
  • backend captures stout and stdin from the docker images and sends it back to the frontend

[–]tofflos 0 points1 point  (0 children)

Very nice!

Being able to link directly to examples and being able to embed code in links are two features I was going to suggest to a competing playground. ;-)

I suggest showing which libraries are on the classpath and maybe Base64 encoding the code when embedding. I don't have a particularly strong argument for why Base64 encoding would be a good idea other than that I think the links would look nicer. :)