nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.44k stars 1.47k forks source link

Documentation: Tutorial (at minimum) should have a link to Nim playground with runnable code #6551

Open mratsim opened 6 years ago

mratsim commented 6 years ago

It would be awesome for people to be able to play with Nim examples in their browser. Nim's playground accept urlencoded code with the code tag

https://play.nim-lang.org/?code=THECODE

For example, first example of the tutorial can have this link:

https://play.nim-lang.org/?code=%23%20This%20is%20a%20comment%0D%0Aecho%20"What%27s%20your%20name%3F%20"%0D%0Avar%20name%3A%20string%20%3D%20readLine%28stdin%29%0D%0Aecho%20"Hi%2C%20"%2C%20name%2C%20"%21"

ghost commented 6 years ago

Why not gists?

mratsim commented 6 years ago

If the anonymous gists created by the playground are never deleted we could use that. Otherwise it should be collaborative gists, ideally under "nim-lang" project.