You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/INSTALLATION.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Installation Options
4
4
5
-
The current Unison release is available for Mac OS X, 64-bit Linux, and Windows users! We hope that if you are trying out Unison you'll come talk to us in the Exercism forum or in the [Unison language slack](http://unison-lang.org/slack). Come ask questions, and report issues you might encounter! We want you to have a welcoming and positive experience when getting started! 😊
5
+
The current Unison release is available for Mac OS X, 64-bit Linux, and Windows users! We hope that if you are trying out Unison you'll come talk to us in the Exercism forum or in the [Unison Discord](https://unison-lang.org/discord). Come ask questions, and report issues you might encounter! We want you to have a welcoming and positive experience when getting started! 😊
6
6
7
7
Unison can be downloaded with [homebrew](https://brew.sh/), [Nix](https://github.com/ceedubs/unison-nix/#usage), or directly via packaged binaries. All of these download options are described in the [Installation instructions page of our website](https://www.unison-lang.org/learn/quickstart/#installation-options). Once you have the UCM installed, head back here!
Copy file name to clipboardExpand all lines: docs/LEARNING.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,4 +8,4 @@ For reference material, the [Unison language reference](https://www.unison-lang.
8
8
9
9
You may want to familiarize yourself with [Unison Share](https://share.unison-lang.org/), Unison's repository for public libraries and projects. The documentation for the standard library, [`base`](https://share.unison-lang.org/@unison/code/latest/namespaces/public/base/latest), contains helpful usage information.
10
10
11
-
👋 If you're ever stuck, we're happy to help. The #beginner-friendly channel in [the official Unison slack](http://unison-lang.org/slack) is filled with friendly people.
11
+
👋 If you're ever stuck, we're happy to help. The #beginner-friendly channel in [the official Unison Discord server](https://unison-lang.org/discord) is filled with friendly people.
Copy file name to clipboardExpand all lines: docs/RESOURCES.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@
4
4
5
5
*[The Unison language documentation](https://www.unison-lang.org/learn/fundamentals/values-and-functions/terms/) is a great place to learn core Unison concepts
6
6
*[Unison Share](https://share.unison-lang.org/) is the repository where we host public libraries and code
7
-
* You can always ask questions in [the Unison slack](http://unison-lang.org/slack)
7
+
* You can always ask questions in [the Unison Discord](https://unison-lang.org/discord)
8
8
*[The Unison Blog](https://www.unison-lang.org/blog/) contains language updates and special topics
9
9
* An article about using [Unison's Remote ability to implement a Spark-like library](https://www.unison-lang.org/articles/distributed-datasets/)
10
10
11
11
## Videos
12
12
13
-
*[YOW! Lambda Jam 2021](https://www.youtube.com/watch?v=DF6zt0Q-pz4), by Rúnar Bjarnason
13
+
*[YOW! Lambda Jam 2021 - Part 1](https://www.youtube.com/watch?v=Adu75GJ0w1o), and [Part 2](https://www.youtube.com/watch?v=gy44CTCce0o), by Rúnar Bjarnason
14
14
*[Scale By the Bay 2019](https://www.youtube.com/watch?v=IvENPX0MAZ4), by Paul Chiusano
15
15
* This is a 32 minute talk that briefly covers the core ideas of Unison and talks about Unison's approach to refactoring.
16
16
*[Strange Loop 2019](https://www.youtube.com/watch?v=gCWtkvDQ2ZI), by Paul Chiusano
17
17
* This is a longer (40 min) introduction to the core ideas of Unison and probably the best talk to start with.
18
18
*[Scale By the Bay 2018](https://www.youtube.com/watch?v=v7L-5AQQkbM), by Paul Chiusano.
19
19
*[Lambda World 2018](https://www.youtube.com/watch?v=rp_Eild1aq8), by Rúnar Bjarnason also presented at [Øredev 2018](https://vimeo.com/311512465).
20
20
*[Scala World 2017](https://www.youtube.com/watch?v=knqlWboqf_U), by Paul Chiusano.
21
-
*[Full Stack Fest](https://www.youtube.com/watch?v=f6yA3t0dO-k) 2016, by Paul Chiusano
21
+
*[Full Stack Fest](https://www.youtube.com/watch?v=f6yA3t0dO-k) 2016, by Paul Chiusano
Copy file name to clipboardExpand all lines: docs/TESTS.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
Writing Unison code is as simple as opening your terminal of choice and running the `ucm` command in the directory where you'll be writing your Unison code. Then you can use your favorite text editor to create or open a file with a `.u` suffix, like `scratch.u` or `hello.u`. The bulk of your workflow will be navigating between the running `ucm` command line instance and your `.u` file. The UCM automatically listens to changes in your `.u` suffixed file upon saving the file.
10
10
11
-
In lieu of a directory structure, Unison codebases are organized via "namespaces". You'll be exploring the standard library's namespace, called `base`, for useful functions and data types, and you'll be creating your own as you write Unison code. In the UCM, navigation in the codebase is done with the [`ls`](https://www.unison-lang.org/learn/ucm-commands/#ls), [`cd`](https://www.unison-lang.org/learn/ucm-commands/#cd), and [`view`](https://www.unison-lang.org/learn/ucm-commands/#view) commands—they're used for listing namespace content, moving throughout the namespace tree, and viewing source code, respectively.
11
+
In lieu of a directory structure, Unison codebases are organized via "namespaces". You'll be exploring the standard library's namespace, called `base`, for useful functions and data types, and you'll be creating your own as you write Unison code. In the UCM, navigation in the codebase is done with the [`ls`](https://www.unison-lang.org/learn/ucm-commands/#ls)and [`view`](https://www.unison-lang.org/learn/ucm-commands/#view) commands—they're used for listing namespace content and viewing source code, respectively.
12
12
13
13
While you can navigate and view your codebase via the UCM CLI, you may also want to see a nice graphical representation of your work. You can do that by issuing the [`ui`](https://www.unison-lang.org/learn/ucm-commands/#ui) command in the UCM CLI. It will open a browser window with a view of the code in your codebase. The local codebase UI is also a great way to explore functions in our standard library, called `base`, which might be useful in accomplishing the exercises. [Read more about the local codebase UI here](https://www.unison-lang.org/learn/tooling/local-codebase-u-i/).
14
14
@@ -18,21 +18,22 @@
18
18
19
19
### Quick overview
20
20
21
-
1. With the UCM watching the exercise directory, make your changes in the `<myFileName>.u` file
22
-
2. Save the `<myFileName>.u` file
23
-
3. If the file typechecks, run the `add` or `update` UCM commands
21
+
1. Create a new project using command [`project.create`](https://www.unison-lang.org/docs/tour/#part-2-tour) and provide the name for it (e.g. `project.create hello-world`)
22
+
2. With the UCM watching the exercise directory, make your changes in the `<myFileName>.u` file
23
+
3. Save the `<myFileName>.u` file
24
+
4. If the file typechecks, run the `add` or `update` UCM commands
24
25
25
26
* If the file does not typecheck, make changes to the code in your `<myFileName>.u` file until it compiles
26
-
4. Run the `load <myFileName>.test.u` command in the UCM cli to bring the tests into scope and run them
27
+
5. Run the `load <myFileName>.test.u` command in the UCM cli to bring the tests into scope and run them
27
28
28
29
### Detailed walk through
29
30
30
-
If you're working on an Exercism problem on the command line, most likely you'll be implementing your solution in the directory named after the given exercise. For example, if the exercise is `hello-world`, you should open the `ucm` from the command line after having `cd`'ed into `~/exercism/unison/hello-world`. Make your implementation changes in the `hello.u` file, and when you're satisfied with your implementation, enter the `add` or `update` command in the Unison codebase manager CLI (UCM) to add your work from the file into the codebase.
31
+
If you're working on an Exercism problem on the command line, most likely you'll be implementing your solution in the directory named after the given exercise. For example, if the exercise is `hello-world`, you should open the `ucm` from the command line after having `cd`'ed into `~/exercism/unison/hello-world` and create a project in the `ucm` (e.g. `project.create hello-world`). Make your implementation changes in the `hello.u` file, and when you're satisfied with your implementation, enter the `add` or `update` command in the Unison codebase manager CLI (UCM) to add your work from the file into the codebase.
31
32
32
-
The file that contains the tests for each exercise is suffixed `.test.u`. You'll want to use the `load` command in the UCM to bring the tests into scope and run them. The `load` command takes a file path as its argument. Here's what that might look like for the hello world exercise:
33
+
The file that contains the tests for each exercise is suffixed `.test.u`. You'll want to use the `load` command in the UCM to bring the tests into scope and run them. The `load` command takes a file path as its argument. Here's what that might look like for the hello world exercise and `hello-world` project:
33
34
34
35
```
35
-
.> load hello.test.u
36
+
hello-world/main> load hello.test.u
36
37
```
37
38
38
39
You should see a message from the UCM about the terms that were brought into scope and, importantly, the result of running the test:
@@ -63,7 +64,7 @@
63
64
64
65
hello : Text
65
66
66
-
.> update
67
+
hello-world/main> update
67
68
68
69
⍟ I've updated these names to your new definition:
69
70
@@ -73,7 +74,7 @@
73
74
Next we can re-load our tests to see if anything changed!
74
75
75
76
```
76
-
.> load hello.test.u
77
+
hello-world/main> load hello.test.u
77
78
Now evaluating any watch expressions (lines starting with `>`)... Ctrl+C cancels.
78
79
79
80
@@ -91,7 +92,6 @@
91
92
* If the old definition has any dependents, update will automatically propagate the change if possible, or create a [`todo`](https://www.unison-lang.org/learn/usage-topics/workflow-how-tos/resolve-conflicts/) item for future refactoring.
92
93
*[`load`](https://www.unison-lang.org/learn/ucm-commands/#load): Parses, typechecks and evaluates the given `.u` suffixed scratch file. Once typechecked and evaluated, you can add the terms to your codebase.
93
94
*[`ls`](https://www.unison-lang.org/learn/ucm-commands/#ls): Lists the contents of a namespace
94
-
*[`cd`](https://www.unison-lang.org/learn/ucm-commands/#cd): Navigates into the given namespace, creating the namespace if it does not exist
95
95
*[`view`](https://www.unison-lang.org/learn/ucm-commands/#view): View the source code of a given Unison definition
96
96
*[`ui`](https://www.unison-lang.org/learn/ucm-commands/#ui): Opens the local codebase UI
Copy file name to clipboardExpand all lines: docs/WORKFLOW.md
+4
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,10 @@ The UCM will show the results of evaluating the expression upon saving the file.
14
14
15
15
For a more in-depth Exercism workflow, here's a [walk-through video][walk-through-vid] of implementing and testing an Exercism problem.
16
16
17
+
```exercism/caution
18
+
The walk-through video shows workflow for the older version of Unison. See new workflow [here](https://exercism.org/docs/tracks/unison/tests) with new project workflow.
19
+
```
20
+
17
21
## Codebase organization
18
22
19
23
A Unison codebase is organized by "namespaces." Namespaces function a bit like directories in a file system, except instead of containing files, they contain your Unison types and functions. Namespace paths are separated by dots, `.`. For example, we can refer to the `Text` namespace in the `base` namespace with `base.Text`.
"test_code": "pacmanRules.test.ex2 = let\n\tTest.label \"eatGhost, ghost does not get eaten because no power pellet active\" <| expect (eatGhost false true === false)"
7
+
"name": "eatGhost, ghost does not get eaten because no power pellet active",
8
+
"test_code": "let\n Test.label.deprecated\"eatGhost, ghost does not get eaten because no power pellet active\" <| expect (eatGhost false true === false)"
9
9
},
10
10
{
11
-
"name": "pacmanRules.test.ex3",
12
-
"test_code": "pacmanRules.test.ex3 = let\n\tTest.label \"eatGhost, ghost does not get eaten because not touching ghost\" <| expect (eatGhost true false === false)"
11
+
"name": "eatGhost, ghost does not get eaten because not touching ghost",
12
+
"test_code": "let\n Test.label.deprecated\"eatGhost, ghost does not get eaten because not touching ghost\" <| expect (eatGhost true false === false)"
"test_code": "pacmanRules.test.ex5 = let\n\tTest.label \"score, score when eating power pellet\" <| expect (score true false)"
19
+
"name": "score, score when eating power pellet",
20
+
"test_code": "let\n Test.label.deprecated\"score, score when eating power pellet\" <| expect (score true false)"
21
21
},
22
22
{
23
-
"name": "pacmanRules.test.ex6",
24
-
"test_code": "pacmanRules.test.ex6 = let\n\tTest.label \"score, no score when nothing eaten\" <| expect (score false false === false )"
23
+
"name": "score, no score when nothing eaten",
24
+
"test_code": "let\n Test.label.deprecated\"score, no score when nothing eaten\" <| expect (score false false === false )"
25
25
},
26
26
{
27
-
"name": "pacmanRules.test.ex7",
28
-
"test_code": "pacmanRules.test.ex7 = let\n\tTest.label \"lose if touching a ghost without a power pellet active\" <| expect (lose false true)"
27
+
"name": "lose if touching a ghost without a power pellet active",
28
+
"test_code": "let\n Test.label.deprecated\"lose if touching a ghost without a power pellet active\" <| expect (lose false true)"
29
29
},
30
30
{
31
-
"name": "pacmanRules.test.ex8",
32
-
"test_code": "pacmanRules.test.ex8 = let\n\tTest.label \"don't lose if touching a ghost with a power pellet active\" <| expect (lose true true === false)"
31
+
"name": "don't lose if touching a ghost with a power pellet active",
32
+
"test_code": "let\n Test.label.deprecated\"don't lose if touching a ghost with a power pellet active\" <| expect (lose true true === false)"
33
33
},
34
34
{
35
-
"name": "pacmanRules.test.ex9",
36
-
"test_code": "pacmanRules.test.ex9 = let\n\tTest.label \"don't lose if not touching a ghost\" <| expect (lose true false === false)"
35
+
"name": "don't lose if not touching a ghost",
36
+
"test_code": "let\n Test.label.deprecated\"don't lose if not touching a ghost\" <| expect (lose true false === false)"
37
37
},
38
38
{
39
-
"name": "pacmanRules.test.ex10",
40
-
"test_code": "pacmanRules.test.ex10 = let\n\tTest.label \"win if all dots eaten\" <| expect (win true false false)"
39
+
"name": "win if all dots eaten",
40
+
"test_code": "let\n Test.label.deprecated\"win if all dots eaten\" <| expect (win true false false)"
41
41
},
42
42
{
43
-
"name": "pacmanRules.test.ex11",
44
-
"test_code": "pacmanRules.test.ex11 = let\n\tTest.label \"don't win if all dots eaten, but touching a ghost\" <| expect (win true false true === false)"
43
+
"name": "don't win if all dots eaten, but touching a ghost",
44
+
"test_code": "let\n Test.label.deprecated\"don't win if all dots eaten, but touching a ghost\" <| expect (win true false true === false)"
45
45
},
46
46
{
47
-
"name": "pacmanRules.test.ex12",
48
-
"test_code": "pacmanRules.test.ex12 = let\n\tTest.label \"win if all dots eaten and touching a ghost with a power pellet active\",| expect (win true true true)"
47
+
"name": "win if all dots eaten and touching a ghost with a power pellet active",
48
+
"test_code": "let\n Test.label.deprecated\"win if all dots eaten and touching a ghost with a power pellet active\"<| expect (win true true true)"
0 commit comments