Stream: bugs

Topic: Num.sqrt on roc-lang online repl not working?


view this post on Zulip Brian Teague (Nov 16 2024 at 17:16):

I noticed putting in Num.sqrt function in the online repl doesn't return anything.

view this post on Zulip Brian Teague (Nov 16 2024 at 17:18):

Running locally on my Arch Linux WSL caused a panic

» Num.toStr

<function> : Num * -> Str
» Num.sqrt
thread 'main' panicked at crates/compiler/gen_dev/src/lib.rs:1452:26:
internal error: entered unreachable code: invalid layout for sqrt
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

view this post on Zulip Brendan Hansknecht (Nov 16 2024 at 17:18):

must be a bug in the dev wasm backend

view this post on Zulip Brendan Hansknecht (Nov 16 2024 at 17:19):

oh interesting. I guess potentially dev backend too

view this post on Zulip Brendan Hansknecht (Nov 16 2024 at 17:19):

Or maybe a larger issue at the mono level

view this post on Zulip Brian Teague (Nov 16 2024 at 17:22):

Full backtrace wasn't too helpful, just gave a bunch of memory offset values from __libc_start_main

view this post on Zulip Brendan Hansknecht (Nov 16 2024 at 17:27):

The issues is that neither dev backend supports sqrt on Dec

view this post on Zulip Brendan Hansknecht (Nov 16 2024 at 17:27):

llvm might not either frankly

view this post on Zulip Anton (Nov 16 2024 at 17:47):

https://github.com/roc-lang/roc/issues/5831


Last updated: Jul 06 2025 at 12:14 UTC