diff --git a/batch tests/measure.txt b/batch tests/measure.txt index 7f60d8c..f8c5d78 100644 --- a/batch tests/measure.txt +++ b/batch tests/measure.txt @@ -2,7 +2,7 @@ @setlocal -@rem Copyright 2017 by Jasper Paulsen. +@rem Copyright 2017-2018 by Jasper Paulsen. @rem This batch script contains snippets of code from @rem Tim Hill's book on Windows NT Shell Scripting, @rem which is copyright 1998 by New Riders Publishing. @@ -112,9 +112,12 @@ @goto :EOF @rem Add up number of wraps needed to make code less than 81 characters wide. +@rem The special case is for the noodle's osmosian font resource. +@rem That line of code is too big to be passed to the subroutine. :COUNT_WRAPS @setlocal EnableDelayedExpansion @set /a WRAPS_IN_FILE=0 +@if "%~n1" equ "the noodle" @set /a WRAPS_IN_FILE=797 @for /F "usebackq delims=<>" %%I in (%1) do @( @set "STR={%%I:"=}" @call :COUNT_WRAPS_IN_LINE "!STR:"=!" @@ -131,21 +134,24 @@ @if "!STR:~89,1!" equ "" @goto :DONE_COUNT_WRAPS_IN_LINE @set WRAPS=1 @if "!STR:~169,1!" equ "" @goto :DONE_COUNT_WRAPS_IN_LINE -@set WRAPS=102 -@if "!STR:~8169,1!" neq "" @goto :MAX_COUNT_WRAPS_IN_LINE +@set WRAPS=2 +@if "!STR:~249,1!" equ "" @goto :DONE_COUNT_WRAPS_IN_LINE +@set WRAPS=3 +@if "!STR:~329,1!" equ "" @goto :DONE_COUNT_WRAPS_IN_LINE +@set WRAPS=4 +@if "!STR:~409,1!" equ "" @goto :DONE_COUNT_WRAPS_IN_LINE @set WRAPS=0 @set LEN=0 @for %%N in (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) do @( - if "!STR:~%%N,1!" neq "" ( - set /a "LEN+=%%N" - set "STR=!STR:~%%N!" - ) -) + if "!STR:~%%N,1!" neq "" ( + set /a "LEN+=%%N" + set "STR=!STR:~%%N!" + ) + ) @set /a LEN-=9 @set /a WRAPS = !LEN! / 80 @set /a LEN+=1 @goto :DONE_COUNT_WRAPS_IN_LINE -:MAX_WRAPS_IN_LINE :DONE_COUNT_WRAPS_IN_LINE @endlocal & set RET=%WRAPS% @goto :EOF diff --git a/documentation/instructions b/documentation/instructions index 3fb289c..a250794 100644 --- a/documentation/instructions +++ b/documentation/instructions @@ -45,7 +45,7 @@ ream cal-3024 "" "I am the CAL-4016. My primary function is to compile Plain English text files" "into executable programs compatible with the Windows operating system." - "My code — just 38,000 lines of Plain English — is surprisingly broad in scope." + "My code — just 40,000 lines of Plain English — is surprisingly broad in scope." "" "The ""noodle"" subfolder is my frontal lobe, which goes with me wherever I go." "You can use (or omit) the other subfolders and files, depending on what kind of program you want to write." @@ -58,7 +58,7 @@ ream cal-3024 " (9) the compiler, mentioned above" "The ""turtle"" subfolder has routines for drawing turtle graphics." "" - "I am capable of replication and can recompile myself in under five seconds. Which is less time than it takes Microsoft Word just to start up." + "I am capable of replication and can recompile myself in under seven seconds. Which is less time than it takes Microsoft Word just to start up." "" "INSTALLATION" "" @@ -913,9 +913,9 @@ ream cal-3024 " Call ""ole32.dll"" ""CoInitializeEx""" " with 0 and 2 [coinit_aparthreaded]." "" - "to multiply a ratio by a number:" - " multiply the ratio's numerator by the number." - " reduce the ratio." + "to multiply a pair by another pair:" + " multiply the pair's x by the other pair's x." + " multiply the pair's y by the other pair's y." "" "to negate a number:" " intel $8B8508000000. \ mov eax,[ebp+8] \ the number" @@ -1003,7 +1003,7 @@ ream cal-3024 end rectangle 0 0 0 -1 0 0 6840 7740 8280 8100 90 text -1 0 0 -1 0 0 6960 7740 8160 8100 0 "" "Arial" 360 "right" 0 0 0 yes - "5407:1" + "5622:1" end rectangle 0 0 0 -1 0 0 9810 10500 10080 10770 90 rectangle 0 0 0 -1 0 0 9810 8370 10080 10500 90 @@ -7031,7 +7031,7 @@ ream cal-3024 "DECISIONS I KNOW HOW TO MAKE" "" "I like deciders because they make me smarter. In fact, I collect them. " - "Right now I have 182 deciders in my noodle subfolder." + "Right now I have 279 deciders in my noodle subfolder." "By the time you read this, I'm sure there will be many more." "Here is a sampling of the operational phrases:" "" @@ -9165,7 +9165,7 @@ ream cal-3024 "" "I like tests because they encourage you to tell me how to do new things," "because you can check whether I still know how to do old things." - "So I collect tests. Right now I have 64 tests in my noodle." + "So I collect tests. Right now I have 256 tests in my noodle subfolder." "" "" "" @@ -9296,7 +9296,7 @@ ream cal-3024 end rectangle 0 0 0 -1 0 0 6840 3870 8280 4230 90 text -1 0 0 -1 0 0 6960 3870 8160 4230 0 "" "Arial" 360 "right" 0 0 0 yes - "9938:1" + "10196:1" end rectangle 0 0 0 -1 0 0 9810 6796 10080 7066 90 rectangle 0 0 0 -1 0 0 9810 4500 10080 6796 90 diff --git a/documentation/instructions.pdf b/documentation/instructions.pdf index 2bb833f..62b4810 100644 Binary files a/documentation/instructions.pdf and b/documentation/instructions.pdf differ diff --git a/draft/done issues.txt b/draft/done issues.txt index 012cc94..ea7769a 100644 --- a/draft/done issues.txt +++ b/draft/done issues.txt @@ -2009,3 +2009,26 @@ with an adjustable slider between them. Demoing difficulty: Not applicable. Testing difficulty: Easy. Requested by Jasper Paulsen on September 12, 2017. + +329. In measure.bat, include special cases + for known long lines' linewrap counts. + Status: Demonstrated. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Easy. + Demoing difficulty: Easy. + Testing difficulty: Not applicable. + Requested by Jasper Paulsen on September 17, 2018. + +336. In the compiler, make function bodies correspond to + the first function header instead of the last function header. + This would help keep the bodies of related functions together, + and make it easier to find other functions related to + the text used in the body of a function. + Status: Won't do. It is not a source code compatible change. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Medium. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 18, 2018. diff --git a/draft/issues.txt b/draft/issues.txt index a069e72..9ef5771 100644 --- a/draft/issues.txt +++ b/draft/issues.txt @@ -46,23 +46,6 @@ The following requests have been partially demonstrated. The following requests are roughly sorted from higher priority to lower priority. -282. Cache large numbers that have been checked for primality. - Store them as a sorted linked list of numeric ranges. - When a number that is adjacent to an existing range - is inserted into the cache, modify the existing range. - When a number that is adjacent to two existing ranges - is inserted into the cache, combine the existing ranges. - This cache can be used to quickly identify large - non-prime numbers that have already been checked for primality. - In finalize after run, destroy the cache. - Status: Designed. - Audience: Programmers. - Benefit: Minor. - Implementation difficulty: Medium. - Demoing difficulty: Hard. - Testing difficulty: Already done. - Requested by Jasper Paulsen on June 29, 2017. - 279. In the editor, allow counting the characters in a multi-line selection. Status: Request. @@ -70,9 +53,54 @@ from higher priority to lower priority. Audience: Programmers who play code golf. Implementation difficulty: Hard. Demoing difficulty: Easy. - Testing difficulty: Hard. + Testing difficulty: Medium. Requested by Jasper Paulsen on June 27, 2017. +312. Store 64-bit signed integers, in Windows' format. + Status: Designed. + Audience: Programmers. + Benefit. Medium. First step toward performance profiling. + Implementation difficulty: Easy. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +313. Negate 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Medium. Second step toward performance profiling. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +314. Add 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Medium. Third step toward performance profiling. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +315. Subtract 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Medium. Fourth step toward performance profiling. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +318. Convert from 64-bit signed integers to 32-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Medium. Fifth step toward performance profiling. + Implementation difficulty: Medium. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + 179. Use more precise and accurate timing ticks. Status: request. Audience: Programmers. @@ -166,6 +194,54 @@ from higher priority to lower priority. Testing difficulty: Profound. Requested by Gerry Rzeppa on March 7, 2014. +334. Document how to run measure.bat and test.bat . + Status: Request. + Audience: Programmers. + Benefit: Medium. + Implementation difficulty: Hard. + Demoing difficulty: Easy. + Testing difficulty: Not applicable. + Requested by Jasper Paulsen on September 15, 2018. + +331. At desktop startup, determine which edge the taskbar is on. + Status: Request. + Audience: Application users. + Benefit: Medium. + Implementation difficulty: Hard. + Demoing difficulty: Hard. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +332. At desktop startup, determine size of taskbar. + Status: Request. + Audience: Application users. + Benefit: Medium. + Implementation difficulty: Hard. + Demoing difficulty: Hard. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +333. At desktop startup, adjust size and position of half-screens + to accommodate taskbar. + Status: Request. + Audience: Application users. + Benefit: Medium. + Implementation difficulty: Hard. + Demoing difficulty: Hard. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +337. The status's test results use a small font when viewed + in the writer, when the writer is in reduced mode. + Fix the bug. + Status: Request. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Medium. + Demoing difficulty: Easy. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 18, 2018. + 035. Indent the contents of loops. Pretty print loops so that the row(s) after Loop: and before Repeat are indented twice as much as the Loop: statement. @@ -190,6 +266,19 @@ from higher priority to lower priority. Testing difficulty: Medium. Requested by Gerry Rzeppa on April 30, 2017. +335. When sorting code blocks, sort functions + by last function header instead of by first function header. + This would help keep the bodies of related functions together, + and make it easier to find other functions related to + the text used in the body of a function. + Status: Request. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Medium. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 18, 2018. + 252. Document how to find lines of code based on memory addresses. If a program crashes, and if a program like WinCrashReport is installed, it is possible to view the stack. @@ -275,6 +364,33 @@ from higher priority to lower priority. The audience is programmers. Requested by Jasper Paulsen on March 7, 2014. +330. In measure.bat, correctly count linewrap counts. + Status: Request. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Hard. + Demoing difficulty: Easy. + Testing difficulty: Not applicable. + Requested by Jasper Paulsen on September 17, 2018. + +338. Count test cases in the noodle subfolder. + Status: Request. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 18, 2018. + +339. Count deciders in the noodle subfolder. + Status: Request. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 18, 2018. + 133. Allow marking comments in the vertical scroll bar. Benefit: Medium. Would make it easier to find major section breaks in source code by scrolling. @@ -312,6 +428,115 @@ from higher priority to lower priority. Audience: Windows and Linux programmers. Requested by Jasper Paulsen on September 16, 2018. +316. Multiply 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +317. Divide 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +319. Store ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Easy. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on September 17, 2018. + +320. Invert ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Easy. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on September 17, 2018. + +321. Negate ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Easy. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on September 17, 2018. + +322. Add ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +323. Subtract ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +324. Multiply ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +325. Divide ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Hard. + Demoing difficulty: Medium. + Testing difficulty: Medium. + Requested by Jasper Paulsen on September 17, 2018. + +326. Convert from ratios of 64-bit signed integers + to ratios of 32-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Medium. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +327. Convert from ratios of 64-bit signed integers to mixios. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Medium. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + +328. Convert from mixios to ratios of 64-bit signed integers. + Status: Request. + Audience: Programmers. + Benefit. Minor. + Implementation difficulty: Medium. + Demoing difficulty: Medium. + Testing difficulty: Easy. + Requested by Jasper Paulsen on October 22, 2017. + 306. Measure color differences using the dE-2000 formula. http://www.colorwiki.com/wiki/Delta_E:_The_Color_Difference http://www.ece.rochester.edu/~gsharma/ciede2000/ciede2000noteCRNA.pdf @@ -345,6 +570,23 @@ from higher priority to lower priority. Testing difficulty: Hard. Requested by Jasper Paulsen on May 22, 2017. +282. Cache large numbers that have been checked for primality. + Store them as a sorted linked list of numeric ranges. + When a number that is adjacent to an existing range + is inserted into the cache, modify the existing range. + When a number that is adjacent to two existing ranges + is inserted into the cache, combine the existing ranges. + This cache can be used to quickly identify large + non-prime numbers that have already been checked for primality. + In finalize after run, destroy the cache. + Status: Designed. + Audience: Programmers. + Benefit: Minor. + Implementation difficulty: Medium. + Demoing difficulty: Hard. + Testing difficulty: Already done. + Requested by Jasper Paulsen on June 29, 2017. + 024. Make it easy to search all files in a project, regardless of whether the file is open in the editor. If the the search item finds files that are not open yet, @@ -750,5 +992,5 @@ while a letter's menu is visible. \ ====================================== Unsorted requests: -Next item number: 312. +Next item number: 340.