book: guide chapter working with collections (pipelines, collecting, sorting) #801
Labels
No labels
loop
queue/failed
queue/queued
ready
status/parked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
torbscript/language#801
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice of #587 (Guide chapters), which is a slice of the epic #582. Third chapter; #607 (first project) and #636 (modelling data) are merged. Governing note:
book/CONCEPT.md("How a page is written", "What CI checks"). Touches the seed: no (documentation only; no syntax change, no native, no driver flag, no std name looked up by the compiler).Goal
Write the Guide chapter
book/guide/working-with-collections.md: building aList, aMapand aSet, changing one in place or getting a changed copy, running values through a pipeline of steps, collecting the result into what you need (a named terminal operation first,collectwith anAccumulatorwhen none fits), and sorting by more than one key with a tuple key. Read likebook/guide/handling-errors.md,book/guide/first-project.mdandbook/guide/modelling-data.md: one example that grows across the sections.Replaces in
docs/docs/how-to/collect-a-pipeline.mddocs/how-to/sort-by-more-than-one-key.mddocs/guide/collections-and-pipelines.md(the parts the Tour pagebook/tour/collections.mddoes not already carry)About 300 lines of old material, one chapter; no further narrowing needed.
Acceptance criteria
book/guide/working-with-collections.mdexists with kindpage,status: stable, front matter in the shape of the other guide chapters (title,summary,order,keywords), and is written asbook/CONCEPT.md, "How a page is written", says: the first paragraph says in two to four sentences what the page covers, headings name ideas, prose first, no history words, no internal references (no issue numbers, no links intodocs/design,docs/contributing,docs/internals,CONCEPT.md), no Related/Next/See also sections, lists of at most seven items, every section starts with a sentencetrb runandtrb errorblock is followed by itsoutputblock with the real output (atrb errorblock shows whattorb checkprints, fromerror:on); aproject.trbis shown as a baretrbblock; no fragments, no// printscommentsList,MapandSet(value semantics,varfor a change), looping and pipelines (lazy until a terminal operation pulls), the named terminal operations (toList,sum,joined,groupBy) andcollectwith anAccumulator, including one accumulator of your own, and sorting by more than one key with a tuple key (and why a type has no generated order of its own)Mapanswers anOption) in the example that growsbook/guide/index.mdlists the new chapter (generated block viatorb docs index book);torb docs check book,torb docs index --check bookandtorb docs site book --checkpass, andtools/gates.shpasses in CIskills/torbscriptandskills/torbscript-languageare generated bytorb docs skill docs skillsand linkcollect-a-pipeline.mdandcollections-and-pipelines.md; for every old page a skill still needs, it stays indocs/unpublished and the PR description names it and why (as in #607 and #636, retiring may be a follow-up); the others are deleted together with every link to them, and the skills are regenerated sodocs skill --checkstays greentour/,start/,reference/,std/) is changed except the links that must follow from the deletion; the other four chapters of #587 are not startedNotes for the implementer
book/CONCEPT.md,book/guide/handling-errors.md,book/guide/modelling-data.mdandbook/tour/collections.mdfirst (do not repeat the Tour; the Guide goes where the Tour stops); run the examples withtorbbefore pasting their output.docs(book): guide chapter working with collectionsand, if needed,docs: retire the pages the chapter replaces.[loop:torbscript] intake: in scope (slice of #587, third guide chapter; goal, replaced docs and criteria are written, #607 and #636 merged, documentation only). next: waiting (ready buffer full: 7 issues
ready, 7 loop PRs open of 8; refine starts when the buffer drops below 4)[loop:torbscript] park refine: deferred 3 ticks in a row (starved), so parked instead of deferred again. Reason: the refine step waits while 4 issues are ready (#799, #680, #664, #656). Unpark and refine when the buffer has room. next: parked