Why did you build this playground?
One of my favourite demos is to go into a C debugger (like gdb or lldb) and look at how the variables are actually represented under the hood. But the interface to gdb is very confusing if you're not used to it! So I wanted to build a friendlier way to spy on what's in a program's memory.
How can I use this site?
You can either explore the existing examples or write your own C code. I'd encourage you to check out the examples even if you're not that comfortable writing C -- play around by changing the numbers!
Is this really running my code?
Yes! It compiles it with
How does it get the program's memory?
The server uses
lldb's Python API to run your program one line a time and grab the memory of all the variables on every line.
What languages does it support?
Just C, because C is the language where it's the most straightforward to map between "the code in your program" and "what's in your computer's memory".
Isn't it insecure to run arbitrary people's code?
Programs are terminated after 1 second of runtime, they run in a container with no network access, and the machine they're running on has no sensitive data on it and a very small CPU.
Where can I find more playgrounds like this?
Some other Wizard Zines playgrounds: