[#4479] Requesting addition to IRB (configurable standard output) — Sascha Ebach <se@...>

Hello,

13 messages 2005/02/24
[#4482] Re: Requesting addition to IRB (configurable standard output) — Sam Roberts <sroberts@...> 2005/02/25

Quoting se@digitale-wertschoepfung.de, on Fri, Feb 25, 2005 at 01:22:34AM +0900:

[#4483] Re: Requesting addition to IRB (configurable standard output) — Eric Hodel <drbrain@...7.net> 2005/02/25

On 24 Feb 2005, at 19:51, Sam Roberts wrote:

[#4488] Re: Requesting addition to IRB (configurable standard output) — Sam Roberts <sroberts@...> 2005/02/26

Quoting drbrain@segment7.net, on Sat, Feb 26, 2005 at 02:43:31AM +0900:

[#4489] Re: Requesting addition to IRB (configurable standard output) — Eric Hodel <drbrain@...7.net> 2005/02/26

On 25 Feb 2005, at 16:03, Sam Roberts wrote:

Re: bug in IRB with $_ matching a range of regexps

From: Mathieu Bouchard <matju@...>
Date: 2005-02-22 17:05:01 UTC
List: ruby-core #4462
On Wed, 23 Feb 2005 nobu.nokada@softhome.net wrote:
> At Tue, 22 Feb 2005 04:28:37 +0900,
> Ryan Davis wrote in [ruby-core:04458]:
> > Can we make the fact that it is of limited use more obvious? Like, 
> > maybe add a warning if that shorthand is used?
>   $ echo 'while gets; print if /^b/../^c/;end' > foo.rb
>   $ ruby -w foo.rb
>   foo.rb:1: warning: range literal in condition
> > What enables it to work in the shorthand (-e) from, but not in regular 
> > use?
> In old versions, it worked in regular use, as well as Perl.

How old? I recall it's in the Pickaxe 1 (Ruby 1.6.2) and it was not even
deprecated back then.

I'd rather have a feature generalised instead of confined like
this. However I understand that some features have to be weeded out, lest
it looks like PERL-6.

  http://www.ozonehouse.com/mark/blog/code/PeriodicTable.pdf

However, I am wondering whether that code (the flipflop regexp code) could
be mostly extracted out of eval.c and put in a class. It's usually better
to have complexity outside of the evaluator than inside. (That's what
BASIC does too little and LISP does too much... if there's a "too much")

What I really *don't* like is that the semantics are different depending
on whether the code is in -e or not. I'd vote for either making a
generalised feature out of it, or removing it completely right now.

(BTW: I think that every time I used that feature in Ruby, Perl, or Awk,
it always was for multiline scripts, typically 10-30 lines, so the current
situation sounds quite stupid to me)

_____________________________________________________________________
Mathieu Bouchard -=- Montr饌l QC Canada -=- http://artengine.ca/matju



In This Thread

Prev Next