loops/etc

Hi

I have seen that while expr; do expr2 end # does not work, because of
the ;
# and similar loops

Is it possible to change that in the parser? ( ';' shouldn't be a
problem!)

Opti

Semicolons terminate expressions (like *most* newlines in Ruby), so the
presence of the semicolon necessarily changes the parsed and executed code.

You could file a bug in the tracker (we all know you won’t, as that‘s not
actually your schtick), but it will be shot down because it brings
negative value for almost three decades worth of needless incompatibility.

Ruby is not Bash. Ruby is not C. Ruby isn’t Perl or Python or any other
language except Ruby. The very first thing you need to do in order to
become a better Rubyist—if, indeed, that is your goal (and I question that,
repeatedly)—is to remember that. As with most other things, if you think
something is a compiler or interpreter or language bug, check again. You
probably don’t understand the language and need to reframe in order to get
some understanding so you stop assuming that it’s a problem with the
language.

I’ve used Ruby for twenty years and I rarely think that something that
doesn’t work the way that I think it should work is a problem in the
language. You are an itinerant tinkerer who asks questions and refuses to
listen to the answers (instead, picking fights over your bruised feelings
because people think that you’re wrong).

The problem is not in the language, it’s in the Fauxptimist.

-a

···

On Sat, Aug 13, 2022 at 7:12 AM Die Optimisten <inform@die-optimisten.net> wrote:

Hi

I have seen that while expr; do expr2 end # does not work, because of
the ;
     # and similar loops

Is it possible to change that in the parser? ( ';' shouldn't be a
problem!)

Opti

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Austin Ziegler • halostatue@gmail.com • austin@halostatue.ca
http://www.halostatue.ca/http://twitter.com/halostatue

Just a lurking reminder that Matz Is Nice And So We Are Nice #minaswan.

···

On Sat, Aug 13, 2022 at 10:58 AM Austin Ziegler <halostatue@gmail.com> wrote:

Semicolons terminate expressions (like *most* newlines in Ruby), so the
presence of the semicolon necessarily changes the parsed and executed code.

You could file a bug in the tracker (we all know you won’t, as that‘s not
actually your schtick), but it will be shot down because it brings
negative value for almost three decades worth of needless incompatibility.

Ruby is not Bash. Ruby is not C. Ruby isn’t Perl or Python or any other
language except Ruby. The very first thing you need to do in order to
become a better Rubyist—if, indeed, that is your goal (and I question that,
repeatedly)—is to remember that. As with most other things, if you think
something is a compiler or interpreter or language bug, check again. You
probably don’t understand the language and need to reframe in order to get
some understanding so you stop assuming that it’s a problem with the
language.

I’ve used Ruby for twenty years and I rarely think that something that
doesn’t work the way that I think it should work is a problem in the
language. You are an itinerant tinkerer who asks questions and refuses to
listen to the answers (instead, picking fights over your bruised feelings
because people think that you’re wrong).

The problem is not in the language, it’s in the Fauxptimist.

-a

On Sat, Aug 13, 2022 at 7:12 AM Die Optimisten <inform@die-optimisten.net> > wrote:

Hi

I have seen that while expr; do expr2 end # does not work, because of
the ;
     # and similar loops

Is it possible to change that in the parser? ( ';' shouldn't be a
problem!)

Opti

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Austin Ziegler • halostatue@gmail.com • austin@halostatue.ca
http://www.halostatue.ca/http://twitter.com/halostatue

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
A musician must make music, an artist must paint, a poet must write, if he
is to be ultimately at peace with himself.
- Abraham Maslow

That only works when all the kids in the pool play by the same rules. When one refuses to play by those rules and keeps pooping in the pool and the lifeguard is not doing anything about it? Don't be the mom who ignores the poop and just yells "play nice" because it hasn't worked in the past and it's not going to work in the future.

I might also point out, you only seem to pop up and say this when Austin gets involved. Where were you when the original kid started pooping? Selective attention is hypocrisy.

Frankly, between Gerald's lunatic/poor-me ravings and Opti's utter trolling, for me this list has lost so much of its original value charm that I'm seriously considering unsubscribing after 20ish years. I won't announce software releases here anymore and I won't help out with legitimate questions either. If hsbt or other mods don't step up and take care of those two then this list is a trolls paradise and just not worth it.

···

On Aug 13, 2022, at 11:39, Sean Felipe Wolfe <ether.joe@gmail.com> wrote:

Just a lurking reminder that Matz Is Nice And So We Are Nice #minaswan.

An interesting question ... and I suppose it's fine to hijack the thread
since we're already off the, uh, rails ... any ideas as to why less traffic
on the list ? Ruby continues to advance, I would call it still a "niche"
language especially with so much JS and Python (ugh) in the universe now.
But still exciting things in Ruby-land. I wonder what might engender more
participation on the list. Or maybe it's just with reddit and other forums
an email list isn't as useful anymore.

Anyhow as always thanks to Matz and the Ruby team and ecosystem
maintainers. it's a great language I continue to use everyday in my work
and outside of work also.

···

On Sat, Aug 13, 2022 at 11:51 AM Ryan Davis <ryand-ruby@zenspider.com> wrote:

> On Aug 13, 2022, at 11:39, Sean Felipe Wolfe <ether.joe@gmail.com> > wrote:
>
> Just a lurking reminder that Matz Is Nice And So We Are Nice #minaswan.

That only works when all the kids in the pool play by the same rules. When
one refuses to play by those rules and keeps pooping in the pool and the
lifeguard is not doing anything about it? Don't be the mom who ignores the
poop and just yells "play nice" because it hasn't worked in the past and
it's not going to work in the future.

I might also point out, you only seem to pop up and say this when Austin
gets involved. Where were you when the original kid started pooping?
Selective attention is hypocrisy.

Frankly, between Gerald's lunatic/poor-me ravings and Opti's utter
trolling, for me this list has lost so much of its original value charm
that I'm seriously considering unsubscribing after 20ish years. I won't
announce software releases here anymore and I won't help out with
legitimate questions either. If hsbt or other mods don't step up and take
care of those two then this list is a trolls paradise and just not worth
it.

Hallo!
Sorry, if my wording is not the best (I had to lookup many words, whats
a Fauxptimist?)
Why should "allowing a ';' with do" be a compatibility problem? (Yes,
I'm used to C and Bash)
- you don't have to use it (so it works as before)
- if applying that change using a ';do', will work in the future,
where it lead to a parser error now - so it's just making Ruby better.
(Allowing an additional usage case).

You can tell me, if you have reasons to not stand by sg I'd like to
have, but (also in this case!) I can't see anything which stands against it.

Yes, if nobody else is filing the feature requests (you dislike the word
'bug' - also with -h and --help, it's Ruby -- But _I_ would prefer it to
have more compatibilty to other languages. -- would be much easier; also
looking at the usage of gem... ) -- I understand, if you're using Ruby
for 20 od 30 years, you're used to it, and _any_ change is a bit(or
more) of additional work.

Thought submitting these things is easier if sb has an account already.
- I see it's more changerequests than I thought - maybe I should get an
account there...

-> Tell me, if 1) sb else wants to submit these requests, and
2) if you're comfortable with the changes (therefore I'm posting them!),
before I submit them.

Opti

Semicolons terminate expressions (like *most* newlines in Ruby), so
the presence of the semicolon necessarily changes the parsed and
executed code.

Could you give me an example where existing code will be broken that
way? (Looks like using the ; do ALWAYS breaks the parser?)

You could file a bug in the tracker (we all know you won’t, as that‘s
not actually your schtick), but it will be shot down because it brings
negative value for almost three decades worth of needless incompatibility.

Therefore I want to discuss it!

Ruby is not Bash. Ruby is not C. Ruby isn’t Perl or Python or any
other language except Ruby. The very first thing you need to do in
order to become a better Rubyist—if, indeed, that is your goal (and I
question that, repeatedly)—is to remember that. As with most other
things, if you think something is a compiler or interpreter or
language bug, check again. You probably don’t understand the language
and need to reframe in order to get some understanding so you stop
assuming that it’s a problem with the language.

All these things are no problems, but I think they can be better...

(Example: options of gem-program are VERY different from all other tools
I'm using...)

I’ve used Ruby for twenty years and I rarely think that something that
doesn’t work the way that I think it should work is a problem in the
language. You are an itinerant tinkerer who asks questions and refuses
to listen to the answers (instead, picking fights over your bruised
feelings because people think that you’re wrong).

I accept other sights, but I insist of using not offending words.

The problem is not in the language, it’s in the Fauxptimist.

Didn't find that with Google - please explain!

···

Am 13.08.22 um 19:57 schrieb Austin Ziegler:

-a

On Sat, Aug 13, 2022 at 7:12 AM Die Optimisten > <inform@die-optimisten.net <mailto:inform@die-optimisten.net>> wrote:

    Hi

    I have seen that while expr; do expr2 end # does not work,
    because of
    the ;
     # and similar loops

    Is it possible to change that in the parser? ( ';' shouldn't be a
    problem!)

    Opti

Gerald is in most peoples kill file by now. Just place Opti there too and
we are golden

It's not because of the semicolon per se. It's because it's not valid Ruby.

···

On Sun, 14 Aug 2022 at 19:12, Die Optimisten <inform@die-optimisten.net> wrote:

I have seen that while expr; do expr2 end # does not work, because of
the ;

~~~
while expr; do expr2 end
~~~

is basically the same as:

~~~
while expr
do
  expr2
end
~~~

which isn't valid Ruby. Working backwards, you're write the multi-line
loop thus:

~~~
while expr do
  expr2
end

# or

while expr
  expr2
end
~~~

so you'd write the one line version:

~~~
while expr do expr2 done

# or

while expr ; expr2 done
~~~

--
  Matthew Kerwin
  https://matthew.kerwin.net.au/

"If you can't understand it without an explanation, you can't understand it
with an explanation."

-- Haruki Murakami, 1Q84

···

Die Optimisten <inform@die-optimisten.net> schrieb am So., 14. Aug. 2022, 11:11:

Hallo!
Sorry, if my wording is not the best (I had to lookup many words, whats a
Fauxptimist?)
Why should "allowing a ';' with do" be a compatibility problem? (Yes,
I'm used to C and Bash)
- you don't have to use it (so it works as before)
- if applying that change using a ';do', will work in the future, where
it lead to a parser error now - so it's just making Ruby better. (Allowing
an additional usage case).

You can tell me, if you have reasons to not stand by sg I'd like to have,
but (also in this case!) I can't see anything which stands against it.

Yes, if nobody else is filing the feature requests (you dislike the word
'bug' - also with -h and --help, it's Ruby -- But _I_ would prefer it to
have more compatibilty to other languages. -- would be much easier; also
looking at the usage of gem... ) -- I understand, if you're using Ruby for
20 od 30 years, you're used to it, and _any_ change is a bit(or more) of
additional work.

Thought submitting these things is easier if sb has an account already.
- I see it's more changerequests than I thought - maybe I should get an
account there...

-> Tell me, if 1) sb else wants to submit these requests, and
2) if you're comfortable with the changes (therefore I'm posting them!),
before I submit them.

Opti

Am 13.08.22 um 19:57 schrieb Austin Ziegler:

Semicolons terminate expressions (like *most* newlines in Ruby), so the
presence of the semicolon necessarily changes the parsed and executed code.

Could you give me an example where existing code will be broken that way?
(Looks like using the ; do ALWAYS breaks the parser?)

You could file a bug in the tracker (we all know you won’t, as that‘s not
actually your schtick), but it will be shot down because it brings
negative value for almost three decades worth of needless incompatibility.

Therefore I want to discuss it!

Ruby is not Bash. Ruby is not C. Ruby isn’t Perl or Python or any other
language except Ruby. The very first thing you need to do in order to
become a better Rubyist—if, indeed, that is your goal (and I question that,
repeatedly)—is to remember that. As with most other things, if you think
something is a compiler or interpreter or language bug, check again. You
probably don’t understand the language and need to reframe in order to get
some understanding so you stop assuming that it’s a problem with the
language.

All these things are no problems, but I think they can be better...

(Example: options of gem-program are VERY different from all other tools
I'm using...)

I’ve used Ruby for twenty years and I rarely think that something that
doesn’t work the way that I think it should work is a problem in the
language. You are an itinerant tinkerer who asks questions and refuses to
listen to the answers (instead, picking fights over your bruised feelings
because people think that you’re wrong).

I accept other sights, but I insist of using not offending words.

The problem is not in the language, it’s in the Fauxptimist.

Didn't find that with Google - please explain!

-a

On Sat, Aug 13, 2022 at 7:12 AM Die Optimisten <inform@die-optimisten.net> > wrote:

Hi

I have seen that while expr; do expr2 end # does not work, because of
the ;
     # and similar loops

Is it possible to change that in the parser? ( ';' shouldn't be a
problem!)

Opti

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hello
Again such offending words. - Zernichter: you didn't understand it,
so I conclude, you will not understand it [communicating in an
acceptable way].

Thank you Matthew, very helpful as usual :slight_smile:
- Is it possible to change Ruby to accept 'done' instead of 'end', of
just do that with a preprocessor?
Opti

···

Am 15.08.22 um 12:44 schrieb Der Zernichter:

"If you can't understand it without an explanation, you can't
understand it with an explanation."

-- Haruki Murakami, 1Q84

Ruby is not bash. If you want Ruby to act like Bash, fork it yourself. Better yet, find another mailing list to troll.

Kindly foad.

-a

···

On Aug 15, 2022, at 06:53, Die Optimisten <inform@die-optimisten.net> wrote:

Hello
Again such offending words. - Zernichter: you didn't understand it,
so I conclude, you will not understand it [communicating in an
acceptable way].

Thank you Matthew, very helpful as usual :slight_smile:
  - Is it possible to change Ruby to accept 'done' instead of 'end', of
just do that with a preprocessor?
Opti

Am 15.08.22 um 12:44 schrieb Der Zernichter:
"If you can't understand it without an explanation, you can't
understand it with an explanation."

-- Haruki Murakami, 1Q84

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;