Raku / user-experience

Identifying issues in and improving the Raku user experience
Artistic License 2.0
25 stars 5 forks source link

Create an online interpreter that can be embedded into online books / blogs #15

Closed trosel closed 7 years ago

trosel commented 7 years ago

Similar to the interpreter/compiler system built into Rust By Example

This service could then be re-used by a number of tutorials / books.

zoffixznet commented 7 years ago

That already exists: glot.io

Perl6.Party uses it. Click on any code example and you can modify/run it: http://perl6.party/post/Perl-6-S---Substitution-Operator

trosel commented 7 years ago

Did you just embed the glot.io iframe in your blog? Under the share link?

<iframe src='https://glot.io/snippets/emfuaraio4/embed' frameborder='0' scrolling='no' sandbox='allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts' width='600' height='400'></iframe>

for example ^

zoffixznet commented 7 years ago

That's another way of doing it, yes.

You can also use Glot.IO's API too (we got a module). Perl6.party just uses it under the hood to get execution results and uses codemirror on the frontend to turn any code block into an editable+executable box.