-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45d1c1c
commit 365ee9c
Showing
169 changed files
with
4,257 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
prompt: """How do I execute one wire that will run asynchornously to the main wire.""" | ||
|
||
solution: """ | ||
@wire(wire{ | ||
Detach(wire-to-run-asynchronously) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(wire{ | ||
Detach(Wire:wire-to-run-asynchronously) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
Detach will execute a wire concurrently in the background within the same mesh as the parent wire. Only one wire of each unique wire | ||
can be detached at any point in time. Subsequent detaches of the same wire, will be ignored. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,25 @@ | ||
{ | ||
prompt: """How do I execute and generate multiple wires that will execute inline to the parent wire.""" | ||
|
||
solution: """ | ||
@wire(main-wire{ | ||
[1 2 3] | ||
DoMany(other-wire) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(main-wire{ | ||
[1 2 3] | ||
Do(Wire:other-wire) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
DoMany is a shard that will generate and execute multiple wires inline to the parent wire. As opposed to Do which will only generate | ||
one wire that is reused, DoMany will generate a number of wires depending on the number of elements in the sequence passed in as input. | ||
|
||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,23 @@ | ||
{ | ||
prompt: """How do I execute a wire from the main wire and continue the main wire after complete execution of the executed wire.""" | ||
|
||
solution: """ | ||
@wire(main-wire{ | ||
Do(other-wire) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(main-wire{ | ||
Do(Wire:other-wire) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
The Do Shard is a wire executor. When called, it will run the wire specified in the Wire parameter inline within the current wire. | ||
The called wire will execute from the start every time it is called and run synchronously within the context of the parent wire. | ||
|
||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,22 @@ | ||
{ | ||
prompt: """How do I stop a wire from executing momentarily for a period of time""" | ||
|
||
solution: """ | ||
@wire(wire{ | ||
Pause(0.5) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(wire{ | ||
Pause(Time: 0.5) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
The Pause Shard is a Shard that stops a wire from being executed momentarily for a period of time. If the wire is called by a wire | ||
Executor Shard within the time frame specified in the Time parameter, it will be ignored. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,21 @@ | ||
{ | ||
prompt: """How do I resume a wire that has been suspended from the start of the wire?""" | ||
|
||
solution: """ | ||
@wire(wire{ | ||
Restart(wire-paused) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(wire{ | ||
Restart(Wire:wire-paused) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
Restart is a Shard that will resume a previously suspended wire from the start of said wire. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,21 @@ | ||
{ | ||
prompt: """How do I resume a wire that has been suspended from the point of suspension?""" | ||
|
||
solution: """ | ||
@wire(wire{ | ||
Resume(wire-paused) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(wire{ | ||
Resume(Wire:wire-paused) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
Resume will execute a previously suspended wire from the point of suspension. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,21 @@ | ||
{ | ||
prompt: """How do I execute multiple wires that will run asynchornously to the main wire.""" | ||
|
||
solution: """ | ||
@wire(wire{ | ||
Detach(wire-to-run-asynchronously) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(wire{ | ||
Detach(Wire:wire-to-run-asynchronously) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
Spawn will generate multiple wires that will run concurrently in the background within the same mesh as the parent wire. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,27 @@ | ||
{ | ||
prompt: """How do I execute and generate multiple wires that will execute inline to the parent wire and continue their state whenever called.""" | ||
|
||
solution: """ | ||
@wire(main-wire{ | ||
[1 2 3] | ||
DoMany(other-wire) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(main-wire{ | ||
[1 2 3] | ||
Do(Wire:other-wire) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
StepMany is a Shard that will generate and execute multiple wires inline to the parent wire. As opposed to Step which will only generate | ||
one wire that is reused, StepMany will generate a number of wires depending on the number of elements in the sequence passed in as input. | ||
StepMany will also continue the state of the wires generated whenever called, unlike DoMany and Do which will execute from the beginning of | ||
the wire. | ||
|
||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,25 @@ | ||
{ | ||
prompt: """How do I execute a wire that continues its state whenever it is called.""" | ||
|
||
solution: """ | ||
@wire(main-wire{ | ||
Step(other-wire-that-continues) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(main-wire{ | ||
Step(Wire:other-wire-that-continues) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
The Step Shard is a wire executor. When called, it will execute the wire specified in the Wire parameter. | ||
Like the Do Shard, Step will run the specified wire synchronously within the context of the parent wire. | ||
Unlike the Do Shard, which will execute a wire from the start whenever it is called, the Step Shard will continue executing a wire | ||
from where it last left off. For example, if a stepped wire is paused using the Pause Shard, the next time it is called, it will | ||
continue its state from where it last paused. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,23 @@ | ||
{ | ||
prompt: """How do I stop a wire?""" | ||
|
||
solution: """ | ||
@wire(main-wire{ | ||
Stop(wire-to-stop) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(main-wire{ | ||
Stop(Wire:wire-to-stop) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
Stop is a Shard that will stop a wire from executing. The wire can be executed again but it will be executed from the start, unlike | ||
Suspend which can be re-executed from the point of suspension. If no wire is fed into the Wire parameter, it will Stop the current wire. | ||
|
||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,22 @@ | ||
{ | ||
prompt: """How do I pause a wire until it is specifically resumed. """ | ||
|
||
solution: """ | ||
@wire(wire{ | ||
Suspend(wire-to-pause) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(wire{ | ||
Suspend(Wire:wire-to-pause) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
The Suspend shard is a shard that will pause the wire specified in the Wire parameter indefinitely until the Resume or Restart | ||
shards are used to revive the wire. If no wire is fed into the Wire parameter, it will suspend the current wire. | ||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,23 @@ | ||
{ | ||
prompt: """How do I suspend a wire and immediately switch execution to a different wire?""" | ||
|
||
solution: """ | ||
@wire(main-wire{ | ||
SwitchTo(wire-to-switch-to false) | ||
}) | ||
""" | ||
|
||
explicit: """ | ||
@wire(main-wire{ | ||
SwitchTo(Wire:wire-to-switch-to Restart:false) | ||
}) | ||
""" | ||
|
||
explanation: """ | ||
SwitchTo is a shard that suspends the currennt wire and switches execution to the wire specified in the Wire parameter. If the Restart | ||
parameter is set to true, the wire being switched to will restart instead of resuming from its suspended state. | ||
|
||
""" | ||
|
||
tag: " #General-Wire" | ||
} |
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,19 @@ | ||
{ | ||
prompt: """How do I convert Base58 to bytes?""" | ||
|
||
solution: """ | ||
bytes | ||
FromBase58 | ||
""" | ||
|
||
explicit: """ | ||
bytes | ||
FromBase58 | ||
""" | ||
|
||
explanation: """ | ||
FromBase58 is a Shard that takes in a base58 string as input and outputs the corresponding bytes. | ||
""" | ||
|
||
tag: " #General" | ||
} |
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,19 @@ | ||
{ | ||
prompt: """How do I convert Base64 to bytes?""" | ||
|
||
solution: """ | ||
bytes | ||
FromBase64 | ||
""" | ||
|
||
explicit: """ | ||
bytes | ||
FromBase64 | ||
""" | ||
|
||
explanation: """ | ||
FromBase64 is a Shard that takes in a base64 string as input and outputs the corresponding bytes. | ||
""" | ||
|
||
tag: " #General" | ||
} |
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,29 @@ | ||
{ | ||
prompt: """How do I create an empty Table?""" | ||
|
||
solution: """ | ||
Table(table-created) | ||
""" | ||
|
||
explicit: """ | ||
Table( | ||
Name: table-created | ||
;;Global: | ||
;;Type: | ||
) | ||
""" | ||
|
||
explanation: """ | ||
Table creates an empty table with or without a specified key (via the :Key parameter). | ||
The created table name is defined in the :Name parameter. | ||
|
||
Whether the created table variable has a global scope (available to all wires on the mesh) or a local scope | ||
(available only to the wire its defined in) can be controlled via the Global parameter (true for global scope, false | ||
for local scope; default is false). | ||
|
||
In addition to the key and the scope, this shard can also define the table's inner data types via the Types parameter. | ||
More than one data type may be set. | ||
""" | ||
|
||
tag: " #General" | ||
} |
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,21 @@ | ||
{ | ||
prompt: """How do I convert bytes to Base58""" | ||
|
||
solution: """ | ||
5 | ||
ToBytes | ||
ToBase58 | ||
""" | ||
|
||
explicit: """ | ||
5 | ||
ToBytes | ||
ToBase58 | ||
""" | ||
|
||
explanation: """ | ||
ToBase58 is a Shard that takes in bytes as input and outputs a base58 format string. | ||
""" | ||
|
||
tag: " #General" | ||
} |
Oops, something went wrong.