Commit Graph

1456 Commits

Author SHA1 Message Date
Folkert
751192ddfc
use timer in effect zig platform 2022-10-26 16:38:11 +02:00
Nick Gravgaard
3fe270ff88
Obvious refactor of TUI platform's event loop
Signed-off-by: Nick Gravgaard <nick@nickgravgaard.com>
2022-10-26 11:35:34 +01:00
Richard Feldman
9bb45f5856
Merge pull request #4381 from roc-lang/windows-rust-platforms
Windows rust platforms
2022-10-24 18:27:26 -07:00
Folkert
b4878e5550
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-24 18:39:30 +02:00
Nick Gravgaard
6d02332b62
Change TUI platform to call view on initial model
Signed-off-by: Nick Gravgaard <nick@nickgravgaard.com>
2022-10-24 09:44:49 +01:00
Folkert
bd05186503
update the rust platform 2022-10-23 20:06:31 +02:00
Folkert
ebac056814
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-21 23:05:34 +02:00
Brendan Hansknecht
7bbf1fb9c5
fix examples that are failing to build 2022-10-21 13:57:22 -07:00
Folkert de Vries
91947972b3
Merge pull request #4340 from roc-lang/update-examples-readme
update and simplify examples README
2022-10-18 13:47:55 +02:00
Anton-4
6b294bed81
Merge branch 'main' into benchmarks-to-nix
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-18 13:43:09 +02:00
Anton-4
54ad5d3416
moved benchmarks to nix 2022-10-17 17:40:35 +02:00
Anton-4
3dad6aba7c
moved platform-switching 2022-10-17 15:22:20 +02:00
Anton-4
13cf67dc13
update and simplify examples README
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-17 12:28:09 +02:00
Richard Feldman
e6fd0c62fd
Do an explicit cast that doesn't make sense
I don't know why this is what the compiler wants,
given that the docs say it shouldn't need a cast,
but this is for some reason what the compiler wants.
2022-10-16 18:43:03 -04:00
Richard Feldman
bb1693556b
Drop some unnecessary imports 2022-10-16 18:40:17 -04:00
Folkert
f562d61505
int cast on macos 2022-10-16 18:32:55 +02:00
Folkert
323210c547
Merge remote-tracking branch 'origin/main' into roc-dev-inline-expects 2022-10-16 13:56:30 +02:00
Anton-4
0d58a7cf8a
example.org is better 2022-10-15 14:28:56 +02:00
Anton-4
eb727bd8b0
fixed links, minimal exceptions
Replaced lorem ipsum links with links to roc-lang. All exceptions added are due to problems with those sites and their interaction with programs like curl
2022-10-15 14:25:03 +02:00
Anton-4
f7dd5ca708
replace random links with roc-lang.org
random links are generated by the lorem ipsum generator, we don't want to allow a bunch of random links in the repo for security purposes.

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-15 12:21:59 +02:00
Folkert
19ea3489cb
provide more libc functions for the expect implementation 2022-10-12 20:59:18 +02:00
Richard Feldman
5dafad506e
Merge pull request #4240 from roc-lang/list-growth
List growth
2022-10-08 23:58:49 -07:00
Richard Feldman
d28445666b
Merge pull request #4265 from cjduncana/from-result
Add the `fromResult` function to the `Task` module
2022-10-08 23:12:44 -07:00
Jan Van Bruggen
d6114721f5
Merge pull request #4234 from roc-lang/add_Stdout.write
Add newline-less `Stdout.write` & `Stderr.write` to `cli-platform`
2022-10-08 22:26:46 -06:00
Jan Van Bruggen
158759ac47
Add Stderr.write to cli-platform 2022-10-08 20:50:25 -06:00
Jan Van Bruggen
b5afb27257
Add Stdout.write to cli-platform 2022-10-08 20:34:14 -06:00
Jan Van Bruggen
922ee41a26
Sort positionals help above options help 2022-10-08 20:31:07 -06:00
Jan Van Bruggen
1633df447f
Eliminate the word "positional" from arg parsing API 2022-10-08 20:31:07 -06:00
Jan Van Bruggen
eb02fb1e52
Fix typo 2022-10-08 20:31:07 -06:00
Jan Van Bruggen
da2c54580e
Expand abbreviations 2022-10-08 20:31:05 -06:00
Jan Van Bruggen
a39fc076d3
Rename non-positional "arg"/"flag" to "option" 2022-10-08 20:30:43 -06:00
Christopher Duncan
70f5560f0e
Add the fromResult function to the Task module 2022-10-08 20:58:28 -04:00
Richard Feldman
03da41c060
Format CLI backtraces 2022-10-08 15:03:03 -04:00
Brendan Hansknecht
94c51f3998
add a backtrace to panics on the cli platform 2022-10-08 09:49:54 -07:00
Ayaz
ea24e295e3
Merge pull request #4252 from roc-lang/dependabot/cargo/examples/gui/breakout/platform/crossbeam-utils-0.8.12
Bump crossbeam-utils from 0.8.6 to 0.8.12 in /examples/gui/breakout/platform
2022-10-08 09:48:10 -05:00
dependabot[bot]
7d1cf8f6a8
Bump crossbeam-utils in /examples/gui/breakout/platform
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.6 to 0.8.12.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.6...crossbeam-utils-0.8.12)

---
updated-dependencies:
- dependency-name: crossbeam-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-08 09:48:11 +00:00
dependabot[bot]
c78666b399
Bump regex from 1.5.4 to 1.6.0 in /examples/gui/breakout/platform
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.6.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.6.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-08 09:48:10 +00:00
Jan Van Bruggen
8ada13cc3b
Merge pull request #4015 from roc-lang/simplify_examples
Drastically simplify examples directory
2022-10-08 03:46:12 -06:00
Brendan Hansknecht
f9c87d9190
add missing new line 2022-10-07 17:11:51 -07:00
Ayaz
fae90c9fd2
Merge pull request #4187 from roc-lang/ranged-char-literal
Single-quote literals behave like ranged numbers
2022-10-07 15:05:09 -05:00
Brendan Hansknecht
0cfaa9213e
misc git ignore 2022-10-07 08:58:50 -07:00
Anton-4
c6ec3d5d30
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-10-07 16:00:32 +02:00
Ayaz
90dacb2085
Merge pull request #4130 from roc-lang/arg-parser-positional-arg
Support positional args in CLI arg parser
2022-10-07 01:00:08 -05:00
Jan Van Bruggen
07a66f4962
Fix positionaConfigs typo 2022-10-06 23:53:51 -06:00
Marcos Prieto
0fa8658ede
Expose Up & Down in Game.KeyCodes 2022-10-06 10:54:52 +02:00
Marcos Prieto
a455f527cd
Expose more fields on Game.Text
- Expose color
- Expose size
- Expose left & top
2022-10-06 10:54:35 +02:00
Ayaz Hafiz
811c8554ac
Simplify Parser example 2022-10-05 17:28:01 -05:00
Ayaz Hafiz
dea7661068
Have Num.shift*By functions shift by a U8
https://roc.zulipchat.com/#narrow/stream/231635-compiler-development/topic/casual.20conversation/near/302305020
2022-10-04 12:28:33 -05:00
Anton-4
dacf542942
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-10-04 15:01:25 +02:00
Richard Feldman
a3ee6b22af
Merge pull request #4097 from roc-lang/better-default-importing
Improve how builtin modules and their types are imported
2022-10-02 00:25:32 -07:00
Richard Feldman
8a467f3cf1
Merge pull request #4091 from roc-lang/env-read
Add setCwd and exePath, change effect type from [Env]* to [Read [Env]*]*
2022-10-02 00:19:22 -07:00
Richard Feldman
95f4c375c3
s/Read/Write for setCwd's effect type
Co-authored-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
Signed-off-by: Richard Feldman <oss@rtfeldman.com>
2022-10-02 03:18:11 -04:00
Ayaz Hafiz
d8fd630df8
Format 2022-09-30 13:43:33 -05:00
Ayaz Hafiz
73491cb12e
Cleanup unused imports 2022-09-30 13:43:19 -05:00
Ayaz Hafiz
066474bfde
Remove unused import 2022-09-30 13:40:35 -05:00
Ayaz Hafiz
92aa0912ea
Report unused imports in modules 2022-09-30 13:40:34 -05:00
Ayaz Hafiz
3490b4b6ef
Format 2022-09-30 13:39:02 -05:00
Ayaz Hafiz
0fceb8573c
Simplify parse error logic a bit 2022-09-30 13:38:40 -05:00
Ayaz Hafiz
b47e26aa83
Fix some leftover type errors 2022-09-30 13:35:32 -05:00
Ayaz Hafiz
13369b47d2
Format 2022-09-30 13:31:19 -05:00
Ayaz Hafiz
e2c9a8fc17
Annotate arg 2022-09-30 13:31:19 -05:00
Ayaz Hafiz
cee38b895a
Error on missing positional args 2022-09-30 13:31:19 -05:00
Ayaz Hafiz
5245c4f640
Implement positional arguments 2022-09-30 13:31:18 -05:00
Ayaz Hafiz
84ddf35956
Make sure argument parsing marks arguments as taken 2022-09-30 13:31:01 -05:00
Ayaz Hafiz
6ccab83576
Add comments about MarkedArgs 2022-09-30 13:28:53 -05:00
Ayaz Hafiz
5a188bda25
More efficient representation of args in the arg parser
Rather than taking slices of a list when parsing subcommands and the
like, we can mark certain positions in the arguments list as having
already been parsed. This allows us to keep the argument list constant,
at just the precise of an extra set (which is likely to be small in
practice).

This also makes it easy to show what arguments are leftover, if the time
comes for that. It also makes parsing positional arguments easy; you
just grab the next unmarked arguments.
2022-09-30 13:28:52 -05:00
Anton-4
0aa590dfe7
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-09-30 19:27:30 +02:00
Ayaz
9e7832ea0b
Merge pull request #4129 from roc-lang/arg-parser-fixes
Localize parsing errors in the arg parser
2022-09-30 00:06:43 -05:00
Ayaz Hafiz
f3f3898d7a
Format 2022-09-28 17:55:12 -05:00
Brian Carroll
4f23bc39f0
Merge pull request #3552 from roc-lang/csv_decoding-server_example
CSV Decoding in pure Roc
2022-09-28 21:46:26 +01:00
Ayaz Hafiz
3be0265159
Localize parsing errors in the arg parser
Previously, missing arguments would be reported incorrectly by the CLI
platform's arg parser, as [discussed on Zulip](https://roc.zulipchat.com/#narrow/stream/231634-beginners/topic/Args.20for.20CLI.20platform.3F/near/299068775).
This fixes that.
2022-09-28 14:44:30 -05:00
Ayaz
523a350151
Merge branch 'main' into env-read
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-09-28 12:56:06 -05:00
Anton-4
eaacb86ad9
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-09-28 19:48:46 +02:00
Folkert de Vries
190ff7e21a
Merge pull request #4122 from roc-lang/dependabot/cargo/env_logger-0.9.1
Bump env_logger from 0.9.0 to 0.9.1
2022-09-28 16:54:47 +02:00
Folkert
2e5f207283
Merge remote-tracking branch 'origin/main' into csv_decoding-server_example 2022-09-28 16:39:34 +02:00
Ayaz Hafiz
f72a1f9a9a
REmove env_logger dep 2022-09-28 09:10:27 -05:00
Folkert
4ada4d4996
deallocate roc string in parser platform 2022-09-28 15:30:17 +02:00
Ayaz Hafiz
efddc38e66
Add EnvDecoding to cli-platform 2022-09-27 18:21:47 -05:00
Ayaz Hafiz
e04960573e
Format env.roc 2022-09-27 18:21:05 -05:00
Ayaz Hafiz
9cd82ab7e4
Ignore env binary 2022-09-27 18:18:42 -05:00
Ayaz Hafiz
331a4c2888
Format Env.roc 2022-09-27 18:17:52 -05:00
Ayaz Hafiz
43e734f75c
Make implementation easier to read 2022-09-27 18:03:19 -05:00
Brendan Hansknecht
30dbad88ae
ensure that the csv platform flushes to stdout successfully 2022-09-27 16:01:15 -07:00
Ayaz Hafiz
a8b1cb2d90
Implement decoding lists from env vars 2022-09-27 17:57:46 -05:00
Ayaz Hafiz
57231de0c1
Add example of decoding environment variables 2022-09-27 17:57:46 -05:00
Ayaz Hafiz
b9f34df96d
Add comment about annotations 2022-09-27 17:57:46 -05:00
Ayaz Hafiz
38ab8de37c
Implement Env.decode for the CLI platform 2022-09-27 17:57:45 -05:00
Brian Carroll
173a4ec8ab
Define roc_memmove in case LLVM decides to use memmove 2022-09-27 21:24:23 +01:00
Anton-4
d5dbee57d9
cli_run no macro re-write 2022-09-27 20:25:28 +02:00
Brian Carroll
dbf63af05b
Use a different stdio function to get C host working on CI 2022-09-26 21:34:35 +01:00
Brian Carroll
1a5ef05585
Print out stderr if CLI test fails 2022-09-26 19:21:44 +01:00
Brian Carroll
bad993a957
Cleanups and formatting 2022-09-25 22:47:09 +01:00
Brian Carroll
32c2d8fb4b
fix spellcheck error 2022-09-25 22:19:41 +01:00
Brian Carroll
cbd8968066
Create CLI test for CSV example 2022-09-25 22:17:29 +01:00
Brian Carroll
a83ef5fa2a
rename codepoint -> codeunit 2022-09-25 22:17:29 +01:00
Brian Carroll
2341c01ab3
rename main file and executable in CSV example 2022-09-25 22:17:28 +01:00
Brian Carroll
a3c1325edf
rename CSV parsing example: csv -> parser 2022-09-25 22:17:12 +01:00
Brian Carroll
005b29885b
Merge branch 'main' of github.com:rtfeldman/roc into csv_decoding-server_example 2022-09-25 21:35:19 +01:00
Anton-4
1d9a751606
cli_run test fixes 2022-09-24 20:14:59 +02:00
Anton-4
076190a217
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-09-24 16:55:37 +02:00
Anton-4
0ddc69e066
Merge branch 'main' of github.com:roc-lang/roc into simplify_examples 2022-09-24 16:49:50 +02:00
Anton-4
ef9c77409f
Merge remote-tracking branch 'upstream/main' into swiftuidemo 2022-09-23 12:04:34 +02:00
Ayaz Hafiz
f2c9fd2b48
Rename Bytes' encoder/decoder to avoid stdlib collision 2022-09-21 12:29:07 -05:00
Ayaz
211c297230
Merge pull request #4041 from KilianVounckx/opaque-bool
Opaque bool
2022-09-21 11:15:41 -05:00
Richard Feldman
02238b8815
Add setCwd and exePath, change fx to [Read [Env]] 2022-09-21 12:05:32 -04:00
Anton-4
04ea17e8a1
Merge branch 'main' into swiftuidemo
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-09-21 17:24:25 +02:00
Folkert de Vries
cc202a4cf9
Merge pull request #4082 from roc-lang/update-cli-platform-unreachables
Support unification with uninhabited tag variants in more places
2022-09-21 12:18:38 +02:00
Folkert de Vries
a74f5d9366
Merge pull request #4076 from roc-lang/collapse-void-2
Unwrap layouts containing void layouts as newtypes
2022-09-21 00:13:56 +02:00
Ayaz Hafiz
140c33aa50
Update Args.roc 2022-09-20 14:42:09 -05:00
Ayaz Hafiz
2c2a1eb869
Fix cli run tests 2022-09-20 14:42:08 -05:00
kilianv
610c529ba8
Update roc files to use new opaque bools 2022-09-20 14:42:04 -05:00
Ayaz Hafiz
0cb48c6404
Simplify CLI platform arms further 2022-09-20 14:30:25 -05:00
Ayaz Hafiz
49ba8b92b4
Remove unreachable branches in Program.roc 2022-09-20 14:14:31 -05:00
Ayaz Hafiz
884843205d
Update zig host for zero-size types 2022-09-20 08:32:20 -05:00
Richard Feldman
7df7e1bbb7
Drop obsolete declaration 2022-09-19 21:13:22 -04:00
Richard Feldman
b6157e76b8
Fix type mismatch in exit code 2022-09-19 21:12:48 -04:00
Richard Feldman
3c12f79771
roc format 2022-09-19 20:07:23 -04:00
Richard Feldman
aa6d29fbb1
Update CLI examples and tests to use Program 2022-09-19 20:06:29 -04:00
Richard Feldman
0e472200f0
Add ExitCode type 2022-09-19 15:23:07 -04:00
Richard Feldman
45df950cf6
Add Env.var 2022-09-19 13:02:31 -04:00
Richard Feldman
ed31b1cb74
Implement Env.dict, move args to Effect 2022-09-19 12:44:26 -04:00
Richard Feldman
ffa2e657e8
Revise file.roc example 2022-09-19 12:30:14 -04:00
Richard Feldman
96f8818b24
Fix type mismatches in file.roc example 2022-09-19 10:27:44 -04:00
Richard Feldman
f0a9bb0a96
Reorganize Program to use effects for getting args 2022-09-19 09:13:11 -04:00
Richard Feldman
3d68293da1
Expand Env docs 2022-09-19 09:13:11 -04:00
Richard Feldman
9232d8271f
Add Program to CLI platform 2022-09-19 09:13:10 -04:00
Ayaz Hafiz
c9e73b6761
Change example to be a calculator 2022-09-14 12:06:35 -05:00
Ayaz Hafiz
faeb3358eb
Add an I64 parser 2022-09-14 11:46:25 -05:00
Ayaz Hafiz
a91a9b7e79
Use empty strings to represent missing values 2022-09-14 11:41:48 -05:00
Ayaz Hafiz
e7b216fa30
Fix docs link 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
93f0a0eeb9
Add documentation 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
ed78848737
Reset file/err.roc 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
d460fc76d3
Lift commands 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
e39fccb0fa
Add cli run test 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
89e70fea4b
Format 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
1bbe56248c
Simplify subparser mapping 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
d9a94a36c5
Flip subCommand order 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
24885e99bc
Format 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
664bcdff33
Improve error message 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
40f5cad578
Add help to named program 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
4b7c11cb2d
Format command help with headings 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
d448083e7a
Use named parser in example 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
812081eefe
named function to create NamedParser 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
990c912abd
Chain named 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
4999e391ee
Flip name order 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
5ea56beae1
Name parsers 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
bf204dcce8
Have parse take program name 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
487ecee143
Expand arg cli example 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
0672a591b6
Expose subCommand, choice 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
7d2249364f
Rename apply to withParser 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
dd88af75c9
Error handling for subcommands 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
391c87b50b
Initial support for subcommands 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
6d1a903841
Remove Default for now 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
2e1d99299f
Use parseFormatted 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
04fd4412fd
Expose apply 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
b0ab69d41c
Format help 2022-09-14 11:26:49 -05:00
Ayaz Hafiz
9c34aac6fd
Start on parseFormatted 2022-09-14 11:26:49 -05:00
Ayaz Hafiz
e7c0cad1e7
Report missing args and types in errors 2022-09-14 11:26:49 -05:00
Ayaz Hafiz
8d2d0671d3
Improve arg example 2022-09-14 11:26:49 -05:00
Ayaz Hafiz
406d476e29
Expose apply 2022-09-14 11:26:49 -05:00
Ayaz Hafiz
f7fdb725c8
Revert "Rename Arg to ArgParse"
This reverts commit 3b3f1699a6b6d275bfd8a26137a4c5666db23a37.
2022-09-14 11:26:49 -05:00
Ayaz Hafiz
c5eb271497
Rename Arg to ArgParse 2022-09-14 11:26:49 -05:00
Ayaz Hafiz
0b53f40c02
Expose bool, str 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
75b93c5563
Add types to config 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
b453bc9d31
Format 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
ff725be187
Admit optional record fields when constructing parsers 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
490bb51d71
Rename bool and str 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
ea6bdb7fc3
roc format 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
ccb579dda8
Implement toHelp 2022-09-14 11:26:48 -05:00
Ayaz Hafiz
0b7d9e58ae
Revert "Remove WithConfig for now"
This reverts commit 38dd0aa449b9dcc572462788860535894f71deee.
2022-09-14 11:26:47 -05:00
Ayaz Hafiz
7e89c8777b
Simplify 2022-09-14 11:26:47 -05:00
Ayaz Hafiz
e738d5e04e
Name tests 2022-09-14 11:26:47 -05:00
Ayaz Hafiz
42bded0aae
Refactor to use OptionStr 2022-09-14 11:26:47 -05:00
Ayaz Hafiz
6979338617
Remove WithConfig for now 2022-09-14 11:26:47 -05:00
Ayaz Hafiz
9c3c64c252
Move parser to Arg.roc 2022-09-14 11:26:47 -05:00
Ayaz Hafiz
a46713dd87
Clear out env and file examples 2022-09-14 11:26:47 -05:00
Ayaz Hafiz
6a19e3d7d5
Clear out cli platform changes 2022-09-14 11:26:46 -05:00
Ayaz Hafiz
2cd7535320
Add some more expects to the arg parser 2022-09-14 11:26:46 -05:00
Richard Feldman
4046d883c9
Get basic andMap example working 2022-09-14 11:26:46 -05:00
Richard Feldman
a023d26590
Basic arg parser example 2022-09-14 11:26:46 -05:00
Richard Feldman
dd080030ee
Move test into main for easier repro 2022-09-14 11:26:46 -05:00
Richard Feldman
2dc1df165e
Revert "Add Args.roc"
This reverts commit 92038e82fee0d8d6ecca33ad7b3e542a7a3f485b.
2022-09-14 11:26:46 -05:00
Richard Feldman
6f368a219d
Add Args.roc 2022-09-14 11:26:46 -05:00
Richard Feldman
e37a8f3089
Remove optional fields to fix panics 2022-09-14 11:26:45 -05:00
Richard Feldman
0313bdec08
Fix decision_tree panic 2022-09-14 11:26:45 -05:00
Richard Feldman
ef7718958b
Repro decision_tree panic 2022-09-14 11:26:45 -05:00
Richard Feldman
fc933d2991
Reproduce compiler stack overflow 2022-09-14 11:26:45 -05:00
Richard Feldman
b50101011f
More arg parsing improvements 2022-09-14 11:26:45 -05:00
Richard Feldman
27e8b156c2
Fix type mismatch 2022-09-14 11:26:45 -05:00
Richard Feldman
80467e23d6
Reproduce type mismatch with 2 identical errors 2022-09-14 11:26:45 -05:00
Richard Feldman
5070593197
Got parser compiling except for unsafe patterns 2022-09-14 11:26:45 -05:00
Richard Feldman
398f1fcf3f
Remove most of Path implementation for now. 2022-09-14 11:26:44 -05:00
Richard Feldman
fac076c239
Remove httpGetUtf8 effect in favor of sendRequest 2022-09-14 11:26:44 -05:00
Richard Feldman
3228c89815
Don't depend on ureq twice 2022-09-14 11:26:44 -05:00
Richard Feldman
963acb0ff5
Add effects for file I/O 2022-09-14 11:26:44 -05:00
Richard Feldman
f3dfab8a94
Fix incorrect merge resolution of Http module 2022-09-14 11:26:44 -05:00
Richard Feldman
7d1376b273
Add Env to cli example 2022-09-14 11:26:43 -05:00
Richard Feldman
ddbfd48ca3
Merge branch 'main' into pass-args-to-cli 2022-09-12 23:53:55 -04:00
Richard Feldman
3f467459f9
roc format 2022-09-12 20:39:06 -04:00
Richard Feldman
33ca6147c9
Fix CLI platform docs 2022-09-12 20:39:05 -04:00
Richard Feldman
21b74f6dbb
Add Dir and Env to CLI platform 2022-09-12 20:19:12 -04:00
Richard Feldman
4ccd726141
Fix File.readBytes 2022-09-12 20:18:52 -04:00
Richard Feldman
81d11e4edd
Add File.delete to CLI platform 2022-09-12 20:18:51 -04:00
Richard Feldman
d5cc75907f
Update file I/O example 2022-09-12 20:18:50 -04:00
Ayaz
6caf945c6a
Merge pull request #4020 from roc-lang/JanCVanB-patch-1
Fix file example app executable name
2022-09-12 12:44:40 -04:00
Ayaz Hafiz
c85562f3e8
Format 2022-09-12 12:25:37 -04:00
Ayaz Hafiz
42fdae4a57
Pass args by pointer 2022-09-12 12:25:37 -04:00
Ayaz Hafiz
203b21f7d1
Use OS args rather than string args 2022-09-12 12:25:36 -04:00
Ayaz Hafiz
ed9271829c
Cargo fmt 2022-09-12 12:25:04 -04:00
Ayaz Hafiz
98b6fe0f7f
Add command-line arguments for platform example 2022-09-12 12:25:03 -04:00
Ayaz Hafiz
ec628ed5c6
Pass cli arguments to main required by cli platform 2022-09-12 12:23:28 -04:00
Brian Carroll
6e64bfc513
Merge pull request #3961 from roc-lang/markdown
Static site with Markdown
2022-09-12 13:45:28 +01:00
Brian Carroll
c1709ea0d2
static-site-gen: print message before writing file 2022-09-12 08:31:46 +01:00
Jan Van Bruggen
4fa52e6dee
Fix file example app executable name
Signed-off-by: Jan Van Bruggen <JanCVanB@users.noreply.github.com>
2022-09-12 01:12:12 -06:00
Jan Van Bruggen
e84b43ddb6
Categorize FALSE interpreter as a CLI 2022-09-11 22:32:15 -06:00
Jan Van Bruggen
a9a65fcf4b
Recategorize interactive apps as CLIs 2022-09-11 22:32:15 -06:00
Jan Van Bruggen
d0f5599bd7
Categorize breakout game as a GUI 2022-09-11 22:32:15 -06:00
Jan Van Bruggen
527f39b8f2
Move Roc CLI testing examples to crates/ 2022-09-11 22:32:15 -06:00
Jan Van Bruggen
2eec200f09
Move helloWorld example up onto cli-platform 2022-09-11 22:22:50 -06:00
Richard Feldman
24dcc91799
Work around formatter bug (namely #4013) 2022-09-11 20:26:49 -04:00
Richard Feldman
d13d79d455
roc format 2022-09-11 19:28:36 -04:00
Richard Feldman
079311d080
Flesh out basic file I/O examples 2022-09-11 16:56:04 -04:00
Richard Feldman
224475a87d
Simplify File error types 2022-09-11 16:56:04 -04:00
Richard Feldman
d7235d376f
Improve documentation in File.roc 2022-09-11 16:56:04 -04:00
Folkert
a0fe1ec453
use repr(u8) instead of repr(C) for an enum 2022-09-11 16:56:03 -04:00
Richard Feldman
42ae4282ba
give some more specific errors in CLI example 2022-09-11 16:56:03 -04:00
Richard Feldman
7adc9c972b
Reanme path_from_list to path_from_roc_path 2022-09-11 16:56:03 -04:00
Richard Feldman
13ae5c068b
Extract write_slice 2022-09-11 16:56:03 -04:00
Richard Feldman
ca730c5b52
Basic implementations of file I/O in the host 2022-09-11 16:56:02 -04:00
Richard Feldman
92b897fc13
Add File I/O CLI example 2022-09-11 16:56:02 -04:00
Richard Feldman
f39e7e6737
Add File to CLI platform 2022-09-11 16:56:02 -04:00
Richard Feldman
75af7b2c5c
Add InternalTask 2022-09-11 16:56:02 -04:00
Richard Feldman
4a14a019b6
Add new File I/O CLI effects 2022-09-11 16:56:02 -04:00
Richard Feldman
762fa75511
Add Stderr.line to cli-platform 2022-09-11 16:56:02 -04:00
Brian Carroll
1a5395d196
static-site-gen: check output dir exists, to kill a Heisenbug on CI 2022-09-10 23:49:54 +01:00
Jan Van Bruggen
8bbfd68621
Add language to all fenced code blocks
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md040
2022-09-09 01:12:31 -06:00
Jan Van Bruggen
072a6bd002
Eliminate consecutive newlines
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md012
2022-09-09 01:12:30 -06:00
Jan Van Bruggen
3902668ce5
Add angle brackets to bare URLs
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md034
2022-09-09 01:12:30 -06:00
Jan Van Bruggen
3219178003
Ensure only one h1 per .md file
See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md025
2022-09-07 23:27:18 -06:00
Brian Carroll
cf6a62b7ad
static-site-gen: Use Box to workaround app/host ABI issues 2022-09-07 23:36:43 +01:00
Anton-4
322ae187bc
Merge branch 'main' into markdown
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-09-06 08:31:49 +02:00
Brian Carroll
6fe9466b0d
static-site-gen: add some CSS 2022-09-05 21:13:37 +01:00
Brian Carroll
c21a6cb67c
static-site-gen: New example using lorem ipsum content 2022-09-05 20:46:53 +01:00
Brian Carroll
aeac8035c1
Delete example (open license is for markdown not for the site) 2022-09-05 18:43:32 +01:00
Jan Van Bruggen
1272503bec
Merge pull request #3943 from sandprickle/move-examples-3912
Move Platform Examples (3912)
2022-09-05 10:38:24 -06:00
Brian Carroll
be245a8ede
static-site-gen: fix typos 2022-09-04 19:10:25 +01:00
Brian Carroll
fe8ea970e8
static-site-gen: report successes & errors, and update roc_cli test 2022-09-04 16:53:01 +01:00
Brian Carroll
ce357db270
static-site-gen: make the nav links nicer 2022-09-04 16:43:44 +01:00
Brian Carroll
bbb36cae17
static-site-gen: move assets to output folder 2022-09-04 16:43:05 +01:00
Brian Carroll
93bc73fb14
static-site-gen: copy assets from Daring Fireball 2022-09-04 16:43:03 +01:00