Live data from Hacker News

I found the best anagram in English (2017)

blog.plover.com

111–120 of 236 posts

Re: I found the best anagram in English (2017)

#111
post #28
post #7

[flagged]

It just searched Bing and loaded up this very article. And man I'm getting really sick of the unrelated ChatGPT comments on literally every post, no offense.

OK, fair enough. I will stop doing it. I get down voted a lot for it :)

Re: I found the best anagram in English (2017)

#112
post #87

Earlier quoted context omitted.

I know. I’m talking about Perl. Try to keep up.

Do pay attention. You wrote "Prior to Perl doing this was painful.". I highlighted how you contradicted the author's claim that it was easy to do using awk. Awk existed long before Perl.

As a concrete example, while my awk skills are extremely rusty, here's a program which will normalize the input line, create a table mapping the normalized name to the matching original lines, then at the end it only displays the ones with at least 5 anagrams.

I tried to avoid modern awk features, like asort, to be something that would have worked in the 1980s:

  {
      # Convert to normal form:
      #  1. Fold to lower case
      #  2. Bin the letters to get frequency counts
      #  3. Only consider lower case ASCII letters
      split(tolower($0), letters, "");
  
      # Ignore asort() in modern awks and do a bin sort instead.
      for (i in letters) {
          c = letters[i];
          repeats[c] = repeats[c] c;
      }
  
      normal_form = "";
      for (i=97; i= 5) {
              # print the number of matches, then the match string
              printf("%d%s\n", num_matches, match_str);
          }
      }
  }
When I try it on a word list I have handy, here are the most common words:

  % awk -f anagram.awk 
Certainly Perl is more succinct, though note that even up to Perl 4 in the early 1990s you would need to use the string concatenation method to store the list of matches in the table.

But, "painful"? No. Not to someone who knew how to use awk.

Re: I found the best anagram in English (2017)

#113

    Qui suis-je ?
    
    Me voici Sultan !
    Nuitisme vocal
    Silice mouvant
    Io, vent musical !
    
    Le voici musant
    Mot inclus à vie
    Ce motival insu
    Là vous émincit
    
    Cultivons amie
    Si il vaut ce nom
    Son val muet ici
    
    Indice:
    
    Si nul vice à mot
    Vu ici slame ton
    Nom c'est via lui
    Vaincu tel, omis
    
    
    
    Who am I?
    
    Here I am, Sultan!
    Vocal nightism
    Moving silica
    Io, musical wind!
    
    Here it is, musing
    Word included for life
    This unknown motive
    There, it slices you down
    
    Let's cultivate, friend
    If it's worth that name
    Its silent valley here
    
    Hint:
    
    If no word vice
    Seen here, slams your
    Name, it's through it
    Defeated as such, omitted

Re: I found the best anagram in English (2017)

#115
post #33

Earlier quoted context omitted.

I'm listening. Please explain.

You basically said, “Can you believe someone actually was so stupid as to ask this question on stackexchange? I didn’t believe anyone could actually be that stupid, so I wasn’t go to address it, but it turns out there actually are people that stupid, and they actually outed themselves by posting their question out in the open! So, here I am having to address it in my blog post in case there are other people who actua…

I’m pretty sure I wrote an anagram solver as a teenager that just spins through permutations forever. I guess I was that stupid once. No comment on whether I’m cured now. Your point is valid, the wording can be read as to imply negativity, but that’s also interpreting it in a negative light. The author was also defending his warning against an imaginary rebuttal, justifying the mention to not to waste time solving anagrams the naive brute force way. I don’t think he was trying to be elitist or offensive, and it is in fact true that people will solve anagrams the slow way, so doesn’t hurt to mention it, and it can even help on occasion. We don’t have to take it as condescending.

Re: I found the best anagram in English (2017)

#116

Don't forget the utterly classic anagrams we made out of "Information Superhighway" when that term was first introduced to a skeptical public. https://ad1c.us/infobahn.htm

Writing a program to find grammatically correct sentence anagrams seems like quite the challenge.

Re: I found the best anagram in English (2017)

#117

This is the TXR Lisp interactive listener of TXR 285. Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet. TXR's sound system features 120 dB separation between quarreling audiophiles. 1> (flow "/usr/share/dict/words" file-get-lines (group-by sort) hash-values (keep-if cdr) (sort @1 : [chain car len])) (("ho" "oh") ("am" "ma") ("em" "me") ("no" "on") ("ah" "ha") ("it" "ti") ("mu" "um") ("eh" "he") ("a…

PowerShell 7:

    PS C:\> get-content wordlist.txt 
            | group { -join ([char[]]$_ | sort) }
            | where count -ge 2
            | sort {$_.Name.Length}
    
     Count Name                      Group
    ----- ----                      -----
        2 ho                        {ho, oh}
        2 do                        {do, od}
        2 ay                        {ay, ya}
    [...]
        2 aeghhiiloooppssty         {pathophysiologies, physiopathologies}
        2 aacghhiilloooppsty        {pathophysiological, physiopathological}
        2 aceghhiimooopprrst        {microphotographies, photomicrographies}

Re: I found the best anagram in English (2017)

#118
post #28

Earlier quoted context omitted.

It just searched Bing and loaded up this very article. And man I'm getting really sick of the unrelated ChatGPT comments on literally every post, no offense.

OK, fair enough. I will stop doing it. I get down voted a lot for it :)

I apologize for the snarky comment, I guess I just have GPT fatigue.

Re: I found the best anagram in English (2017)

#119

Megachiropteran lit up helicopter for me (as soon as he worte it means mega-bat) and chiro- naturally zing'd the word chiropractor. First guess was 'opter'/'opter' must have something to do with flight and the o is shared as a connective and it means 'bone-flying'. Wrong: turns out -pter is Latin for 'wing', and so we have helico(l)-pter (helix-wing) and our featherless friends are chiro-pter (hand-wing).

Made me think of ornithopter (from Greek ornis, ornith- "bird" and pteron "wing")

Re: I found the best anagram in English (2017)

#120
post #67

Earlier quoted context omitted.

Waiting for someone to post a 4-symbol APL version (which makes use of a language feature added by an eccentric hedge fund millionaire in 2002 and removed in 2017, to ensure nobody ever runs it).

According to GPT-4, an equivalent APL one-liner is: (⊢⌷⍨∘⍋∘≢¨)↑1<≢¨⊢⌸(⍋⊢)¨⎕NGET'/usr/share/dict/words'1

AI-assisted APL could totally be a thing.

Why shouldn’t my programs be intense neutron stars of weird symbols, if there’s a superhuman intelligence always at hand to explain and improve the code?

Post reply on HN