« first day (785 days earlier)      last day (542 days later) » 

6:21 PM
@Deadcode I feel like I don't have so much time to look at this stuff, which is a shame.
I just had a go at Lynch-Bell numbers, and came up with: 109, ^(?!(x{1,9})((x{1,9}(\1(x*))\4{8}(?=\5$))*(?=(x*)(\6{9})$)\7\1|(?!\1*$))((?=(x*)((\1\9){9}x*))\10)*(x{10})*$)
I haven't looked at your solution, but mine is certainly slower. I feel that mine is quite ugly also.
 
6:37 PM
Shorter and faster with ^(?!(x{1,9})(((?=(x*)((\1\4){9}x*))\5)*(?=(x*)(\7{9})$)\8\1|(?!\1*$))((?=(x*)((\1\10){9}x*))\11)*(x{10})*$)
The idea is to, pick a digit, then check that either it's a non-divisor who appears in the input, or that it appears in the input, and appears to the right of itself in the input
 
@H.PWiz Cool, thanks! I'll take a look at it.
@H.PWiz Any thoughts on the 3(quotient) > divisor thing?
 
So the check of whether it's to the right of itself can be done with the same code regex that checks with the non-divisor is in the input (i.e to the right of the end of the number)
 
Actually I can't even prove the division algorithm at all using the Chinese remainder theorem, unlike multiplication.
 
@Deadcode One moment, let me read that message
 
@H.PWiz Do you think I should remove all the spoiler warnings from my posts? I feel they haven't done any good, and maybe they're preventing people from reading them at all who would enjoy reading them, but who would never actually get around to trying to solve the problem independently.
(the idea was to try to get more people interested in experimenting with unary regex themselves)
 
6:45 PM
I don't know. I just uncovered the spoilers when reading these answers. There are plenty of things that I've figured out for myself, to discover everything from scratch isn't necessarily the most fun way to explore the capabilities of regex.
 
@H.PWiz Can you solution be modified to exactly match Lynch-Bell numbers, instead of just satisfying the CGCC question?
I have next to no interest in the challenge's version of the question, where you're allowed to match numbers with a 0 in them
right, that matches repeated digits
 
7:13 PM
so your main golf here compared to mine is you have an expression for tail = floor((tail + Digit) / 10) - Digit
which is used twice
well at least that's the micro-golf, still building an understanding of the macro golf
regarding that micro golf, I tried the same with codegolf.stackexchange.com/questions/211840/… but it didn't pan out. I didn't think of applying that idea to Lynch-Bell
 
Something like that. Conceptually I'm just trying to pretend that I didn't really subtract off the digit when capturing \1. So I add a bunch of \1s in later to make up for it
@Deadcode There is this, which matches 0: ^(?!(x{0,9})(((?=(x*)((\1\4){9}x*))\5)*(?=(x*)(\7{9})$)\8\1|(?!\1*$))((?=(x*)((\1\10){9}x*))\11)*((x{10})+|(?!\1))$)
Not very pretty
 
so, 10 bytes longer
including the x at the end to make it not match 0
 
Right, maybe if I considered 0 digits from the start I'd have thought of something different.
I'm sure a much nicer solution exists, anyway
 
Okay, so how about the 3(quotient) > divisor thing? Any idea of how to procede on that?
or even on how to prove division works when quotient >= divisor
(my bounties)
 
7:30 PM
I don't actually know what "the abbreviated form of division" is.
 
It's what is used in many of our regexes now, including Factorial
 
I have. I want to look at fib at some point
pi(n) seems hard to prove impossible
But unlikely to be possible
@Deadcode Right I've never tried to understand the division algorithm, can you show me a small regex that uses it? (and one that uses the generalized version)
 
Is the 92 byte factorial small enough?
 
Maybe, I'll look later. I've gtg now
 
the (?=((x+)(?=\5\7*$)x)\6*$) part of factorial: ^(((x+)\3+)(?=\3\3\2$)(x(?=\3+(x*))(?=\5+$)(?=((x+)(?=\5\7*$)x)\6*$)\3+(?=\5\7$))*\3xx|x?)x$
Okay, seeya.
Good to have you here again. :)
 
7:46 PM
Okay, the macro golf in your Lynch-Bell is that the second stage works both as "a second occurrence of the found digit" and as "the first occurrence of a non-divisor digit"
Nice.
 

« first day (785 days earlier)      last day (542 days later) »