Quantcast

Maximum PC

It is currently Mon Oct 20, 2014 7:49 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Python vs Ruby
PostPosted: Tue Feb 09, 2010 5:58 pm 
Willamette
Willamette

Joined: Mon Jan 07, 2008 2:35 pm
Posts: 1150
I would like to learn another programming language and I think I have narrowed it down to Python or Ruby. I want something that is simple, but powerful. At some point I would like to be able to easily add a GUI to a program. Also, easy to do networking would be a huge plus.

I will be using Ubuntu as my primary OS, so I really don't care about how good the IDE is for windows for either language. It would be nice to have a simple command line compiler or non-project based IDE for windows though.

Which language, Ruby or Python has the best cross platform GUI toolkit?

Which is easiest to program with regards to networking?

My previous programming experience: I took 3 years of java in high school and feel very comfortable with it. I have taken a semester course in c++ in college. I hated it and didn't learn much. The prof was terrible. I also tinkered with a couple scripting languages including javascript and VBScript.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 7:13 pm 
Coppermine
Coppermine
User avatar

Joined: Mon Feb 21, 2005 9:33 am
Posts: 692
Location: Grass Valley, CA
What is your target? A desktop application or something that runs in a web browser? And what kind of "cross platform GUI toolkit" are you talking about?


Top
  Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 7:59 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Either would work... but if I had to vote I would choose python. It seems to me that it is more widely used due to its age and it just seems like it has more uses. Not to say that Ruby couldn't do it. Or Java even. Java would probably better (unless you know Java and you are looking to expand to another language).


Top
  Profile  
 
 Post subject:
PostPosted: Tue Feb 09, 2010 8:51 pm 
Willamette
Willamette

Joined: Mon Jan 07, 2008 2:35 pm
Posts: 1150
I'm looking to expand my knowledge and learn a new programming language, but i want to learn something relevant and useful. When I say GUI toolkit, I want something that is easy to program a GUI interface that is compatible on both windows and linux.

Basically I want something that I can easily write short "tasks" (eg, used java to guess and check method to solve a math problem today), as well as use to write more complicated programs (perhaps a game or something).


Top
  Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 5:20 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Python will probably be your best bet, IMO.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Feb 10, 2010 9:55 am 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4745
Location: In the monkey's litterbox
I'd agree with starting on Python.

There's wxpython for a good GUI toolkit and pygame for a good game framework.


Top
  Profile  
 
 Post subject: Re: Python vs Ruby
PostPosted: Fri Feb 19, 2010 9:18 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
teh 1337 haxxor wrote:
Which language, Ruby or Python has the best cross platform GUI toolkit?

Which is easiest to program with regards to networking?


Either/or will work, though Python does have more GUI toolkits available. You can do hooks into Win32/MFC from Python and it has wxPython (which I've only encountered but never used in a project).

Though, admittedly, Python and Ruby are .NET capable now (if you want to develop for Windows). IronPython and IronRuby seem like they carry a promise.

Also, both languages are supported by most LAM (Linux/Apache/Mysql) webhosting companies - though Ruby has a leg-up with Ruby on Rails. I say, learn both because each has their own strengths. :)


Top
  Profile  
 
 Post subject: Re: Python vs Ruby
PostPosted: Thu Mar 04, 2010 11:13 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
teh 1337 haxxor wrote:
I would like to learn another programming language and I think I have narrowed it down to Python or Ruby.

<snip>

Which is easiest to program with regards to networking?
<snip>


Before I get started on your question... thanks for being so descriptive in your initial post. It is a welcome relief from the typical "I have a bug in my program. It is written in C++. It gives an error about cin and null pointers. Please Help!!!".

The main concern that I have after reading your post is that it appears you might be attempting to learn too many things at one time. You stated that you'd like to learn a new programming language, inquired about networking support and about gui support. I think you need to prioritize and take a more methodical approach. Each of the things that you want to learn will require pretty big chunks of time. Is the main focus to learn another language, networking or creating a gui?

If you haven't created a gui in Java, which appears to be the language that you know the best, I would suggest that you spend an hour or two going through a tutorial. Just pick an existing app and try to copy the look leaving the actual event calls as stubs. If you do have a gui in mind, draw everything on paper. Completely story board your idea and then implement it.

Ditto for networking... read the API and write a small script to scrape a couple of web pages. If you're dying to write a web app, check out grails and see what makes it a compelling choice. People tend to learn things more effectively when they are able to relate a new piece of knowledge to something else that they've already learned (eg I know that a quart is 1/4 of a gallon because I know that a quarter is 1/4 of a dollar).

Regarding the languages, Python is a very elegant language with tutorials, libraries, and developers in spades. It is a very good language choice. Personally, I think that the contrast between working in the Python interpretor and a Java IDE will be a good experience for you.


Top
  Profile  
 
 Post subject:
PostPosted: Wed May 05, 2010 7:53 am 
8086
8086

Joined: Mon May 03, 2010 8:09 am
Posts: 4
Python distinguish between functions and procedures. In python anonymous functions are nice feature. Python is not equivalent to Ruby’s do end block. Python is limited to one line and can’t contain statements in for, if etc. So there are more differences between Ruby and Python


Top
  Profile  
 
 Post subject:
PostPosted: Mon May 24, 2010 11:26 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
smithdwsn wrote:
Python is not equivalent to Ruby’s do end block. Python is limited to one line and can’t contain statements in for, if etc.

Can't contain statements in the conditional part of for or if statements?

Can you give an example of the do end block in Ruby.

smithdwsn wrote:
So there are more differences between Ruby and Python

Of course there are quite a few differences. Ruby has a pretty horrible macro system. In some respects, the macro system in Ruby is worse than C. At least newbies can figure out that the macro system in C isn't very good. The macro system in Ruby is pretty deceptive in that regard.

Of course, Python doesn't have any macro system.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.