Skip to content

Conversation

@colinleach
Copy link
Contributor

An attempt to address issue #1043.

Placing this in the syllabus will be an interesting challenge. We want it fairly early, to introduce students to mutating and non-mutating functions. On the other hand, the About touches on a wild variety of more advanced concepts, which we'll need to work around.

I'm tentatively thinking the sequence will be either Ranges -> Sorting -> Vector Operations or Vector Operations -> Sorting -> Functions.

Maybe this will be clearer once we have an exercise? I haven't found anything on another track that covers specifically this topic.

@colinleach colinleach requested a review from depial January 3, 2026 22:25
Copy link
Contributor

@depial depial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good! Just a couple of minor suggestions and a possible switch in an example.

With the exclusion of broadcasting, I think that there is enough in Ranges to have this follow. I'd imagine that we'll end up deleting the bits on multi-dimensional sorting in the introduction.md but everything else seems to be at an appropriate level.

'J': ASCII/Unicode U+004A (category Lu: Letter, uppercase)
'l': ASCII/Unicode U+006C (category Ll: Letter, lowercase)
'u': ASCII/Unicode U+0075 (category Ll: Letter, lowercase)
```
Copy link
Contributor

@depial depial Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not too much information, an example I have found useful is something like:

julia> tups = [(1, 3), (4, 2), (3, 4), (2, 1)];

julia> sort(tups, by=last)
4-element Vector{Tuple{Int64, Int64, Int64}}:
 (2, 1)
 (4, 2)
 (1, 3)
 (3, 4)

This also kinda gives a nice segue to the multi-dimensional arrays part.

Full example
julia> tups = [(1, 3), (4, 2), (3, 4), (2, 1)];

julia> sort(tups)
4-element Vector{Tuple{Int64, Int64, Int64}}:
 (1, 3)
 (2, 1)
 (3, 4)
 (4, 2)

julia> sort(tups, by=last)
4-element Vector{Tuple{Int64, Int64, Int64}}:
 (2, 1)
 (4, 2)
 (1, 3)
 (3, 4)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to About, with a forward-reference to the Tuples concept. I think it's too advanced for the Introduction.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! I'd forgotten about where Tuples come in. We could change this to Vectors and get the same effect:

julia> vecs = [[1, 3], [4, 2], [3, 4], [2, 1]];

julia> sort(vecs)  # by default sorts by the first element of the vectors
4-element Vector{Vector{Int64}}:
 [1, 3]
 [2, 1]
 [3, 4]
 [4, 2]

julia> sort(vecs, by=last)
4-element Vector{Vector{Int64}}:
 [2, 1]
 [4, 2]
 [1, 3]
 [3, 4]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, there might be a stray "about" in the last line:

The final example about will be explained in more detail in the [Tuples Concept][concept-tuples].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I'm fine with tuples for now. Let's wait and see what the exercise ends up needing: this bit may end up being removed from the Introduction regardless.

@colinleach
Copy link
Contributor Author

we'll end up deleting the bits on multi-dimensional sorting in the introduction.md

I'd already done that. I just checked, and I'd really done that (apart from a stray URL in the references), not just imagined it!

@colinleach colinleach merged commit 0cb89ab into exercism:main Jan 4, 2026
1 check passed
@depial
Copy link
Contributor

depial commented Jan 4, 2026

I'd already done that.

Sorry about that! I was operating under the (unjustified) assumption that introduction.md was still just a copy of about.md, so I didn't even go through it...

@colinleach
Copy link
Contributor Author

The Introduction appears on the website under my own account, and the About in incognito - nice! I'll read through them again to see what typos slipped through.

@colinleach colinleach deleted the sorting branch January 4, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants