-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple languages #190
Comments
I've managed to run Ruby code from a notebook, but I need to fix some things here and there, so no PR yet. But it kinda works. Same thing will work for Python in no time. |
Having Erlang support would be awesome! How would this integrate with the language servers to get stuff like auto-complete and similar? |
@TheGeorge we are not using language server here because we are using a much simpler variant. So whoever implements the Erlang bindings would need to implement the logic for autocompletion too. |
.NET CORE C# (the one that runs inside a REPL on linux), Python would be awesome too. |
I have significant interest in using livebook to host "living unit tests" |
For my Erlang Jupyter kernel I worked on a generic jupyter library (https://github.com/filmor/ierl/tree/master/apps/jupyter, https://hex.pm/packages/jupyter) which should be relatively simple to extend to also implement a Jupyter client. That would open up support for basically the whole Jupyter ecosystem. |
After discussing with @jonatanklosko, we have realized it doesn't make sense for Livebook to support imperative/mutable languages, because the state tracking and cell evaluation mechanism rely on the assumption we can go back and re-execute an existing piece of code, which is hard on imperative languages since you can mutate any value created in a previous cell. So if we are branch out to the languages, we will likely continue to focus on functional ones. |
It's not like Elixir or Erlang are really functional either ( |
IO is not a good example here because it changes the state around the world in a way we can capture it and manage it. In any case, that’s not the point here. Almost all languages will have observable side-effects. The question is how prominent those are in the code. |
My point was that Beam languages don't even try that hard to be purely functional. There is |
I am well aware. :) I didn't claim it is close to a purely functional one, but it is still a large departure from any language where every data-structure or every object is, by default, mutable. |
I am wondering if Julia would stand a chance at working in an elixir livebook ? |
SQL |
Closing this for now. We do plan to support specific languages (such as SQL) but for now Livebook will likely remain specific to BEAM languages. |
Was there any progress on adding support for other BEAM languages? I'd be quite interested in helping out with adding Erlang support if this hasn't happened yet (and looking through the code I couldn't find any relevant references) |
Hi @michalmuskala, there was no progress here but we would love Erlang support. For simplicity, we have decided that the Erlang runtime would still be implemented in Elixir, this way we can share most of the code and still use things like I believe the work is:
There are some parts we haven't figure out, however:
Anything else I missed @jonatanklosko? |
We also need Erlang syntax highlighting in the Monaco editor. Given that the binding can't be shared I'm not sure if we should support Erlang as part of regular runtimes, or have a separate runtime Erlang instead. More specifically, I'm not convinced we should allow both Elixir and Erlang cells in the same notebook, because then it's less "convertable" to a single script. Dependency management is a good point though, but Erlang code that calls Mix sounds good, especially that we have UI for adding packages and the user doesn't need to be concerned with getting that code right. |
One option for sharing bindings would be to expose a map with them in each language: in Erlang this would be |
@michalmuskala Have you worked on this, yet? I'd like to have a look into this as well. For me, this would also be a lot more useful if Elixir and Erlang could be mixed in a notebook (using |
This is something we will definitely do at some point but not right now, since things are too much influx. This issue is therefore to collect interest.
Supporting other BEAM languages is easy and can be a stepping stone but other languages will require a communication protocol.
The text was updated successfully, but these errors were encountered: