Talk:Extended Straddling Checkerboard

From Rosetta Code

Is this a draft task?--Nigel Galloway (talk) 14:28, 18 March 2024 (UTC)

Not in my book. It may as well read "A programming language is a thing. See wikipedia". It could be made into a draft task if the author specified which word dictionaries (and all their corresponding codes) and which 'arbitrary' functional codes to use, and specifically here how FIGURE was supposed to know how many digits there were (if not 1). Sample inputs and outputs will help. Of course if someone (Wherrera) is working on a submission, that alone would probably provide enough details to flesh out the task description. --Petelomax (talk) 14:34, 20 March 2024 (UTC)

--Wherrera (talk) 18:47, 25 March 2024 (UTC)

I have an implementation of one of the extended checkerboards in the reference, but wonder if it fits what the author wanted? They are vague since the page does not specify a task.--Wherrera (talk) 18:30, 20 March 2024 (UTC)
Well, as the author is not showing any signs of life, all we have to go on is that the implementation should support FIG and CODE fields. So, if yours does that, I’d post it and we’ll try and build a draft task around that. --PureFox (talk) 09:33, 21 March 2024 (UTC)
Sure/same, post it if you want, and we can turn the task into an actual task. I just wanted to avoid three or more independant and incompatible submissions simultaneously appearing. --Petelomax (talk) 12:04, 21 March 2024 (UTC)
Now it is a proper task, any thoughts on renaming to "Straddling Checkerboard, extended" or similar? --Petelomax (talk) 16:23, 25 March 2024 (UTC)
Perhaps “Straddling Checkerboard/Extended” would be more consistent with how we’ve named things in the past though I can’t say I’m bothered either way. --PureFox (talk) 17:15, 25 March 2024 (UTC)

Moot point.

Probably a bit late already, but if the point of swapping f/l and supp is so that in say f/l 777 888 999 f/l we know the last digit is 9 and not f/l with a 9 being part of some following code, surely that means we can safely encode digits in two characters not three?? With two tiny tweaks:

Message: Admin ACK your MSG. CODE291 SEND further 2000 SUPP to HQ by 1 March
Encoded: 07279239092908848482907983749190629190979073848257518290982200000098909990549075819070889098119890790827175
    (vs) 0727923909290884848290798374919062919097907384825751829098222000000000989099905490758190708890981119890790827175
Decoded: ADMIN ACK YOUR MSG. CODE291 SEND FURTHER 2000 SUPP TO HQ BY 1 MARCH

--Petelomax (talk) 16:45, 25 March 2024 (UTC)

Yeah, it’s slightly awkward to decode but it is possible to stick with the checkerboard as published though, as Wherrera had made the switch in his Python solution, I thought I’d be consistent with that in my Wren solution. --PureFox (talk) 17:08, 25 March 2024 (UTC)
BTW, I agree of course that, having made the switch, we could encode digits in two characters rather that three though, as that would mean another change to the checkerboard as published, I imagine that’s why Wherrera hasn’t done that. --PureFox (talk) 17:53, 25 March 2024 (UTC)
When I made the 98 <-> 99 swap I had in mind the common scenario where the character immediately following digits was a space or a period. This means that, with '99' as terminator, some kind of lookahead or backtracking would be needed because there will be 3 '9' digits as the last part of the sequence: "3.1" becomes "9933399929911199". Here we would at first handle '999' as coming from the text "39" but on the error that there is no '99' terminator we re-nterpret the original text to be '3x' where x is not a digit. if the swap of the indicator from '99' to '98' is made there is no need for the lookahead or backtrack in that common scenario. If the OP of the task feels that the FIG or F/L should be '99' they could specify that, or that should be an option. Indeed the original task did not specify a particular checkerboard, so 2-digit numbers would be fine too --Wherrera (talk) 18:47, 25 March 2024 (UTC)
Well, I think the three of us can probably agree that the most sensible solution is to swap the codes for F/L and SUPP and then just use 2 characters rather than three for figures. So unless the OP responds in the next 24 hours, I propose that we change things accordingly before other people start adding solutions. --PureFox (talk) 19:25, 25 March 2024 (UTC)
OK, as there hasn't been any objection, I've changed the task description and Wren entry and perhaps I could leave you both to update your own entries so that everything remains in kilter. --PureFox (talk) 10:19, 27 March 2024 (UTC)