Regex Crossword
regexcrossword.com
regexcrossword.com
You might find this hard to believe, but I don't have a Facebook account.
"How about you store my progress in a regex! (Which can be put into a browser cookie as an afterthought.)"
Personally, I don't have a facebook account and I will not create one just so I can log in on your website. The disability to save my progress also made me give up on trying to progress since it'd just be lost anyway.
Perhaps the hint font should be different from the answer font. Or at least better zero's.
Alphabet: [01]
Number of variables: N
Columns: one for each clause, i.e.:
r/.0...|..1..|....1/
(-x2 V x3 V x5)
They're disjunctions of three regexps of length N. Each alternative fixes one positional variable to either 0 or 1, and ignores the rest.Rows: one for each variable, forcing it to be single-valued across the clauses:
r/0+|1+/Just a heads-up though: There are some typos and grammar mistakes in your explanations, so if you plan to share professionally, you might want to have someone proofread it. Also, your Facebook OAuth window that pops up upon page load is being caught by Chrome's built-in popup blocker. Either way though, I'm always disappointed when Facebook OAuth is the only login method. I get that it's easy to implement, but I can't imagine this is a very security-sensitive app in terms of user-accounts. I would like to save my progress, but it's not worth the risk or analysis required to hook up my Facebook.
Really nicely designed though. Clean UI. Wouldn't mind if it was enlarged to use more of the screen real estate (tiny fonts are hard to read). I had fun with this.
In this case, the "suddenly solving the whole thing given only 40% or 50% of the letters" effect can be kind of cool, or annoying if you were enjoying the logic puzzle aspect. In the original MIT Mystery Hunt hexagonal regular expression crossword, most of the grid did not spell anything recognizable, so it was clearly a logic puzzle through-and-through. I guess whether people appreciate that depends on whether they were expecting a pure logic puzzle or a combined logic+word puzzle.
All the hitchhikers ones are pretty obvious though.
A bit of customisation of the default bootstrap look would have been nice too.
This is the web incarnation of that hexagon puzzle.
(Just so it's not credited to MIT in general; each year's Mystery Hunt is written by a specific puzzle team, and indeed each puzzle is written by specific puzzlers!)
A* is "the set of all strings over the alphabet {A}, including the empty string ε."
"QQQQ" is not a string over the alphabet {A} because it contains the symbol 'Q', which is not in {A}.
/A*/.test('QQQQ');
> true
Showing that yes, /A/ does match 'QQQQ'Just because these tools use regex this way doesn't mean that's how regex really works.
/A*/.exec('QQQQ')
[""]
When computer scientists discuss what a regular express does and does not "match", they are saying that strings which are "matched" by a regex are those strings which are members of the regular language defined by the regex. QQQQ is not a string in the language defined by /A* /, so /A* / does not match QQQQ.If we look at things your way, we would have to say that the regex /A/ matches "AQQQQ". It does not. It matches "A".
When you're testing your answers, add explicit start/end anchors and implicit grouping to get better results:
var r = /^(?:HE|LL|O+)$/;
console.log("OE".match(r));
console.log("OO".match(r));I had a lot of fun writing a solver in Haskell for a crossword like this a few months ago. Apologies for the self promotion but here's a link to the article I wrote about it http://almostobsolete.net/regex-crossword/part1.html
I'd be happy to donate more than whatever Facebook pays you for every newly registered account if you would implement a simpler method.
With the exception of DHH, do they believe in Open Source in Denmark? (jk)
Anyone understand what (.)*DO\1 should match?
edit: Okay, I was writting 0 instead of O that's why it wasn't working.
DO
DONUT
DOG(.) -> any character, grouped to reference it, since it's the first group it's referenced as \1
(.)* -> that, 0 or more times
(.)* DO -> any character 0 or more times, followed by DO
(.)* DO\1 -> any character 0 or more times, followed by DO, and the same character as in the beginning
(.*)+\1
would match "ABAB", or "ABCABC", etc."\2" would match the second capture group, e.x.
(.*)(.*)\2\1
would match "ABBA", or "AABBBBAA", etc. (.*)\1+
Would also match "ABABAB", for example.(AB|O|OR)+ dictates that the last letter of the first row has to be A or O
[^ABRC]+ makes it so that the lower right square can't be B therefore the upper right square can't be A
I think I found an error in “The Lektor Device“: The “I“ in “WITH” could also be a “T” from the rules, but only the “I” is accepted.
Good to practise regular expressions.
* *
/ /
/ isn't a special character and * isn't special when inside a character classYeah, maybe... let me check: NOPE.
But Facebook does have a good security track record. This random website does not. I don't trust them with any more information than needed. In this case, that is only a single anonymized token.
Same with Google properties. I only use Chrome to visit Google properties.
Hence, Facebook lives in its own VirtualBox machine.
$ ping facebook.com
connect: Invalid argument
Not so much, no.