Embedded Code Playgrounds

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Often when going through documentation/wikis/blogs there is a need to run some code (Code Playground) for experimentation/learning purposes. When a documentation/wiki/blog doesn't have a way to run code it significantly slows down the learning process (in some cases), and makes it more difficult to understand what is being read.

A picture is worth a thousand words

Further details

Think of a Code Playground as a small space to try things out, which isn't tied to any single programming language, and is a cut down Programmer's Text Editor (a bit like VS Code, Sublime Text etc). Below is a example of a Code Playground:

Code_Playground_Example

Proposal

Only a small number of libraries can be accessed (mainly a language's standard library), and most language features can be used, which would greatly cut down on the work that is required to implement a Code Playground. Some examples of Code Playgrounds already exist which provide very good ideas on how to do implementation and design. Also some Code playgrounds can be embedded into some blog/wiki/documentation systems. With GitLab the easiest approach would be to introduce Code Playground support in Wikis, which provide the following options to users:

  • Programming language
  • Programming language version
  • Platform (JVM, JS, WASM, .NET etc), options will vary depending on the programming language selected
  • Libraries to use in the Code Playground

Links / references

Edited by 🤖 GitLab Bot 🤖