Stream: ideas

Topic: Running a script from a URL


view this post on Zulip Luke Boswell (Jan 28 2024 at 01:48):

Would it be a good idea to be able to run a script or app using just a URL? For example, say I publish an example app that uses a URL package, could I then share a gist and the URL for users to just run it locally without having to copy the contents into a new .roc file.

So for example I have this gist with the roc-ansi TUI menu example. I could share the URL and others could run locally just by typing the following...

roc https://gist.githubusercontent.com/lukewilliamboswell/0b6cdf0feba9549fd505b08d377fc926/raw/f6d54b7347ad31bdd39f15650dbd55ba6593de24/tui-menu.roc

view this post on Zulip Luke Boswell (Jan 28 2024 at 01:50):

the idea here is that roc would download the file to the .cache and then run that.

Maybe it hashes the URL and uses the hash as the filename or something. :shrug:

view this post on Zulip Luke Boswell (Jan 28 2024 at 01:51):

Or maybe it just downloads each time, because I guess a URL can and should change

view this post on Zulip Anton (Jan 28 2024 at 11:02):

I think we should encourage people to read/check code before executing it

view this post on Zulip Kiryl Dziamura (Jan 28 2024 at 22:24):

Roc cli then can ask for a confirmation. With information about the platform used for the app


Last updated: Jun 16 2026 at 16:19 UTC