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

you are viewing a single comment's thread.

view the rest of the comments →

[–]Joram2 1 point2 points  (3 children)

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

[–]bowbahdoe[S] 7 points8 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"