Stream: beginners

Topic: New features in the last few months


view this post on Zulip Ian McLerran (Sep 13 2024 at 17:27):

So I've been out of the Roc loop for a couple months, and the language is progressing a lot. I feel like I've missed quite a bit, so I'm hoping folks can fill me in a bit on what's been happening. A few of the changes or new features I'm aware of are:

I think I remember seeing someone offhandedly mention another major feature/change in some thread ("...now that X is in the language..."). Any thoughts on updates I should be aware of in the language?

view this post on Zulip Sam Mohr (Sep 13 2024 at 17:33):

I'm about to take off on a plane ride, so I can't help at the moment, but I'd recommend searching the closed PR names in the past few months if you don't get an answer

https://github.com/roc-lang/roc/pulls

view this post on Zulip Ian McLerran (Sep 13 2024 at 17:42):

Thanks Sam, I have indeed been browsing through the PRs. Thought I'd try to short circuit that process as there are a LOT of PRs... and for example, thought someone mentioned module params being in the language, but all I've found is a PR for adding syntax parsing for module params, but not anything indicating its functional yet.

view this post on Zulip Ian McLerran (Sep 13 2024 at 17:45):

PS: have a safe flight!

view this post on Zulip Brendan Hansknecht (Sep 13 2024 at 17:53):

Yeah, I haven't used module params yet, but they are functional to my understanding

view this post on Zulip Ian McLerran (Sep 13 2024 at 18:00):

Was just able to get module params working in a proof of concept. Looks like the name of the exposed value in the importing module (IE main.roc) has to match the name of the value in the imported module.

So if Module.roc looks like:

module { echo } -> [leftPadPrint]

Then to import, main.roc should look like:

import cli.Stdout
echo = Stdout.line
import Module { echo }

view this post on Zulip Ian McLerran (Sep 13 2024 at 18:05):

Maybe I should rephrase my question, as I think the list of updates is too long to recount. I'm really just curious what folks think are the major highlights of the language evolution in the last couple months.

view this post on Zulip Luke Boswell (Sep 13 2024 at 20:19):

Your list looks pretty good to me.

Are you tracking Brendans refcounted upgrade, basically for Lists of anything refcounted they go way fast now. Like 2500x or something crazy.

On the basic-cli and basic-webserver side there's also been a heap of nice upgrades. The TCP and FileHeap so roc can automatically close close and cleanup when dropped. Super nice Sqlite API upgrade, multipart/formdata support and others I'm sure.

view this post on Zulip Ian McLerran (Sep 15 2024 at 21:25):

Wow, that’s a huge improvement for refcounted lists. I have been vaguely aware of that as a WIP. Those are some great improvements to the platforms as well.

I’m super excited to start playing with module params… seems like that should open up a lot of possibilities.

view this post on Zulip Brendan Hansknecht (Sep 15 2024 at 23:37):

Oh also, we fixed our alloca generation in llvm leading to:

  1. Recursive functions shouldn't sometime mutate values.
  2. Llvm optimizes much better

view this post on Zulip Isaac Van Doren (Sep 18 2024 at 01:34):

Wow, I didn't realize module params had landed, that's awesome!


Last updated: Jul 06 2025 at 12:14 UTC