Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Do you like puzzles?

  • Yes

  • No

  • Sometimes


Results are only viewable after voting.
My grand daughter loves puzzles. It’s a fun way to spend some quality, calm time with a very active 7 year old!
 
Haven't gotten down to a puzzle in years, but I always enjoy a hard fought game of Chess. I'm not particularly great at it but fancy it a lot nevertheless.

Tried getting into crosswords a few times over the years (if they count as puzzles to anyone here), but never got that bug. It's too dry and technical for me, my knowledge of English is a lot more practical and free-flowing.
 
Haven't gotten down to a puzzle in years, but I always enjoy a hard fought game of Chess. I'm not particularly great at it but fancy it a lot nevertheless.

Tried getting into crosswords a few times over the years (if they count as puzzles to anyone here), but never got that bug. It's too dry and technical for me, my knowledge of English is a lot more practical and free-flowing.

I enjoy crossword puzzles, even though I’m a terrible speller.
 
Seems weird to have both "yes" and "sometimes" options; in both instances, you like puzzles, but if you didn't choose "sometimes," are you just constantly liking every conceivable puzzle?
 
I don't spend as much time on crossword puzzles as I used to do when riding the trains to work, but I like that Spelling Bee puzzle in the NYT online - they give you seven letters with one being required and you make as many words as you can think of. Answers go up the next day so you can roll eyes at what you missed. It's good for a coffee break. Annoying sometimes when you find a word they seem to have omitted for no good reason.

NYT Spelling Bee.jpg

Sudoku is fun, I keep an app on my laptop, it's my go-to when landing in a hold queue on the phone.

And I like the free jigsaw puzzle of the online New Yorker. Three levels of complexity and it just makes a puzzle out of a randomly chosen back issue. Another fun coffee break kinda thing.


On that one (and because I'm a subscriber) then after I complete the puzzle I sometimes log into the archives and prowl around that issue date for some articles, stories or cartoons.
 
^ I kinda like the Spelling Bee puzzle (or is it a game?).

The main problem I have with things like that is rather than working on the puzzle, I start thinking about how I'd write a program to solve the puzzle. That leads to things like what resources I'd need other than coding it (e.g. a big list of words), what the basic algorithm would be, whether there's a way to write the program in stages (e.g. w/o repeated letters, then w/ repeats), and so on. In other words, I get distracted by the engineering aspects of it, rather than trying to find words.

I guess I'm solving the puzzle, but in a meta way, and making it simpler to solve future puzzles.

And it looks like I've found my next diversion project, to commence shortly after the next Statistics Day.
 
  • Love
  • Like
Reactions: LizKat and max2
My wife is an avid picture puzzle enthusiast. If you like picture puzzles, there are some outstanding ones on iOS, while acknowledging some of you are already aware. :)
 
  • Like
Reactions: max2
Well, that ended quickly.

I had a file with an extensive list of words in it, which I got long ago on some project. It consists of English words including suffixed variants, in lexical order. It's cleverly named "Big words list", and holds a little over 172,000 words.

Anyway, as often happens when the goal is "find text that matches a pattern", I thought of using regular expressions. Yes, I know: now I have two problems.

The first problem was filtering the list down to words that contain only the required character, which was "p" in the example shown. That's easy:
Code:
grep p "Big words list.txt"
The output is a list of words that all contain "p", in any position.

Next, find the words that contain only the letters from the set "hipaced", with no other letters. This was a bit more difficult, either because I was borking the reg-ex, or because 'grep' had some unexpected behavior. The problematic grep reg-ex was:
Code:
grep  "[hipaced]+"
This should mean "any letter from the set enclosed in []'s, repeated 1 or more times". The output from the prior grep was piped to it, and the output was consistently nothing. Fine, be that way.

My next attempt was:
Code:
grep  "[hipaced][hipaced]*"
This means "any letter from the 1st [] set, followed by any letter from the 2nd [] set repeated zero or more times". Since the sets within the []'s are identical, I expected this to be the same as the first expression. Using a barnyard analogy, one cow, chicken, or pig followed by zero or more cows, chickens, or pigs should be the same as one or more cows, chickens, or pigs.

Anyway, the latter expression worked, so all I had to do was ensure that the entire word matched the pattern. In 'grep' this means adding a "start of line" and "end of line" code to the pattern.

Here's the full command-line, with the output of the first grep piped to the input of the 2nd:
Code:
grep p "Big word list.txt" | grep  "^[hipaced][hipaced]*$"
Translated to English: Find every word in the Big word list that contains p. From that list, find every line that starts with a letter from the 1st set followed by zero or more repeats from the 2nd set, and goes to the end of the line. Since the word list has one word per line, the second filter is effectively matching words.

Here's the output:
adipic
apace
apache
ape
aped
aphid
apiece
cap
cape
caped
caph
capped
cep
cepe
cepheid
chap
chape
chapped
cheap
cheapie
cheep
cheeped
chip
chipped
chippie
dap
dapped
deep
dip
dipped
edaphic
epee
epha
ephah
epic
epicedia
hap
happed
headpiece
heap
heaped
hep
hip
hipped
hippie
icecap
ipecac
pa
pac
paca
pace
paced
pacha
pad
padded
padi
pah
paid
pap
papa
pappi
pe
pea
peace
peaced
peach
peached
pec
pech
peched
ped
pee
peed
peep
peeped
peh
pep
pepped
phi
pi
pia
pic
pica
pice
pie
piece
pieced
pied
pip
pipe
piped
pipped
 
  • Haha
Reactions: LizKat
^^ 4 got 2 say in writeup of the Spelling Bee game: must have minimum of 4 letters

outside of that, pretty cool. Although... I wouldn't mind not having been reminded of word "ipecac". Gross!

Wow, I hope fans of the actual game don't read this forum. Talk about spoilers. Well they'd still run into the delights of being infuriated when they list a word and discover that the Supreme Arbiter at the Times didn't think of it, so it's disallowed. (and the times doesn't care either, even if you write to them)
 
I'll add the min-length criterion. I've already been playing around with length, and learned that "headpiece" was the longest word in the 92-word output. I'll post revised scripts later.

Meanwhile, I puzzled out why the reg-ex "[hipaced]+" didn't work: pilot error.

After I tried more tests, including on other macOS versions and a Raspberry Pi, I went and Read The Fine Man page for 'grep'. Well, imagine my surprise when I was reminded that + is in the extended regular expressions, not basic reg-ex'es. Huh. Mystery solved.

Next, I looked at a few scripts where I was sure I was using +, and what do I see but 'egrep' instead of 'grep'. That is, the variant of 'grep' that defaults to extended reg-ex'es.

It also turns out that awk's default reg-ex'es are the extended ones (I read the man page), and I've been using awk a lot more than grep for some time, so I just got complacent with having the extended ones always at hand. Familiarity breeds complacence.

Well, another meta-puzzle solved.
 
  • Like
Reactions: LizKat
imma stick to seeing how many words a few cups of coffee can pry out of a really old brain. But your approach will prove useful for those days I forgot to look at "yesterday's answers" bc i think they only store one day back...
 
Here's the revised word-finder, which only outputs words of 4 or more letters:
Code:
## 1st letter of PUZZLE var is the "required" letter.

PUZZLE="piechad" ;
grep "${PUZZLE:0:1}" "Big word list.txt" | awk "/^[${PUZZLE}]+\$/ && length >= 4"
The expression for 'grep' gets the 1st letter of the PUZZLE variable. The code passed to 'awk' matches a line consisting of 1 or more repetitions of the letters in the PUZZLE variable, and with a line length >= 4.

You have to enter each puzzle's set of letters in the quoted string assigned to PUZZLE. Then you can select the two lines and paste into a Terminal window. Output appears in the Terminal window.

Here's the output for the example:
adipic
apace
apache
aped
aphid
apiece
cape
caped
caph
capped
cepe
cepheid
chap
chape
chapped
cheap
cheapie
cheep
cheeped
chip
chipped
chippie
dapped
deep
dipped
edaphic
epee
epha
ephah
epic
epicedia
happed
headpiece
heap
heaped
hipped
hippie
icecap
ipecac
paca
pace
paced
pacha
padded
padi
paid
papa
pappi
peace
peaced
peach
peached
pech
peched
peed
peep
peeped
pepped
pica
pice
piece
pieced
pied
pipe
piped
pipped
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.