Go Back   Science Forums
View Single Post
Old 08-06-2005   #12 (permalink)
CraigD's Avatar
CraigD
Creating


Location:
Silver Spring, MD, USA
 
CraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond reputeCraigD has a reputation beyond repute
 



Not Ranked  0 score     
Cool Beautiful programming languages: Ruby & M

Quote:
Originally Posted by coldhead
Here's one.
Introduction to Ruby & Ruby on Rails.
http://www.rubyonrails.com/
Ruby is beautiful! Thank you for pointing me to it. I look forward to getting to know it better in the coming weeks.

In an attempt to reciprocate, let me present my personal favorite “joy and less code” language, M (AKA MUMPS, ANSI X-11.1-1995, Cache). Although there’re several open source implementations of M available, I recommend this free, unlimited-use single-user version of a commercial implementation. This one will run quietly on your desktop or a server on your network, and can be accessed by any telnet terminal emulator (a simple one slightly nicer than the one that come with Windows comes bundled with the download).
  • Ruby is public domain via Yukihiro Matsumoto’s GPL, ca. 1995. M is public domain because it was developed by Octo Barnett and friends under a US federal grant in the ca. 1970.
  • Ruby is interpreted and terminal-based, commonly in an interactive, “direct” mode. So is M.
  • Ruby is intrinsically weakly (no true multiple inheritance) object-oriented. M is not even weakly OO, despite some implementer’s tacked-on extensions.
  • Ruby’s arithmetic is arbitrary-precision. M’s is limited (typically 16-18 decimal digits). If you like to use M to mess with big numbers, you’ll need to write or acquire and use better math functions.
  • Ruby’s pretty terse. M, which supports and encourages abbreviation of its keywords, is more terse. It’s arguably nearly as terse as a procedural language can be. Example:
    Code:
    # recursive factoral function in Ruby
    def fact(n)
      if n == 0
        1
      else
        n * fact(n-1)
      end
    end
    
     ; recursive factoral function in M
    fact(n) q:n=0 1 q $$fact(n-1)
  • Named functions/subroutines in Ruby must be defined. M programs can modify themselves dynamically (though one is to be cautioned that this can lead pretty far down the rabbit hole!)
Reply With Quote
 
» Advertisement
» Current Poll
Who's the sexiest man alive? Johnny Depp or Robert Pattinson?
Johnny Depp - 30.00%
3 Votes
Robert Pattinson - 0%
0 Votes
Someone else (please specify) - 40.00%
4 Votes
I'm too macho to think a guy is sexy - 30.00%
3 Votes
Total Votes: 10
You may not vote on this poll.


All times are GMT -8. The time now is 04:12 AM.

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

We have been online since May 2000, and aim to be the best place to find and share science-related content of all kinds.

Share the love!

Please add more science to your life. Use our RSS feeds on your blog, your portal, or your favorite feedreader!


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000-2009 Hypography
Part of the Hypography - Science for Everyone Network