Skip to content

Commit

Permalink
Merge branch 'main' into add-robot-name
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron authored Oct 19, 2024
2 parents 73ab4ff + f894826 commit b4197cc
Show file tree
Hide file tree
Showing 159 changed files with 8,527 additions and 14 deletions.
12 changes: 11 additions & 1 deletion bin/add-exercise
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ fi
./bin/fetch-configlet
./bin/configlet create --practice-exercise "${slug}" --author "${author}" --difficulty "${difficulty}"

if [ -e ".problem-specifications/exercises/${slug}/.deprecated" ]; then
echo ""
printf "\e[31mWARNING: this exercise is deprecated\e[0m\n"
echo "-------------------------------------"
cat .problem-specifications/exercises/${slug}/.deprecated
echo "-------------------------------------"
echo ""
else

cat << END_TESTER > "exercises/practice/${slug}/.meta/template.j2"
{%- import "generator_macros.j2" as macros with context -%}
Expand Down Expand Up @@ -102,4 +110,6 @@ Your next steps are:
- Format all your Roc code by running 'roc format' on each .roc file
- Update the 'difficulty' value for the exercise's entry in the 'config.json' file
- Validate CI using 'bin/configlet lint' and 'bin/configlet fmt'
NEXT_STEPS
NEXT_STEPS

fi
180 changes: 176 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
"prerequisites": [],
"difficulty": 1
},
{
"slug": "high-scores",
"name": "High Scores",
"uuid": "80043e33-2549-435d-8739-14cbfa337b17",
"practices": [],
"prerequisites": [],
"difficulty": 1
},
{
"slug": "leap",
"name": "Leap",
Expand Down Expand Up @@ -77,15 +85,17 @@
"uuid": "8e8ad2db-88c2-4cca-88df-5add42efb3dc",
"practices": [],
"prerequisites": [],
"difficulty": 2
"difficulty": 2,
"status": "deprecated"
},
{
"slug": "binary",
"name": "Binary",
"uuid": "4188031d-ae8c-4ce5-b4e4-dd4ac14c7729",
"practices": [],
"prerequisites": [],
"difficulty": 2
"difficulty": 2,
"status": "deprecated"
},
{
"slug": "clock",
Expand Down Expand Up @@ -141,7 +151,8 @@
"uuid": "e63a6404-5e3a-41bc-b8bd-9a91b6513bf4",
"practices": [],
"prerequisites": [],
"difficulty": 2
"difficulty": 2,
"status": "deprecated"
},
{
"slug": "isogram",
Expand Down Expand Up @@ -181,7 +192,8 @@
"uuid": "98f71971-66cd-48b0-8f54-dab6b1505086",
"practices": [],
"prerequisites": [],
"difficulty": 2
"difficulty": 2,
"status": "deprecated"
},
{
"slug": "proverb",
Expand Down Expand Up @@ -295,6 +307,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "atbash-cipher",
"name": "Atbash Cipher",
"uuid": "57e5a257-9afd-46f1-8c43-6fbd6f371ca3",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "binary-search",
"name": "Binary Search",
Expand All @@ -311,6 +331,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "crypto-square",
"name": "Crypto Square",
"uuid": "b3e52a1c-d51f-4a86-8e3c-6bc2c89daa97",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "diamond",
"name": "Diamond",
Expand Down Expand Up @@ -343,6 +371,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "largest-series-product",
"name": "Largest Series Product",
"uuid": "30b8f3f3-ccb1-485f-90b9-d0d81a084167",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "matching-brackets",
"name": "Matching Brackets",
Expand All @@ -359,6 +395,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "nth-prime",
"name": "Nth Prime",
"uuid": "43dd9f02-130f-4947-8469-37229e819748",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "pangram",
"name": "Pangram",
Expand All @@ -367,6 +411,22 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "pascals-triangle",
"name": "Pascal's Triangle",
"uuid": "74935bfc-e18f-4dd4-a4b1-22fd540a4c24",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "phone-number",
"name": "Phone Number",
"uuid": "8ccc518a-562e-49a3-8690-affe98a091b5",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "protein-translation",
"name": "Protein Translation",
Expand All @@ -375,6 +435,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "pythagorean-triplet",
"name": "Pythagorean Triplet",
"uuid": "0b50a6d7-79fc-46a2-a62c-9d003c815896",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "queen-attack",
"name": "Queen Attack",
Expand Down Expand Up @@ -431,6 +499,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "spiral-matrix",
"name": "Spiral Matrix",
"uuid": "7f8e880a-def6-463a-99b6-8864ef69177b",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "square-root",
"name": "Square Root",
Expand All @@ -439,6 +515,14 @@
"prerequisites": [],
"difficulty": 3
},
{
"slug": "strain",
"name": "Strain",
"uuid": "86f3e354-1452-4791-b099-c2861ff32aac",
"practices": [],
"prerequisites": [],
"difficulty": 3
},
{
"slug": "transpose",
"name": "Transpose",
Expand Down Expand Up @@ -471,6 +555,14 @@
"prerequisites": [],
"difficulty": 4
},
{
"slug": "custom-set",
"name": "Custom Set",
"uuid": "cad7b3db-6fdc-4df0-90da-3799d4a0e440",
"practices": [],
"prerequisites": [],
"difficulty": 4
},
{
"slug": "eliuds-eggs",
"name": "Eliud's Eggs",
Expand All @@ -495,6 +587,14 @@
"prerequisites": [],
"difficulty": 4
},
{
"slug": "meetup",
"name": "Meetup",
"uuid": "0ef0cb6e-fe81-4988-bc13-26caac30c4d8",
"practices": [],
"prerequisites": [],
"difficulty": 4
},
{
"slug": "perfect-numbers",
"name": "Perfect Numbers",
Expand All @@ -511,6 +611,22 @@
"prerequisites": [],
"difficulty": 4
},
{
"slug": "run-length-encoding",
"name": "Run-Length Encoding",
"uuid": "d6b8a979-8ce8-4f46-a6cd-35cd44b19701",
"practices": [],
"prerequisites": [],
"difficulty": 4
},
{
"slug": "variable-length-quantity",
"name": "Variable Length Quantity",
"uuid": "3d6cb550-b77f-44f3-a617-1243a4a52dcb",
"practices": [],
"prerequisites": [],
"difficulty": 4
},
{
"slug": "all-your-base",
"name": "All Your Base",
Expand Down Expand Up @@ -551,6 +667,14 @@
"prerequisites": [],
"difficulty": 5
},
{
"slug": "knapsack",
"name": "Knapsack",
"uuid": "07b3e979-9c13-4075-8608-95398a67a4dc",
"practices": [],
"prerequisites": [],
"difficulty": 5
},
{
"slug": "robot-name",
"name": "Robot Name",
Expand All @@ -567,6 +691,14 @@
"prerequisites": [],
"difficulty": 6
},
{
"slug": "change",
"name": "Change",
"uuid": "2660ff89-57d1-453e-b616-b76ac01c7eb9",
"practices": [],
"prerequisites": [],
"difficulty": 6
},
{
"slug": "connect",
"name": "Connect",
Expand All @@ -575,6 +707,14 @@
"prerequisites": [],
"difficulty": 6
},
{
"slug": "go-counting",
"name": "Go Counting",
"uuid": "8c81bf5c-5188-4e1b-9814-1f0f0fcdeec2",
"practices": [],
"prerequisites": [],
"difficulty": 6
},
{
"slug": "gigasecond",
"name": "Gigasecond",
Expand Down Expand Up @@ -607,6 +747,14 @@
"prerequisites": [],
"difficulty": 6
},
{
"slug": "palindrome-products",
"name": "Palindrome Products",
"uuid": "a0f2579e-f990-4773-a05d-e7a508fcd53e",
"practices": [],
"prerequisites": [],
"difficulty": 6
},
{
"slug": "rational-numbers",
"name": "Rational Numbers",
Expand All @@ -615,6 +763,14 @@
"prerequisites": [],
"difficulty": 6
},
{
"slug": "tournament",
"name": "Tournament",
"uuid": "aca2366a-03d8-47c5-b007-2d89f73a54dc",
"practices": [],
"prerequisites": [],
"difficulty": 6
},
{
"slug": "two-bucket",
"name": "Two Bucket",
Expand All @@ -623,6 +779,14 @@
"prerequisites": [],
"difficulty": 6
},
{
"slug": "word-search",
"name": "Word Search",
"uuid": "6e00fa23-6f9c-412b-9cc4-f257158c8f64",
"practices": [],
"prerequisites": [],
"difficulty": 6
},
{
"slug": "bowling",
"name": "Bowling",
Expand All @@ -639,6 +803,14 @@
"prerequisites": [],
"difficulty": 7
},
{
"slug": "poker",
"name": "Poker",
"uuid": "08d1815b-185f-4bf3-b63b-99ee0d25c055",
"practices": [],
"prerequisites": [],
"difficulty": 7
},
{
"slug": "wordy",
"name": "Wordy",
Expand Down
2 changes: 1 addition & 1 deletion config/generator_macros.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ app [main] {
{% if name == "unicode" -%}
unicode: "https://github.com/roc-lang/unicode/releases/download/0.1.2/vH5iqn04ShmqP-pNemgF773f86COePSqMWHzVGrAKNo.tar.br"
{%- elif name == "isodate" -%}
isodate: "https://github.com/imclerran/roc-isodate/releases/download/v0.5.0/ptg0ElRLlIqsxMDZTTvQHgUSkNrUSymQaGwTfv0UEmk.tar.br"
isodate: "https://github.com/imclerran/roc-isodate/releases/download/v0.5.1/XHx5wx95nuICKpN8sxMwYnCme5oX_YFbJUL1s6D1feU.tar.br"
{%- elif name == "json" -%}
json: "https://github.com/lukewilliamboswell/roc-json/releases/download/0.10.2/FH4N0Sw-JSFXJfG3j54VEDPtXOoN-6I9v_IA8S18IGk.tar.br"
{%- elif name == "rand" -%}
Expand Down
Loading

0 comments on commit b4197cc

Please sign in to comment.