正在加载视频...

视频加载失败

I think I solved it. The perfect scripting environment for Elixir. I call it Livescript. livereload of .exs files in IEX, only rerunning the code that changes. The longer your script, the more savings gained. #myelixirstatus

53,440 次观看 • 1 年前 •via X (Twitter)

11 条评论

Thomas Millar 的头像
Thomas Millar1 年前

Livescript diffs you code to only run the minimal amount of code to bring your IEx session back up to the current state.

Thomas Millar 的头像
Thomas Millar1 年前

Loading a large dataset? automating a chrome browser? All will be cached between edits of your script. The longer script, the more you win.

Thomas Millar 的头像
Thomas Millar1 年前

Best part, the resulting file is just a plain .exs file. Nothing else. You can run it normally and schedule it with CRON. Finally you can throw out your bash scripts and use elixir like you used to use Python.

Thomas Millar 的头像
Thomas Millar1 年前

check it out

José Valim 的头像
José Valim1 年前

Love the demo! I also think Livebook should at least have a "livebook export foo.livemd --to exs" so you can automate some things without having to manually export notebooks in the UI.

Hugo Baraúna 的头像
Hugo Baraúna1 年前

Wow, this is cool!

Thomas Millar 的头像
Thomas Millar1 年前

Thanks, I built a web scraper with it last night. It was so enjoyable. Really built it to scratch my own itch

mitch the elixir-tools guy 👨🏻‍🔬👨🏻‍🔧 的头像
mitch the elixir-tools guy 👨🏻‍🔬👨🏻‍🔧1 年前

Looks nice! Is the wallaby helper library i see there pushed up anywhere/oss?

Thomas Millar 的头像
Thomas Millar1 年前

Nope it’s just a local dumping ground for right now. Once I stop changing it every 3 weeks I’ll clean it up and post it. FWIW it’s mostly helper lib for Floki, there’s only a few wallaby things in there for now

Yurko 的头像
Yurko1 年前

Great idea and a very nice and to the point demo! Thank you for showcasing it with Wallaby - highlights how fast you can do things with Elixir too! I haven’t played with that library before - seems very approachable (like a lot of Elixir things are :))

Thomas Millar 的头像
Thomas Millar1 年前

It's very nice, the |> pipe operator is a perfect fit for webscraping too

相关视频