Jump to content

Ruby is most like?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts
What mainstream language is Ruby most like?

I'm guessing Python, but my Ruby exposure is limited.

What do you think? Python, Smalltalk, etc...

This part of the forum is off to a very slow start...
I wonder if it reflects Ruby's overall popularity?

#2
chili5

chili5

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 7,247 posts
This forum is fairly new and it hasn't attracted much Ruby programmers yet. Part of the reason for that is there is no Ruby content here.

It looks similar to Python but I haven't used it much to know any better.

#3
Guest

Guest

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,414 posts
Ruby is most similar to pseudocode
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)

#4
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts

Guest said:

Ruby is most similar to pseudocode
Not sure I agree with that, but we'll see if we eventually
get some code posted up here. :)

#5
technica

technica

    Learning Programmer

  • Members
  • PipPipPip
  • 63 posts

Guest said:

Ruby is most similar to pseudocode

What makes you think that Ruby is like pseudocode?

#6
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Ruby was actually based on a combination of languages: Perl, Smalltalk, Eiffel, Ada, and Lisp. You can see in the code several of those languages (and others):
[highlight=ruby]def create_set_and_get(initial_value=0) # Note the default value of 0
closure_value = initial_value
return Proc.new {|x| closure_value = x}, Proc.new { closure_value }
end

setter, getter = create_set_and_get # ie. returns two values
setter.call(21)
getter.call # => 21

#You can also use a parameter variable as a binding for the closure.
#So the above can be rewritten as...

def create_set_and_get(closure_value=0)
proc {|x| closure_value = x } , proc { closure_value }
end[/highlight]

# look like Perl
def/end look like Basic
Optional line ending syntax is similar to JavaScript

What else?

#7
Guest

Guest

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,414 posts
I compared Ruby to pseudocode because it is so readable.
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)

#8
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
That reminds me of the autoit language (not sure what to call it) it looks similar to that type of syntax.

#9
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts
the more I look at that code, the more my stomach turns. :blink:

#10
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Why?

#11
debtboy

debtboy

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 916 posts
I personally don't like pipe characters used for passing in variables/parameters

#12
azad007

azad007

    Newbie

  • Members
  • Pip
  • 5 posts
Ruby is most likely to pseudo code.