roc
roc copied to clipboard
Dict.list freezes the repl on aarch64 linux
Running roc repl on linux GNU aarch64 (roc built from source):
d = Dict.fromList [("foo", 123i64)]
this code causes roc to use 100% of a CPU core, and it never returns control. It works fine in the online repl:
Enter an expression to evaluate, or a definition (like x = 1) to use later.
» d = Dict.fromList [("foo", 123i64)]
@Dict { data: [("foo", 123)], dataIndices: [0, 0, 0, 0, 0, 0, 0, 0], metadata: [36, -128, -128, -128, -128, -128, -128, -128], size: 1 } : Dict Str I64
and it also works fine in a CLI program
app "roctmp"
packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.5.0/Cufzl36_SnJ4QbOoEmiJ5dIpUxBvdB3NEySvuH82Wio.tar.br" }
imports [pf.Stdout]
provides [main] to pf
main =
d = Dict.fromList [((Str.toUtf8 "foo"), 123i64)]
pr = when (Dict.get d (Str.toUtf8 "foo")) is
Ok v -> Num.toStr v
Err KeyNotFound -> "notfound"
Stdout.line "Hello, \(pr)"
martin@martin-pinebook ~/d/roctmp> roc run
Hello, 123
so it seems to be specific to the repl on this platform.
does this stil reproduce? @lukewilliamboswell maybe you can check this on aarch64? on x86_64 this seems to work fine
» Dict.fromList [("foo", 123i64)]
@Dict { buckets: [{ dataIndex: 0, distAndFingerprint: 289 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }, { dataIndex: 0, distAndFingerprint: 0 }], data: [("foo", 123)], maxBucketCapacity: 12, maxLoadFactor: 0.8, shifts: 60 } : Dict Str I64