[ExI] The tyranny of context free grammars

Ryan Rawson ryanobjc at gmail.com
Wed Dec 8 02:22:39 UTC 2010

I was merely pointing out the downfall of a context-ful grammar, since
the original poster makes it seem like "if only we shed the shackles
of CFGs we'd be better for it".  There is a dark side of that though,
and perl is one of them... I've written a few thousand lines of perl,
it's great for hacking things out, but trying to re-discover what you
coded a few weeks/months/years ago can be... difficult.

I also noted that Dijkstra noted that there is strength in formalisms
that seem simple but allow people to do much more complex things.
>From his article, we probably don't want to go back to arguing algebra
without the symbolism.

That is what context free grammars (CFGs as I have been saying)
deliver - simplicity at the base level, but anyone who knows languages
like haskell, lisp, etc know that complexity abounds and amazing
things can happen.

I was particularly enthused by the 'list processing module' tidbits
from Kurzweil's talk at the singularity summit this summer here in SF.
 I haven't spent any time on it though.


On Tue, Dec 7, 2010 at 12:01 PM, Eugen Leitl <eugen at leitl.org> wrote:
> On Tue, Dec 07, 2010 at 11:13:03AM -0700, Keith Henson wrote:
>> I agree with Ryan that Perl (and Forth) are nearly impossible to
> It is quite possible to write very readable, verbose Perl.
> It is also quite possible to write extremely terse, incomprehensible
> Perl.
> Forth isn't really a good comparison, because you typically implement
> a DSL in Forth, which then can have arbitrary syntax.
> Consider the following Forth sources written for this minimal
> CPU (defined in VeriLog:
> http://excamera.com/files/j1demo/verilog/j1.v )
> This implements the basic Forth words from primitives:
> http://excamera.com/files/j1demo/docforth/basewords.fs.html
> This is an Ethernet driver:
> http://excamera.com/files/j1demo/docforth/eth-ax88796.fs.html
> ARP: http://excamera.com/files/j1demo/docforth/arp.fs.html
> IP: http://excamera.com/files/j1demo/docforth/ip.fs.html
> UDP: http://excamera.com/files/j1demo/docforth/udp.fs.html
> etc, see http://excamera.com/sphinx/fpga-j1.html
>> maintain.  That's because it's nearly impossible to read code and
>> figure out what it does.
> Only if the programmer is trying to be too clever for their
> own good.
> --
> Eugen* Leitl <a href="http://leitl.org">leitl</a> http://leitl.org
> ______________________________________________________________
> ICBM: 48.07100, 11.36820 http://www.ativel.com http://postbiota.org
> 8B29F6BE: 099D 78BA 2FD3 B014 B08A  7779 75B0 2443 8B29 F6BE
> _______________________________________________
> extropy-chat mailing list
> extropy-chat at lists.extropy.org
> http://lists.extropy.org/mailman/listinfo.cgi/extropy-chat

More information about the extropy-chat mailing list