-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from LukasNysted/dev-prop
TroupeCheck
- Loading branch information
Showing
42 changed files
with
6,490 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ yarn-error.log | |
*.swp | ||
bin/troupe | ||
bin/understudy | ||
trp-rt/out/ | ||
trp-rt/out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,5 +69,6 @@ in | |
, ("length", length) | ||
, ("append", append) | ||
, ("partition", partition) | ||
, ("nth", nth) | ||
] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ lookup | |
elem | ||
length | ||
append | ||
partition | ||
partition | ||
nth |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
2024-06-09T16:24:36.820Z [RTM] [32minfo[39m: Skipping network creation. Observe that all external IO operations will yield a runtime error. | ||
>>> Main thread finished with value: 2@{}%{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import lists | ||
let val ls = [1,2,3,4] | ||
in nth ls 2 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
2024-06-09T16:28:52.670Z [RTM] [32minfo[39m: Skipping network creation. Observe that all external IO operations will yield a runtime error. | ||
>>> Main thread finished with value: true@{}%{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import lists | ||
let val ls = ["ls", 3, 1/2, {r = 10, p = 7}] | ||
val string = nth ls 1 | ||
val int = nth ls 2 | ||
val float = nth ls 3 | ||
val record = nth ls 4 | ||
in (getType string = "string") andalso (getType int = "number") andalso (getType float = "number") andalso (getType record = "record") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
TLOCAL=$(TROUPE)/local.sh | ||
|
||
tc-tests: | ||
$(TLOCAL) ./tc_tests/general-testing.trp | ||
$(TLOCAL) ./tc_tests/userguide-tests.trp | ||
|
||
tc-shrink-tests: | ||
$(TLOCAL) ./tc_tests/shrinking-tests.trp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
MKID=node $(TROUPE)/rt/built/p2p/mkid.mjs | ||
MKALIASES=node $(TROUPE)/rt/built/p2p/mkaliases.js | ||
START=$(TROUPE)/network.sh | ||
|
||
battleship-game: | ||
|
||
$(START) battleship-game.trp --id=ids/battleship-game.json --port=6789 # --debug --debugp2p | ||
|
||
battleship-player1: | ||
$(START) battleship-player.trp --id=ids/battleship-player1.json --aliases=aliases.json # --debug --debugp2p | ||
|
||
battleship-player2: | ||
$(START) battleship-player.trp --id=ids/battleship-player2.json --aliases=aliases.json # --debug --debugp2p | ||
|
||
create-network-identifiers: | ||
mkdir -p ids | ||
$(MKID) --outfile=ids/battleship-game.json | ||
$(MKID) --outfile=ids/battleship-player1.json | ||
$(MKID) --outfile=ids/battleship-player2.json | ||
$(MKALIASES) --include ids/battleship-game.json --include ids/battleship-player1.json --include ids/battleship-player2.json --outfile aliases.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Battleship game example | ||
|
||
1. *First-time only* Run `make create-network-identifiers`. This command will create two network identifiers in the local subdirectory `ids/`, and an alias file with the generated identifiers. | ||
|
||
2. Run the server by running `make battleship-game` | ||
3. Open another terminal window and start player 1 by running `make battleship-player1` | ||
4. Open another terminal window again and start player 2 by running `make battleship-player2` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"battleship-game":"12D3KooWLz6JNygFFtyTjujjU29ivACgp9bxYGCHheoyfwxpgpv7","battleship-player1":"12D3KooWCCB5cy5eYhdrzPqUqYbmcQjKiKjBA8EH3jvtP5R6jkxc","battleship-player2":"12D3KooWQwT7Pv3vVTZjkhztwU4zzp3mNMQSstzkN2vvNai4uqNv"} |
Oops, something went wrong.