Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4664

Re: canonical/syntax-diagrams representation.

From Justin Collins <justincollins@ucla.edu>
Newsgroups comp.lang.ruby
Subject Re: canonical/syntax-diagrams representation.
Date 2011-05-17 04:24 -0500
Organization Service de news de lacave.net
Message-ID <4DD23EAC.4050605@ucla.edu> (permalink)
References <iqqupr$i2j$1@dont-email.me>

Show all headers | View raw


On 05/16/2011 03:42 AM, no.top.post@gmail.com wrote:
> I started investigating ruby.
> It's very informal, which is NOT suitable for computing.
> The chatty syntax introduction that: IF can come before
> or after, as you like, and arguments can be bracketed
> or not, as you like and block can use "}" or END; is BAD!

Which is bad? The informal specification, the actual syntax, or the 
verbose introduction you are using? (I think the latter?)

> The bloke who heads 'intentional programming' wrote a
> good article explaining why<having too many degrees
> of freedom>  makes the task more difficult, as you already
> know intuitively.

Not sure I agree. For example, why do we have "unless" and "until" when 
we already have "if not" and "while not"? Because sometimes it's more 
natural to use one or the other. _Too_ many options may be a problem, 
but I don't think Ruby has _too_ many.

> Because this is my Nth programming language, I just
> want to make a<template driven editor>  for my `mc`;
> where the basic structures can be merely filled in.

Sorry, I do not understand what you want here. Unlike some other 
languages, Ruby (as you noted) has a fairly fluid structure. I do not 
even know what a template would look like for a Ruby program.

> We don't want to be bothered with ANOTHER arbitrary
> syntax -- do we?

I don't think it's arbitrary. Ruby's syntax is one of its best features 
in terms of being (in my opinion) well-designed and intentional.

> IMO the clearest syntax representation ever, was the
> syntax-diagram format of PASCAL which was used in
> the 70s.
>
> Can anybody point me to an on-line minimal formal
> syntax for ruby, so as to not rely on the chatty tutors.
> We want a train-time-table format; not a novel.
>
> Thanks,
>
> == Chris Glur

If you want to write a parser, then I don't know of such a resource. If 
you just want to learn the language, there are online resources readily 
available which outline the syntax in a less verbose way. (But I assume 
those are not what you want, because they are easily found.)

-Justin

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

canonical/syntax-diagrams representation. no.top.post@gmail.com - 2011-05-16 10:37 +0000
  Re: canonical/syntax-diagrams representation. Adam Prescott <adam@aprescott.com> - 2011-05-16 06:15 -0500
  Re: canonical/syntax-diagrams representation. Peter Hickman <peterhickman386@googlemail.com> - 2011-05-16 06:24 -0500
  Re: canonical/syntax-diagrams representation. Robert Klemme <shortcutter@googlemail.com> - 2011-05-16 06:52 -0500
  Re: canonical/syntax-diagrams representation. Clifford Heath <no@spam.please.net> - 2011-05-17 09:17 +1000
    Re: canonical/syntax-diagrams representation. Ryan Davis <ryand-ruby@zenspider.com> - 2011-05-16 19:50 -0500
      Re: canonical/syntax-diagrams representation. Stu <stu@rubyprogrammer.net> - 2011-05-17 02:41 -0500
      Re: canonical/syntax-diagrams representation. Robert Klemme <shortcutter@googlemail.com> - 2011-05-18 20:35 +0200
    Re: canonical/syntax-diagrams representation. Robert Dober <robert.dober@gmail.com> - 2011-05-20 05:07 -0500
  Re: canonical/syntax-diagrams representation. Stu <stu@rubyprogrammer.net> - 2011-05-16 18:30 -0500
  Re: canonical/syntax-diagrams representation. William Rutiser <wruyahoo05@comcast.net> - 2011-05-16 19:21 -0500
  Re: canonical/syntax-diagrams representation. Justin Collins <justincollins@ucla.edu> - 2011-05-17 04:24 -0500
  Re: canonical/syntax-diagrams representation. "Markus H." <shevegen@gmail.com> - 2011-05-19 12:57 -0500
    Re: canonical/syntax-diagrams representation. Kevin <darkintent@gmail.com> - 2011-05-19 13:42 -0500
  Re: canonical/syntax-diagrams representation. Brian Candler <b.candler@pobox.com> - 2011-05-20 03:25 -0500
    Re: canonical/syntax-diagrams representation. Josh Cheek <josh.cheek@gmail.com> - 2011-05-20 07:34 -0500
      Re: canonical/syntax-diagrams representation. spiralofhope <spiralofhope_rubyml@lavabit.com> - 2011-05-20 13:24 -0500
  Re: canonical/syntax-diagrams representation. Intransition <transfire@gmail.com> - 2011-05-20 08:12 -0500
  Re: canonical/syntax-diagrams representation. Intransition <transfire@gmail.com> - 2011-05-20 08:12 -0500

csiph-web