News for hackers. Stuff that matters.
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by asicsp on Sunday December 08, 2019 @12:04AM (#21734422)
Wonder what happened to the regex101 demo link [1], it just redirects to home page

[1] https://regex101.com/r/8e2iU1/2

---

Edit: Found a newer article [2] which does point a working regex101 link [3]

[2] http://www.drregex.com/2018/11/how-to-match-b-c-where-abc-be...

[3] https://regex101.com/r/QsFZ5M/2

Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by saagarjha on Sunday December 08, 2019 @02:48AM (#21734805)
The link works for me.
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by acje on Sunday December 08, 2019 @04:25AM (#21735057)
Real example of how comodity enterprise software is configured.
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by pests on Sunday December 08, 2019 @06:54AM (#21735470)
"# Carrying. This is where it gets complicated"

Oh, I thought we were past that already...

Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by rmtech on Sunday December 08, 2019 @05:08AM (#21735182)
This is a crime against sanity
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by carapace on Sunday December 08, 2019 @01:35PM (#21737330)
This could be the best and the worst thing I've seen all year.
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by wool_gather on Sunday December 08, 2019 @12:41PM (#21737048)
What a fascinatingly bizarre little program. It's like some kind of immutable-data assembly language with tortured syntax. The next level of Brainfuck.
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by ouid on Sunday December 08, 2019 @11:13AM (#21736576)
a b c where a+b=c is not a regular language. What exactly is the constraint on this challenge?
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by lifthrasiir on Monday December 09, 2019 @05:10AM (#21741526)
Whatever the PCRE supports. This essentially means that you can have at least a context-sensitive grammar, which I think a+b=c indeed is.
Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by bArray on Sunday December 08, 2019 @06:03AM (#21735330)
Should probably read the articles first... I was really hoping for:

    a + b = c, where a = b = c
I could only find:

* a = b = c = 0

* a = b = c = k/inf (where k < inf and k > -inf)

Off-topic but are there other solutions? I checked in Wolfram Alpha and nothing...

Re:How to Match “A B C” where A+B=C: The Beast Tamed (2018) by jmaa on Sunday December 08, 2019 @06:11AM (#21735354)
Not sure where you get those weird infinity results from, but the "a = b = c = 0" solution is easily show:

Note that "a + b = c" implies "b = c - a", and given our assumption that "a = b = c", we can rewrite as "a = a - a = 0". This obviously results in "a = b = c = 0".

EDIT: Modifying the proof above, it becomes apparent that this is a property of groups (most number systems are groups): Again "a + b = c", iff "a + a = a" iff "a + a + (-a) = a + (-a)" which is "a = e".

Note that addition over IEEE754 floats do not constitute a group, (in part) because "inf + inf == inf" evaluates to true.