Stream: contributing

Topic: Track remaining builtins for the Zig compiler


view this post on Zulip Luke Boswell (Jun 10 2026 at 04:04):

See https://github.com/roc-lang/roc/issues/9596

It's come up a few times, so I thought I'd ask our LLM friends to sift through all the details I could find and put together a consolidated list of missing builtins for us to coordinate around.

view this post on Zulip Luke Boswell (Jun 10 2026 at 04:06):

I've locked and pinned the issue so we can limit discussion to Zulip ideas threads or more specific GH Issues.

view this post on Zulip Luke Boswell (Jun 10 2026 at 04:07):

It would be helpful if you see anything that doesn't look right to let me know... I've tried to compile a lot of detail and almost certainly missed some things

view this post on Zulip Luke Boswell (Jun 10 2026 at 13:11):

I've made a start on two of these
(1) https://github.com/roc-lang/roc/pull/9599 -- implement Dict with an insertion-ordered hash map
(2) https://github.com/roc-lang/roc/pull/9600 -- all of the remaining Numeric builtins

view this post on Zulip David Mell (Jun 10 2026 at 17:06):

Shouldn't all the builtins that were suffixed with _checked in the old compiler use _try instead, to be consistent with the change in naming of the to_ conversion functions?

view this post on Zulip Richard Feldman (Jun 10 2026 at 17:47):

that makes sense to me

view this post on Zulip Luke Boswell (Aug 25 2026 at 23:40):

I just updated the tracking GH Issue for the remaining builtins -- https://github.com/roc-lang/roc/issues/9596

These are the things remaining from what I can see

view this post on Zulip TeaDrinkingProgrammer (Aug 26 2026 at 05:42):

I mistook the log API for a logging API, which I haven't seen discussed much. Is that on the radar?

view this post on Zulip Luke Boswell (Aug 26 2026 at 05:42):

log or logging?

view this post on Zulip Luke Boswell (Aug 26 2026 at 05:43):

Logging API -- that sounds like an effect that a platform would provide and be responsible for

view this post on Zulip Luke Boswell (Aug 26 2026 at 05:44):

There isn't anything in the design for the Roc<->Host ABI (unlike dbg, crash, allocations etc) so I do not think there is any plan to add that.

view this post on Zulip TeaDrinkingProgrammer (Aug 26 2026 at 05:48):

Logging specifically. Might be nice to do something similar to HTTP, where we have built-ins for "constructing" the log and you can then choose to log using dbg or have the host expose a function to write a logging file for instance.

view this post on Zulip Luke Boswell (Aug 26 2026 at 05:52):

I'm not tracking anything, would you like to start an #**ideas thread about it?

view this post on Zulip Jonathan (Sep 03 2026 at 16:24):

I see List.map! has been deferred. I was just needing to map over some things using a db connection. I know I can use for loops (and preallocated destination) but was curious as to why it's been pushed back?

view this post on Zulip Richard Feldman (Sep 03 2026 at 18:07):

the only reason was just "is there a real use case for this or are we only including it because it's obvious how it would work?"

view this post on Zulip Richard Feldman (Sep 03 2026 at 18:07):

if you've found a real use case, happy to add it! :smile:

view this post on Zulip Richard Feldman (Sep 03 2026 at 18:07):

I'm just curious what the use case turned out to be haha

view this post on Zulip Jonathan (Sep 03 2026 at 18:19):

Just a minor convenience. Wanted to fetch some data for a list of ids: jobs = ids.map!(|id| Query.get_job_data(q, stmt, id)) (I know, not using a batched query)

view this post on Zulip Jonathan (Sep 03 2026 at 18:22):

You might say that not adding it here is good to discourage N+1 -- fair enough :laughing:

view this post on Zulip removewingman (Sep 03 2026 at 20:24):

Would it be possible to add List.for_each_try! : List(a), (a => Try({}, err)) => Try({}, err) aswell?

Also just minor convenience, so I can refactor this:

main! = |_args| {
  for line in Stdin.lines!()? {
    Stdout.write!("${line}\n")
  }
  Ok({})
}

view this post on Zulip Richard Feldman (Sep 04 2026 at 00:50):

seems reasonable! :+1:

view this post on Zulip Dan G Knutson (Sep 04 2026 at 01:30):

Effectful pure-ish functions like List.map! are also nice for platform-specific pure-ish functions like floating point SIMD.

view this post on Zulip Richard Feldman (Sep 04 2026 at 02:11):

oh we're going to add floating point SIMD, just haven't gotten to it yet. Is that blocking you?

view this post on Zulip Dan G Knutson (Sep 04 2026 at 21:43):

Not blocking! I'm not deep in yet.

I could see other platforms having their own pure-ish things that would be out-of-scope though. That sort of platform-provided custom data transformation just another category that would use a List.map!

view this post on Zulip Notification Bot (Sep 05 2026 at 01:37):

A message was moved from this topic to #ideas > `List.has_any_match` and `List.for_each_try` by Luke Boswell.


Last updated: Sep 24 2026 at 15:59 UTC