I've been working on a tutorial for building Roc applications - I've written maybe like 30% of it, but I wanted to share what I have so far in case it's already useful to people in its current WIP form!
https://gist.github.com/rtfeldman/b5cd8d8876bfcd70cb82caaa55875285
also if anyone has any feedback or questions about the sections that are written, please feel free to ask/share here!
Looking good so far :)
Some corrections:
nice, looks good
I'm trying out this tutorial, and I have my first error:
Num.toStr 4
── NOT EXPOSED ─────────────────────────────────────────────────────────────────
The Num module does not expose `toStr`:
4│ Num.toStr 4
^^^^^^^^^
Am I missing something?
that builtin may be unimplemented, not sure tho, I haven't checked
I think you can use Str.fromInt if you'd like
Thanks, Str.fromInt
works.
Should I open a PR to change that? Or will Num.toStr
be available soon?
hey I'm new to rust and roc, and just installed my Win 10 WSL, since native windows isn't supported yet. couldnt run any of the rust/zig/c examples with a brand-new WSL Ubuntu install.
idk how many people this would help but to get the zig and C examples to compile (couldnt get rust yet), I made sure the windows Hyper-V Platform was enabled (or at least clicked once):
image.png
I had to enable SVM on my AMD Mobo via BIOS to allow this at all.
then hit wsl
at the powershell cli, to open the store prompt to install Ubuntu https://www.microsoft.com/store/productId/9NBLGGH4MSV6
then followed the ubuntu instructions (setting username etc)
then I needed to
sudo apt update
sudo apt upgrade
sudo apt install build-essentials
because otherwise I couldn't get clang installed without those three things
tar -xf /mnt/c/Users/WINDOWSUSERNAME/Downloads/roc_nightly-linux_x86_64-20211129-673215.tar.gz //downloaded roc through the GH releases
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh //to install roc
The rust example doesn't compile (but ill paste the errors in a bit), but the zig and C ones do:
wget https://ziglang.org/download/0.8.1/zig-linux-x86_64-0.8.1.tar.xz
tar -xf zig-linux-x86_64-0.8.1.tar.xz
sudo ln -s $(pwd)/zig-linux-x86_64-0.8.1/zig /usr/local/bin/zig
for zig as per docs
sudo apt install clang
for C, as per docs
my rust example doesn't compile though (the duplication is part of the output):
RUST_BACKTRACE=1 ./roc examples/hello-rust/Hello.roc
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', compiler/build/src/link.rs:471:39
stack backtrace:
0: rust_begin_unwind
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
2: core::result::unwrap_failed
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/result.rs:1617:5
3: roc_build::link::rebuild_host
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', cli/src/build.rs:223:50
stack backtrace:
0: rust_begin_unwind
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/panicking.rs:101:14
2: core::result::unwrap_failed
at /rustc/59eed8a2aac0230a8b53e89d4e99d55912ba6b35/library/core/src/result.rs:1617:5
3: roc_cli::build::build_file
4: roc_cli::build
5: roc::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.```
Hi @Tankor Smash,
Thanks for the detailed report! The rust error is because it could not find cargo. If you installed rust in the same terminal you need to create a new one. Try cargo --version
to see if you have it in path.
I'll update the README to prevent this issue.
Yann Simon said:
Should I open a PR to change that? Or will
Num.toStr
be available soon?
so we would need a new builtin for this but I think we can just map the name Num.toStr to Str.fromInt
@Anton thanks, restarting wsl and running cargo --version
displays something, and it compiles (it took about 30s to compile compared to c and zig's 1s, I thought it had broken). thanks!
I can add it later, there isn't much of a learning opportunity with that one otherwise I would suggest we pair on it and I walk you through it. There's other builtins that would have more learning value @Yann Simon
you can leave the tutorial as is and we'll just make sure to add this builtin
@Tankor Smash nice to have it working :) 30 seconds is a lot indeed, I have not encountered that myself. Perhaps some extra things are done when you build the first rust project on your OS.
It's possible that was caused by slow internet or bad wifi.
Anton said:
It's possible that was caused by slow internet or bad wifi.
yeah it could be. I'm on a gigabit connection, having to download a bunch of crates for the first compile makes sense I guess!
Make sure that you are storing files on the linux filesystem and not windows. I know that caused extremely slow builds of roc itself on WSL. So it wouldn't be surprising if it affected all rust projects on WSL.
Lucas Rosa said:
that builtin may be unimplemented, not sure tho, I haven't checked
https://github.com/rtfeldman/roc/blob/trunk/TUTORIAL.md#functions-and-if I just got caught on that too lol, I assumed it was a function because of the tutorial too.
in roc repl
, how do you submit a line?
»addXY = \x, y -> x + y
…
…
…
…``` can't hit enter to submit this. Ctrl+Enter and Shift+Enter doesn't let me submit either
I can type :help
and it'll show the help message, but not define functions it doesnt seem like
@Tankor Smash WSL itself is also slow when files need to be moved between windows and linux file systems, and the rust compiler seems to move a lot of files around. My compilation (linux) compilation got way faster with a better SSD. @Brian Carroll may have more details on how to best set up our compiler
on wsl
Tankor Smash said:
in
roc repl
, how do you submit a line?»addXY = \x, y -> x + y
…
…
…
…
@Tankor Smash the repl only works with expressions for now and expressions have to return something.
So entering addXY 1 2
after your definition would work.
It is also not yet possible to keep values in scope between REPL entries, so every entry starts with a clean scope.
Anton said:
Tankor Smash said:
in
roc repl
, how do you submit a line?»addXY = \x, y -> x + y
…
…
…
…Tankor Smash the repl only works with expressions for now and expressions have to return something.
So enteringaddXY 1 2
after your definition would work.
It is also not yet possible to keep values in scope between REPL entries, so every entry starts with a clean scope.
ah my mistake, thank you!
ok I'm back, I'm about to add Num.toStr
Is there a way to read a file from disk, maybe using a Task or something? I see stdin in the tutorial, but I'm not sure what else
that is something the platform needs to provide
I think there are some experiments with it somewhere, but for now a platform could just read the file as a string/bytes as needed
at some point we'd want file handlers so the whole thing is not loaded into memory
I quickly looked through the zig and rust platforms to try and find one, but I'll keep looking. I think examples/hello-world/
is what the tutorials examples/cli
became right?
ah found a trove of them, https://github.com/rtfeldman/roc/tree/c4f6697536db203fecda1ad17a32773d61652e51/examples, these aren't present in the roc the guide had me install, but I'm sure there'll be something here!
The false-interpretter
example reads from a file. We should probably make a simple file io platform to help people along.
That being said, it reads in small chunks instead of just dumping everything to memory.
The talk I gave on zig showtime walks you through adding a platform function that writes to a file, you could do the same but for reading a file
depends if you want to use zig for the platform or not but in general the concept is the same across Rust, C, or Zig
https://www.youtube.com/watch?v=FMyyYdFSOHA
yea that one. you can skip to the demo
yeah we should add file I/O to examples/cli
for sure!
1. Expose callback from platform's Package-Config.roc
* Defines the Roc signature in the `effects` record
2. Write the native function in the zig/rust/C
* prefix function name with `roc_fx_`
* zig example: `pub export fn roc_fx_funcnamehere(name: RocStr) callconv(.C) void {}
3. Wrap the platform's exported native function with a Roc function
* since it's exposed as `fx.Effect`, it can be accessed within the platform's Roc
* the platform can then export a function that wraps `fx.Effect`
4. Use in app:
* In the Roc app, add `imports` the platform's wrapped function
something like this? haven't tried it yet but that seems like the gist from your talk @Lucas Rosa
seems like its no longer Pkgconfig.roc
@Tankor Smash yep that’s it
Going through the tutorial (on macOS 12/M1) I couldn't get Stdout.line
to print anything. I put a couple of debug outputs in the platform code and found out that the str
it was getting was empty. Eventually, cribbing notes from the echo example, I got some output with this code:
main =
{} <- await (Stdout.line "I'm a Roc application!")
Stdout.line ""
I'm not sure why the await makes it work, but I've tried every permutation possible and this is the only way I got any output :thinking:
Another note: After the first await, Stdout.line
works without await - so the final line
call in there could have any text and it will get printed.
You are probably hitting this issue in some form: https://github.com/rtfeldman/roc/issues/2028
Num.toStr -> https://github.com/rtfeldman/roc/pull/2108
@Richard Feldman One suggestion for the tutorial. In this section https://gist.github.com/rtfeldman/b5cd8d8876bfcd70cb82caaa55875285#the-app-module-header it's not quite clear to me if every file defines the packages it needs or if only the file containing a main function does that? And if every file defines its own packages, what happens if two files use conflicting package versions?
gotcha, thanks! I can clear this up when I write the part about other modules, but the short answer is that you only define that in one module.
This tutorial is well-written.
thank you! :hearts:️
I listened to the first half of it via text-to-speech on a walk this morning, and I was surprised at how many code examples joked about toasters... Now I see that the voice app was just attempting to pronounce Num.toStr
.
Is there a way to split a large Roc module into multiple files?
Jan Van Bruggen said:
Is there a way to split a large Roc module into multiple files?
Nevermind, I think I found my answer in an example: https://github.com/rtfeldman/roc/blob/e872d00b1329b69851ba9cc2aa158d1bba96b959/examples/benchmarks/QuicksortApp.roc#L3
importer:
# /.../project/SomeRocFile.roc
...
import [AdjacentRocFile]
...
AdjacentRocFile.someFunction ...
...
importee:
# /.../project/AdjacentRocFile.roc
interface AdjacentRocFile exposes [someFunction] imports []
...
someFunction = ...
...
I assume that the trailing asterisk in this: [ A, B ] : List [ A, B ]*
...
Is that correct?
Is there any documentation on the distinction between "open"/"closed" tag unions? The only references I see to them are not descriptive - once in the tutorial and once in this chatroom.
I think what you're looking for is explained in https://github.com/rtfeldman/roc/blob/trunk/roc-for-elm-programmers.md. Search for "unbound".
yeah I'm working on adding both to the tutorial! (Other modules and open unions)
I have a question about how Task
and await
work in the example CLI platform: https://github.com/rtfeldman/roc/issues/2151
Any insight appreciated! :)
@JanCVanB It's probably a bug, I think you're right it should work.
Thanks, that's validating :)
I believe this is indeed a bug caused by #2028
Ah, so it's a compiler bug, not an examples/cli/platform bug?
In that case, I'll just start all of my mains with {} <- await once_upon_a_time
:yum:
I think it has to be _ <- await once_upon_a_time
.
I think both work. I always use {}
with await and no arg. I think _
is an unnamed variable and {}
is destructuring an empty struct
Emiliano Bovetti has marked this topic as resolved.
Emiliano Bovetti has marked this topic as unresolved.
Hi all,
I'm running the tutorial code:
app "hello"
packages { pf: "examples/cli/platform" }
imports [ pf.Stdout ]
provides [ main ] to pf
main = Stdout.line "I'm a Roc application!"
with ./target/debug/roc Hello.roc
and I get
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', compiler/build/src/link.rs:312:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', cli/src/build.rs:223:50
🔨 Rebuilding host... %
What am I doing wrong?
Do you have clang
installed?
I think this is the current bug where main
can't be a single Stdout.line
statement. Maybe try out the solution in #2151 to get main to work?
Edit: I read too fast, it's not that bug. But you'll run into it right afterwards :sweat_smile:
Yes but apparently only as clang-12. I will update-alternatives as I did for llvm-as
After doing that, it worked! Neat. That is not a very helpful error message :) Let me look at the #2151 now...
If I do
app "hello"
packages { pf: "examples/cli/platform" }
imports [ pf.Stdout ]
provides [ main ] to pf
main =
{} <- await (Stdout.line "hi")
Stdout.line "yep"
but forget to import Task
, I get:
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', compiler/mono/src/ir.rs:8228:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Why is it that I have to do one awaited Stdout.line and also one other Stdout.line beneath?
Broken effects in Roc. They generally work as expected but they are definitely not running and working as expected under the hood.
The tutorial is very well written! However it is good it is still private, because a lot of code snippets don't work yet. I think this should be mentioned at the top of the document. There is of course issue #2028 about Tasks, but I have encountered quite a few other problems, on today's version of the compiler. Is it worthwhile to make issues for them? (of course I will make sure that they are not yet reported)
.
yes, definitely please make issues for them! Also, don't worry about checking if they're reported or not already - it's easy to sort out duplicates, and it can be useful to get more data when we get different reports from running on different machines!
Hey all. I'm at this spot in the tutorial: https://github.com/rtfeldman/roc/blob/trunk/TUTORIAL.md#building-an-application
i've got what looks to be the correct code in Hello.roc
:
$ cat Hello.roc
app "hello"
packages { pf: "examples/cli/platform" }
imports [ pf.Stdout ]
provides [ main ] to pf
main = Stdout.line "I'm a Roc application!"
this is at the source of the Roc tree
however when i run it, i don't get any output!
$ cargo run Hello.roc
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Running `target/debug/roc Hello.roc`
🔨 Rebuilding host... Done!
What am I doing wrong?
It's a compiler bug
Tasks have some issues currently
https://github.com/rtfeldman/roc/issues/2151
The work around is to await the task
Yup, like this:
main =
_ <- await Stdout.line "Once upon a time..."
Stdout.line "I'm a Roc application!"
(it is currently bugged so that main
needs at least one awaited Task to run at all)
(in practice, I use an empty string for the first await, and then I have an actually-helpful newline prefix for my output!)
Got it, thanks
so I now have this:
app "hello"
packages { pf: "examples/cli/platform" }
imports [ pf.Stdout, pf.Task.{ await } ]
provides [ main ] to pf
main =
_ <- await Stdout.line "I'm a Roc application!"
$ cargo run Hello.roc
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Running `target/debug/roc Hello.roc`
thread 'main' panicked at 'not yet implemented: unhandled parse error: IndentEnd(@187)', reporting/src/error/parse.rs:545:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ah, my indents are off i think
hm, still failing
No, it's not that. Your main function doesn't return anything.
An await is never the last step of a function
ah, i see. what is roc's unit type?
(This is unfortunately a more advanced concept than you may be at in the tutorial, but it's a result of the current bug)
this makes sense, i'm a haskell user so i think i can see the parallel
In my example above, I await one stdout task and then return another
await is syntax sugar for a callback function, so you now need to add that callback function's body on the next line
does roc have a unit type?
akin to haskell's ()
I'm not a Haskeller and idk what a unit type is, but it might be {}
(the empty record singleton)
hmm this still fails
app "hello"
packages { pf: "examples/cli/platform" }
imports [ pf.Stdout, pf.Task.{ await } ]
provides [ main ] to pf
main =
_ <- await Stdout.line "I'm a Roc application!"
{}
Mismatch in compiler/unify/src/unify.rs Line 1173 Column 13
Trying to unify two flat types that are incompatible: Func([218, 228], 216, 197) ~ Func([102, 103, 109], 111, 112)
thread '<unnamed>' panicked at 'index out of bounds: the len is 0 but the index is 0', compiler/mono/src/ir.rs:8266:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Yes, as your pf
of choice wants a main
that returns a Task
ah, i see, thanks
Running cargo check Hello.roc
might yield a better error message with the current compiler
── TOO MANY ARGS ───────────────────────────────────────────────────────────────
The await function expects 2 arguments, but it got 3 instead:
6│ main =
^^^^^
Are there any missing commas? Or missing parentheses?
────────────────────────────────────────────────────────────────────────────────
Gah, that's my mistake
I forgot to put parens around my example's await arg
await (foo bar)
ah, right! it's working now, thanks
so the current bug is that you _must_ have at least one await
in main?
It's actually a lot bigger behind the scenes, but from the view of most users/applications that is a common manifestation of the bug. A mix of details here: https://github.com/rtfeldman/roc/issues/2028
thanks, reading now
And welcome to Roc! :) Happy to have you. Baptism by fire.
yeah, it feels like Tasks need to be closures only, with execution deferred to the runtime. but hey, maybe i'm biased from haskell
thanks :)
i'm fairly sure that purescript implements Effect
as a thunk
indeed https://github.com/purescript/purescript-effect/blob/master/src/Effect.js
check out that bind https://github.com/purescript/purescript-effect/blob/985d97bd5721ddcc41304c55a7ca2bb0c0bfdc2a/src/Effect.js#L9-L15
Yeah, they should be closures that get returned and then run as a chain. Though can potentially be inlined in some cases.
drew said:
check out that bind https://github.com/purescript/purescript-effect/blob/985d97bd5721ddcc41304c55a7ca2bb0c0bfdc2a/src/Effect.js#L9-L15
Arrow notation makes it even better! :D
bindE = (a) => (f) => () => f(a())()
it feels like Tasks need to be closures only, with execution deferred to the runtime.
yeah, that's what they ought to be; the bug is that sometimes they aren't, even though we want them to be!
There's a WIP fix here: https://github.com/rtfeldman/roc/pull/2226 - but it currently causes regressions in other places.
It's proven to be one of those bugs that's conceptually simple but annoyingly tricky to fix in practice.
I have a PR to add a bunch of stuff to the tutorial. Any feedback welcome! https://github.com/rtfeldman/roc/pull/2327
Taking my first steps in Roc by following the tutorial. Some feedback:
Section "Installation" should refer to the installation guide at https://github.com/roc-lang/roc/tree/main/getting_started
The Install link at the top of the page (in the header bar) points to https://www.roc-lang.org/install which does not exist.
https://github.com/roc-lang/roc/tree/main/getting_started says:
You can run examples as follows:
cd examples
roc run helloWorld.roc
but the tutorial says: run main.roc by using roc dev.
Unclear to me what this means. Should this be "roc main.roc dev"? And why use the dev subcommand here?
roc dev myRocAppFile.roc
will run your app including expectations and I think other debugging helpful things, it won't run if there are any errors or warnings. I think roc run mayAppMainFile.roc
will let you run even if you have warnings.
Thanks for bringing this to our attention @Michael, I'll fix those issues.
I'm trying to wrap my brain around how I can go about splitting up a large roc file into multiple modules, and there doesn't seem to be an existing section in the tutorial about how this works. Is that in the works?
In the latest version of the tutorial, which is not live yet, there is a subsection for modules with the text: "[This part of the tutorial has not been written yet. Coming soon!]". I don't think anyone is planning on writing that in the short term though.
You can make interface
modules and import them into your app
module. See how examples/virtual-dom-wip/example-client.roc
imports ExampleApp.roc
Often the best way to split a big file is to find a type that has some associated functions and pull them out into an interface. If you haven't seen it, search on YouTube for "The Life of a File" by Evan Czaplicki. It's about Elm but it applies to Roc too.
Thanks!
There is a few things like this I'm eyeing to add into the tutorial. I'm away for a few days, but keen to get to this soon. Added an issue to track this.
I noticed that in https://www.roc-lang.org/tutorial is written in the Records section:
total = addAndStringify { birds, 5, iguanas, 7 }
I guess this should read total = addAndStringify { birds: 5, iguanas: 7 }
Hi @Andreas Pehnack,
Yes indeed, I'll fix that right now. Thanks :)
hey there, I noticed that the inline code
tags can sometimes be cut across two lines, which makes it harder to read. Do you think it would make sense to make them white-space: nowrap
? Screenshot-2023-02-18-at-13.24.40.png
Sounds good @Ju Liu! Feel free to go ahead with a PR if you want, if not; could you write up an issue for it?
sweet, PR here: https://github.com/roc-lang/roc/pull/5047
aha, it took me a while to figure out that pf
stands for platform
:)
Hah; I didn't even consider that that stood for anything.
oh yeah, it used to be plat
at one point I think haha
I finished the tutorial yesterday, I'm very impressed by the design choices you've made. :heart:
Some random things I enjoyed:
Some things I found a bit strange:
true
is used instead of Bool.true
, which convinced me it's hard for Roc maintainers as well. also people love to grab this sort of minor things to say "look you can't even write true".*
. Maybe in practice this is not a problem because the compiler will help you a lot. All in all, had lots of fun :)
For True
being in the tutorial, that is probably just legacy. It used to be True
and False
before it became Bool.true
and Bool.false
. also, given it is free to describe a more specific enum instead of using a bool, it probably is advised to not use a bool a lot of the time. When searching a list, for example, use Found
and NotFound
instead of true and false. Etc.
Also, if you want to just use true
instead of Bool.true
, you should just need to add the line true = Bool.true
.
when I read the sections about open/closed records and open/closed tag unions it made me think that it spawns a lot of conditional branches in my head when I'm reading code, and I have to be extra careful about the
*
. Maybe in practice this is not a problem because the compiler will help you a lot.
For me at least, I rarely think about it when writing code. Not sure what it would be like if i had to read a big project from someone else.
awesome, thanks for the feedback Ju! :smiley:
Ju Liu said:
there is quite a bit of delay in the REPL from when I press enter to when I see the result
this is because the repl isn't yet using our development backend or surgical linker, because they aren't feature-complete enough for it yet. If you check out https://www.roc-lang.org/repl you can see it giving responses instantly because @Brian Carroll made the linking and development backend for WASM super fast, and we haven't caught up outside wasm yet :big_smile:
although shout-out to @Ahmad Sattar for making a bunch of progress on the dev backend recently!
it will be a wonderful day when it's far enough along that we can switch roc repl
over to use it :grinning_face_with_smiling_eyes:
I think the tutorial got messed up somehow. This is what it looks like for me on mobile right now
84920F56-ACC1-43DE-B92A-5D8054EDCA5A.png
Thanks for reporting this @Nick Hallstrom, I know this was a recent change, that might have caused it. Someone can try to delete that line with the inspection tools in the browser, I'm done for today. I can take a look tomorrow if it's still unsolved.
@Anton I quickly inspected it in the browser and the nowrap
seems to be the cause of the problem. There is a quite long code line in the bullet point list of the Open Records and Closed Records section that doesn't get wrapped. Changing the whitespace wrapping back to normal
seems to solve the problem
I agree with Ju Liu that the nowrap
helps making the tutorial more readable, though. Maybe we could enable the normal wrapping just in the mobile friendly media query?
So I made a quick pull request with a fix for that problem on mobile devices. I hope I didn't mess up since it's my first time making a PR on an open source project :sweat_smile:
https://github.com/roc-lang/roc/pull/5053
Looks good @Giacomo Cavalieri! Thank you and congratulations on your first open source PR :)
Thanks! I hope I’ll be able to contribute more in the future :)
What would you guys think about putting an example in the tutorial of backpassing with multiple parameters? It really confused me the first time I saw it, even though it makes perfect sense now. I mean this syntax: a, b <- someFunc “abc”
seems reasonable!
So I was going through the tutorial and accidentally misnamed the greeting variable to greetings, and so when I tried to do the string interpolation it failed and killed the repl
Is that the expected behaviour? Shouldn't the repl be more resilient?
» "\(greeting) there, \(audience)!"
"\xc8\x9d\"\x04\x01"
thread 'main' panicked at 'Roc hit an error', crates/repl_cli/src/cli_gen.rs:134:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
it should, yes. What operating system was this on?
also that line number is different from the main
branch at least. How recent is your build of roc?
it was on a M1 mac
I think my build is at most 1 month old
» "\(greeting) there, \(audience)!"
"\xe8\x9d\t\x05\x01"
thread 'main' panicked at 'Roc hit an error', crates/repl_cli/src/cli_gen.rs:142:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is what I get on latest main using M2 mac
I made issue #5708 for this.
Last updated: Jul 05 2025 at 12:14 UTC