[#54640] bRuby? — Austin Ziegler <austin@...>

Can anyone explain to me what Yuya's package bRuby

16 messages 2002/11/01
[#54646] Re: bRuby? — Matt Gushee <mgushee@...> 2002/11/01

On Fri, Nov 01, 2002 at 11:40:51AM +0900, Austin Ziegler wrote:

[#55128] Re: bRuby? (Yet another Ruby parser) — ptkwt@...1.aracnet.com (Phil Tomson) 2002/11/07

In article <20021107151904lBE13F@ohmsha.co.jp>,

[#54839] rubyconf notes — Pat Eyler <pate@...>

On Saturday Night, I recommended that attendees of Ruby Conf send off

38 messages 2002/11/04
[#54881] Matz Roundtable Summary (was Re: rubyconf notes) — Paul Duncan <pabs@...> 2002/11/05

Below is my pieced together summary of matz's roundtable summary. It's

[#54862] A vision for Parrot — Daniel Pfeiffer <occitan@...>

Hi,

80 messages 2002/11/04

[#54889] PGP on the list (was: Re: Matz Roundtable Summary) — Eric Hodel <drbrain@...7.net>

Paul Duncan (pabs@pablotron.org) wrote:

12 messages 2002/11/05

[#54906] Win32 support issues — "Gavin Sinclair" <gsinclair@...>

<quote source="roundtable">

14 messages 2002/11/05

[#55091] PGP signatures — "Gavin Sinclair" <gsinclair@...>

From: "Paul Duncan" <pabs@pablotron.org>

18 messages 2002/11/07

[#55149] Making Instace Variables Private/Local — William Djaja Tjokroaminata <billtj@...>

Hi Matz,

27 messages 2002/11/07

[#55221] CPAN Style installer — Tom Clarke <tom@...2i.com>

Hi all,

30 messages 2002/11/08
[#55233] Re: CPAN Style installer — ptkwt@...1.aracnet.com (Phil Tomson) 2002/11/08

In article <Pine.LNX.4.44.0211071926160.7998-100000@localhost.localdomain>,

[#55241] Re: CPAN Style installer — Tom Clarke <tom@...2i.com> 2002/11/08

On Fri, 8 Nov 2002, Phil Tomson wrote:

[#55290] Re: CPAN Style installer — " JamesBritt" <james@...> 2002/11/08

>

[#55291] Re: CPAN Style installer — tom <tom@...2i.com> 2002/11/08

On Sat, 9 Nov 2002, JamesBritt wrote:

[#55304] Re: CPAN Style installer — " JamesBritt" <james@...> 2002/11/08

> From: tom [mailto:tom@u2i.com]

[#55258] Beginner Question (Idiomatic way to subset an array — "Booth, Peter" <Peter.Booth@...>

I'm wondering if there is a more idiomatic way to do the following?

20 messages 2002/11/08
[#55261] Re: Beginner Question (Idiomatic way to subset an array — ahoward <ahoward@...> 2002/11/08

On Fri, 8 Nov 2002, Booth, Peter wrote:

[#55268] return MyClass.new vs self.type.send :new — ahoward <ahoward@...> 2002/11/08

[#55361] Lighting Rod — Eric Armstrong <eric.armstrong@...>

I love Ruby's smalltalk features. I really do.

16 messages 2002/11/09

[#55369] Why use 'include' — Eric Schwartz <emschwar@...>

As requested, here's a FAQ question & answer on the usage of modules

13 messages 2002/11/09

[#55372] Random idea: Procedural CGI?? — "Hal E. Fulton" <hal9000@...>

I've been musing about something today,

17 messages 2002/11/09

[#55442] Recording of the Ruby segement on LL2 — Yohanes Santoso <ysantoso@...>

Hi all,

22 messages 2002/11/09

[#55461] www.ruby-doc.org — " JamesBritt" <james@...>

Jim Freeze's presentation at RubyConf 2002 mentioned, among other things, the

18 messages 2002/11/10

[#55563] EuRuKo: European Ruby conference — Armin Roehrl <armin@...>

Hi all,

15 messages 2002/11/11

[#55571] ruby-dev summary 18613-18710 — TAKAHASHI Masayoshi <maki@...>

Hi all,

26 messages 2002/11/11
[#55926] Re: ruby-dev summary 18613-18710 — timsuth@... (Tim Sutherland) 2002/11/15

In article <20021112020739J.maki@rubycolor.org>, TAKAHASHI Masayoshi wrote:

[#55929] Re: ruby-dev summary 18613-18710 — dblack@... 2002/11/15

Hi --

[#55955] Re: ruby-dev summary 18613-18710 — timsuth@... (Tim Sutherland) 2002/11/15

In article <Pine.LNX.4.44.0211142157370.25867-100000@candle.superlink.net>,

[#55750] Another Newbie question regarding instance variables? — montana <montana@...99.bsd.st>

The value of an instance variable is only available to the instance of the class, whereas the value of the class variable is available to all instances of the class? Is this correct?

10 messages 2002/11/13

[#55815] RubyConf 2002 Slides for FreeRIDE Presentation — "Curt Hibbs" <curt@...>

I finally got the slides online from Rich Kilmer's FreeRIDE presentation at

40 messages 2002/11/14
[#55828] Re: RubyConf 2002 Slides for FreeRIDE Presentation — " JamesBritt" <james@...> 2002/11/14

>

[#55829] Re: RubyConf 2002 Slides for FreeRIDE Presentation — "Curt Hibbs" <curt@...> 2002/11/14

JamesBritt wrote:

[#56087] Re: RubyConf 2002 Slides for FreeRIDE Presentation — Robert McGovern <tarasis@...> 2002/11/17

Curt Hibbs wrote:

[#56088] Re: RubyConf 2002 Slides for FreeRIDE Presentation — "Rich Kilmer" <rich@...> 2002/11/17

Extensibility IN RUBY was the key thing for us. We wanted the IDE to be

[#55818] regex help — "Shashank Date" <sdate@...>

Using ruby 1.7.3 (2002-10-12) [i386-mswin32] on Win XP (Home)

14 messages 2002/11/14

[#55842] Ruby equivalent to Python's map()? — wolfoxbr@... (Roberto Amorim)

Hi...

18 messages 2002/11/14

[#56045] Not really a ruby question, but this is a smart group. Win32 file.write timing. — jcb@... (MetalOne)

I am trying to write non-compressed video to a file at 40 fps.

16 messages 2002/11/16

[#56119] ruby-dev summary 18711-18810 — Minero Aoki <aamine@...>

Hi all,

34 messages 2002/11/18

[#56131] identing ruby in vim — Maur兤io <briqueabraque@...>

Hi,

14 messages 2002/11/18

[#56158] install.rb/setup.rb question — ptkwt@...1.aracnet.com (Phil Tomson)

I want to install a script that will be run as an executable which isn't a

26 messages 2002/11/18

[#56250] Need help dynamically creating classes. — pgregory@... (Paul Gregory)

I have a system at the moment where I create 'things' based on a base

11 messages 2002/11/19

[#56300] untainted, unfrozen, honest-to-god session data! — "Chris" <nemo@...>

Hello,

12 messages 2002/11/20

[#56376] Interpreted vs compiled [FAQ] defining methods anywhere — Daniel Carrera <dcarrera@...>

Hello,

13 messages 2002/11/21
[#56378] Re: [FAQ] Interpreted vs compiled [FAQ] defining methods anywhere — "Iain 'Spoon' Truskett" <spoon-dated-1039065493.b360fd@...> 2002/11/21

* Daniel Carrera (dcarrera@math.umd.edu) [21 Nov 2002 16:07]:

[#56388] Ruby is too slow — jcb@... (MetalOne)

I have been writing some image processing algorithms that run on incoming

37 messages 2002/11/21

[#56440] Multiple constructors? — christopher.j.meisenzahl@...

18 messages 2002/11/21

[#56469] The ultimate Application — "Dat Nguyen" <thucdat@...>

13 messages 2002/11/21

[#56593] Ruby idom needed — Robert Cowham <rc@...>

What's the best ruby idiom for the following Perl:

23 messages 2002/11/24

[#56633] Things That Newcomers to Ruby Should Know (11/24/02) — William Djaja Tjokroaminata <billtj@...>

Hi,

56 messages 2002/11/25
[#56679] Re: Things That Newcomers to Ruby Should Know (11/24/02) — William Djaja Tjokroaminata <billtj@...> 2002/11/25

Hi,

[#56694] Re: Things That Newcomers to Ruby Should Know (11/24/02) — "Gavin Sinclair" <gsinclair@...> 2002/11/26

From: "Simon Cozens" <simon@simon-cozens.org>

[#56695] Re: Things That Newcomers to Ruby Should Know (11/24/02) — Daniel Carrera <dcarrera@...> 2002/11/26

[#56722] Re: Things That Newcomers to Ruby Should Know (11/24/02) — Austin Ziegler <austin@...> 2002/11/26

On Tue, 26 Nov 2002 09:21:48 +0900, Daniel Carrera wrote:

[#56725] Re: Things That Newcomers to Ruby Should Know (11/24/02) — Daniel Carrera <dcarrera@...> 2002/11/26

> It's applicable to a small subset of the total set of classes.

[#56726] Re: Things That Newcomers to Ruby Should Know (11/24/02) — "Gavin Sinclair" <gsinclair@...> 2002/11/26

[#56729] Re: Things That Newcomers to Ruby Should Know (11/24/02) — Daniel Carrera <dcarrera@...> 2002/11/26

[snip]

[#56738] Re: Things That Newcomers to Ruby Should Know (11/24/02) — dblack@... 2002/11/26

Hi --

[#56744] Re: Things That Newcomers to Ruby Should Know (11/24/02) — Jason Persampieri <helgaorg@...> 2002/11/26

> You're not changing the letter 'a' itself; you're

[#56764] Re: Things That Newcomers to Ruby Should Know (11/24/02) — "Hal E. Fulton" <hal9000@...> 2002/11/26

----- Original Message -----

[#56807] Re: Things That Newcomers to Ruby Should Know (11/24/02) — Jason Persampieri <helgaorg@...> 2002/11/26

OK... I get it... I understood your argument (although

[#56812] Re: Things That Newcomers to Ruby Should Know (11/24/02) — William Djaja Tjokroaminata <billtj@...> 2002/11/26

Jason Persampieri <helgaorg@yahoo.com> wrote:

[#56814] Re: Things That Newcomers to Ruby Should Know (11/24/02) — dblack@... 2002/11/26

Hi --

[#56665] FXRuby on Mandrake 8.2 — Ludo <coquelle@...>

Hi, could someone help a beginner rubyer please ?

15 messages 2002/11/25

[#56708] Default value of property — Tim Bates <tim@...>

I have an object, with a method that returns another object, or nil under

20 messages 2002/11/26

[#56719] each_with_index & collect_with_index? — Tim Bates <tim@...>

Array.each (and others) have an alternative .each_index which passes the index

34 messages 2002/11/26
[#56734] Re: each_with_index & collect_with_index? — dblack@... 2002/11/26

Hi --

[#56800] Re: each_with_index & collect_with_index? — Gordon Miller <gmiller@...> 2002/11/26

> As for the second.... I recently appointed myself President of

[#56845] Re: each_with_index & collect_with_index? — why the lucky stiff <ruby-talk@...> 2002/11/27

Gordon Miller (gmiller@promisemark.com) wrote:

[#56849] Re: each_with_index & collect_with_index? — Jason Persampieri <helgaorg@...> 2002/11/27

> It would be really cool if, instead of having a

[#56851] Re: each_with_index & collect_with_index? — dblack@... 2002/11/27

Hi --

[#56772] RCR: Stack, Queue alias methods in Array — Martin DeMello <martindemello@...>

Rationale: Ruby arrays can be easily used as stacks and queues, but it's

46 messages 2002/11/26
[#56793] Re: RCR: Stack, Queue alias methods in Array — matz@... (Yukihiro Matsumoto) 2002/11/26

Hi,

[#56797] Re: RCR: Stack, Queue alias methods in Array — Nikodemus Siivola <tsiivola@...> 2002/11/26

[#56967] call-by-reference problem again — Shannon Fang <xrfang@...>

Hi there,

23 messages 2002/11/27
[#56970] Re: call-by-reference problem again — William Djaja Tjokroaminata <billtj@...> 2002/11/27

Shannon Fang <xrfang@hotmail.com> wrote:

[#56972] Re: call-by-reference problem again — Dave Thomas <Dave@...> 2002/11/27

William Djaja Tjokroaminata <billtj@y.glue.umd.edu> writes:

[#57146] Ruby ++, the one element and generators — "MikkelFJ" <mikkelfj-anti-spam@...>

21 messages 2002/11/30

[#57172] Numerical Ruby — Olivier Saut <Olivier.Saut@...>

Hi all,

14 messages 2002/11/30

Re: Thoughts on Ruby

From: Austin Ziegler <austin@...>
Date: 2002-11-03 05:56:27 UTC
List: ruby-talk #54725
On Sun, 3 Nov 2002 10:57:29 +0900, Enric Lafont wrote:
> Why does common operators like "=" , "and", " .." , "or" etc ...
> can not be overloaded or redefined ?, maybe the complexity of the
> Ruby parser comes from the fact that everything is ALMOST an
> object or a method.

I don't actually see this (that everything is "almost" an object).
Personally, I think that matz has made the right choice in making
boolean operations (and, &&, or, ||) invariant in the language. You
can, by the way, redefine the bit operators (& and |). There's
nothing worse than a language which doesn't do what you expect it to
do with conditionals, and it does so on the whim of another
programmer.

> Why is not "=" a method?

Because it's not something done to objects, but to reference
variables that we use to manipulate objects. I'm really curious as
to why one would want to redefine assignment in the first place. I
mean, seriously. It's not like this is C++ where you have to
reinvent everything every time you work with the bloody language.

> Same question for "and" and the rest of operators that can not be
> redefined, Does the actual implementation make life easier for the
> designer ? I say so because for me is more natural when everything
> is an object (without exceptions, here Ruby follows the rule
> pretty well) and a method is a method ever, not sometimes.

This is just MNSHO, but again I don't see why one would want to
allow such basic constructs to be redefined. IMO, you can redefine
everything except boolean tests and still have a useful -- if obtuse
-- language; if you try to redefine those, you're not going to be
able to have any determinacy with the programs that are written.

> Some methods are keywords, and some other are not v.g. loop vs.
> while. The every call is a method could simplify greatly the
> sintax parser (look at the Smalltalk parser).

while is a boolean test as much as a loop construct.

> Why primitives are hidden ? In smalltalk you can call a primitive
> every time you want with a <primitive: aNumber> , this way the
> implementation of native methods, and in some way native Classes
> like String are not hidden from the programmer, freeing the
> programmer to change the behaviour if needed.

Why is it necessary to access the primitives? IMO, Java's biggest
problem is that it makes the primitives available. In Ruby, by the
way, I can still change the behaviour of String -- this is where
Ruby differs from every other language that I've ever used: it's
dynamic. If I need a new function on String, I can add it whenever I
need. I'm looking at extending the functionality of a library that
I've ported so that it can optionally extend String and Array to
include this library as methods on String and Array instead of as
something else to operate on a String or an Array.

> Yes you can have the "required" clause and use binary libraries,
> but would not be much more "natural" to have a "require string"
> when you want to invoque string libraries instead of having them
> loaded all the time ?. I want to say here that the "primitive"
> keyword frees the language from it's implementation. This favours
> the everything is a module aproach.

I disagree -- allowing access to the primitives ties the developer
very tightly to the local implemententation of the language. I don't
particularly care whether or not my integers are 32-bit or 64-bit or
even larger -- I just expect them to do what they should do (and
that means possibly upclassing to a BigNum class if I exceed the
word size). I think that the only thing that I'd like to see in this
regard is for Ruby to take a page from Ada and allow me to define
ranges as types (that is, I want to be able to automatically define
a class UInt64 < Integer [(-2**64) .. (2**64 - 1)] and have it do
the Right Thing).

It would NOT be much more natural to require every bloody module I
need every time I need it. A language -- especially a language like
Ruby, where Strings are fundamental to everything -- isn't useful
without certain defaults. Would it not make equal sense to "require
integer" when I need to use integers, or are you suggesting that
those are fundamentals and are always included? Strings are part of
what makes Ruby useful immediately (the same applies to Files)
because it's a scrpiting language.

> Sintax Sugar (SS), other thing difficult to understand for me, the
> question here is why ? Everything has exceptions very few things
> are orthogonal with the principe that must drive it, you can wite
> a.+(3) or a + 3 or a.+ 3 or a hundred other ways to write the same
> thing, yes, this gives you freedom, but a bad deserved (not
> needed) one. I use one form, but when I read programs from other
> persons the code seems strange and somewhat dificult to read.

I'm sorry, but I don't understand what you're getting at here. The
three examples you gave:

  a.+(3)
  a.+ 3
  a + 3

are actually the only ways to express that thought (without getting
silly wrt parenthesis). Ruby explicitly makes parentheses optional
on method calls. Parentheses make complex operations easier to read,
certainly, and can prevent confusion for the interpreter and
programmer, as when you have:

  a b, c d
    // Is this a(b, c(d)) -- OR
    //         a(b), c(d)

This means only that "a + 3" is syntactic sugar for "a.+(3)" because
it is fundamentally more natural for most people to write "a + 3"
than either "a.+(3)" or even RPN "a 3 +". Again, matz has made the
proper choice -- it keeps the language easily accessible.

> Sometimes SS is right, v.g. x +=1, but the every call is a method
> aproach could give you the same results without trouble, in this
> case += could be a method. As could be "++" or others.

Actually, it can't give you the same results without trouble. C++
*is* trouble because it allows the definition of:

  a = a + b     // a.=(a.+(b))

to be different from:

  a += b        // a.+=(b)

If the result of the first call isn't the same as the result of the
second call, then there's a disconnect which has to be documented.
Matz made the right choice here, I think, because it prevents this
sort of stupidity that C++ allows. (And this isn't 'prevention' in
the way that I think GvR was beyond silly to require indentation for
block definition in Python.)

> Undeclared variables, I don't know other people but I do fast
> typing and writing "aVariable" and "aVariabel" is a mistake that I
> can do very easily. Yes you can say, type more slowly, but this is
> not a solution, I would like to have a way to force the compiler
> to generate a warning when I use a non pre-declared (or pre
> asigned) variable.

The interpreter will warn you of this, to some degree. If I try to
use an undefined variable, it will complain (at least with 1.7)
because the value is unknown (it's not even properly 'nil'). This
won't help, however, if you have two similarly named variables.

> Why are Strings arrays of integers ? aString[0] is an integer,
> yes, it's the way it is, but I would like to have String as an
> array of chars, and char if you want as a descendant of Integer
> (nice election because a Unicode String is and array of double
> chars i.e. integer), I don't know you, but for me aString[i].chr
> =='x' is somewhat unnatural, because it breaks the semantic of a
> String, so it's not intuitive for me.

This one is easy: because it was a design decision made earlier. A
new version of String is being worked on, to the best of my
knowledge, that will deal with characters -- but this leaves the
problem of existing code which will break because it uses the
current implementation.

> Why is Ruby an interpreter ? Yes the less traditional bytecode
> aproach, can be harder (or not), but enables external
> optimizations more easily (JIT and similars) because the language
> are separated from the implementation, enables reduced footprint
> and gives faster execution times, yes, look at how Self executes
> programs, it's amazingly fast (and incredibly complex also), but a
> separated implementation could help develop better Ruby-engines.

A bytecode system is being worked on, to the best of my knowledge.

-austin
-- Austin Ziegler, austin@halostatue.ca on 2002.11.03 at 00.12.35


In This Thread