examples
examples copied to clipboard
All kinds of Roc examples
Explain the --opt-size flag, what it does and show a quick basic example of the kind of impact it can have on executable size.
Explain the --optimize flag, what it does and show a quick basic example of the kind of impact it can have on execution speed.
The example could show an imperative c-style while loop and the equivalent in Roc.
The example could show an imperative c-style for loop and the equivalent in Roc.
See [this message](https://roc.zulipchat.com/#narrow/stream/231634-beginners/topic/read.20.20file/near/392505746) for inspiration.
We should make an example for this once we figure it out ourselves :p Example of a problematic case: ``` {} await { stable: currentStable, nightly: currentNightly } await {}...
See [here](https://roc.zulipchat.com/#narrow/stream/304641-ideas/topic/Basic.20cli.20error.20handling/near/387551699) for inspiration.
See [writeUtf8](https://www.roc-lang.org/packages/basic-cli/0.4.0/File#writeUtf8)
for example, roc code that prints a string like this: "this is a number: \(Num.toStr someNumber)" Also mention these constraints: - it has to be one line - no interpolations...
See [`readUtf8`](https://www.roc-lang.org/packages/basic-cli/0.4.0/File#readUtf8). This example should also mention [this example](https://github.com/roc-lang/examples/tree/main/examples/IngestFiles) as a better alternative in certain situations.