brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 111 forks source link

docs typo #1659

Closed shriram closed 6 months ago

shriram commented 2 years ago

Fairly certain the text from this page swaps 2 and 3:

image

Also, I think it would be better if the text said "ascending" and "descending" instead of "increasing" and "decreasing", though maybe there were reasons for choosing those words instead.

Bug found by Siddharth Yende.

jpolitz commented 2 years ago

Thanks! Fixed by https://github.com/brownplt/pyret-docs/commit/31e1f748ca9311bc3a8bc3d4bdb07100c03167bf

I think ascending/descending were picked because they make a little more sense with data that doesn't represent a quantity but is orderable (like strings). Doesn't mean they are the perfect/better choice, but that was the reasoning!

shriram commented 12 months ago

Did this actually get built and pushed? Unless I'm misreading something, the bug is still there:

image

[Reported by Aren Guralp.]

jpolitz commented 12 months ago

Ugh, you're right. There's a strange deploy error on master. Nothing for you to do about it, I'll see what I can figure out

https://app.travis-ci.com/github/brownplt/pyret-docs/builds/266268147 for reference; the bit that says “Skipping a deployment with the s3 provider because this branch is not permitted: master”

image
blerner commented 6 months ago

It's deployed:

Tables can be sorted by multiple columns. In general you may select as many columns as desired, and can mix and match ascending and descending sorts. No column can be mentioned more than once.

order some-table:
  column1 ascending,
  column3 descending,
  column2 ascending
end

This example will first sort the data in increasing order on column1. If there are any duplicate values in column1, each such group of rows will be sorted in decreasing order by column3. If there are any duplicates in both columns, each remaining group will be sorted in increasing order by column2.