Stream: ideas

Topic: repl link in header


view this post on Zulip Anton (Feb 05 2024 at 15:37):

#6500 was made to propose adding a repl link (roc-lang.org/repl) to the header links in the website.
I think 7 header links is definitely too many. We could however take out the community link and add a short section about community to the home page and end that section with a link to roc-lang.org/community.

We also have a repl on the home page under "Try Roc", it's main shortcoming is that is quite narrow, compared to the repl on roc-lang.org/repl.

We do link to the repl early on in the tutorial so discoverability is not bad. Searching roc repl with Google or Duckduckgo also gives you the repl page as the first result.

Opinions welcome :)

view this post on Zulip Richard Feldman (Feb 05 2024 at 15:39):

hm, how valuable would a repl link in the header be? :thinking:

view this post on Zulip Richard Feldman (Feb 05 2024 at 15:39):

considering the repl is already on the homepage :big_smile:

view this post on Zulip Anton (Feb 05 2024 at 15:43):

Indeed, it's probably rare that the repl on the homepage would be too narrow for what you want to do.

view this post on Zulip Anton (Feb 05 2024 at 18:52):

What do you think @Brian Teague?

view this post on Zulip Folkert de Vries (Feb 05 2024 at 19:23):

I've found myself wanting the repl and not really knowing where it is (I know the url so I could find it that way but it's not that clear atm I'd say)

view this post on Zulip Richard Feldman (Feb 05 2024 at 19:32):

hm, but why the online rather than roc repl at the command line?

view this post on Zulip Folkert de Vries (Feb 05 2024 at 22:05):

checking a bug report regarding online repl

view this post on Zulip Brian Carroll (Feb 06 2024 at 08:13):

A footer link would be a classic solution to this kind of thing!
Currently the footer has links to GitHub and Netlify.

view this post on Zulip Brian Carroll (Feb 06 2024 at 08:14):

We could pick a slightly different layout for it and add the REPL there, maybe.

view this post on Zulip Kiryl Dziamura (Feb 06 2024 at 09:39):

image.png
image.png
image.png
image.png
image.png

it's very convenient when the playground link is easily discoverable. tho there are even more counter-examples :D (zig, erlang, elixir, unison, and many many more)

view this post on Zulip Richard Feldman (Feb 06 2024 at 11:22):

well I think our discoverability is hopefully good considering it's near the top of the homepage! :big_smile:

view this post on Zulip Kiryl Dziamura (Feb 06 2024 at 11:57):

I have to scroll the page to find a small instance of repl. I just got used to scanning the top of the page looking for repl/playground link so I can immediately jump into some experiments. Especially if it's not my first visit and I want to try smth quickly. In the case of roc site, I usually open its main page and add repl in the address bar manually

view this post on Zulip Brian Teague (Feb 07 2024 at 03:58):

I was also thinking about a playground just like the other example websites.

Maybe instead of a single line CLI, we could display example programs from a drop down on a left hand side editor that people can edit and run and see the output on the right hand side?

view this post on Zulip Brian Teague (Feb 07 2024 at 03:59):

Something a little more interactive that makes it easy to test simple multiple line programs. I find myself accidentally typing the up arrow losing my edits in the online repl.

view this post on Zulip Richard Feldman (Feb 07 2024 at 04:42):

I would love to have a full wasm playground!

view this post on Zulip Richard Feldman (Feb 07 2024 at 04:42):

like imagine if people could edit and try out roc-wasm4 programs completely in the browser, with no servers involved, working completely offline if you lost your network connection

view this post on Zulip Richard Feldman (Feb 07 2024 at 04:43):

that's totally doable, although of course it would be a very ambitious project :grinning_face_with_smiling_eyes:

view this post on Zulip Richard Feldman (Feb 07 2024 at 04:43):

and I think the web repl has already solved a lot of the foundational challenges there

view this post on Zulip Norbert Hajagos (Feb 07 2024 at 19:51):

I have heard the hosts of a podcast (Go Time?) talking very highly of the go playground to a lady who was responsible for something like developer relationships for the go project. They have said that it allows you to try the language and your ideas in it before you download the compiler, lowering the barrier to entry. Also to show the language to someone on a random desktop. They have also said that it is so good that they both overuse it and should stop doing that, but that is just an indicator of a good product :)
I think a playground would be a worthwhile investment.

view this post on Zulip Brian Carroll (Feb 07 2024 at 20:35):

This would be cool!
I built the web REPL. I don't have the free time to do this project but I'd be happy to help/advise anyone who decides to do it!

Here's what I think it looks like:

The web REPL works by constructing a program from the history of inputs, and then compiling that program.
A playground can actually skip the first step. It doesn't have to construct a program, because the user does that. So in that sense it has less work to do than the REPL.

What we'd need to do is pass a flag down through repl_wasm telling it to bypass certain pieces of its pipeline. The skipped logic would be:

Then you'd need to make a new web UI for it, probably using one of the open source code editor libraries.

Initially you'd probably have a fixed platform like the REPL does. So not much change from what we have. But later you would want to be able to load different platforms as .wasm files.

view this post on Zulip Brian Carroll (Feb 07 2024 at 20:41):

I think it sounds like a fun web dev project, with a fair bit of Wasm and Rust mixed in. You'd learn a bit about how the compiler is structured, without having to get super deep into it, unless you want to do that later.

view this post on Zulip Anton (Feb 09 2024 at 10:03):

@Brian Teague if you're looking for projects, this would be a cool one with high impact :)


Last updated: Jun 16 2026 at 16:19 UTC