lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 12/10/2016 7:18 PM, Soni L. wrote:
On 10/12/16 12:12 AM, KHMan wrote:
On 12/10/2016 9:46 AM, Duncan Cross wrote:
On Sat, Dec 10, 2016 at 12:10 AM, Soni L. wrote:
I was told PNG is a regular language, in the sense that you
can validate any
PNG chunk with a VERY VERY VERY LONG regex.

Including the 32-bit CRC at the end of the chunk? That's got to
be a
hell of a regex.

I'm really curious about the "I was told PNG is a regular
language" though. It directs the blame for the idea on an
anonymous someone else.

Perhaps he has VERY VERY VERY LARGE amounts of free time this
weekend, or perhaps he wants to trap some unsuspecting folks
trying it. I think both.

Each PNG chunk is a finite sequence of bytes. Thus, a long enough
regex can parse a stream of PNG chunks.

Sure, sure.

Oh, don't mind me, I'm just shooting the breeze here. If I sounded too negative, it's because I'm a dinosaur in Internet years and I mostly sit back and gawk at the younger folks who enthusiastically apply themselves to interesting problems such as this one... :-) ;-) It's a generation gap thing, no biggie.

--
Cheers,
Kein-Hong Man (esq.)
Selangor, Malaysia