Live data from Hacker News

RegEx Crossword

jimbly.github.io

101–110 of 160 posts

Re: RegEx Crossword

#102
post #87

Awesome puzzle! Can be completed without guesses. Any ideas how it was invented?

Look at the original MIT Mystery Hunt page (and solution). It was part of a puzzle hunt. (I was one of the people who successfully solved it on my team during that very event back in 2013...) See this comment for the link to the original, including the author's name and the puzzle in context with its official solution: https://news.ycombinator.com/item?id=26439598 (I wish that other comment would get upvoted to the t…

Hah! I was beginning to suspect there existed some pattern or answer in the result and was looking for an answer. The better part of 2 decades of mystery hunt has conditioned me. I see a four-letter snack in there that jumps out as a possible solution. Should we call hq?

Re: RegEx Crossword

#103

Is there something wrong? Why isn't the clue `(O|RHH|MM)*` satisfied by blankness?

You can assume that all regexes are "anchored". They match the entire word, not just a substring.

Re: RegEx Crossword

#104
post #24

Earlier quoted context omitted.

I just completed it, and can say with certainty that it is solvable by only taking into consideration two constraints at any given time, with the exception of 3 at just one point early on (and they were the easier constraints in the puzzle). That being said, the nature of regex means you kind of need to jump around as far as which constraints you combine.

Is the complexity basically NP-hard, equivalent to a SAT solver or even harder?

Depends what you think N is doesn't it? What would be a variable parameter in this puzzle? The number of letters in the alphabet? The size of the regex expressions? The size of the board?

Re: RegEx Crossword

#106

This is an absolute classic! It is not just an exercise in tedium or repetition, it has an internal progression that makes it very satisfying to solve.

Just the right amount of difficulty before you get rewarded. Like pistachios.

Re: RegEx Crossword

#108
post #38

Earlier quoted context omitted.

That's because it's not empty string in the puzzle, it's 8 spaces. (and on top of that, we're doing a full match.)

8 spaces also matches. I don't know what you mean by a full match. Do you mean that you are using a different RegEx than the one displayed?

8 spaces does not in any way match the language described by that regex. Not a partial match, not a full match.

Plugging the first space into a DFA described by the regex is an immediate failure - there is no exit from the initial state initiated by the space character. It's a non match.

Regex engines will say they do match because they are by default checking for for substrings that match the language (such as the initial empty string of each line of grep), not for strings that match the language.

*edit: added last paragraph.

Re: RegEx Crossword

#109
nice, solved it in about half an hour. At first it looked impossible past the first maybe 5 free characters. I feel like there were a lot of characters that had to be solved sudoku-style by holding up to 4 constraints in mind at the same time, which was tricky.

Re: RegEx Crossword

#110

Small feature request for this implementation: Highlight/bold the three impacted regex when selecting a given hexagon, trying to trace it manually by eye is a bit of a pain. (I guess I could PR on github when I get some time later today)

https://github.com/Jimbly/regex-crossword/pull/10

I was just finishing my implementation of this in the console when I saw your comment!
Post reply on HN