Live data from Hacker News

I found the best anagram in English (2017)

blog.plover.com

131–140 of 236 posts

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

#132

I'm a non-coding lurker here, but the only thing that ever motivated me to write my own program was to solve the newspaper anagram puzzle, "Jumble", faster than my wife. I wrote it in Basic, then re-wrote it in assembly language, I forget when. Then in Fortran while home bound during the first summer of the pandemic - to atone for my past sin of neglecting to learn Fortran when I had a chance in the late 1960's.

About thirty years ago I had an account on a computer system that had a Boggle game, and I got tired of losing to it. So I wrote a program (in C!) which, when run, would search the grid and print out a list of all the words it found. Since I was using a bigger dictionary than the Boggle game itself, I found a lot more words. Ha ha, take that!

I proudly boasted to a friend about my winning Boggle solver and they said it was the pettiest thing they had ever heard of.

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

#133
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 didn't “basically” say any of that. I didn't say any of it at all; you made it all up and then attributed it to me. All I actually did was to state a fact: someone on StackExchange actually asked this question.

All those thoughts about what a stupid question it is, and how stupid someone must have been to ask it—all those are thoughts you had, not me.

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

#134

Earlier quoted context omitted.

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

That doesn't work in Dyalog APL, comes back with RANK ERROR. It's idiomatic to pick ⊃ the first result of ⎕NGET to get just the lines to work on, and not the other things like file encoding. Then grade-up-right-train-each (⍋⊢)¨ is redunant, it's the same as grade-up-each ⍋¨ The grade is an array of which indices to take to put the argument in sorted order and I don't think it makes sense to group ⌸ by that since the…

(⊢⊢⍤/⍨1<≢¨)({⍵[⍋⍵]}¨⊢∘⊂⌸⊢)words or something like that maybe

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

#135

I'm a non-coding lurker here, but the only thing that ever motivated me to write my own program was to solve the newspaper anagram puzzle, "Jumble", faster than my wife. I wrote it in Basic, then re-wrote it in assembly language, I forget when. Then in Fortran while home bound during the first summer of the pandemic - to atone for my past sin of neglecting to learn Fortran when I had a chance in the late 1960's.

I did similar for a newspaper puzzle unscrambler, pushing to rewrite it in lower level languages (PowerShell then C# then Rust) and changing algorithm (from sort letters, to precompute lookup hashtable of sorted letters, to multiply prime numbers one for each alphabet letter to drop the overhead of sorting, to lookup hash of those, to sorting the integer results into an array to do a binary search through and jump to…

> to multiply prime numbers one for each alphabet letter to drop the overhead of sorting

how does that work?

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

#136
post #82

Earlier quoted context omitted.

The point is that you don’t need a hash table implementation. And the normalization that is used as the sorting key doesn’t otherwise have good hash-like qualities (like constant size and a good distribution) and thus doesn’t especially deserve to be called a hash.

How do you extract the last (largest) entry for each normalized key from the sorted list? What is the command line function?

You pipe the sorted list into awk (for example) and append the second field to a list as long as the value of the first field remains the same. Whenever the value of the first field changes, and in the END block, you output the list (which contains the matching anagrams) and reset it to empty.

No hash table needed, just splitting the line into the two fields, equality comparison, and appending values to a list.

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

#137

Earlier quoted context omitted.

Tell me you’re a millennial who grew up watching The Simpsons without etc etc.

Actually early genx. I don’t think most millennials were old enough for a lot of the jokes in 90’s simpsons as they were young teens. But glad you got it!

“Are you being sarcastic, dude?”

I was born in 1982, and a lot of the humor went over my head til much later. But the first ten seasons or so are still indelibly etched in my memory.

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

#138
post #133

Earlier quoted context omitted.

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 didn't “basically” say any of that. I didn't say any of it at all; you made it all up and then attributed it to me. All I actually did was to state a fact: someone on StackExchange actually asked this question. All those thoughts about what a stupid question it is, and how stupid someone must have been to ask it—all those are thoughts you had, not me.

FWIW, I also originally read that line to imply "I thought this was obvious, but apparently I need to be explicit anyway".

Given the tone of the rest of the article I assumed that I'd either read something into it that wasn't there or was missing some context - for example, perhaps the person on SO had insisted that this was the correct approach, and you'd gone to some lengths to show that it was not and were exasperated by it by the time you wrote the article.

At any rate - it didn't really take away from your article for me, but I did see it as condescending.

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

#139

I don't know why, but I really like soapstone teaspoons.

I will counter that with.. timesaving negativism.

That one has real meaning too. Being naturally inclined to mentally run through all the worst case scenarios for everything has definitely saved me time over the years.

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

#140
post #133

Earlier quoted context omitted.

I didn't “basically” say any of that. I didn't say any of it at all; you made it all up and then attributed it to me. All I actually did was to state a fact: someone on StackExchange actually asked this question. All those thoughts about what a stupid question it is, and how stupid someone must have been to ask it—all those are thoughts you had, not me.

FWIW, I also originally read that line to imply "I thought this was obvious, but apparently I need to be explicit anyway". Given the tone of the rest of the article I assumed that I'd either read something into it that wasn't there or was missing some context - for example, perhaps the person on SO had insisted that this was the correct approach, and you'd gone to some lengths to show that it was not and were exasper…

Thanks for letting me know.
Post reply on HN