Skip to content
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

Create a Livebook sub repo? #194

Open
ndrean opened this issue Dec 26, 2022 · 10 comments
Open

Create a Livebook sub repo? #194

ndrean opened this issue Dec 26, 2022 · 10 comments
Labels
discuss Share your constructive thoughts on how to make progress with this issue

Comments

@ndrean
Copy link
Contributor

ndrean commented Dec 26, 2022

I am looking for a place for this.

For example, a Livebook is a good place to play with data visualisation. This repo is a good guide: https://book.elixir4datascience.com/3-dataviz.html#content

@ndrean
Copy link
Contributor Author

ndrean commented Jan 3, 2023

I liked the idea of a "Run in Livebook" button to explore libraries:

https://www.youtube.com/watch?v=0wg5S91fam at 21'45

@nelsonic
Copy link
Member

nelsonic commented Jan 3, 2023

@ndrean
Copy link
Contributor Author

ndrean commented Jan 3, 2023

On youtube: "A Blueprint for Intuitive Internal Elixir Ecosystems | Ryan Young | ElixirConf EU 2022"
Trying again??

Screenshot 2023-01-03 at 16 36 18

So how do you do such a button? Is it a link ? <a href="an-url-where-a-livebook-is???/>, or it runs a command livebook server <some-file> on your computer?

Part of this talk is here: https://dashbit.co/blog/mix-hex-registry-build

Screenshot 2023-01-03 at 16 22 35

@ndrean
Copy link
Contributor Author

ndrean commented Jan 4, 2023

This guy seems to be an expert:

https://github.com/jonatanklosko/notebooks/tree/main/examples

@nelsonic
Copy link
Member

nelsonic commented Jan 5, 2023

Keen to do this for https://github.com/dwyl/learn-elixir 💭

@nelsonic nelsonic transferred this issue from dwyl/start-here Jan 5, 2023
@ndrean
Copy link
Contributor Author

ndrean commented Jan 5, 2023

"Run in livebook" button: see https://livebook.dev/badge
Screenshot 2023-01-05 at 13 09 18

Screenshot 2023-01-07 at 18 15 35

@ndrean
Copy link
Contributor Author

ndrean commented Jan 9, 2023

One step further: create smart cells (aka create your own JS front-end):

ElixirConf 2022 - Stephen Ball - Livebook smart cells are amazing

Screenshot 2023-01-09 at 11 23 31

@ndrean
Copy link
Contributor Author

ndrean commented Jan 11, 2023

Keen to do this for https://github.com/dwyl/learn-elixir 💭

I almost did it, but needs to be polished, especially choosing between using the terminal with IEX or exclusively using the Livebook. The pb is that you can't define a module in a cell and then come back later to it. There are some repetitions when you add step-by-step functions in a module as you need it all. You can index the versions of the module but it may need lengthy explanations. Not sure.
Then running tests in Livebook is not obvious but I think I made it.
Finally, I can't copy-paste or load the code of my livebook to fly.io because it doesn't compile. I only used basic packages. So I can't just put "run in livebook". If I code directly in a fly.io livebook, then I can't use doctest because the version is not up-to-date .....

A little plus. I played with the factorial and was surprised to discover that the "spawn" version outperforms the others pretty quickly. I think the plot I made below helps to visualize why concurrency is interesting when you run heavy computations.

visualization (8)

@nelsonic
Copy link
Member

Very cool. 👌

@ndrean
Copy link
Contributor Author

ndrean commented Jan 12, 2023

https://github.com/dwyl/learn-elixir-on-livebok/blob/main/learn-elixir-on-livebook.livemd

The solution to run it seems...hacky but works :)

Please feel free to criticize, or modify it in any way

@ndrean ndrean added the discuss Share your constructive thoughts on how to make progress with this issue label Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue
Projects
None yet
Development

No branches or pull requests

2 participants