WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: RFC: To RUBY or NOT RUBY  (Read 3959 times)

Offline rms46

  • Jr. Member
  • **
  • Posts: 60
    • Rahmat M. Samik-Ibrahim
RFC: To RUBY or NOT RUBY
« on: March 19, 2013, 06:03:26 AM »
Hello All,
If you are asked to introduce the idea of scripting to newbies with only "You Know What" operating systems experience, what will you choose:
1) the traditional "bash, awk, and sed" set, or
2) Ruby, or
3) other what runs on TCL (specify)
Thanks.
 
This following is ROT13 -- Guvf sbyybjvat vf EBG13

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: RFC: To RUBY or NOT RUBY
« Reply #1 on: March 19, 2013, 06:06:04 AM »
Hello All,
If you are asked to introduce the idea of scripting to newbies with only "You Know What" operating systems experience, what will you choose:
1) the traditional "bash, awk, and sed" set, or
2) Ruby, or
3) other what runs on TCL (specify)
Thanks.

Python
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: RFC: To RUBY or NOT RUBY
« Reply #2 on: March 19, 2013, 06:55:55 AM »
I'd replace the "bash" in 1) by "sh" for portability.

Using the expression "TCL" in 3) might create confusion because there is a scripting language named "tcl".
(I can remember a few years ago having been corrected by a member of the team not to use "tcl" as an acronym for "tinycorelinux" to avoid misunderstandings)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: RFC: To RUBY or NOT RUBY
« Reply #3 on: March 19, 2013, 10:15:14 AM »
Quote
to introduce the idea of scripting to newbies

I would use sh instead of bash, per tinypoodle's suggestion, however I would be unlikely to include awk and sed as they each deserve a separate intro of their own.

Having said that, I'll have to admit that I know nothing of ruby and very little of lua or python (or sed or awk, for that matter).

I'm thinking that there's not a lot one can't do with the "old-time" unix utilities if one just puts in the time to learn them - sed, awk, tcl, tk, et cetera.

What are the strengths of ruby, python, lua and such?  What do they "bring to the table" that's new or easier?  (I'm omitting perl because of a long standing personal bias.  If I ever revisit perl, I may just come to love it.)
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline rms46

  • Jr. Member
  • **
  • Posts: 60
    • Rahmat M. Samik-Ibrahim
Re: RFC: To RUBY or NOT RUBY
« Reply #4 on: March 19, 2013, 11:40:49 AM »
Python

Sure, Python is a GREAT language and "cleaner" than Perl. However, is it easy to be taught to the ones with not much programming interest?
This following is ROT13 -- Guvf sbyybjvat vf EBG13

Offline rms46

  • Jr. Member
  • **
  • Posts: 60
    • Rahmat M. Samik-Ibrahim
Re: RFC: To RUBY or NOT RUBY
« Reply #5 on: March 19, 2013, 11:45:15 AM »
I'd replace the "bash" in 1) by "sh" for portability.

For "TinyCore", how standard is busybox's  "sh"?
BTW: I still have no idea on how to use busybox's "vi", and therefore worry if there will be unknown glitches of "sh".
This following is ROT13 -- Guvf sbyybjvat vf EBG13

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: RFC: To RUBY or NOT RUBY
« Reply #6 on: March 19, 2013, 11:56:40 AM »
How does your inability to learn vi suggest there might be problems with ash?

Offline rms46

  • Jr. Member
  • **
  • Posts: 60
    • Rahmat M. Samik-Ibrahim
Re: RFC: To RUBY or NOT RUBY
« Reply #7 on: March 19, 2013, 12:18:57 PM »
How does your inability to learn vi suggest there might be problems with ash?
I am not sure on how this is related to "ash". Does "busybox" implement "ash"?
And, yes: I am having problem to learn/understand busybox since it is quite different compared to the real commands. E.g. busybox's "vi" in Tinycore even do not implement a simple "u"/ undo.
This following is ROT13 -- Guvf sbyybjvat vf EBG13

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: RFC: To RUBY or NOT RUBY
« Reply #8 on: March 19, 2013, 01:47:44 PM »
Alternatively you could compile bash with "--enable-strict-posix-default --enable-xpg-echo-default".
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: RFC: To RUBY or NOT RUBY
« Reply #9 on: March 19, 2013, 05:19:10 PM »
Python

Sure, Python is a GREAT language and "cleaner" than Perl. However, is it easy to be taught to the ones with not much programming interest?
Python reads almost like pseudo code. I would say that should make it very easy for a good teacher. Also, a good number of schools and universities are using python to introduce programming concepts to students. I'd say that's a pretty good endorsement.

But... I would ask what is the goal? At the end of the course/session/whatever, what do the newbies need to be able to do? Which language is best for the tasks and skills you want to prepare them for? I would highly recommend python over ruby, but that might be my personal preferences. Bash, on the other hand, will force your rookies to learn a little bit about linux and how it works.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: RFC: To RUBY or NOT RUBY
« Reply #10 on: March 20, 2013, 12:36:09 AM »
if the objective is to control a system, sh is irreplaceable for linux, otherwise between python, perl, ruby ​​and other competitors there are many valid alternatives