From: Kendall Gifford Date: 2012-02-29T08:17:41+09:00 Subject: Re: Rubymoticons --14dae934079fe1350704ba0e6eff Content-Type: text/plain; charset=UTF-8 On Tue, Feb 28, 2012 at 10:03 AM, Dave Aronson < rubytalk2dave@davearonson.com> wrote: > I was demonstrating injection of a symbol, and noticed a familiar > pattern of characters. That inspired a bit more investigation. So > now I present some basic Rubymoticons: > > [].inject( :-) > Hmm, a little off-topic, but how come my ruby 1.9.2-p290 version of irb behaves "funny" with certain, apparently valid symbols? Example 00: irb 01: > :hi 02: => :hi 03: > :"-" 04: => :- 05: > :- 06: > :+ 07: > x = :- 08: > x 09: => :- ... Basically, certain characters that the ruby (1.9.2-p290) parser is fine with having as unquoted symbols above make irb fail to print out the statement's value. Specifically, no result line is printed for lines 5, 6, or 7. Obviously, I noticed this while playing around with Dave's challenge and I'm just curious if anyone knows what's going on. > > {}[ :-] > > ->() { :-} > > These are perfectly valid Ruby code, and evaluate to nil, nil, and a > lambda. > > Of course, the nose is easily substitutable, and noseless ones can use > any mouth they please... but what about changing the eyes, or the > mouth on full-size ones, and additional adornments? Let's see how > creative you can get, especially in as few characters as possible on > either side. > > -Dave > > -- > Dave Aronson: Available Cleared Ruby on Rails Freelancer > (NoVa/DC/Remote) -- see www.DaveAronson.com, and blogs at > www.Codosaur.us, www.Dare2XL.com, www.RecruitingRants.com > > -- Kendall Gifford zettabyte@gmail.com --14dae934079fe1350704ba0e6eff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Feb 28, 2012 at 10:03 AM, Dave Aronson <= span dir=3D"ltr"><rubyt= alk2dave@davearonson.com> wrote:
I was demonstrating injection of a symbol, and noticed a familiar
pattern of characters. =C2=A0That inspired a bit more investigation. =C2=A0= So
now I present some basic Rubymoticons:

[].inject( =C2=A0 =C2=A0 =C2=A0 :-)

Hmm, a little = off-topic, but how come my ruby 1.9.2-p290 version of irb behaves "fun= ny" with certain, apparently valid symbols?

Example

00: = irb
01: > :hi
02:=C2=A0 =3D> :hi
03: > :"-"
04:=C2=A0 =3D> :-05: > :-
06: >=C2=A0 :+
07: >=C2=A0 x =3D :-
08: >=C2= =A0 x
09:=C2=A0 =3D> :-
...

Basically, certain characters t= hat the ruby (1.9.2-p290) parser is fine with having as unquoted symbols ab= ove make irb fail to print out the statement's value. Specifically, no = result line is printed for lines 5, 6, or 7.

Obviously, I noticed this while playing around with Dave's challeng= e and I'm just curious if anyone knows what's going on.
=C2=A0

{}[ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:-]

->() { =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :-}

These are perfectly valid Ruby code, and evaluate to nil, nil, and a lambda= .

Of course, the nose is easily substitutable, and noseless ones can use
any mouth they please... but what about changing the eyes, or the
mouth on full-size ones, and additional adornments? =C2=A0Let's see how=
creative you can get, especially in as few characters as possible on
either side.

-Dave

--
Dave Aronson: =C2=A0Available Cleared Ruby on Rails Freelancer
(NoVa/DC/Remote) -- see www.DaveAronson.com, and blogs at
www.Codosaur.us, <= a href=3D"http://www.Dare2XL.com" target=3D"_blank">www.Dare2XL.com, www.RecruitingRa= nts.com


--
Kendall Gifford
zettabyte@gmail.com
--14dae934079fe1350704ba0e6eff--