Canonical/syntax-diagrams representation

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!

The bloke who heads ‘intentional programming’ wrote a
good article explaining why makes the task more difficult, as you already
know intuitively.

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

We don’t want to be bothered with ANOTHER arbitrary
syntax – do we?

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.

On Mon, May 16, 2011 at 11:42 AM, [email protected] wrote:

I started investigating ruby.

[Ruby sucks, variety sucks, let’s use PASCAL.]

Thanks,

== Chris Glur

What were you hoping to achieve by bringing this to a mailing list of
Ruby
users and people who really like Ruby?

On 16 May 2011 11:42, [email protected] wrote:

I started investigating ruby.
It’s very informal, which is NOT suitable for computing.

Strange that, plenty of people seem to be using it just for that
purpose. What do you think it should be used for?

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!

The trailing IF is a very old form of syntax, it certainly goes back
to Basic on the VAX it might go back even further than that (Algol
maybe). We seem to have coped somehow.

‘{ … }’ and ‘do … end’ are slightly different.

The bloke who heads ‘intentional programming’ wrote a
good article explaining why makes the task more difficult, as you already
know intuitively.

I suspect that your intuition and ours are at some variance.

Who is this ‘bloke’, does he have a name? How about a link to the
article.

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

If you were a programmer rather than a troll you woud have completed
this task by now and moved on.

We don’t want to be bothered with ANOTHER arbitrary
syntax – do we?

Who is this ‘we’ you speak of, it certainly better not include me.

IMO the clearest syntax representation ever, was the
syntax-diagram format of PASCAL which was used in
the 70s.

The syntax diagram was EBNF and had nothing to do with Pascal other
than the syntax diagram for Pascal is available in EBNF. As are the
diagrams for several other languages.

Can anybody point me to an on-line minimal formal
syntax for ruby, so as to not rely on the chatty tutors.

If this is all you wanted to ask then what was with all the preamble?

We want a train-time-table format; not a novel.

Again, show is this ‘we’ you talk about?

Thanks,

No thanks

On 05/16/11 20:37, [email protected] wrote:

I started investigating ruby.
It’s very informal, which is NOT suitable for computing.

This line is the reason you have alienated other respondents.
That’s a pity, because the rest of your message is reasonable.
On behalf of the Ruby community, I’d like to say that their
response was… embarrassing at best. When did this community
become so… insular, defensive, and basically just unpleasant?
It certainly wasn’t like that in 2002 when I joined it.
C’mon folks, we’re better than this…

The bloke who heads ‘intentional programming’

Charles Simonyi, http://www.intentsoft.com/. He was the
prime mover behind the creation of icrosoft Word and Excel,
so (however little you may like those) he’s no lightweight.
Intentional have been in a dark pre-startup phase doing some
pretty interesting things for some years now (even if Charles’
first patent in the area was a decade after my almost identical
invention, presented to HP in 1987). Prior art, any one? I have
records…

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

Good idea, but very hard with Ruby’s syntax.

IMO the clearest syntax representation ever, was the
syntax-diagram format of PASCAL which was used in
the 70s.

You can get railroad diagrams from ANTLRworks for any ANTLR
grammar. However they (and syntax-directed editors in general)
are much less effective for languages that require significant
look-ahead.If you manage to make an ANTLR grammar for Ruby,
I’ll be a little amazed (though it’s definitely possible)
and you’ll be a hero in here. But it’s a massive task.
The LALR-based grammar for Ruby has many context-sensitive
areas which rely on large look-ahead.

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.

No such syntax description exists. Even if it did, a syntax
directed editor probably wouldn’t work very well for Ruby.

Clifford H…

I don’t think this is the programming language for you.

On 2011-05-16 6:42 AM, [email protected] wrote:

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.

You may find these useful:
http://ruby.runpaint.org/
http://www.ipa.go.jp/software/open/ossc/english/ruby/Ruby_final_draft_enu_20100825.pdf

While not online,
[ “The Ruby P.ming Language”, David Flanagan & Yukihiro M.,
O’reilly ]
is pretty thorough and concise.

Bill Rutiser

On Mon, May 16, 2011 at 12:42 PM, [email protected] wrote:

I started investigating ruby.
It’s very informal, which is NOT suitable for computing.

Please, then do not use it. Thank you.

Please move on everybody, nothing to see here.

Cheers

robert

On Mon, May 16, 2011 at 7:50 PM, Ryan D. [email protected]
wrote:

While I assume that the OP is trolling with that first paragraph, I can’t be
sure… I think that a lot of the responses in this thread shouldn’t have been
made. It’s one thing when you’re Ilias, but in this case we really can’t be sure.
Robert and Stu’s responses were fine examples of how we shouldn’t behave.

While it certainly depresses me that you feel this way Ryan and I hope
one day you and I can get past that. Though you may see his post for
it’s ambiguity I do not.

I do see the OP as either an megalomaniac due to the assumption ‘that
ruby is NOT good for computing’ and simply trolling on syntactical
structure. I imagine his stress comes from this iteration in learning
yet another programming language and realizing it really can’t be
grokked as quickly as his other nth paradigm languages.

Ruby has become his strawman with statements his statements like: We
don’t want to be bothered with ANOTHER arbitrary syntax – do we? and
makes the task more difficult

This here is the flamebait I responded passionately to.

OP in effort to avoid your argument ad hominem in the future please read
this:

http://catb.org/esr/faqs/smart-questions.html

After that if you would like to have a discussion about how the
harmonic minor scale relates to the Ruby programming language we can
then discuss in euphemistic doublespeak how music has evolved from the
dark ages to the early renaissance.

~Stu

On May 16, 2011, at 16:20 , Clifford H. wrote:

You can get railroad diagrams from ANTLRworks for any ANTLR
grammar. However they (and syntax-directed editors in general)
are much less effective for languages that require significant
look-ahead.If you manage to make an ANTLR grammar for Ruby,
I’ll be a little amazed (though it’s definitely possible)
and you’ll be a hero in here. But it’s a massive task.
The LALR-based grammar for Ruby has many context-sensitive
areas which rely on large look-ahead.

Well, given that Terr gave up on the antlr ruby grammar, I’m not sure
how possible it is (versus how much of a time sink it is). To the OP’s
benefit, Ruby’s grammar is a fucking mess. There are some constructs in
ruby that make LL parsing problematic. Getting bison2antlr to work on
ruby’s parse.y is a chore, and even then you need to do a LOT of work to
get the left recursion worked out of it. Until you do, the railroad
diagrams are pretty much useless.

While I assume that the OP is trolling with that first paragraph, I
can’t be sure… I think that a lot of the responses in this thread
shouldn’t have been made. It’s one thing when you’re Ilias, but in this
case we really can’t be sure. Robert and Stu’s responses were fine
examples of how we shouldn’t behave.

On 05/16/2011 03:42 AM, [email protected] 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 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 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.

== 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

It is difficult to assess whether someone is trolling or just
disagreeing.

The benefit of doubt should exist.

That said, I want to comment just one thing:

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!

The problem is, you made a statement, but you did not explain why it
would not be suitable for computing.

It is just syntax after all.

My ruby code is very clean in most cases and I found a code
style which suits me. I love being able to append if or unless

show_debug_message() if @debug

This almost reads like a natural language to me (I tend to use a @debug
variable for my larger projects when I am debugging them.)

Sure you can do almost the same in other languages, but ruby seems to be
a lot terser than others.

I don’t think the original poster will reply, but then again
I just wanted to point out why I feel Ruby is elegant and perfectly
suited for computing.

On 17.05.2011 02:50, Ryan D. wrote:

While I assume that the OP is trolling with that first paragraph, I
can’t be sure… I think that a lot of the responses in this thread
shouldn’t have been made. It’s one thing when you’re Ilias, but in
this case we really can’t be sure. Robert and Stu’s responses were
fine examples of how we shouldn’t behave.

Apparently the irony in my posting didn’t get through to you. Sorry
about that.

Cheers

robert

I don’t mind the flexibility of using braces or the end keyword to end
things like blocks. I also do not mind the optional parenthesis for
function calls. I’ve started to write mine without them just to get
used to the idea so that when I have some down time Haskell will not
look as weird. It also save me some typing which is nice since I have
difficulty using my hands. Though I do think that using parenthesis
is better in terms of letting people know that something is a
function and not something else when it takes arguments.

With respect to formal grammar specifications, I do not think that
they are necessarily as useful if they are viewed in isolation. What
I would like to see is the grammar spec integrated into the standard
documentation so people can readily cross-reference what they read
with the spec. When I first started playing around with Haskell I
found it very hard to get a handle on things because I had to
constantly flip back between the documentation for a function, Real
World Haskell, and the specification. Having to build a map in your
head of a language by looking at a dictionary and a grammar book was
acceptable prior to the invention of hypertext. We should not have to
be doing that in the modern era with any language. But it seems like
we have simply overlooked this part of learning and continued to do
things the old way as if we had a limit to how many pages we could
cram into a single electronic document.

On Tue, May 17, 2011 at 1:20 AM, Clifford H. [email protected]
wrote:

On 05/16/11 20:37, [email protected] wrote:

I started investigating ruby.
It’s very informal, which is NOT suitable for computing.

This line is the reason you have alienated other respondents.
That’s a pity, because the rest of your message is reasonable.
On behalf of the Ruby community, I’d like to say that their
response was… embarrassing at best.
You should not be embarrassed, if somebody trolls than she is bound to
be ignored, and if following a trolly message are instructions of how
to build a cold fusion reactor, than that is just a shame, but it is
the troller, who is responsible for that miss, not the trollees, who,
rightly, refused to be such.

How much interesting information will you get by reading such posts,
in the long run?

Cheers
Robert

unknown wrote in post #998975:

I started investigating ruby.
It’s very informal, which is NOT suitable for computing.

In that case I think you’ll enjoy trying to understand the semantics of
String in ruby 1.9 (not):
https://github.com/candlerb/string19/raw/master/string19.rb

Anyway, there was an attempt to produce a formal spec for ruby, which
may be what you’re looking for, although it seems to have gone quiet:
http://ruby-std.netlab.jp/

It was based on ruby 1.8.7.

Otherwise, I guess ruby is not the language for you. For those who need
to write programs using formal methods or safety-critical systems I’d
say it’s definitely not. But many of us use it because ruby helps us
write useful applications quickly and enjoyably.

On Fri, May 20, 2011 at 3:25 AM, Brian C. [email protected]
wrote:

Otherwise, I guess ruby is not the language for you. For those who need
to write programs using formal methods or safety-critical systems I’d
say it’s definitely not. But many of us use it because ruby helps us
write useful applications quickly and enjoyably.

Why is not suitable for safety-critical systems?

This is a very funny thread.

On May 16, 6:42am, [email protected] wrote:

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.

matz wrote a very concise book. Ruby in a Nutshell (http://oreilly.com/
catalog/9780596002145)

On Fri, 20 May 2011 21:34:46 +0900
Josh C. [email protected] wrote:

Why is not suitable for safety-critical systems?
For critical systems, wouldn’t the language need to be very carefully
engineered? Typesafe and all that. This is one of the things that’s
been intriguing me about Mythryl.

http://mythryl.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs