From f517807a6101744382d06b315e01b1e40e76157a Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Mon, 25 May 2026 15:06:20 -0700 Subject: [PATCH 1/2] Format all `instructions.append.md` to start with an H1 (required but ignored) and H2 --- .../.docs/instructions.append.md | 15 ++++++-------- .../.docs/instructions.append.md | 2 ++ .../ledger/.docs/instructions.append.md | 4 ++-- .../linked-list/.docs/instructions.append.md | 13 +++++------- .../phone-number/.docs/instructions.append.md | 4 ++-- .../practice/pov/.docs/instructions.append.md | 20 +++++++++---------- .../.docs/instructions.append.md | 5 +++-- .../robot-name/.docs/instructions.append.md | 10 +++++----- .../.docs/instructions.append.md | 6 ++---- .../.docs/instructions.append.md | 15 ++++++-------- .../two-fer/.docs/instructions.append.md | 2 ++ 11 files changed, 45 insertions(+), 51 deletions(-) diff --git a/exercises/practice/complex-numbers/.docs/instructions.append.md b/exercises/practice/complex-numbers/.docs/instructions.append.md index fa36038..1e265b3 100644 --- a/exercises/practice/complex-numbers/.docs/instructions.append.md +++ b/exercises/practice/complex-numbers/.docs/instructions.append.md @@ -1,15 +1,12 @@ # Instructions append -The Phix compiler is normally aware of all the standard packages that are distributed with it, and automatically -incorporates them for you when needed, however that is not always the case, just as it would not be for components -you have created as part of an application. This (dirt-simple) exercise involves nothing more than locating the -standard complex number package that is distributed with Phix and making it available for the tests to run. +## Implementation -You may use the [online][[online] copy of the docs, though if you have installed a copy locally you may find it has -better search facilities, especially the chm version, typically located in C:\Program Files[ (x86)]\Phix\docs\phix\. +The Phix compiler is normally aware of all the standard packages that are distributed with it, and automatically incorporates them for you when needed, however that is not always the case, just as it would not be for components you have created as part of an application. +This (dirt-simple) exercise involves nothing more than locating the standard complex number package that is distributed with Phix and making it available for the tests to run. -Should you want to learn how complex number arithmetic is implemented, you can do no better than to examine the -source code of that standard component, at least generally speaking - I am not going to deny there may be slightly -better algorithms out there for one or two things, that could be faster or more precise or both. +You may use the [online][[online] copy of the docs, though if you have installed a copy locally you may find it has better search facilities, especially the chm version, typically located in `C:\Program Files[ (x86)]\Phix\docs\phix\`. + +Should you want to learn how complex number arithmetic is implemented, you can do no better than to examine the source code of that standard component, at least generally speaking - I am not going to deny there may be slightly better algorithms out there for one or two things, that could be faster or more precise or both. [online]:(http://phix.x10.mx/docs/html/phix.htm) diff --git a/exercises/practice/flatten-array/.docs/instructions.append.md b/exercises/practice/flatten-array/.docs/instructions.append.md index 0176212..d40ebbd 100644 --- a/exercises/practice/flatten-array/.docs/instructions.append.md +++ b/exercises/practice/flatten-array/.docs/instructions.append.md @@ -1,3 +1,5 @@ # Instructions append +## Implementation + In Phix null==0 but/hence for these tests we have to use -1 instead. diff --git a/exercises/practice/ledger/.docs/instructions.append.md b/exercises/practice/ledger/.docs/instructions.append.md index 462145b..fc70fad 100644 --- a/exercises/practice/ledger/.docs/instructions.append.md +++ b/exercises/practice/ledger/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -Note the test harness for this exercise invokes printf(0,"",{"unicode_align",true}) which is needed to properly align -multibyte unicode/UTF-8 characters, specifically here the Euro sign, and hence get the tests to pass. +## Implementation +Note the test harness for this exercise invokes `printf(0,"",{"unicode_align",true})` which is needed to properly align multibyte unicode/UTF-8 characters, specifically here the Euro sign, and hence get the tests to pass. diff --git a/exercises/practice/linked-list/.docs/instructions.append.md b/exercises/practice/linked-list/.docs/instructions.append.md index 05a8aae..7128b10 100644 --- a/exercises/practice/linked-list/.docs/instructions.append.md +++ b/exercises/practice/linked-list/.docs/instructions.append.md @@ -1,12 +1,9 @@ # Instructions append -Phix does not have pointers, and implementing something like a linked list which is slightly tricky -to begin with, perhaps by emulating pointers with indexes, would not only be even trickier but also -utterly pointless, given that a standard sequence, the very backbone of the language, deals with -such things in a much easier and almost trivial way. Hence this exercise is a very simple one, to -emulate the behaviour of a double-linked(/ended) list using a single (flat) sequence, without any -pointers or similar of any kind. While multiple lists could be handled using multiple returns, or -the provided stack/queue include could be used (both can be instructed to perform an operation on -their "other" end), to further simplify matters we'll just use the single static variable "list". +## Implementation + +Phix does not have pointers, and implementing something like a linked list which is slightly tricky to begin with, perhaps by emulating pointers with indexes, would not only be even trickier but also utterly pointless, given that a standard sequence, the very backbone of the language, deals with such things in a much easier and almost trivial way. +Hence this exercise is a very simple one, to emulate the behaviour of a double-linked(/ended) list using a single (flat) sequence, without any pointers or similar of any kind. +While multiple lists could be handled using multiple returns, or the provided stack/queue include could be used (both can be instructed to perform an operation on their "other" end), to further simplify matters we'll just use the single static variable "list". [//]:# (this should require simple-linked-list to be completed first...) diff --git a/exercises/practice/phone-number/.docs/instructions.append.md b/exercises/practice/phone-number/.docs/instructions.append.md index 77814ab..a36075b 100644 --- a/exercises/practice/phone-number/.docs/instructions.append.md +++ b/exercises/practice/phone-number/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -You may return "error" instead of any of the more specific error messages that contain "not" or "must", -which in the tests specified for this exercise is all of them, or be prepared to return 13 different errors. +## Implementation +You may return "error" instead of any of the more specific error messages that contain "not" or "must", which in the tests specified for this exercise is all of them, or be prepared to return 13 different errors. diff --git a/exercises/practice/pov/.docs/instructions.append.md b/exercises/practice/pov/.docs/instructions.append.md index 6054573..01653d3 100644 --- a/exercises/practice/pov/.docs/instructions.append.md +++ b/exercises/practice/pov/.docs/instructions.append.md @@ -1,13 +1,13 @@ # Instructions append -I consider this one of the most difficult exercises on this site: although the final code itself is -likely to be fairly straightforward, it may well be a challenge to conceptualise what it should do. -It can certainly trigger every possible p2js violation known to mankind, so I'd certainly recommend -solving it first under "without js", and later fixing it under "with js" only if you must. In fact, -the testing harness for this exercise already applies "without js" for you (and there is no way you -could possibly disable that when running online). - -For simplicity every tree/node must obey enum LABEL, CHILDREN, eg {"parent",{{"a",{}}}}, where each -element of CHILDREN also obeys the same rule. The {} is not optional. Not that I can think why, but -you would be allowed extra elements after those two. Every tree in/from the test data obeys said. +## Implementation + +I consider this one of the most difficult exercises on this site: although the final code itself is likely to be fairly straightforward, it may well be a challenge to conceptualise what it should do. +It can certainly trigger every possible p2js violation known to mankind, so I'd certainly recommend solving it first under "without js", and later fixing it under "with js" only if you must. +In fact, the testing harness for this exercise already applies "without js" for you (and there is no way you could possibly disable that when running online). + +For simplicity every tree/node must obey enum LABEL, CHILDREN, eg `{"parent",{{"a",{}}}}`, where each element of CHILDREN also obeys the same rule. +The `{}` is not optional. +Not that I can think why, but you would be allowed extra elements after those two. +Every tree in/from the test data obeys said. diff --git a/exercises/practice/prime-factors/.docs/instructions.append.md b/exercises/practice/prime-factors/.docs/instructions.append.md index 3c3471d..15cd2a0 100644 --- a/exercises/practice/prime-factors/.docs/instructions.append.md +++ b/exercises/practice/prime-factors/.docs/instructions.append.md @@ -1,6 +1,7 @@ # Instructions append +## Implementation + There is a builtin that almost does this for you, and no shame in using that. (No shame of course in using full longhand/longwinded code to solve this either.) -Tip: the builtin returns {1} rather than the {} this exercise demands, and you'd -have to override both default parameters to get it to return the right thing. +Tip: the builtin returns `{1}` rather than the `{}` this exercise demands, and you'd have to override both default parameters to get it to return the right thing. diff --git a/exercises/practice/robot-name/.docs/instructions.append.md b/exercises/practice/robot-name/.docs/instructions.append.md index b8bdef4..6d221e8 100644 --- a/exercises/practice/robot-name/.docs/instructions.append.md +++ b/exercises/practice/robot-name/.docs/instructions.append.md @@ -1,8 +1,8 @@ -# Stress test +# Instructions append + +## Stress test Test 8 seeks to prove unique names are generated for all 676,000 robots, but gives up after 5s. -Only if it completes will there be a ninth test (no more robot names). Should you only pass 8 -tests (and the 8th will have "[incomplete]" in it's description), it will still congratulate -you and let you submit your work, but perhaps you should consider a more efficient approach. +Only if it completes will there be a ninth test (no more robot names). +Should you only pass 8 tests (and the 8th will have "[incomplete]" in it's description), it will still congratulate you and let you submit your work, but perhaps you should consider a more efficient approach. The example/test solution manages to fully complete all tests in 0.5s, just so you know. - diff --git a/exercises/practice/simple-cipher/.docs/instructions.append.md b/exercises/practice/simple-cipher/.docs/instructions.append.md index b5d9991..9b2ed70 100644 --- a/exercises/practice/simple-cipher/.docs/instructions.append.md +++ b/exercises/practice/simple-cipher/.docs/instructions.append.md @@ -1,7 +1,5 @@ # Instructions append -Traditionally, encrypted results have spaces and punctuation removed and are converted to upper/lower case, -however when a test specifies a bPreserve of true neither of those should occur, and when false the result -should only contain the lowercase letters a..z, in which case perfect decryption isn't actually possible, -but rest assured the testing code is smart enough to know that. +## Implementation +Traditionally, encrypted results have spaces and punctuation removed and are converted to upper/lower case, however when a test specifies a bPreserve of true neither of those should occur, and when false the result should only contain the lowercase letters `a..z`, in which case perfect decryption isn't actually possible, but rest assured the testing code is smart enough to know that. diff --git a/exercises/practice/simple-linked-list/.docs/instructions.append.md b/exercises/practice/simple-linked-list/.docs/instructions.append.md index 0ed9bc1..8e47104 100644 --- a/exercises/practice/simple-linked-list/.docs/instructions.append.md +++ b/exercises/practice/simple-linked-list/.docs/instructions.append.md @@ -1,15 +1,12 @@ # Instructions append -Phix does not really have pointers, because it doesn't need them. The sequence type should always -be your first thought when thinking about storing data (graduating to in-memory dictionaries, and -on-disk databases as required), and in fact they are quite likely to outclass more traditionally -taught linked lists in maybe 99% of all cases. They can shrink and grow at will, with no manual -housekeeping, which not only instantly eliminates the main reason anybody ever still uses linked -lists but can even eradicate the housekeeping that linked lists themselves normally need. +## Implementation -This trivial exercise has two aims: to introduce sequences and some simple operations on them, -and to extinguish any desire for fiddly pointer-based structures that just don't belong in Phix. +Phix does not really have pointers, because it doesn't need them. +The sequence type should always be your first thought when thinking about storing data (graduating to in-memory dictionaries, and on-disk databases as required), and in fact they are quite likely to outclass more traditionally taught linked lists in maybe 99% of all cases. +They can shrink and grow at will, with no manual housekeeping, which not only instantly eliminates the main reason anybody ever still uses linked lists but can even eradicate the housekeeping that linked lists themselves normally need. + +This trivial exercise has two aims: to introduce sequences and some simple operations on them, and to extinguish any desire for fiddly pointer-based structures that just don't belong in Phix. [//]:# (now I've said all that, freelists really are a separate concept...) [//]:# (this, and linked-list might want to be concepts not exercises...) - diff --git a/exercises/practice/two-fer/.docs/instructions.append.md b/exercises/practice/two-fer/.docs/instructions.append.md index 4678e40..81f3ca9 100644 --- a/exercises/practice/two-fer/.docs/instructions.append.md +++ b/exercises/practice/two-fer/.docs/instructions.append.md @@ -1,3 +1,5 @@ # Instructions append +## Implementation + Phix provides support for [optional parameters](http://phix.x10.mx/docs/html/procedures.htm#optionalparams). From 632922b8ec7b8edcff9b71da19b14bfdceb569cd Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Tue, 26 May 2026 22:17:10 -0700 Subject: [PATCH 2/2] Update the header to "Track specific instructions" --- exercises/practice/complex-numbers/.docs/instructions.append.md | 2 +- exercises/practice/flatten-array/.docs/instructions.append.md | 2 +- exercises/practice/ledger/.docs/instructions.append.md | 2 +- exercises/practice/linked-list/.docs/instructions.append.md | 2 +- exercises/practice/phone-number/.docs/instructions.append.md | 2 +- exercises/practice/pov/.docs/instructions.append.md | 2 +- exercises/practice/prime-factors/.docs/instructions.append.md | 2 +- exercises/practice/simple-cipher/.docs/instructions.append.md | 2 +- .../practice/simple-linked-list/.docs/instructions.append.md | 2 +- exercises/practice/two-fer/.docs/instructions.append.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/exercises/practice/complex-numbers/.docs/instructions.append.md b/exercises/practice/complex-numbers/.docs/instructions.append.md index 1e265b3..21dd974 100644 --- a/exercises/practice/complex-numbers/.docs/instructions.append.md +++ b/exercises/practice/complex-numbers/.docs/instructions.append.md @@ -1,6 +1,6 @@ # Instructions append -## Implementation +## Track specific instructions The Phix compiler is normally aware of all the standard packages that are distributed with it, and automatically incorporates them for you when needed, however that is not always the case, just as it would not be for components you have created as part of an application. This (dirt-simple) exercise involves nothing more than locating the standard complex number package that is distributed with Phix and making it available for the tests to run. diff --git a/exercises/practice/flatten-array/.docs/instructions.append.md b/exercises/practice/flatten-array/.docs/instructions.append.md index d40ebbd..f2df642 100644 --- a/exercises/practice/flatten-array/.docs/instructions.append.md +++ b/exercises/practice/flatten-array/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -## Implementation +## Track specific instructions In Phix null==0 but/hence for these tests we have to use -1 instead. diff --git a/exercises/practice/ledger/.docs/instructions.append.md b/exercises/practice/ledger/.docs/instructions.append.md index fc70fad..f256b71 100644 --- a/exercises/practice/ledger/.docs/instructions.append.md +++ b/exercises/practice/ledger/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -## Implementation +## Track specific instructions Note the test harness for this exercise invokes `printf(0,"",{"unicode_align",true})` which is needed to properly align multibyte unicode/UTF-8 characters, specifically here the Euro sign, and hence get the tests to pass. diff --git a/exercises/practice/linked-list/.docs/instructions.append.md b/exercises/practice/linked-list/.docs/instructions.append.md index 7128b10..6abb812 100644 --- a/exercises/practice/linked-list/.docs/instructions.append.md +++ b/exercises/practice/linked-list/.docs/instructions.append.md @@ -1,6 +1,6 @@ # Instructions append -## Implementation +## Track specific instructions Phix does not have pointers, and implementing something like a linked list which is slightly tricky to begin with, perhaps by emulating pointers with indexes, would not only be even trickier but also utterly pointless, given that a standard sequence, the very backbone of the language, deals with such things in a much easier and almost trivial way. Hence this exercise is a very simple one, to emulate the behaviour of a double-linked(/ended) list using a single (flat) sequence, without any pointers or similar of any kind. diff --git a/exercises/practice/phone-number/.docs/instructions.append.md b/exercises/practice/phone-number/.docs/instructions.append.md index a36075b..11cb0e2 100644 --- a/exercises/practice/phone-number/.docs/instructions.append.md +++ b/exercises/practice/phone-number/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -## Implementation +## Track specific instructions You may return "error" instead of any of the more specific error messages that contain "not" or "must", which in the tests specified for this exercise is all of them, or be prepared to return 13 different errors. diff --git a/exercises/practice/pov/.docs/instructions.append.md b/exercises/practice/pov/.docs/instructions.append.md index 01653d3..952ad17 100644 --- a/exercises/practice/pov/.docs/instructions.append.md +++ b/exercises/practice/pov/.docs/instructions.append.md @@ -1,6 +1,6 @@ # Instructions append -## Implementation +## Track specific instructions I consider this one of the most difficult exercises on this site: although the final code itself is likely to be fairly straightforward, it may well be a challenge to conceptualise what it should do. It can certainly trigger every possible p2js violation known to mankind, so I'd certainly recommend solving it first under "without js", and later fixing it under "with js" only if you must. diff --git a/exercises/practice/prime-factors/.docs/instructions.append.md b/exercises/practice/prime-factors/.docs/instructions.append.md index 15cd2a0..38f389c 100644 --- a/exercises/practice/prime-factors/.docs/instructions.append.md +++ b/exercises/practice/prime-factors/.docs/instructions.append.md @@ -1,6 +1,6 @@ # Instructions append -## Implementation +## Track specific instructions There is a builtin that almost does this for you, and no shame in using that. (No shame of course in using full longhand/longwinded code to solve this either.) diff --git a/exercises/practice/simple-cipher/.docs/instructions.append.md b/exercises/practice/simple-cipher/.docs/instructions.append.md index 9b2ed70..2caad73 100644 --- a/exercises/practice/simple-cipher/.docs/instructions.append.md +++ b/exercises/practice/simple-cipher/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -## Implementation +## Track specific instructions Traditionally, encrypted results have spaces and punctuation removed and are converted to upper/lower case, however when a test specifies a bPreserve of true neither of those should occur, and when false the result should only contain the lowercase letters `a..z`, in which case perfect decryption isn't actually possible, but rest assured the testing code is smart enough to know that. diff --git a/exercises/practice/simple-linked-list/.docs/instructions.append.md b/exercises/practice/simple-linked-list/.docs/instructions.append.md index 8e47104..bedc38a 100644 --- a/exercises/practice/simple-linked-list/.docs/instructions.append.md +++ b/exercises/practice/simple-linked-list/.docs/instructions.append.md @@ -1,6 +1,6 @@ # Instructions append -## Implementation +## Track specific instructions Phix does not really have pointers, because it doesn't need them. The sequence type should always be your first thought when thinking about storing data (graduating to in-memory dictionaries, and on-disk databases as required), and in fact they are quite likely to outclass more traditionally taught linked lists in maybe 99% of all cases. diff --git a/exercises/practice/two-fer/.docs/instructions.append.md b/exercises/practice/two-fer/.docs/instructions.append.md index 81f3ca9..5f899f8 100644 --- a/exercises/practice/two-fer/.docs/instructions.append.md +++ b/exercises/practice/two-fer/.docs/instructions.append.md @@ -1,5 +1,5 @@ # Instructions append -## Implementation +## Track specific instructions Phix provides support for [optional parameters](http://phix.x10.mx/docs/html/procedures.htm#optionalparams).