From a9c36c2657b7fafa563efafb3aedd23de3e439f3 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Tue, 2 Jan 2024 15:41:44 +0000 Subject: [PATCH 1/5] sync track --- exercises/practice/hello-world/.meta/config.json | 2 +- exercises/practice/knapsack/.meta/tests.toml | 5 +++++ exercises/practice/pop-count/.meta/config.json | 2 +- exercises/practice/transpose/.meta/config.json | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/exercises/practice/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json index bcbaab1..1004ba4 100644 --- a/exercises/practice/hello-world/.meta/config.json +++ b/exercises/practice/hello-world/.meta/config.json @@ -13,7 +13,7 @@ ".meta/example.jq" ] }, - "blurb": "The classical introductory exercise. Just say \"Hello, World!\".", + "blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".", "source": "This is an exercise to introduce users to using Exercism", "source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program" } diff --git a/exercises/practice/knapsack/.meta/tests.toml b/exercises/practice/knapsack/.meta/tests.toml index febc7b2..8e013ef 100644 --- a/exercises/practice/knapsack/.meta/tests.toml +++ b/exercises/practice/knapsack/.meta/tests.toml @@ -11,6 +11,11 @@ [a4d7d2f0-ad8a-460c-86f3-88ba709d41a7] description = "no items" +include = false + +[3993a824-c20e-493d-b3c9-ee8a7753ee59] +description = "no items" +reimplements = "a4d7d2f0-ad8a-460c-86f3-88ba709d41a7" [1d39e98c-6249-4a8b-912f-87cb12e506b0] description = "one item, too heavy" diff --git a/exercises/practice/pop-count/.meta/config.json b/exercises/practice/pop-count/.meta/config.json index 063c322..57d8824 100644 --- a/exercises/practice/pop-count/.meta/config.json +++ b/exercises/practice/pop-count/.meta/config.json @@ -13,7 +13,7 @@ ".meta/example.jq" ] }, - "blurb": "Help Eluid count the number of eggs in her chicken coop by counting the number of 1 bits in a binary representation.", + "blurb": "Help Eliud count the number of eggs in her chicken coop by counting the number of 1 bits in a binary representation.", "source": "Christian Willner, Eric Willigers", "source_url": "https://forum.exercism.org/t/new-exercise-suggestion-pop-count/7632/5" } diff --git a/exercises/practice/transpose/.meta/config.json b/exercises/practice/transpose/.meta/config.json index ac540c3..39c457b 100644 --- a/exercises/practice/transpose/.meta/config.json +++ b/exercises/practice/transpose/.meta/config.json @@ -15,5 +15,5 @@ }, "blurb": "Take input text and output it transposed.", "source": "Reddit r/dailyprogrammer challenge #270 [Easy].", - "source_url": "https://www.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text" + "source_url": "https://web.archive.org/web/20230630051421/https://old.reddit.com/r/dailyprogrammer/comments/4msu2x/challenge_270_easy_transpose_the_input_text/" } From 59a9048c25ae2b6fe3c61dc54cb9b1f5ee67c36b Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Wed, 3 Jan 2024 20:54:07 +0000 Subject: [PATCH 2/5] remove doc for v1.6 constraint that `else` is required --- .../raindrops/.docs/instructions.append.md | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/exercises/practice/raindrops/.docs/instructions.append.md b/exercises/practice/raindrops/.docs/instructions.append.md index 04d403b..4dac8b6 100644 --- a/exercises/practice/raindrops/.docs/instructions.append.md +++ b/exercises/practice/raindrops/.docs/instructions.append.md @@ -3,17 +3,13 @@ ## `jq` Tips The [`if-then-else` expression][if] will be helpful in this exercise. - -One thing to note: the version of `jq` used in this track is **1.6**. -In this version, the `else` clause is **required**. - An example: ```jq 8, 12 | if . < 10 - then "\(.) is less than ten" - else "\(.) is more than ten" + then "\(.) is less than ten" + else "\(.) is more than ten" end ``` @@ -24,21 +20,4 @@ outputs "12 is more than ten" ``` -But - -```jq -8, 12 -| if . < 10 then "\(.) is less than ten" end -``` - -outputs - -```none -jq: error: syntax error, unexpected end (Unix shell quoting issues?) at , line 2: -| if . < 10 then "\(.) is less than ten" end -jq: error: Possibly unterminated 'if' statement at , line 2: -| if . < 10 then "\(.) is less than ten" end -jq: 2 compile errors -``` - -[if]: https://jqlang.github.io/jq/manual/v1.6/#if-then-else-end +[if]: https://jqlang.github.io/jq/manual/v1.7/#if-then-else-end From 523ad6434bc04446e9b67d207aab851b69d0f061 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Wed, 3 Jan 2024 21:03:57 +0000 Subject: [PATCH 3/5] change links in practice exercises to v1.7 manual. remove line about jq only able to parse ISO8601 datetimes; it's not true --- exercises/practice/etl/.docs/instructions.append.md | 2 +- exercises/practice/gigasecond/.docs/instructions.append.md | 3 +-- exercises/practice/nth-prime/.docs/instructions.append.md | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/exercises/practice/etl/.docs/instructions.append.md b/exercises/practice/etl/.docs/instructions.append.md index 8f8d1eb..63c6d30 100644 --- a/exercises/practice/etl/.docs/instructions.append.md +++ b/exercises/practice/etl/.docs/instructions.append.md @@ -46,4 +46,4 @@ outputs ] ``` -[x_entries]: https://jqlang.github.io/jq/manual/v1.6/#to_entries,from_entries,with_entries +[x_entries]: https://jqlang.github.io/jq/manual/v1.7/#to_entries-from_entries-with_entries diff --git a/exercises/practice/gigasecond/.docs/instructions.append.md b/exercises/practice/gigasecond/.docs/instructions.append.md index ffd0fbb..6d04fca 100644 --- a/exercises/practice/gigasecond/.docs/instructions.append.md +++ b/exercises/practice/gigasecond/.docs/instructions.append.md @@ -1,6 +1,5 @@ # placeholder To solve this exercise in jq, you will need to use the [builtin datetime functions][date-funcs]. -jq can only parse datetime strings in full ISO8601 format, such as `1970-01-01T00:00:00Z` -[date-funcs]: https://jqlang.github.io/jq/manual/v1.6/#Dates +[date-funcs]: https://jqlang.github.io/jq/manual/v1.7/#dates diff --git a/exercises/practice/nth-prime/.docs/instructions.append.md b/exercises/practice/nth-prime/.docs/instructions.append.md index 1817beb..a1253e9 100644 --- a/exercises/practice/nth-prime/.docs/instructions.append.md +++ b/exercises/practice/nth-prime/.docs/instructions.append.md @@ -12,4 +12,4 @@ In your solution, use `$n` as the input to get the nth prime. See [Invoking jq][man-invoke] in the manual. -[man-invoke]: https://jqlang.github.io/jq/manual/v1.6/#Invokingjq +[man-invoke]: https://jqlang.github.io/jq/manual/v1.7/#invoking-jq From d9c4857ade2694402a44e2d92f93bbc6e83d4361 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Wed, 3 Jan 2024 21:20:40 +0000 Subject: [PATCH 4/5] concept exercise hints point to v1.7 manual --- exercises/concept/assembly-line/.docs/hints.md | 8 ++++---- exercises/concept/bird-count/.docs/hints.md | 4 ++-- exercises/concept/grade-stats/.docs/hints.md | 4 ++-- exercises/concept/high-score-board/.docs/hints.md | 11 +++++------ exercises/concept/lasagna/.docs/hints.md | 8 ++++---- .../concept/recursive-functions/.docs/hints.md | 2 +- exercises/concept/regular-chatbot/.docs/hints.md | 14 +++++++------- .../concept/remote-control-car/.docs/hints.md | 6 +++--- exercises/concept/vehicle-purchase/.docs/hints.md | 8 ++++---- 9 files changed, 32 insertions(+), 33 deletions(-) diff --git a/exercises/concept/assembly-line/.docs/hints.md b/exercises/concept/assembly-line/.docs/hints.md index db85908..93fc319 100644 --- a/exercises/concept/assembly-line/.docs/hints.md +++ b/exercises/concept/assembly-line/.docs/hints.md @@ -18,7 +18,7 @@ - Division uses the `/` operator. - The result of the division will need to be truncated with [the `trunc` function][math-funcs]. -[eq]: https://jqlang.github.io/jq/manual/v1.6/#==,!= -[cmp]: https://jqlang.github.io/jq/manual/v1.6/#%3E,%3E=,%3C=,%3C -[if-then-else]: https://jqlang.github.io/jq/manual/v1.6/#if-then-else -[math-funcs]: https://jqlang.github.io/jq/manual/v1.6/#Math +[eq]: https://jqlang.github.io/jq/manual/v1.7/#==-!= +[cmp]: https://jqlang.github.io/jq/manual/v1.7/#%3E-%3E=-%3C=-%3C +[if-then-else]: https://jqlang.github.io/jq/manual/v1.7/#if-then-else-end +[math-funcs]: https://jqlang.github.io/jq/manual/v1.7/#math diff --git a/exercises/concept/bird-count/.docs/hints.md b/exercises/concept/bird-count/.docs/hints.md index 619427a..8c90610 100644 --- a/exercises/concept/bird-count/.docs/hints.md +++ b/exercises/concept/bird-count/.docs/hints.md @@ -24,5 +24,5 @@ - The one-argument version of the [any][manual-any] filter will be appropriate. -[manual-add]: https://jqlang.github.io/jq/manual/v1.6/#add -[manual-any]: https://jqlang.github.io/jq/manual/v1.6/#all,all(condition),all(generator;condition) +[manual-add]: https://jqlang.github.io/jq/manual/v1.7/#add +[manual-any]: https://jqlang.github.io/jq/manual/v1.7/#any diff --git a/exercises/concept/grade-stats/.docs/hints.md b/exercises/concept/grade-stats/.docs/hints.md index 40d9919..a432aa0 100644 --- a/exercises/concept/grade-stats/.docs/hints.md +++ b/exercises/concept/grade-stats/.docs/hints.md @@ -12,5 +12,5 @@ - The result object must have all the possible letter grades as keys, even if no students earned that grade. - The [`+=` assignment][jq-man-arith-assign] will be useful. -[jq-man-if]: https://jqlang.github.io/jq/manual/v1.6/#if-then-else -[jq-man-arith-assign]: https://jqlang.github.io/jq/manual/v1.6/#Arithmeticupdate-assignment:+=,-=,*=,/=,%=,//= +[jq-man-if]: https://jqlang.github.io/jq/manual/v1.7/#if-then-else-end +[jq-man-arith-assign]: https://jqlang.github.io/jq/manual/v1.7/#arithmetic-update-assignment diff --git a/exercises/concept/high-score-board/.docs/hints.md b/exercises/concept/high-score-board/.docs/hints.md index 28bedba..f693e86 100644 --- a/exercises/concept/high-score-board/.docs/hints.md +++ b/exercises/concept/high-score-board/.docs/hints.md @@ -36,9 +36,8 @@ We can use [`map_values`][man-map_values], or [`.[]`][man-brackets] to output a stream of values. - The `add` expression can be used to find the sum of a list of numbers. -[man-plus]: https://jqlang.github.io/jq/manual/v1.6/#Addition:+ -[man-del]: https://jqlang.github.io/jq/manual/v1.6/#del(path_expression) -[man-update-assignment]: https://jqlang.github.io/jq/manual/v1.6/#Arithmeticupdate-assignment:+=,-=,*=,/=,%=,//= -[man-map_values]: https://jqlang.github.io/jq/manual/v1.6/#map(x),map_values(x) - -[man-brackets]: https://jqlang.github.io/jq/manual/v1.6/#Array/ObjectValueIterator:.[] +[man-plus]: https://jqlang.github.io/jq/manual/v1.7/#addition +[man-del]: https://jqlang.github.io/jq/manual/v1.7/#del +[man-update-assignment]: https://jqlang.github.io/jq/manual/v1.7/#arithmetic-update-assignment +[man-map_values]: https://jqlang.github.io/jq/manual/v1.7/#map-map_values +[man-brackets]: https://jqlang.github.io/jq/manual/v1.7/#array-object-value-iterator diff --git a/exercises/concept/lasagna/.docs/hints.md b/exercises/concept/lasagna/.docs/hints.md index 6b3bc5a..69a6f68 100644 --- a/exercises/concept/lasagna/.docs/hints.md +++ b/exercises/concept/lasagna/.docs/hints.md @@ -28,7 +28,7 @@ - Include the calculated value in the output object for the key `"total_time"`. - [The `+` operator][addition] is used for arithmetic addition on numbers. -[subtraction]: https://jqlang.github.io/jq/manual/v1.6/#Subtraction:- -[multiplication]: https://jqlang.github.io/jq/manual/v1.6/#Multiplication,division,modulo:*,/,and% -[addition]: https://jqlang.github.io/jq/manual/v1.6/#Addition:+ -[alternative]: https://jqlang.github.io/jq/manual/v1.6/#Alternativeoperator:// +[subtraction]: https://jqlang.github.io/jq/manual/v1.7/#subtraction +[multiplication]: https://jqlang.github.io/jq/manual/v1.7/#multiplication-division-modulo +[addition]: https://jqlang.github.io/jq/manual/v1.7/#addition +[alternative]: https://jqlang.github.io/jq/manual/v1.7/#alternative-operator diff --git a/exercises/concept/recursive-functions/.docs/hints.md b/exercises/concept/recursive-functions/.docs/hints.md index 78c6a4a..c589466 100644 --- a/exercises/concept/recursive-functions/.docs/hints.md +++ b/exercises/concept/recursive-functions/.docs/hints.md @@ -27,4 +27,4 @@ - The base case is an empty array. [arrays-concept]: /tracks/jq/concepts/arrays -[manual-addition]: https://jqlang.github.io/jq/manual/v1.6/#Addition:+ +[manual-addition]: https://jqlang.github.io/jq/manual/v1.7/#addition diff --git a/exercises/concept/regular-chatbot/.docs/hints.md b/exercises/concept/regular-chatbot/.docs/hints.md index 755fe3d..2fe4d48 100644 --- a/exercises/concept/regular-chatbot/.docs/hints.md +++ b/exercises/concept/regular-chatbot/.docs/hints.md @@ -34,12 +34,12 @@ - The pattern is "comma followed by zero or more whitespace". - We have to use the **2-arity** `split` filter; there are no flags that need to be specified. -[flags]: https://jqlang.github.io/jq/manual/v1.6/#RegularexpressionsPCRE -[regex-test]: https://jqlang.github.io/jq/manual/v1.6/#test(val),test(regex;flags) -[regex-gsub]: https://jqlang.github.io/jq/manual/v1.6/#gsub(regex;string),gsub(regex;string;flags) -[regex-match]: https://jqlang.github.io/jq/manual/v1.6/#match(val),match(regex;flags) -[regex-scan]: https://jqlang.github.io/jq/manual/v1.6/#scan(regex),scan(regex;flags) -[regex-split]: https://jqlang.github.io/jq/manual/v1.6/#split(regex;flags) -[regex-capture]: https://jqlang.github.io/jq/manual/v1.6/#capture(val),capture(regex;flags) +[flags]: https://jqlang.github.io/jq/manual/v1.7/#regular-expressions +[regex-test]: https://jqlang.github.io/jq/manual/v1.7/#test +[regex-gsub]: https://jqlang.github.io/jq/manual/v1.7/#gsub +[regex-match]: https://jqlang.github.io/jq/manual/v1.7/#match +[regex-scan]: https://jqlang.github.io/jq/manual/v1.7/#scan +[regex-split]: https://jqlang.github.io/jq/manual/v1.7/#split-2 +[regex-capture]: https://jqlang.github.io/jq/manual/v1.7/#capture [named-capture]: https://riptutorial.com/regex/example/2479/named-capture-groups [phone-validation]: https://www.w3resource.com/javascript/form/phone-no-validation.php diff --git a/exercises/concept/remote-control-car/.docs/hints.md b/exercises/concept/remote-control-car/.docs/hints.md index 6e99694..7c4abc3 100644 --- a/exercises/concept/remote-control-car/.docs/hints.md +++ b/exercises/concept/remote-control-car/.docs/hints.md @@ -24,6 +24,6 @@ - If the battery is dead, it should return the object unchanged. -[string-interpolation]: https://jqlang.github.io/jq/manual/#Stringinterpolation-%5C(foo) -[if-then-else]: https://jqlang.github.io/jq/manual/#if-then-else -[update-assn]: https://jqlang.github.io/jq/manual/#Arithmeticupdate-assignment:+=,-=,*=,/=,%=,//= +[string-interpolation]: https://jqlang.github.io/jq/manual/v1.7/#string-interpolation +[if-then-else]: https://jqlang.github.io/jq/manual/v1.7/#if-then-else-end +[update-assn]: https://jqlang.github.io/jq/manual/v1.7/#arithmetic-update-assignment diff --git a/exercises/concept/vehicle-purchase/.docs/hints.md b/exercises/concept/vehicle-purchase/.docs/hints.md index e785432..7f5a0f4 100644 --- a/exercises/concept/vehicle-purchase/.docs/hints.md +++ b/exercises/concept/vehicle-purchase/.docs/hints.md @@ -20,7 +20,7 @@ - To calculate the result, apply the percentage to the original price. For example, `30% of x` can be calculated by multiplying `x` by `30` and dividing by `100`. -[equality operator]: https://jqlang.github.io/jq/manual/v1.6/#==,!= -[boolean operators]: https://jqlang.github.io/jq/manual/v1.6/#and/or/not -[comparison operator]: https://jqlang.github.io/jq/manual/v1.6/#%3E,%3E=,%3C=,%3C -[conditional expression]: https://jqlang.github.io/jq/manual/v1.6/#if-then-else +[equality operator]: https://jqlang.github.io/jq/manual/v1.7/#==-!= +[boolean operators]: https://jqlang.github.io/jq/manual/v1.7/#and-or-not +[comparison operator]: https://jqlang.github.io/jq/manual/v1.7/#%3E-%3E=-%3C=-%3C +[conditional expression]: https://jqlang.github.io/jq/manual/v1.7/#if-then-else-end From a2a477ed0df6b2282f3e168800296db2a0b36bd9 Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Wed, 3 Jan 2024 21:23:48 +0000 Subject: [PATCH 5/5] last remaining reference to stedolan github org --- docs/RESOURCES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/RESOURCES.md b/docs/RESOURCES.md index e68d5da..2afc7d4 100644 --- a/docs/RESOURCES.md +++ b/docs/RESOURCES.md @@ -1,8 +1,8 @@ # Resources - [jq home page][jq] -- Github: [stedolan/jq][github] -- Supplementary documentation: [stedolan/jq/wiki][wiki] +- Github: [jqlang/jq][github] +- Supplementary documentation: [jqlang/jq/wiki][wiki] - [jqplay.org][jqplay], an online "playground" for interacting with a jq interpreter - [ijq][ijq], interactive jq tool, like jqplay for the commandline. - [Exercism jq Cookbook][cook], an effort created by [@sshine][sshine].