-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use CommonMark-compatible info strings everywhere
The bulk of this updates transcripts to put spaces around the language name in code blocks. E.g., ```` markdown ```ucm:hide ```` becomes ```` markdown ``` ucm :hide ```` This corresponds to https://share.unison-lang.org/@unison/website/contributions/11, which updates the docs in the same way. This is effectively a fix for #5214, but that issue also has good recommendations for future changes to info strings, so I don’t know that it should be closed.
- Loading branch information
Showing
387 changed files
with
2,406 additions
and
2,489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,96 @@ | ||
```ucm:hide | ||
``` ucm :hide | ||
scratch/main> pull unison.public.base.releases.M4d base | ||
scratch/main> pull runarorama.public.sort.data sort | ||
``` | ||
|
||
```unison:hide | ||
``` unison :hide | ||
benchmarkFilePath = FilePath "unison-src/transcripts-manual/benchmarks/output.bench.txt" | ||
archiveFilePath = FilePath "unison-src/transcripts-manual/benchmarks/output" | ||
timeit : Text -> '{IO,Exception} a ->{IO,Exception} a | ||
timeit label a = | ||
timeit label a = | ||
before = !realtime | ||
r = !a | ||
after = !realtime | ||
elapsed = Duration.between before after | ||
elapsedText = Duration.toText elapsed | ||
go file = | ||
go file = | ||
putText file ("\n" ++ label ++ " " ++ Int.toText (Duration.countMicroseconds elapsed) ++ " # " ++ elapsedText) | ||
printLine ("\n\n ******** \n") | ||
printLine (label ++ " took " ++ elapsedText) | ||
bracket '(FilePath.open benchmarkFilePath FileMode.Append) Handle.close go | ||
r | ||
prepare = do | ||
-- if benchmarkFilePath exists, move it to blah-<datetime>.txt for archive purposes | ||
prepare = do | ||
-- if benchmarkFilePath exists, move it to blah-<datetime>.txt for archive purposes | ||
use Text ++ | ||
if FilePath.exists benchmarkFilePath then | ||
createDirectory archiveFilePath | ||
now = OffsetDateTime.toText (atUTC !realtime) | ||
timestamped = FilePath.toText archiveFilePath ++ "/" ++ now ++ "-bench.txt" | ||
timestamped = FilePath.toText archiveFilePath ++ "/" ++ now ++ "-bench.txt" | ||
renameFile benchmarkFilePath (FilePath timestamped) | ||
else | ||
else | ||
() | ||
``` | ||
|
||
```ucm:hide | ||
``` ucm :hide | ||
scratch/main> add | ||
scratch/main> run prepare | ||
``` | ||
|
||
## Benchmarks | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/each.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/listmap.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/listfilter.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/random.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/simpleloop.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/fibonacci.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/map.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/natmap.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/stm.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/tmap.u | ||
scratch/main> run main | ||
``` | ||
|
||
```ucm | ||
``` ucm | ||
scratch/main> load unison-src/transcripts-manual/benchmarks/array-sort.u | ||
scratch/main> run main | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.