Talk:Anagrams: Difference between revisions

m
added a section header for the very first (talk) discussion to force the TOC (table-of-contents) to the correct location.
(→‎REXX: new section)
m (added a section header for the very first (talk) discussion to force the TOC (table-of-contents) to the correct location.)
 
(16 intermediate revisions by 2 users not shown)
Line 1:
==not acronyms==
Yep, I know now, they are not acronyms. --[[User:Paddy3118|Paddy3118]] 20:34, 24 September 2008 (UTC)
:Do you want to call them "anagrams" instead? --[[User:DanBron|DanBron]] 18:04, 25 September 2008 (UTC)
Line 171 ⟶ 172:
 
words should be shown as they are (not uppercased) !?! --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 06:21, 5 August 2013 (UTC)
 
: I added the uppercase because I didn't assume the dictionary (wordlist) is in any particular case (or the word may be capitalized).   As it stands, the dictionary being used is all lowercase.   '''EVIL''' is still an anagram of '''vile''' and '''Live'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:08, 5 August 2013 (UTC)
 
-----
 
It may be noteworthy to mention that timings (see ooRexx) for various languages have been discouraged on Rosetta Code.
 
http://rosettacode.org/wiki/User_talk:Paddy3118#Comparisons
 
(Especially for examples that no longer exist!)   Getting repeatable results is problematic.   Also, not knowing what hardware and/or operating system and/or which compiler/interpreter (or version) was used, or for that matter, what ''code'' (program statements) were used,   etc,   makes it difficult to judge the veracity of the timings. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:33, 5 August 2013 (UTC)
 
:: You could have said: "thanks for making me improve my code (significantly) no matter what hardware is used." But he who expects nothing shall not be disappointed. The example still exists in rosettacode's history. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 11:40, 5 August 2013 (UTC)
 
There seems to be an error in the REXX code. Applying the program to a very small dictionary
<pre>
abc
acb
bac
bca
cab
cba
</pre>
yields
<pre>
------------------------------ 6 words in the dictionary file: u.txt
ABC ACB BAC BCA CAB
 
Found 1 words (each of which have 4 anagrams).
</pre>
whereas the ooRexx programs yield
<pre>
abc acb bac bca cab cba
</pre>
which is what I have expected. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:01, 5 August 2013 (UTC)
: Maybe I introduced this error with my modifications. pls verify the original! --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:03, 5 August 2013 (UTC)
 
:: No, you didn't introduce an error. &nbsp; It was an overzealous filtering statement that I put in to optimize the reading. &nbsp; I removed the offending statement and all is now well. &nbsp; Thanks for finding that error (it only manifests itself if the number of anagrams exceed the number of letters in the word). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:17, 5 August 2013 (UTC)
 
-----
 
<strike>
The REXX version 2 program won't find all the anagrams if some words are in mixed case. &nbsp; Furthermore, if all the words are in uppercase, no anagrams are found:
</strike>
<strike>
<pre>
There are 0 set(s) of anagrams with 24819 elements each:
</pre>
</strike>
I suspect that many of the programming examples won't handle a mixed case dictionary &nbsp; (should treat '''Live''' as an anagram of '''EVIL''').
 
Since the entire dictionary '''unixdict.txt''' is in lowercase, the mixed case error situation will remain hidden for most programs.
 
-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 06:06, 8 August 2013 (UTC)
 
: REXX version 1 is now close to perfect. thanks --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 07:47, 9 August 2013 (UTC)
 
:: I've added a faster version &nbsp; (but it has it drawbacks). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:13, 12 August 2013 (UTC)
 
::: After adapting the new versions (=; -> =<nowiki>''</nowiki>; @ -> aa # -> nn) and adding the invocations for time('R') and time('E'), I used this driver
<pre>
call gsana11
call gsana12
call gsana13
to get these timings on Windows/ooRexx
1.1 1.279000
1.2 1.201000
1.3 1.139000
PS I had to add a call lineout ifid in order to close the
input file before staring the next program.
I was severely burnt when not closing a file on the host
when the next program used 'my' ddname and the allocated dataset.
</pre>
--[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 16:07, 12 August 2013 (UTC)