Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual v1.6 links #202

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/RESOURCES.md
Original file line number Diff line number Diff line change
@@ -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].
Expand Down
8 changes: 4 additions & 4 deletions exercises/concept/assembly-line/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions exercises/concept/bird-count/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions exercises/concept/grade-stats/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 5 additions & 6 deletions exercises/concept/high-score-board/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions exercises/concept/lasagna/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion exercises/concept/recursive-functions/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 7 additions & 7 deletions exercises/concept/regular-chatbot/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions exercises/concept/remote-control-car/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions exercises/concept/vehicle-purchase/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion exercises/practice/etl/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions exercises/practice/gigasecond/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion exercises/practice/hello-world/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
5 changes: 5 additions & 0 deletions exercises/practice/knapsack/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/nth-prime/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion exercises/practice/pop-count/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
27 changes: 3 additions & 24 deletions exercises/practice/raindrops/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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 <top-level>, line 2:
| if . < 10 then "\(.) is less than ten" end
jq: error: Possibly unterminated 'if' statement at <top-level>, 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
2 changes: 1 addition & 1 deletion exercises/practice/transpose/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}