Stream: beginners

Topic: is Roc functional?


view this post on Zulip Zachary Curtis (Sep 04 2022 at 13:18):

Hey, I was just wondering to what extent Roc is functional as a language at the present. Thanks!

view this post on Zulip Richard Feldman (Sep 04 2022 at 13:25):

functional as in "functional programming" or as in "ready for production use?" :big_smile:

view this post on Zulip jan kili (Sep 04 2022 at 13:27):

I drew this plot with Roc, of data points generated pseudorandomly in Roc: https://github.com/JanCVanB/roc-plotters/blob/main/examples/scatter.png

view this post on Zulip jan kili (Sep 04 2022 at 13:29):

That's my latest personal milestone with Roc, but it doesn't flex all of Roc's current functionality:)

view this post on Zulip Zachary Curtis (Sep 04 2022 at 13:36):

I don’t expect production ready, I guess my question is along the lines of “How much can be done right now?

view this post on Zulip jan kili (Sep 04 2022 at 13:49):

With regard to which aspect(s)? (Syntax, compiler, performance, editor, libraries, automation...) I don't mean to be pedantic, just clarifying.

view this post on Zulip jan kili (Sep 04 2022 at 13:51):

Personally, if I were to answer the same question for Python, I'd focus on libraries, but that's my personal+Pythonic bias.

view this post on Zulip Zachary Curtis (Sep 04 2022 at 13:58):

Mhm, I guess syntax/performance/compiler are my focuses, I don’t expect the libraries to be in good shape pre-0.1

view this post on Zulip jan kili (Sep 04 2022 at 14:05):

Then I'll defer to compiler-y colleagues - as an app developer, those aspects feel v0.2 ready (useful & pleasant for noncritical hobby apps)

view this post on Zulip jan kili (Sep 04 2022 at 14:08):

My only friction is with feature instability between nightly builds, but I know that the compiler team have an aggressive roadmap before v0.1

view this post on Zulip Brian Carroll (Sep 04 2022 at 14:10):

I think the best way to get an understanding of where things are is to look at the examples folder in the repo. That should give you an idea of what kinds of things can be done at the moment.

view this post on Zulip Zachary Curtis (Sep 04 2022 at 14:19):

And what is the story with Roc requiring a host language to work?

view this post on Zulip jan kili (Sep 04 2022 at 14:28):

Yes, Roc is a guest-only scripting language - those examples show how to host it in systems languages like C, Rust, Swift, Web Assembly, and Zig

view this post on Zulip Zachary Curtis (Sep 04 2022 at 14:35):

Is there like more insight into that choice of being guest only vs standalone?

view this post on Zulip jan kili (Sep 04 2022 at 14:41):

Yes! The best resource for that would be a specific YouTube video, but I'm not at my laptop to find it right now...

view this post on Zulip jan kili (Sep 04 2022 at 14:54):

Here's the one I was thinking of: https://youtu.be/cpQwtwVKAfU

view this post on Zulip jan kili (Sep 04 2022 at 14:54):

I also highly recommend binging the other exciting talks linked on roc-lang.org

view this post on Zulip Brendan Hansknecht (Sep 04 2022 at 15:36):

Is there like more insight into that choice of being guest only vs standalone?

We should add that to the FAQ probably.

view this post on Zulip Brian Carroll (Sep 04 2022 at 16:14):

Also when I mentioned the examples folder, I should probably also have mentioned the latest example I'm working on in this PR. It's a static site generator that takes a directory full of markdown files, transforms the content to HTML, and inserts it into a page template defined in Roc.

view this post on Zulip Wasswa Samuel (Sep 07 2022 at 08:10):

Roc being a guest language is interesting but which kind of people will be platform authors. Will the Roc team maintain platforms for other languages? Am asking because am personally just interested in writing Roc and the fiddling with Platforms is probably something I will have less interest in. Doesn't it also mean that adoption will depend on how healthy the platform ecosystem is?

view this post on Zulip Folkert de Vries (Sep 07 2022 at 09:27):

yes!

and the number of places where you can use roc depends on what (good) platforms are available. With roc this is not strictly tied to what the compiler team can manage (or is interested in), because anyone can write a platform for anything.

view this post on Zulip Brendan Hansknecht (Sep 07 2022 at 15:02):

The eventual goal is a strong package ecosystem where you can just grab one and not think too much about it.

view this post on Zulip Brendan Hansknecht (Sep 07 2022 at 15:03):

Currently except in very limited cases, roc development currently at least requires platform fiddling. If you only want to write roc, hopefully some more robust platforms will slowly start to come into existence.


Last updated: Jul 26 2025 at 12:14 UTC