?

Log in

No account? Create an account
Bending Reality to my Will

> Recent Entries
> Archive
> Friends
> Profile
> My Website

September 13th, 2005


Previous Entry Share Flag Next Entry
12:29 pm - Other People's Writing
I think most of my "friends," aka 'people likely to be reading my blog' are artsy types, not techy types. I have techy friends, but I haven't mentioned the blog to them, for the most part. Who cares? I'm posting this anyway.

As most people start with English, then maybe French or German, and then perhaps something more esoteric like Chinese, my first computer language was Basic, and then Pascal. From there, I pretty much dove into the computer equivalents of Serbo-Croatian, Klingon, and Sanskrit. I learned Modula-2, but not C. I learned DCL (Digital Command Language, the scripting language on the VAX) but not the DOS scripting language (well, not much). I learned aREXX (for multiapplication scripting on the Amiga) and AppleScript (for multiapplication scripting on the Mac), and WordPerfect's scripting language, but not Word's. No C++ for me. No VisualBASIC. No no, far too quotidian.

When it came time to make the web come alive, I eschewed the Micro-monster's Active Server Pages for Tango. I learned SQL, which is sort of like Hawai'ian or Welsh in how not-like-other-languages it is. No Perl, no PHP, no Python, no Java. I ran from Java; too much like C.

But alas, Tango was orphaned, and my old tools can't be made to function on OSX. Apple doesn't let me use AppleScript for web pages until I buy OSX Server; regular OSX won't connect the dots. I decided I'd have to bite the bullet and learn another language, one that reached more broadly than AppleScript could (even though AppleScript's reach was immensely expanded by XCode, which allows it to control windows and buttons and sliders and screens and much (but not all!) of the sexy paraphernalia of OSX's Aqua user interface.)

Well, first, let's look at what's already hiding under the hood of OSX. That is, Perl, Python, PHP, Tcl, and Ruby. I'd heard of the first four. To my surprise, this turned out to be a pretty easy decision. I'd had to fiddle with Perl before, and didn't really like it much; too much punctuation. I'd heard very good things about Python. Anyway, I started by finding each language's home page.

From perl.org: "Perl is a stable, cross platform programming language. It is used for mission critical projects in the public and private sectors and is widely used to program web applications of all needs."

From Python.org" "Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. Python is also usable as an extension language for applications that need a programmable interface."

(AppleScript is rather object-oriented. Without attempting to explain the difference between that and an older procedural-oriented language, I'll just tell you that I'm not the only person who thinks it's a Better Way. Plus one for Python.)

From PHP.net: "PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML." OK, especially suited for Web development is a good thing.

From tcl.tk/advocacy: "Tcl is the leading scripting language for a wide variety of integration application needs, whether you need to build a powerful GUI, embed Tcl in your application, create a multi-threaded application, or develop a cross-platform program, Tcl is your best choice". They have a graph that shows more checkmarks for Tcl than for Perl, JavaScript, or VisualBASIC, and as many as Python, although Python gets asterisks.

But from rubycentral.org/misc/intro.html: "Ruby is a an exciting new, pure, object oriented programming language. . . . Most of all, Ruby puts the fun back into programming. When was the last time you had fun writing a program---a program that worked the first time; a program that you could read next week, next month, or next year and still understand exactly what it does?"

Ruby: object oriented, and fun! Winner!

But don't just take my word for it. This blog entry was prompted by reading a review/tutorial of another tutoral for "Ruby on Rails," a library/module that's written in Ruby to make web development even easier. The article has this comment about Ruby itself:


As you probably noticed, Ruby (not just Rails) has very lax rules when it comes to syntax. . . . You don't have to use semicolons—but you can. You don't have to use parentheses—but you can. You don't have to use curly braces on code blocks—although, of course, you can. . . .

I used to wrinkle my nose at code with so few constraints, especially the lack of variable signifiers . . . in languages like Python and Ruby. But I was wrong, and perhaps just a tiny bit scarred by my PERL experience. But Ruby is gorgeous—spare like a Japanese tea room, as functional as a Zen studio. I want to marry Ruby and have its babies. But I have the feeling that a language like Ruby lives a life that resembles its syntax; I'm sure it's not looking for that kind of emotional entanglement. Somehow, I soldier on.


Code is not the only thing that this guy can write.
Current Mood: delighted

(9 comments | Leave a comment)

Comments:


[User Picture]
From:xv
Date:September 13th, 2005 10:52 pm (UTC)
(Link)
Public internet dude, you never know who's reading. (In this case one of my robots brought to my attention your liberal usage of the keyword 'AppleScript') So I read with interest your initial inclination to AS on X Server, and resting later at Ruby. I went off and looked at some Ruby code/philosophy and was intrigued. My first and only language is AppleScript, but I'm getting to the point where I know enough to want to start doing slightly more exotic things than pushing folders around the finder. CGI looks interesting, but I've only just now been touched by the curiosity. X Server is a bit cost prohibitive here, but a quick google turns up some more reasonable looking apache whatsits.
[User Picture]
From:snarke
Date:September 13th, 2005 11:26 pm (UTC)

A wider audience.

(Link)
Actually, I often know who's reading. Any time I embed a graphic in my journal, my web server's gonna log the hit when somebody looks at the page, for example. {grin} I tried both the acgi thing you linked to, and another connecter called PeacePipe. Both of them completely failed to work despite a lot of time and effort on my part. I even emailed the guy that wrote PeacePipe to try to get a working version, but he couldn't help me.

Ruby's array handling and string handling is so monumentally better than AppleScript's that anything that involves reading files off the drive means I run to Ruby.
[User Picture]
From:xv
Date:September 14th, 2005 10:22 am (UTC)

Re: A wider audience.

(Link)
Thank you for the peacepipe tip... I can already feel myself jumping off that cliff despite your warnings. My whole foray into high-level scripting is itself a function of my ignorance, so I'm either uniquely able to or completely not qualified to defend AS (behold the power of koolaid, woot). I've sought out enhancing the language by running things around in the shell and installing scripting additions. I'm still hoping the subject of my intense interest shifts elsewhere, like, to getting a job or getting laid... something.
[User Picture]
From:snarke
Date:September 14th, 2005 10:02 pm (UTC)

Re: A wider audience.

(Link)
The shell is excellent for backfilling some of AppleScript's weaknesses. Scripting Additions are good too. But you didn't mention AppleScript Studio, aka XCode! You *are* using XCode, no?

As for the power of Kool-aid, well, you needn't try to impress me with that. I already knew that.
[User Picture]
From:xv
Date:September 15th, 2005 03:07 pm (UTC)
(Link)
Yes, yes, Xcode is definitely where AS has a major leg up on the other scripted languages. The linked server looks down at the moment, but I fetched your koolaids from the net archive, crazy!
[User Picture]
From:snarke
Date:September 15th, 2005 09:57 pm (UTC)

Gotta be quicker.

(Link)
See next post for the whole linked server thing.
[User Picture]
From:twilight2000
Date:September 13th, 2005 11:03 pm (UTC)
(Link)
The writer who extoled the virtues of Ruby could well excell writing reviews and other pieces -- you're right, Ruby ain't all he writes well in.

As for the general description, it sounds a lot like earlier descriptions of Python :>.

I may have to just take up a language!
From:samildanach
Date:September 13th, 2005 11:59 pm (UTC)
(Link)
You've got some techie readers, anyway.

(Hi there; we've met at Foolscap and such.)
[User Picture]
From:bedii
Date:September 16th, 2005 11:23 am (UTC)
(Link)
Another language for your collection that I stumbled across today: Biferno, at http://www.tabasoft.it/biferno/

I doubt that it's ready for Prime Time, but you might want to look at it just to say you've seen it.

> Go to Top
LiveJournal.com