Live data from Hacker News

RegEx Crossword

jimbly.github.io

121–130 of 160 posts

Re: RegEx Crossword

#121
post #100

Earlier quoted context omitted.

Spent a similar amount of time... Ended up with a "solution" that breaks 1 constraint. Must have erred somewhere, but backtracking is only leading to other 1-broken constraint outcomes. Sigh.

Official solution from the original author: https://web.mit.edu/puzzle/www/2013/coinheist.com/rubik/a_re...

What's the fun in that? :-P

Thanks though. I tried again on my laptop and got it - was a bit easier with a larger display than on my phone.

Re: RegEx Crossword

#122
post #47

Earlier quoted context omitted.

I found other patterns that I thought were unsimplified, but (spoiler alert) in the end it turned out that all of the seemingly-unnecessary details were important for the solution! E.g. [^C]*[^R]* LOOKS unsimplified, but it actually means that if the string contains an R, the preceding characters CANNOT be C.

Or if the string contains a C, a subsequent character can't be an R? Doesn't it really just mean a string can't contain a C followed by an R?

Yes, those are three ways of saying the same thing. :)

Re: RegEx Crossword

#124
OMG, I was having the hardest time figuring out what 3 regexes applied to each hex. Then I reloaded partway through and the HIGHLIGHTING started working.

Reload if you don't see the regexes turn bold when you click in a hex!

Re: RegEx Crossword

#125

Earlier quoted context omitted.

The solution: https://www.i-programmer.info/images/stories/News/2014/Dec/B... Aren't crosswords supposed to spell out a word? This feels like random characters. Unless i'm supposed to rotate it or something?

Think sudoku rather than crossword.

There is an answer extraction, though, because it's a Mystery Hunt puzzle (where all puzzles extract a word or phrase as an answer at the end). It's just that the individual diagonals in the grid as a whole are not themselves words.

Re: RegEx Crossword

#126
post #85

Earlier quoted context omitted.

Some people would be correct to think that. That is what those regexes mean. If you are secretly prepending a ^ and appending a $, then you are not using the regex displayed.

Sorry, but you're wrong. There's nothing about regular expressions that means you have to use them to search for matching substrings. That's just one particular operation that uses regular expressions. It's not a quality inherent to regular expressions themselves. There are many different operations you can perform with a regular expression besides a substring search. Python, for example, has a fullmatch method.[0] l…

Another way to describe this could be that the meaning here is inherently ambiguous between "is-a" and "has-a", but the puzzle only makes sense (and only has a solution) if you interpret as "is-a".

In Mystery Hunt puzzles, which this originally was, "we have to interpret this in a way that would allow there to be a meaningful and unique solution" is not only a perfectly legitimate form of reasoning, but often necessary!

It's not really exactly the same kind of reasoning, but in a puzzle I wrote a year before this for the same event

https://www.mit.edu/~puzzle/2012/puzzles/into_the_woodstock/...

you could look at it and say "hiragana is only ever allowed to be used to write Japanese!!!" but insisting on that rule (much as it applies in most situations) wouldn't give the puzzle a meaningful solution. :-)

Maybe a closer equivalent would be that in this year's Mystery Hunt, there was a puzzle using a set of variant Hashiwokakeru (Bridges) logic puzzles. There were hints about which rules were changed but it wasn't stated whether the rule changes applied individually (one puzzle each) or cumulatively (when rules get changed, they don't change back afterward), or some other way. So, it was necessary to make assumptions about what was meant and see whether they allowed a solution. That's typically considered fair and appropriate throughout Mystery Hunt-land.

Re: RegEx Crossword

#127
post #125

Earlier quoted context omitted.

Think sudoku rather than crossword.

There is an answer extraction, though, because it's a Mystery Hunt puzzle (where all puzzles extract a word or phrase as an answer at the end). It's just that the individual diagonals in the grid as a whole are not themselves words.

Oh wow I didn't realize there was a phrase embedded in there. Amazing.

Re: RegEx Crossword

#128
Solved it! I kept tilting my head because it was hard to see the clue and interpret it at the same time. The ability to highlight all three diagonals would have been perfect.

The final clue I had to complete was that tricky .*(.)(.)(.)(.)\4\3\2\1.*

Re: RegEx Crossword

#129
post #118

I thought this would be a true crossword -- i.e., it'd have /words/ to solve for ... :/ Really neat puzzle though!

In the context of the original MIT Puzzle Hunt, there is a single word or phrase that comes out of solving the entire thing, but, yeah, would be interesting if it were all words!

Re: RegEx Crossword

#130
I think that was between 1 and 1.5 hours to solve. Was a fun puzzle! Though for some reason my brain was expecting the NYT Crossword completion music when I filled that last hexagon...
Post reply on HN