From: Felix Windt [mailto:
[email protected]]=20
# felix@felix-laptop:~$ expr 20 + 5 - 4
# 21
#=20
# Now, I work in the shell all day long, so maybe I'm just used to those
# things, but I didn't find them any harder to learn than some=20
# of the ground rules for Ruby.
for shell gurus, it probably should not matter. But w the current IT
state, of admins beset with multitude of problems amongst a sea of
heteregeneous platforms, architecture, networks, os, applications,
languages, whatever, we need a tool that is general purpose, kind on our
brains, yet powerful to drive a small script up to the the biggest web
framework imagineable.
eg,
botp@botp-desktop:~$ expr 1+1
1+1
botp@botp-desktop:~$ expr 1+.5
1+.5
botp@botp-desktop:~$ expr 1+0.5
1+0.5
ruby on the other hand is kinder,..
botp@botp-desktop:~$ ruby -e "p 1+1"
2
botp@botp-desktop:~$ ruby -e "p 1+.5"
-e:1: no .<digit> floating literal anymore; put 0 before dot
p 1+.5
^
-e:1: syntax error, unexpected '.'
p 1+.5
^
i see. so ruby is kind to the programmer, providing much error info as
possible
botp@botp-desktop:~$ ruby -e "p 1+0.5"
1.5
botp@botp-desktop:~$ ruby -e "p 1+0.5+Math:

I"
4.64159265358979
botp@botp-desktop:~$ ruby -e "p r=3D100; c=3DMath:

I*r; area=3Dc*r; p =
area"
100
31415.9265358979
botp@botp-desktop:~$ ruby -e "r=3D100; c=3DMath:

I*r; area=3Dc*r; p =
area"
31415.9265358979
botp@botp-desktop:~$ ruby -e "p 2**999"
535754303593133660474212524530000905280702405852766803721875194185175525
562468061246599189407847929063797336458776573412593572642846157021799228
878734928740196728388741211549271053730253118557093897709107652323749179
097063369938377958277197303853145728559823884327108383021491582631219341
8602834034688
botp@botp-desktop:~$ echo hello, world | ruby -e "p
gets.chomp.capitalize"
"Hello, world"
botp@botp-desktop:~$ rails -v
ruby is kind to me, ..or maybe, i'm just getting old and lazy
kind regards -botp