elixir-lang / elixir-lang.github.com

Website for Elixir
elixir-lang.org
354 stars 822 forks source link

Interactive language guide powered by Livebook #1544

Closed DaniruKun closed 3 years ago

DaniruKun commented 3 years ago

It would be amazing if the official language guide on the website was also interactive, for example in the form of a Livebook with individual sessions for each visitor.

I already created a ported version of all the guides to the .livemd format with the right fixes here:

https://github.com/DaniruKun/ex-guide-livebook

It is actually very trivial to convert the .markdown pages to .livemd, as you can see from the script supplied. The question is - where should this Livebook be hosted, and is it possible to somehow integrate Elixir code evaluation nicely into the website?

josevalim commented 3 years ago

The issue with Livebook is that everyone gets access to execute whatever they want in the machine, which opens up the door for all kinds of explotation.

So we need to tell users to boot up and run their own Livebook instead. Given how early Livebook is in its life, it is too early to push into this direction in the official guides (and not all official guides can run in Livebook, such as the Mix one). In the future, maybe we will convert some of the guides and provide an option to run them in Livebook, but not by default.

DaniruKun commented 3 years ago

That's fair, I was thinking maybe in the future, there could be some kind of small pool of VPCs / containers running Livebook nodes, and a visitor could be allocated to one, provided they authenticate themselves in some way (something as simple as Oauth + Github profile for example). So there might be some kind of use-case for a simple Livebook as a Service.

josevalim commented 3 years ago

Exactly, but that's a much bigger effort and we don't have plans for those at moment. Because of that, I will go ahead and close this :) Thanks!