-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
It would be nice to have something like play.ziglang.org that is used to try out the zig programming language right in the browser.
Some examples of playgrounds implemented for other programming languages are
I would like to propose and participate in building this. Feedback and ideas on making this proposal happen would be very helpful 🙂
Why?
I have tried to pick up zig multiple times, but never ended up writing code during the learning process, as I was busy reading the entire document of https://ziglang.org/documentation/master/ , not knowing where to stop 😅
A solution to making the learning experience nicer for beginners is building an online tour of the programming language (where user could interactively type code in browser and learn the language). This leads me to propose building tour.ziglang.org (but not yet, please read below). Some good examples for a tour of programming languages are
Before building a tour, we need to build a playground service. Because the API from this service will facilitate building tour sites, that teach the language.
Mock up

(sorry for the misalignment of line number and code 😅)
Features
- Run: User will be able to type zig code and run it against the desired version of Zig.
- Format: User will be able to run zig fmt on the code typed in the playground.
- Share: User will be able to get a link for sharing the playground (which will contain the code, version and optionally output)
Further
I intend to type in the design and prototype once this proposal is marked with "accepted" tag.