Talk:Palindrome detection: Difference between revisions

 
(14 intermediate revisions by 6 users not shown)
Line 20:
 
::::: Sure, understood. I think people are just pointing out that the task description was not as clear to some of us as you wanted it to be, partly because the term "palindrome" is not actually defined in the task. The linked Wikipedia article focuses mostly on natural language palindromes, as does the Latin example. As a linguist myself, I admit I find those more interesting than formal strings, and both are valid. For your more restrictive and computationally general idea, maybe specifying a formal mathematical statement of a palindromic sequence would have helped. In any case, the one type of solution is convertible to the other with a little extra string handling, so it's not a huge deal. And thanks for the explanations of your POV. --[[User:Snoman|Snoman]] 08:39, 13 July 2010 (UTC)
::::::: The wikipedia's article was linked just to clarify the sense of palindromicity, but my initial wording should make it clear that the task was thought with "computer vision" in mind: <cite>check if a '''sequence of characters (or bytes)''' is a palindrome or not</cite>; <cite>It is not mandatory to handle properly encodings</cite>; <cite>The function must not ignore spaces and punctuations</cite>; then, for the given example, I specified <cite>To do your test with it, you must make it all the same case and strip spaces.</cite>. Anyway, if people are happier with other defintions, it's ok to change the task description, as far as the rewriting does not "invalidate" all the codes (or people should rewrite the codes too for task compliance) --[[User:ShinTakezou|ShinTakezou]] 18:13, 13 July 2010 (UTC)
 
:::::: I would recommend a rephrasing:
:::::: "This task requires a modular design: You must implement a function which tests if an arbitrary sequence of characters or bytes is a palindrome. You must also implement a wrapper which normalizes text, removing spaces, case differences, and punctuation." --[[User:Rdm|Rdm]] 14:21, 13 July 2010 (UTC)
::::::: If people agree, go for it. I don't see my sentences ambiguous anyway. --[[User:ShinTakezou|ShinTakezou]] 18:13, 13 July 2010 (UTC)
:::::::: I do not think your sentences were ambiguous, either. They do, however, allow for a paradoxical interpretation, from some people's points of view. And its easy enough to change. --[[Special:Contributions/159.54.131.7|159.54.131.7]] 18:34, 13 July 2010 (UTC)
 
----
Line 123 ⟶ 129:
 
They worked... The meaning of True when feeded with a palindrome was that one (and only) solution is true, while the ? just asked for the search of the next solution; the ''no'' that is output thereafter, means there are no more solutions! When it is not a palindrome, it simply says that there are not solution (no), it does not mean that the "predicate" returned false... it means that the problem can't have a solution (i.e., the word is not palindrome). --[[User:ShinTakezou|ShinTakezou]] 14:32, 11 February 2009 (UTC)
 
== REXX ==
 
why was "remove" changed to "rename"?? --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 04:26, 18 May 2013 (UTC)
 
I had a short-lived brilliant idea to remove 1/3 of the subroutine, but it didn't work, so I reinstated the original statement, but I re-typed the comment incorrectly. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 05:41, 18 May 2013 (UTC)
 
== COMPRESS in REXX ==
 
What is compress? Which Rexx has it??
Would space(...,0) do the job??? --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 08:40, 14 September 2015 (UTC)
 
: The '''compress''' BIF is supported by the ARexx REXX interpreter, as well as Regina when the appropriate '''options''' are specified, and also in Regina when Regina is executing on (or an equivalent) Commodore Amiga 1000 (A1000), known commonly as the Amiga. &nbsp; The '''compress''' BIF is documented in the Regina (PDF) documentation. &nbsp; I can't speak to any other REXXes that may support that BIF. &nbsp; As far as I know, '''compress''' is equivalent to '''space(xxx,0)''', but I don't know how it treats whitespace other than blanks. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:54, 14 September 2015 (UTC)
 
:: In Regina doc I read that all blanks are removed. So does SPACE(xxx,0) as far as I know.
Does ARexx >not< support space(xxx,0)? --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:41, 14 September 2015 (UTC)
 
::: ARexx does support &nbsp; '''space(xxx,0)'''. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 04:31, 3 March 2016 (UTC)
 
:::: But Compress() is more versatile. -- [[User:Idrougge|Idrougge]] ([[User talk:Idrougge|talk]]) 09:56, 22 March 2017 (UTC)
 
::::: That may be true, but the &nbsp; '''compress''' &nbsp; BIF isn't supported by most of the REXX interpreters available. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:42, 28 March 2017 (UTC)
 
== Why do so many solutions fail to solve both extra credit tasks? ==
 
From my experience trying to do it in R, supporting Unicode while stripping punctuation and white space is hard, but is it really so hard that hardly any of our solutions have done it?--[[User:ReeceGoding|ReeceGoding]] ([[User talk:ReeceGoding|talk]]) 20:28, 16 July 2020 (UTC)
331

edits