From owner-freebsd-questions@FreeBSD.ORG Tue Feb 19 21:07:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E081D16A417 for ; Tue, 19 Feb 2008 21:07:09 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [75.145.138.73]) by mx1.freebsd.org (Postfix) with ESMTP id 7F67513C467 for ; Tue, 19 Feb 2008 21:07:09 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (viper.tundraware.com [192.168.0.2]) (authenticated bits=0) by ozzie.tundraware.com (8.14.2/8.14.2) with ESMTP id m1JL724R045733 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 19 Feb 2008 15:07:03 -0600 (CST) (envelope-from tundra@tundraware.com) Message-ID: <47BB44F8.6030307@tundraware.com> Date: Tue, 19 Feb 2008 15:07:04 -0600 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Gary Kline References: <20080219142047.GB27411@dell1> <20080219161657.GC91805@demeter.hydra> <200802191226.17164.kline@thought.org> In-Reply-To: <200802191226.17164.kline@thought.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-tundraware.com-MailScanner-Information: Please contact the ISP for more information X-tundraware.com-MailScanner: Found to be clean X-tundraware.com-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Cc: FreeBSD Mailing List Subject: Re: thankee, thankee! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: tundra@tundraware.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 21:07:10 -0000 Gary Kline wrote: > On Tuesday 19 February 2008 08:16:57 Chad Perrin wrote: >> On Tue, Feb 19, 2008 at 09:20:47AM -0500, William Bulley wrote: >>> According to Tim Daneliuk : >>>> Before you go down this road too far, you should take a look at Python >>>> as an implementation language. If what you're doing involves text and >>>> string manipulation, Python is loaded with good modules that will make >>>> your task a snap. Having coded extensively in many assemblers, C, >>>> BASIC, ... I now find myself reaching exclusively for Python when >>>> writing applications and utilities unless the task at hand must have >>>> the performance of native C. Try it ... you'll be shocked how fast >>>> your program comes together. >>> Might the same not be said for Perl? >> Yes . . . and Ruby. I prefer both over Python, for different reasons, >> personally. > > Gotta laugh at most of this considering that I understand that we tend to > favor what we're most familiar with. I've been lazing along for several > years since I've gone back to school--sort of. During my last lifetime I > was trapped into learning perl and forced myself to get into C++ because > much of my work required these languages. > > Can you guys, or anybody else, point me to some comparison sites for python > and ruby? I just found one abandoned freeware suite in ruby that may be just > what I'm trying to do. The deal is: do I want to invest months (from 2 to 3) > in learning another language/ or port from ruby to C? or take the Java > functions and re-write or translate them to C? > > Still, first thing is to get the algorithm down and tested. > http://blog.ianbicking.org/ruby-python-power.html Basically, you'll discover that Python and Ruby do many of the same things in similar, but different ways. The OO purists like Ruby because it tends (as I understand it) to be more academically pure as an OO language. Many web apps folk also like Ruby because of the well-received Ruby-On-Rails framework. OTOH, Python is highly regarded because of its very rich library support, excellent cross-platform consistency, and ability to switch programming paradigms in mid-program. The last bears a bit of explanation. Most languages have you programing in one paradigm: imperative/procedural (Algol-derived), functional (Haskell), list processing (LISP), Object Oriented (C++, Java), etc... But here in the Real World, a single paradigm is not always a good idea. (With slight modesty, may I suggest a read of something I did a while back on this subject: http://www.tundraware.com/Technology/Bullet/ One of Python's great virtues is that it lets you "switch gears" paradigmatically in the middle of a program to use the model that best suits your problem. So for, instance, you can be doing OO programming, but quickly switch to procedural programming when the code needs to do DBMS access - a place where there has always been an OO/DBMS "impedance mismatch" in the past. As to the learning curve. If you are an experienced programmer in any decent language (C, BASIC, Java, Perl, Ruby, ...), you can learn the essence of Python in an afternoon, not weeks or months. As I said, I've been doing this for a while. Moreover, my graduate work was in languages and automata. This means I am a language dork. In several decades of fiddling around with languages, I have *never* seen one as elegant, expressive, maintainable, and efficient for the programmer as Python. No, it's not as fast as native C, but unless you're doing real time or systems programming, with good programming style and design modern hardware doesn't require you to write applications in C. In any case, you can profile Python code, figure out the small portions of it that are slow and replace them with callouts to C functions. In short, and IMHO, Python is an (almost) perfect applications/utility programming language. And I'm not alone in thinking so. The Python community is full of people who were/are C/C++, Perl, Java, LISP, ... experts who wouldn't go back to their old languages under any circumstance - Python is that good. Having said this, there is, and always will be a place for many kinds of programming languages because there are many kinds of problems and even more kinds of people. Again, with slight modesty, may I suggest this: http://www.tundraware.com/Technology/How-To-Pick-A-Programming-Language/ Cheers, ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/