3 ms·
Livebook / scripting from a workbook has been a huge boost for my workflow over the last few years. And in the last 6 months even more so, now I have a full edi
by heeton 3y ago
Livebook / scripting from a workbook has been a huge boost for my workflow over the last few years. And in the last 6 months even more so, now I have a full editor and autocomplete with copilot for scripting (with context of all my scripts).
Playbooks at work, exploration in personal projects, 80% of my terminal use is now driven by an editor and sending snippets to the terminal.
(I know this is more common for emacs and lisp users, but never really managed to get into that workflow myself, until livebook)
My only gripe is that livebook itself doesn’t love reloading if I edit the source files directly, and I’d like to get that working.
- __jonas 3y agoI'd be interested in how to get a nice workflow going with livebook and a local mix project. Right now I do iex --sname some-name --cookie some-cookie -S mix And then in the livebook, go to the runtime settings, select "Attached Node" and enter the name and cookie. It seems kind of inconvenient to have to do this every time, and also I don't get any automatic hot reloading of modules in the livebook when I edit files directly, so I just end up copying files into the livebook to edit them. Maybe there is a nicer way? Wish I could just `mix livebook.start` or something to open a livebook attached to the current mix project. Or have that be the behaviour when opening the notebook file by default. Edit: I just saw this comment from the previous discussion: https://news.ycombinator.com/item?id=37035686 https://news.ycombinator.com/item?id=37035686 This might be what I want actually!
- hugobarauna 3y agoI think this may solve live reloading in Livebook for you: https://github.com/jonatanklosko/mix_install_watcher https://github.com/jonatanklosko/mix_install_watcher
- freedomben 3y agoFor vim users, check out vim-slime[1]. It's really changed my workflow! It can work for any language that uses a REPL, including bash/shell. Combined with tmux, it is an amazing and (in hindsight) obvious tool. I honestly can't imagine myself going back to not having it now. [1]: https://github.com/jpalardy/vim-slime https://github.com/jpalardy/vim-slime
- freedomben 3y agoInterestingly, I had a similar workflow in the past where I wanted to edit scripts with vim and have liveview reload them. I tried to ask for this and even offered to work on a PR, but they weren't interested (at the time at least, this was a couple of years ago).