Stream: announcements

Topic: builtin Task


view this post on Zulip Anton (Aug 31 2024 at 13:26):

As of today's nightly, Task is now builtin in Roc, you'll need to upgrade to basic-cli 0.15.0 and remove Task imports like this one:

import pf.Task exposing [Task]

If you encounter:

thread 'main' panicked at crates/compiler/mono/src/borrow.rs:396:34:
internal error: entered unreachable code:
        No borrow signature for LambdaName { name: `16.IdentId(46)`, niche: Niche(Captures([InLayout(33), InLayout(149)])) } layout.

        Tip: This can happen when you call a function with less arguments than it expects.
        Like `Arg.list!` instead of `Arg.list! {}`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

You'll need to change someTime = Utc.now! to someTime = Utc.now! {}

view this post on Zulip Anton (Aug 31 2024 at 13:52):

basic-webserver 0.9.0 has been released as well.

view this post on Zulip Richard Feldman (Aug 31 2024 at 14:30):

amazing!!! thanks so much to everyone who worked on this! What a massive improvement to the language! :heart_eyes::heart_eyes::heart_eyes:

view this post on Zulip Zeljko Nesic (Aug 31 2024 at 16:45):

Oh oh, can't wait to play with it when I get home!

view this post on Zulip Pearce Keesling (Aug 31 2024 at 17:14):

As a casual observer I know this has been in the works for ages and it's awesome to see it come to fruition! It'd be cool to read a super brief write up of the wins/unlocks here. As I understand it there is so much more to it than just "don't need to write an import anymore".

view this post on Zulip Brendan Hansknecht (Aug 31 2024 at 18:56):

I think it is mostly the base for unlocking more (rather than a huge unlock itself), but im not fully sure, so hopefully others will chime in.

view this post on Zulip Sven van Caem (Aug 31 2024 at 19:22):

As far as I'm aware, this will unblock Effect Interpreters, which (I believe) in turn allows Roc code to run Tasks in parallel!

view this post on Zulip Sam Mohr (Aug 31 2024 at 19:23):

One of the main benefits is that Roc libraries now know what a Task is. If Weaver, for example, wants to provide a method that intelligently manages responding to stdout, it can now ask for a callback that takes a Str and returns a Task {} *

view this post on Zulip Sam Mohr (Aug 31 2024 at 19:24):

Sven van Caem said:

As far as I'm aware, this will unblock Effect Interpreters, which (I believe) in turn allows Roc code to run Tasks in parallel!

This is part of the journey, yes, but we still need type erasure to unblock map2 for parallelism. So we are still blocked, but we are making progress!

view this post on Zulip Luke Boswell (Aug 31 2024 at 19:24):

The thing I've been looking forward to most is the ability to have platform agnostic packages with effects. We can move a lot of code into packages and reuse that.

It's a massive lift for the ecosystem, well unlock... now we get to experiment with it and build a lot of cool things. :sunglasses:

view this post on Zulip Pearce Keesling (Aug 31 2024 at 22:24):

Awesome thanks! Exciting stuff!


Last updated: Jul 26 2025 at 12:14 UTC