Ruby grammar

Phil Tomson wrote:

In article <20051109184727.GB9100@puritan.petwork>,

> > I have to write this for a University Examination. The examination is
> > for Java Language.

> This is what I suspected. Shouldn=E2=80=99t you be solving this by
> yours= elf? Or perhaps ask your teacher, course assitants, or
> fellow students for help? See
> Internet FAQ Archives - Online Education - faqs.org. If you must have
> answers to questions you should be figuring out for yourself but
> don=E2=80=99t want to and you could consider _paying_ someone to do
> your = work for you, then there=E2=80=99s always
> http://answers.google.com/answers/\.

Well, this is a pretty tough exam question, so while in general I
would agree with you Nikolai, in this case I'd be willing to cut some
slack.

Writing a grammar for a small subset of an existing language isn’t what
I would call a “pretty tough exam question”. It’s what I would call the
first step in a three-step laboration in creating a 1)
grammar, lexer, and parser, 2) interpreter, 3) compiler/translator.
I’ve assisted on an introductory course in programming languages that
has this setup, and while the results haven’t always been great on the
final written examination, 85-90% of the students have been able to hand
in all three laborations and gotten a passing grade on them.

Coming up with an idea for a language and a grammar isn’t easy, but
that’s precisely why these things are on the syllabus. “We don’t do it
because it’s easy, we do it because it’s hard.”

Finally, people should certainly be able to ask questions and certainly
on things relating to their homework. However, asking questions like
“can you take my partial solution and rewrite/finish it so that it
works” isn’t what I would call a valid question. An honest question
like “I have this homework exercise that requires me to write a grammar
for a small subset of Ruby and I was wondering if anyone has a
suggestion on how to parse parameter lists. I have this partial
solution that seems to be able to handle the simple cases but am having
trouble with the more esoteric ones. Here’s what I’ve got and a
beginning on the rest. Anyone have any suggestions? I’ve tried the
following things, but it fails for this and this, and I don’t quite
understand why.” I’d consider answering such a question, provided I had
something to contribute.

And who knows, with an exam question like this maybe we can end up
with a new parser for Ruby. I hope the professor publishes the best
result :wink:

I’m not going to hold my breath for this one. Ruby’s grammar is very
complex and it’ll take a lot more skill than one acquires during a
semester writing grammars/lexers/parsers to write a parser for it. I
know I’d have a hard time writing one.

        nikolai

···

Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> wrote:
> puellula@gmail.com wrote:

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

puellula@gmail.com wrote:

Nikolai,
you haven't to help me if you don't want.

Yeah, I know that; well before you posted three messages saying so. And
yet I want to help, so I did. I posted a message with suggestions on
alternative routes you may try in finding the answers you seek. I admit
that my tone wasn’t the friendliest that I sport, but it wasn’t my
rudest one either.

I post here one of my problems, ok? If there are someone would help me
he is wellcome, therefore don't worry.

Well, I do worry. I worry that you won’t actually learn anything from
your examination, and I worry that you won’t pass your course if you
don’t actually know anything about the course’s contents. I worry that
this list will be flooded with requests for doing people’s homework, and
I worry about why my stomach doesn’t seem to like me putting food in it.
I worry about what’s going to happen to me after I die, and I worry
about how much longer Jamba is going to be able to have commercials on
television, because I seriously can’t take it any more. (And I fear
that they’ll be able to for quite some time to come – which doesn’t help
my stomach, I’m sure.)

You don't know my teacher and my situation!

No, I don’t. But you didn’t hint at any of this in your original mail,
which makes me think that it isn’t as bad as you hint at in this one.
If you have a problem with your teacher, perhaps you should take it up
with him or her. It’s their job to make sure that you learn, after all.

Don't worry for me, please.

Then please adhere to the advice I have already given you.

thank you

No worries, happy to help.

        nikolai

···

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

Turning to the internet to get your exam problems solved by others is completely unethical. If you can't do it on your own, you deserve to flunk. Nothing else is appropriate here.

I am not quite sure how to put this - turning to the Internet for help is not in itself unethical, not even for a uni course. Some courses might well be hard enough in themselves to warrant researching / asking for help.

It will become unethical, though, the moment you turn in your result without attributing any help you got.

I think one of the signs of a good engineer would be to also go out and ask others for help on something, rather than inventing the wheel for the gazillionth time.

Whether the ruby grammar here is an example complex enough to warrant asking for help, I can't quite say - I haven't seen the course the original poster is taking, nor do I really know where the parser fits into the task at hand.

I sure as heck did not *really* enjoy my javacc exercises - though, I pulled through them without resorting to too much help... :wink:

Benedikt

   ALLIANCE, n. In international politics, the union of two thieves who
     have their hands so deeply inserted in each other's pockets that
     they cannot separately plunder a third.
       (Ambrose Bierce, The Devil's Dictionary)

Nikolai Weibull ha scritto:

> Nikolai,
> you haven't to help me if you don't want.

Yeah, I know that; well before you posted three messages saying so. And
yet I want to help, so I did. I posted a message with suggestions on
alternative routes you may try in finding the answers you seek. I admit
that my tone wasn't the friendliest that I sport, but it wasn't my
rudest one either.

First of all, if I posted three same messages, that would be because of
the connection problem. Do you understand? I am not the person to
repeat same things to emphasize. I felt not good when I read what you
wrote toward me. I am originally a gentle person who treats others good
but you are not a kind person. So I have to change my attitude towards
you from now on.

> I post here one of my problems, ok? If there are someone would help me
> he is wellcome, therefore don't worry.

Well, I do worry. I worry that you won't actually learn anything from
your examination, and I worry that you won't pass your course if you
don't actually know anything about the course's contents. I worry that
this list will be flooded with requests for doing people's homework, and
I worry about why my stomach doesn't seem to like me putting food in it.
I worry about what's going to happen to me after I die, and I worry
about how much longer Jamba is going to be able to have commercials on
television, because I seriously can't take it any more. (And I fear
that they'll be able to for quite some time to come - which doesn't help
my stomach, I'm sure.)

You abused me wiothout knowing me and understanding my situation. I
have problems only with RUBY grammar, you see? Do not disrespect me any
more. I won't deserve it. Moreover this course is from Java, not from
compiler. I have no problems with Java at all!

What is the reason for this board existing? I thought this was born for
those who are in need of help.
If a person like you keep spitting bad words here, I am without words!

> You don't know my teacher and my situation!

No, I don't. But you didn't hint at any of this in your original mail,
which makes me think that it isn't as bad as you hint at in this one.
If you have a problem with your teacher, perhaps you should take it up
with him or her. It's their job to make sure that you learn, after all.

You haven't to know my situation. I post a message of help here and
ONLY persons want to help me write here, ok?

> Don't worry for me, please.

Then please adhere to the advice I have already given you.

> thank you

No worries, happy to help.

        nikolai

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

Thank you of all!
Please, don't worry for me, ok?
I have no more free time to replying to your bullshits.
I have to study for this exam!

puellula

···

puellula@gmail.com wrote:

I would agree, but.....

EVERY time I have tried this, the question has got exactly the same answer.

Nothing.

I have found asking in a public forum to be a very tricky thing. And my Mother tongue is English, not Italian like the OP. YMMV :slight_smile:

Regards

Ian

···

In message <20051110210653.GA9265@puritan.petwork>, Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes

Finally, people should certainly be able to ask questions and certainly on things relating to their homework. However, asking questions like “can you take my partial solution and rewrite/finish it so that it works” isn’t what I would call a valid question. An honest question like “I have this homework exercise that requires me to write a grammar for a small subset of Ruby and I was wondering if anyone has a suggestion on how to parse parameter lists. I have this partial solution that seems to be able to handle the simple cases but am having trouble with the more esoteric ones. Here’s what I’ve got and a beginning on the rest. Anyone have any suggestions? I’ve tried the following things, but it fails for this and this, and I don’t quite understand why.” I’d consider answering such a question, provided I had something to contribute.

--
Ian - posting to a Newsgroup. Please remove everything to reply.

Benedikt Heinen ha scritto:

<snip>
I agree with almost anything you said

I sure as heck did not *really* enjoy my javacc exercises - though, I pulled through them without resorting to too much help... :wink:

I enjoyed my bison exercies, but I actually needed help from the bison help mailing list in some things :slight_smile:

Ian Hobson ha scritto:

I would agree, but.....

EVERY time I have tried this, the question has got exactly the same
answer.

Nothing.

I have found asking in a public forum to be a very tricky thing. And my
Mother tongue is English, not Italian like the OP. YMMV :slight_smile:

Regards

Ian
--
Ian - posting to a Newsgroup. Please remove everything to reply.

Ian,
I had ONLY ask an advise, I don't want nobody that write me code. Don't
worry. Isn't my first examination. I had a problem and I thinked people
here can help me!
I thinked people here could write problems and can help other persons.

I always help persons that need help without ask him "why do you have
do this?".
My project isn't write a Ruby Grammar, because the subject is JAVA, not
RUBY. I haven't to learn RUBY, ok? I don't know if you understand what
I write! Isn't a COMPILER EXAMINATION, but is a JAVA EXAMINATION, ok?
Do you know difference? Ok!

When we have work problems do you use forums? and why I can't?
Well... can explain me when a person CAN write in a virtually community
like this?

Another thing: witch problem have you with Italian? Thank you!

Only this.
Don't worry... my problem I resolv myself...

puellula

puellula@gmail.com wrote:

Nikolai Weibull ha scritto:

>
> > Nikolai,
> > you haven't to help me if you don't want.
>
> Yeah, I know that; well before you posted three messages saying so. And
> yet I want to help, so I did. I posted a message with suggestions on
> alternative routes you may try in finding the answers you seek. I admit
> that my tone wasn't the friendliest that I sport, but it wasn't my
> rudest one either.

First of all, if I posted three same messages, that would be because of
the connection problem. Do you understand? I am not the person to
repeat same things to emphasize. I felt not good when I read what you
wrote toward me. I am originally a gentle person who treats others good
but you are not a kind person. So I have to change my attitude towards
you from now on.

>
> > I post here one of my problems, ok? If there are someone would help me
> > he is wellcome, therefore don't worry.
>
> Well, I do worry. I worry that you won't actually learn anything from
> your examination, and I worry that you won't pass your course if you
> don't actually know anything about the course's contents. I worry that
> this list will be flooded with requests for doing people's homework, and
> I worry about why my stomach doesn't seem to like me putting food in it.
> I worry about what's going to happen to me after I die, and I worry
> about how much longer Jamba is going to be able to have commercials on
> television, because I seriously can't take it any more. (And I fear
> that they'll be able to for quite some time to come - which doesn't help
> my stomach, I'm sure.)
>

You abused me wiothout knowing me and understanding my situation. I
have problems only with RUBY grammar, you see? Do not disrespect me any
more. I won't deserve it. Moreover this course is from Java, not from
compiler. I have no problems with Java at all!

What is the reason for this board existing? I thought this was born for
those who are in need of help.
If a person like you keep spitting bad words here, I am without words!

> > You don't know my teacher and my situation!
>
> No, I don't. But you didn't hint at any of this in your original mail,
> which makes me think that it isn't as bad as you hint at in this one.
> If you have a problem with your teacher, perhaps you should take it up
> with him or her. It's their job to make sure that you learn, after all.
>

You haven't to know my situation. I post a message of help here and
ONLY persons want to help me write here, ok?

> > Don't worry for me, please.
>
> Then please adhere to the advice I have already given you.
>
> > thank you
>
> No worries, happy to help.
>
> nikolai
>
> --
> Nikolai Weibull: now available free of charge at http://bitwi.se/\!
> Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

Thank you of all!
Please, don't worry for me, ok?
I have no more free time to replying to your bullshits.
I have to study for this exam!

puellula

Wow! What happened there?

Todd

···

> puellula@gmail.com wrote:

puellula@gmail.com wrote:

Nikolai Weibull ha scritto:

> > Nikolai,
> > you haven't to help me if you don't want.

> Yeah, I know that; well before you posted three messages saying so.
> And yet I want to help, so I did. I posted a message with
> suggestions on alternative routes you may try in finding the answers
> you seek. I admit that my tone wasn't the friendliest that I sport,
> but it wasn't my rudest one either.

First of all, if I posted three same messages, that would be because
of the connection problem. Do you understand? I am not the person to
repeat same things to emphasize. I felt not good when I read what you
wrote toward me. I am originally a gentle person who treats others
good but you are not a kind person. So I have to change my attitude
towards you from now on.

No. I obviously don't understand. And here we are with two new
identical messages. Perhaps you shouldn't be pressing "Send" repeatedly
in Gmail/Google Groups?

> > I post here one of my problems, ok? If there are someone would
> > help me he is wellcome, therefore don't worry.

> Well, I do worry. I worry that you won't actually learn anything
> from your examination, and I worry that you won't pass your course
> if you don't actually know anything about the course's contents. I
> worry that this list will be flooded with requests for doing
> people's homework, and I worry about why my stomach doesn't seem to
> like me putting food in it. I worry about what's going to happen to
> me after I die, and I worry about how much longer Jamba is going to
> be able to have commercials on television, because I seriously can't
> take it any more. (And I fear that they'll be able to for quite
> some time to come - which doesn't help my stomach, I'm sure.)

You abused me wiothout knowing me and understanding my situation. I
have problems only with RUBY grammar, you see? Do not disrespect me any
more. I won't deserve it. Moreover this course is from Java, not from
compiler. I have no problems with Java at all!

Well, if you don't have any problems with Java either, then what's the
issue here?

What is the reason for this board existing? I thought this was born for
those who are in need of help.
If a person like you keep spitting bad words here, I am without words!

So far it's been all you with the bad words. But if you are now without
words, I'd gladly put this thread to rest.

> > You don't know my teacher and my situation!

> No, I don't. But you didn't hint at any of this in your original
> mail, which makes me think that it isn't as bad as you hint at in
> this one. If you have a problem with your teacher, perhaps you
> should take it up with him or her. It's their job to make sure that
> you learn, after all.

You haven't to know my situation. I post a message of help here and
ONLY persons want to help me write here, ok?

It obviously doesn't work that way. You still haven't explained your
situation, so there's really no reason for you to keep up the charade of
being a victim here.

I have to study for this exam!

Good luck.

        nikolai

···

> puellula@gmail.com wrote:

--
Nikolai Weibull: now available free of charge at http://bitwi.se/\!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

first language, so I suppose I could have misunderstood that, but...
/Johan

···

On 11/12/05, puellula@gmail.com <puellula@gmail.com> wrote:

Ian Hobson ha scritto:

>
> I would agree, but.....
>
> EVERY time I have tried this, the question has got exactly the same
> answer.
>
> Nothing.
>
> I have found asking in a public forum to be a very tricky thing. And my
> Mother tongue is English, not Italian like the OP. YMMV :slight_smile:
>
> Regards
>
> Ian
> --
> Ian - posting to a Newsgroup. Please remove everything to reply.

Ian,
I had ONLY ask an advise, I don't want nobody that write me code. Don't
worry. Isn't my first examination. I had a problem and I thinked people
here can help me!
I thinked people here could write problems and can help other persons.

I always help persons that need help without ask him "why do you have
do this?".
My project isn't write a Ruby Grammar, because the subject is JAVA, not
RUBY. I haven't to learn RUBY, ok? I don't know if you understand what
I write! Isn't a COMPILER EXAMINATION, but is a JAVA EXAMINATION, ok?
Do you know difference? Ok!

When we have work problems do you use forums? and why I can't?
Well... can explain me when a person CAN write in a virtually community
like this?

Another thing: witch problem have you with Italian? Thank you!

Only this.
Don't worry... my problem I resolv myself...

puellula

Actually, I believe that mr Hobson was defending you. English isn't my

Wow! What happened there?

I dunno, but it reminded me of a recent post on the XP mailing list -

Message-ID: <4344A487.6080204@dhemery.com>

···

To: extremeprogramming@yahoogroups.com
References: <1069410035.20051004074034@XProgramming.com> <4342B224.2080106@mayford.ca>
<296556583.20051004195433@XProgramming.com> <7a3fe2020510050510l5b1731ex@mail.gmail.com> <20051005195614.GI21451@darksleep.com>
In-Reply-To: <20051005195614.GI21451@darksleep.com>
List-Id: <extremeprogramming.yahoogroups.com>
Sent: Wednesday, October 05, 2005 8:13 PM
Subject: Re: [XP] communication and abuse

As I've said before, the responsibility for communication lies upon
the hearer as much as the speaker.

I'm not sure what the current theory is, but when I was studying
rhetoric, the generally-accepted rule of thumb seemed to be that it
was 80% speaker, 20% hearer.

My rule of thumb is that when I'm the speaker, the speaker is 100% responsible; and when I'm the listener, the listener is 100% responsible.

----

Which I thought was an interesting progression.... :slight_smile:

Regards,

Bill