Linked by Ritesh Kumar on Thu 13th May 2004 19:31 UTC
General Development In recent years "scripting languages" are becoming a path which is a must go for rapid application development. The open source community has seen many scripting language implementations. Some really popular and good ones available are perl and python.
Order by: Score:
RE: On Scripting Languages
by phil on Thu 13th May 2004 19:51 UTC

" I have been looking at this language called Objective C lately. It seems to be a natively compiled version of a language like Java."

Well, Objective C tends to fall in the more dynamically-typed language category. It's a lot more similar to SmallTalk or Ruby ( http://www.ruby-lang.org ) than it is to Java.

In fact, you can write extensions to Ruby in Objective C. This would be very similar to the scenario you describe where parts of your system are written in a compiled language and other parts are written in a 'scripting' language for rapid development.

Lua is good as well
by Gallen on Thu 13th May 2004 19:58 UTC

Lua was designed with embeddability and compatibility with C in mind. I've seen some pretty impressive ways of implementing it with more object oriented languages/libraries, too. It's really quite nice.

http://www.lua.org

Worth looking into. I'm sure it could talk nicely with objective C.

Oh yeah, and it's really fast.

Ruby
by paul on Thu 13th May 2004 20:01 UTC

Ruby ( http://www.ruby-lang.org ) plays well with Objective C.
You can write extentions to Ruby in Objective C. It's quite nice since Objective C is your compiled language with some dynamic features and Ruby is a very dynamic OO programming language that is great for rapid development.

Objective C
by Phuqker on Thu 13th May 2004 20:25 UTC

While there's talk that Objective C influenced Java, I don't see too many similarities between them. Strike that, I don't see any similarities between them.

...and I don't mean the abhorrent sh/bash scripting language.

while I would prefer to see perl integrated tightly into the system (make 'psh' the default shell), too many people are repulsed by the syntax. I would settle for python. ANYTHING but the utterly limiting and archaice sh syntax.

Python is not a scripting language
by Anonymous on Thu 13th May 2004 20:47 UTC

(I believe Perl 6 isn't either)

Python is a bytecode compiled language (simmilar to Java or .NET), it just compiles on the fly.
You even have the option of using the compiled language by accessing the .pyc part.

Python has full OOP with multiple inheritence, operator overloading, etc...

Basicly, Python CAN be used for some simple scripting, but it is definatly used for much more then that.

Re: Objective C
by jf on Thu 13th May 2004 20:51 UTC
@blahblah
by dr_gonzo on Thu 13th May 2004 20:57 UTC

maybe you should check out csh, it's a shell with, that's right you guessed it, a c like syntax.

also, it's really easy to use system calls in perl, just enclose it with a `
eg

#!/usr/bin/env perl
#

my $cat_output = `cat /etc/fstab`;
print "Here are the contents of /etc/fstab: n $cat_output n";

The Theory of Classification
by Brian Zhou on Thu 13th May 2004 21:06 UTC

"""
Mary was trying to find out about type systems in general and the basic classification of languages in terms of the typing system they use.
"""

The series of papers "The Theory of Classification" by Anthony J H Simons are pretty good on that topic -

http://www.dcs.shef.ac.uk/~ajhs/classify/

IMHO Scheme is an excellent candidate to build other languages on.

Where is Pike?
by Stefan Pfetzing on Thu 13th May 2004 21:23 UTC

I'm sure that Pike should also be noted here.

http://pike.ida.liu.se/

prolog?
by dr_gonzo on Thu 13th May 2004 21:30 UTC

where would Prolog fit into all of this? it's run through an interpreter but you can't run it like you can with perl or can you? i though the only way of running it without opening up the Prolog interpreter was by compiling it into binary. i could be wrong though...

Ruby
by neoneye on Thu 13th May 2004 21:35 UTC

I can recommend Ruby. Its syntax is really gentle, with a low signal to noise ratio. I am more productive than I have ever been before (Sml, C++, Pascal, Basic).

I care about that my programs can easily be maintained, even long after I am gone.. Ruby fits this perfectly.

RE:Python is not a scripting language
by Anonymous on Thu 13th May 2004 22:11 UTC

"""
Python is a bytecode compiled language (simmilar to Java or .NET), it just compiles on the fly.
You even have the option of using the compiled language by accessing the .pyc part.
"""

Aren't most "scripting languages" compiled to bytecode internally these days? Some languages just don't write bytecode to a file. It seems strange to say it is "not a scripting language" just because of that.. Java and .NET at least optimize bytecode and have JIT compilers, whereas Python .pyc is generated just to avoid reparsing sources (and normally is written for imported modules only, not for main script).

Objective-C scripting
by Jeff on Thu 13th May 2004 22:19 UTC

There used to be an Objective-C scripting language using WebObjects/NeXT called webscript, but it was abandoned. However, there is a very interesting scripting (as well as compiling) language for OS X which is a strict superset of Objective-C called F-Script ( http://www.fscript.org/ ). It also makes use of the Cocoa libraries, and, of course, all things C. (Not sure if it can use Obj-C++ to access C++ libraries.) -- There was also something called Joy which seemed nice, but it hasn't been updated in years. More options?

RE: Anonymous (IP: ---.ia2.marketscore.com)
by Anonymous on Thu 13th May 2004 22:22 UTC

"""
Java and .NET at least optimize bytecode and have JIT compilers, whereas Python .pyc is generated just to avoid reparsing sources (and normally is written for imported modules only, not for main script).
"""

Python writes pyc files for the main script aswell (Atleast on my machine) and has a flag to generate it automatically. It also does optimisations when it compiles, just not agressive ones.
See here for an example of 'optimizing' some common operations: http://manatee.mojam.com/~skip/python/fastpython.html#notc
(specifically how +, *, and << perform the same unlike in other languages)

Second, Python does have somethine like a JIT compiler:
http://psyco.sourceforge.net/introduction.html

So why is Python a scripting languae and Java/.NET not?

RE:Where is Pike?
by Martin Stubenschrott on Thu 13th May 2004 22:41 UTC

Yes, cool that another one is using this language as well ;)

I really like programming in C, but some months ago I was searching for a scripting language, which would not have to be compiled for some quick'n dirty scripts.

I looked at perl, python and ruby, but none of them kept my beloved C/Java syntax.

But finally I found pike, and it is really C for scripting with some cool features (like switch() on strings, or advanced array handling).

RUBY
by CitizenKane on Thu 13th May 2004 23:09 UTC

http://www.ruby-lang.org/en/
http://www.rubycentral.com/

bash, perl, python and others are just wannabe scripting languages. i know perl and learnt python but ever since i touched ruby, i haven't looked anywhere else.

in less than 2 hrs, i put together a photo-album creation script that uses ImageMagick to do the scaling blah blah blah and does GREAT layout in HTML, and takes a snapshot of movies to show in thumbnail (mjpegtools)

ruby IS the way to go, anyone who tells you otherwise just doesn't know enough.

here's what i use.

C - kernel and systems coding (C++ sometimes for systems stuff).
tcsh - basic shell scripting (like 5-line scripts)
ruby - long term shell scripts.

Ruby all the way !
by Dewd on Thu 13th May 2004 23:09 UTC

I was expecting to be the first Ruby fan poster.
I better get on the line. :-)
Funny that the article didn't even mention it.
I can code in Ruby all day long without getting tired. (But I may run out of ideas, cause from idea to code is fast with it :-)

If you need a "scripting" language then your primary language sucks
by Crotchety old man on Thu 13th May 2004 23:36 UTC

To quote Ralph Richard Cook: "I look at it this way. A lot of the new, interesting software is being written in a combination of two languages; a high-level, dynamically typed language with good built-in data structures and an environment for rapid software development, and a statically typed, heavily optimized language for performance. For a Python programmer, these two languages are Python and C. For the Common Lisp programmer, the two languages are Common Lisp and Common Lisp."

So is PERL
by Chris on Fri 14th May 2004 00:12 UTC

"Python is a bytecode compiled language (simmilar to Java or .NET), it just compiles on the fly.
You even have the option of using the compiled language by accessing the .pyc part."
Does it depend on a runtime? Yes, so for the sake of deciding whether it's appropriate for a situation or not it is a script. If you precompile it then I suppose you don't need to call it a runtime.
And PERL 5 and I believe all previous versions compile to bytecode. What makes python different is that as it is a whitespace nazi it can be more efficient in the parsing stage.

ruby
by omnivector on Fri 14th May 2004 00:13 UTC

Ruby has pulled me out of a language-rut. I went in search for a language to replace my bash scripts, and after using perl i knew there had to be something better. The first language I tried in my search was python, since I heard a lot of things about it. Yuck. talk about psuedo-object-oriented. Why in a modern language do you have to pass self to every member method? Well after going through the free online ruby book (http://www.rubycentral.com) i was in LOVE. What a beautiful language. it's as if the author said "what's the best about all languages" and combined them into one. blocks for closures, statements return values like lisp, EVERYTHING is an object, classes can be dynamically altered, lambda methods, built in accessors/mutators, CLEAN syntax, native inline regexes, array and hash literals, you name it. it's just simply the best language i've ever seen.

Scripting for Objective-C -> F-Script
by Jean-Pierre Slet on Fri 14th May 2004 00:17 UTC


There is an open source scripting language for Objective-C called F-Script at http://www.fscript.org . Like BeanShell with Java, F-Script directly manipulates Objective-C objects, without the need for a bridge. In addition, it has a very interesting object browser with let you browse Objective-C objects and invoke methods.

blahblah: want a Python-enhanced command line?
http://ipython.scipy.org/

CitizenKane: the major difference between Ruby and Python is style. If you spend a few minutes perusing both main sites and compare syntax, you'll discover that they have a large portion of syntax in common, likely due to the fact that Yukihiro Matsumoto knew Python before starting in on Ruby. Seems he was dissatisfied with Python's OO syntax, and the toy-like nature of Perl back in '93.
http://www.ruby-talk.org/blade/00382

On the most part syntactically, Perl + Python -> Ruby.

Oh, and Python doesn't aspire to be a "scripting language", when it is a general-purpose programming language that can used for scripting (exemplified by the fact that you need to import a module to execute external processes).

I have always had a soft spot for REBOL...
by Rick Lively on Fri 14th May 2004 00:38 UTC

http://www.rebol.com/

You got to love a language that is 560Kb (including a GUI)!
(and 217Kb for the console only version). Compare that to the Mb's and Gb's for others.

AND it works on 40+ operating system platforms...

Carl Sassenrath has a good idea, I wish it was used a LOT more widely.

Heh?
by Anonymous on Fri 14th May 2004 01:03 UTC

2 pages, 3 languages: OCaml, Objective C and BeanShell. Of those only the last is a scripting language, and even then not commonly used. Bizarre.

Wish ruby were a little faster
by Jeremy on Fri 14th May 2004 01:06 UTC

I first started learning programming from shell scripting under Linux. From there I moved on to Python. I loved it until I found Ruby. I absolutely love the syntax of Ruby. To me, it seems so easy to write such small and succinct code. The only problem is that for number crunching, it doesn't seem to be very fast. Perhaps it's not something that people do often, but I had to generate a little over a million numbers to keep in a list one time, and it took my computer over 3 minutes to do it. I know it wasn't the fastest of computers (800MHz 2GB/RAM), but that was way too long to take to do that. I also like Common Lisp ALOT, but "simple" things like splitting strings at specified patterns can be a REAL pain, so I have trouble finding that one to be practical.

RE: Wish ruby were a little faster
by phil on Fri 14th May 2004 01:22 UTC

" had to generate a little over a million numbers to keep in a list one time, and it took my computer over 3 minutes to do it."

Sounds like you could have used narray (numerical Ruby) to speed things up considerably, for more info see:
http://www.ir.isas.ac.jp/~masa/ruby/index-e.html

RE: major difference between Python & Ruby is style
by phil on Fri 14th May 2004 01:33 UTC

"CitizenKane: the major difference between Ruby and Python is style."

Josiah Carlson: On the surface this may seem to be the case, however if you look a bit deeper you'll find more significant differences. Ruby's blocks are a deceptively simple, yet powerful feature for creating domain specific languages; Python doesn't have anything similar.

Here's a couple of recent posts to ruby-talk from a Pythonista who recently looked into Ruby in depth and found more difference than just style:
http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/99802
http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/99817

Chris (IP: ---.desm.qwest.net)
by Anonymous on Fri 14th May 2004 02:38 UTC

"""
Does it depend on a runtime? Yes, so for the sake of deciding whether it's appropriate for a situation or not it is a script. If you precompile it then I suppose you don't need to call it a runtime.
"""

So I suppose .NET and Java are also scripting languages?

Objective-C/Smalltalk scripting
by Dean Powell on Fri 14th May 2004 03:10 UTC

" I have been looking at this language called Objective C lately. It seems to be a natively compiled version of a language like Java."

Objective-C is an object-oriented superset of C which was created by melding ANSI-C with Smalltalk. Because it's Smalltalk-based, the syntax takes a little getting used to, but once you get the hang of it you're spoiled for anything else.

Yu might want to try out StepTalk,
http://steptalk.agentfarms.net/
which is a Smalltalk-based scripting language that sits on top of GNUstep, the open-source variant of the old NeXT platform. GNUstep is built with Objective-C and currently uses its own variation of Apple's Foundation and Appkit classes. IIRC, StepTalk is actually a variant of Smalltalk, but for use with the Objective-C classes of GNUstep.

You might also be interested in GNU Smalltalk. Unlike traditional Smalltalk systems, this one is command-line driven, and is very well suited to scripting tasks. You can check it out at:
http://www.gnu.org/software/smalltalk/smalltalk.html

Dean Powell

Tcl!
by Seo Sanghyeon on Fri 14th May 2004 03:16 UTC

Discussion of scripting languages without any mention of Tcl is just hilarious.

BeanShell?
by Seo Sanghyeon on Fri 14th May 2004 03:22 UTC

Ever heard of Jython and Jacl? Jython is pure Java implementation of Python, Jacl is pure Java implmenetaion of Tcl, having all good points claimed by BeanShell.

Both can be compiled down to JVM bytecode. Both have automatic Java bridge, with native syntax. (Jython can subclass Java classes, Jacl can call Java methods as action family commands, etc.)

And they are *real* languages, many years of efforts behind their syntax and core libraries. Yes Jython and Jacl passes Python and Tcl's syntax regression test suite and have all the core libraries Python and Tcl programmers would expect.

PyObjC
by Seo Sanghyeon on Fri 14th May 2004 03:30 UTC

Python has a semi-automatic bridge to Objective C. With PyObjC Python class can subclass Objective C classes and Cocoa application can be written only in Python. It also works with GNUstep in some degree.

Rhino and Javascript
by Someone on Fri 14th May 2004 03:34 UTC

Thought I would mention javascript here as well. Javascript is a rather suprising language that has been tainted by different support in browsers.

Recently used Rhino (from Netscape) in a Java project and was pleasantly surprised by it.

Mixing Javascript and Java in one project clearly highlighted the advantages of scripting languages. The Javascript elements were simpler without all the casting and error handling. I wouldn't want to do the entire project in javascript but I really want to integrate Rhino with every other project I am working on.

It seems to me that Perl epitomised the scripting approach with it's "just works" and "gets the job done" "quickly and easy" philosphies. Something that most high level languages (in particular Java) have certainly forgotten.

The Different Type Of Programmers!
by sam foocan on Fri 14th May 2004 03:36 UTC


Assembly Coders - these are extinct group of primitive
form of life before the advent of culture or
civilisation, althought having no access to
any formal human-recognizable language structure
they were amazingly versatile in their skills
to construct reality by pushing and popping strings of
little pebbles from holes dug in the ground. Ancient
arcade machines sometimes found in desolate pubs
testify to their once glorious existance.


C - C Programmers are more like highly evolved alien beings
from outer space who spoke purely in binary
and pointers. They often take the disguise as
unsightly middle aged man with beard and glasses
amongst earthlings. They do not care for the
artifacts of language or culture, they only care
for the semantics. Their job is to construct and engineer
the roads, the transportation, the network lines,
the infrasture that our civilazation have come to depend very much
on. They are very hard to communicate with as
intepreting their language requires unusually
greater IQ than most of our earthlings can aspire to.

C++ - C++ Programmers are born again C programmers
who realised their folly of seeing the world
in pure binary and pointers. They want to see
reality more concretely thus they talk in
objects and classes. More often than not,
C++ Programmers are still attached to their
old ways and their attempts to communicate
with others often result in abstrated
hodgepodge just as complicated as the C
language. Most C++ Programmers feel
they may have had a deprived childhood.



Java - Java Programmers are like C++ programmers
except they were brought up in aristrocat families.
Their manners in their language are refined and elegant
althought at times may appear slightly
pretentious and artificial. They are very
socially closed and mix with their own
kind only, basically they dont like
outsiders playing in their upper-middle class
private school sandbox. Being economically previliged
means they have ample access to inheritance
like network libraries, etc. Although their
reputation is good amongst corporate circles,
they are rumoured to be impotent when it
comes to GUI.

Visual Basic - Visual Basic programmers
are perceived to be like your every day a dime
a dozen computer science graduates. They
are naive, confident and sometimes a little brash
in their perceived ability to deal with the real world.
Their language developed from high school
jargons and street slang though highly
vulgar in the eyes of other programmers,
were often effective (or adequate) in solving a lot
of every day ordinary kitchen and sink
problems. Often the case, a job completed
by a Visual Basic programmer, thought cheap
and fast leaves little to be desired,
tales of half patched pipes leaking from under kitchen
sink are well known in the industry.


C# - C# Programmers are Java programmers
wannabes. wanting to achieve the same
social status and previledge that
Java programmers have, C# programmers
lacks the authentic social grace and ethics to
could help them rise above the
Visual Basic suburbia coarse mentality
that tends to predominate them. C# Programmers
also tends to like screen widgets that are glitzy.
They are the type of people
that the marketing department love
to target in their product focus group.



COBOL - Cobol Programmers are not really people, they
were actually mutated from hole-punch
card readers. they have no human affectations
and thus are very capable of churning out
millions of incredibly mundane and
humanly degrading pages and pages of
printed accounts reconciliation codes.
although they were disbanded
by the human rights organisation, Cobol
programmers were actively recruited just
before the millineum to solve the Y2k bug
which they were originally responsible for.



Fabled Programmers - the are many
species of programmers that claim
to exist but no one have ever met
any of these illusive creatures in real life,
althought they appear to be
very vocal in obscure scientific journals.
programmers who go under the
label of 'FORTH', 'OCAML', 'Awk',
'Lisp', 'Eiffel', 'ADA', 'Modula-2'
are amongst the most commonly
heard fabled programmers.


The New Generation - the New Generation
are a renegade group of programmers of various
culture and descend. although subversive to the
traditional codes, the new generation
owe their competency and agility to
their heritage developed from the fabled programmers.
the new generation are confident and feel
rightly justified
due to their years of experience and abuse
from working
under the oppressive regimes of all the
other programmers. their alignment
with the open source movement shows their
idealistic pursuit for freedom and self
determination. Python, PHP, Perl,
Ruby, Rebol, LUA, D are the
most commonly used languages amongst
the New Generation.


Perl - Perl programmers represent
a good example of the possible dangers of falling
into one of the new generation renegade groups.
Perl programmers suffer the dellusional belief
that the Perl language is a real programming
language. programs that are written
in Perl (developed from layers of
very complicated command line options encrypted
in regular expressions)
often look like the work of a very mad
person, which enforces the common perpection
that all Perl programmers are mad or cult members.
Perl programmers also have plenty of ardent believers
in the second coming.


Ruby Advocation
by Nathan O. on Fri 14th May 2004 03:39 UTC

Every time I hear someone talk about how great Ruby is, they sound so... similar to how everyone else saying the same thing sounds. You never, EVER read someone's post saying, "Ruby's great! It's pretty clean. It's my fav." Oh no. It's always more along the lines of, "I used to use other languages. Then I found Ruby. Until you learn Ruby, you know not the secrets of Universal Nirvana and Enlightenment, which I have attained through learning RUBY."

Am I going nuts, or do other people see it, too?

re: Nathan O.
by daniel on Fri 14th May 2004 03:44 UTC

I used to use other languages. Then I found PLT Scheme. Until you learn PLT Scheme, y ou know not the secrets of Universal Nirvana and Enlightenment, which I have attained through learning PLT Scheme. :-)

PLT Spy
by Seo Sanghyeon on Fri 14th May 2004 03:54 UTC

Python has preliminary PLT Scheme bridge. Search for PLT Spy on Google. So you will be able to attain the secrets of Nirvana and Enlightenment (blahblah) in comfortable Python interactive shell...

RE: Where is Pike?
by nate nice on Fri 14th May 2004 03:56 UTC

Yes, cool that another one is using this language as well ;)

I really like programming in C, but some months ago I was searching for a scripting language, which would not have to be compiled for some quick'n dirty scripts.

I looked at perl, python and ruby, but none of them kept my beloved C/Java syntax.

But finally I found pike, and it is really C for scripting with some cool features (like switch() on strings, or advanced array handling).





If you cannot get over a syntax, that's not good. You should study formal languages well and understand that syntax is really not a factor at all. If you know C or Java really well, a language like Python should take no longer than a couple days of reading a "Nutshell" book to grasp the syntax and common idea. Python behaves like C/C++ and java in that it is an iterative language that uses the while/for/if looping and branching mechanisims. If you spent a day with it, you would in fact find that it implements these in ways that are often more natural and logical for your purpose. My advice, not that you have any reason to listen to it, is to force yourself to understand a programming language, such as ML or Prolog or even Python to start, that is syntactialy different from what you are used to, to grasp a deeper understanding of what it means to construct an algorithm that transends the characters you see on the screen.

Python and Javascript
by Seo Sanghyeon on Fri 14th May 2004 03:58 UTC

Python has Mozilla bridge, or to be precise XPCOM bridge. Therefore any Mozilla XP component can be used with Python, including Javascript one.

Python also has direct binding to Spidermonkey. (Javascript engine written in C. Rhino is one written in Java.) Search for python-spidermonkey. It allows you to call Javascript functions just like Python functions.

Python has binding to KDE component architecture, therefore you get KJS support for free.

v The Different Type Of Programmers!
by sam foocan on Fri 14th May 2004 04:01 UTC
Perl...
by the_trapper on Fri 14th May 2004 04:03 UTC

Perl...it makes easy things easy and hard things possible!

'nuff said...if you can't do it in Perl, you CAN'T do it.

re: PLT Spy
by daniel on Fri 14th May 2004 04:28 UTC

Seo,
That's actually my project. ;)

True Nirvana will come by way of PyGTK inside DrScheme. :-)

re: daniel
by Seo Sanghyeon on Fri 14th May 2004 04:32 UTC

Nice to meet you! I am honoured. DrScheme rocks. I have my best regard to you and your project. Keep up the good work!

@the_trapper
by Rayiner Hashem on Fri 14th May 2004 04:32 UTC

You forgot the footnote that says: "*only if you're problem can be modeled as a regexp..."

re: Seo
by daniel on Fri 14th May 2004 04:34 UTC

Seo,

Nice to meet you too! Glad you're into Scheme. Let me know if you ever want to work on a project with us!

RE: Anonymous (IP: ---.ia2.marketscore.com)
by Anonymous on Fri 14th May 2004 05:11 UTC

"""
So why is Python a scripting languae and Java/.NET not?
"""

Well, one reason is that Python seems to be designed to be elegant and convenient, even when this sacrifices performance. Basically, more optimized for programmer productivity than code speed. Java/NET are strongly typed, which gives some performance advantages and early type error catching, that can be helpful in complex programs. OTOH, Python is great for small programs you want to write fast - for scripts.

I mean, if it is used mainly for scripts, let's just call it a scripting language (Java&NET have a different niche after all). Also consider that it is somewhat hard to deploy python programs in other form than a bunch of scripts (yes, I know that there are third-party tools).

oberon: both script and system programming language
by Anonymous on Fri 14th May 2004 05:20 UTC

The Oberon System by Wirth and Gutknecht and all its successors (e.g. Blackbox from www.oberon.ch, Bluebottle from http://www.bluebottle.ethz.ch/) feature a small and efficient compiled language (variations: Oberon, Obebron-2, Component Pascal, Active Oberon) as both the basic language for system development and the script language.

Sun licensed and examined the Oberon compiler around 1991(!), and Microsoft Research subsequently hired a student of Wirth.
Oberon, quite obviously, influenced Java and C# deeply.

A design truly remarkable in its purity -- the best comparison reliability/simplicity/efficiency-wise would be with AK-47.

Re:the Different Type Of Programmers!
by LC on Fri 14th May 2004 06:26 UTC

IMHO there is only a two type of programmers: hobby coders and professionals. The second group needs a strict type system and strict compilers, because it is decrease a number of the possible bugs. It is not matter if you write a small code for yourself, but in a bigger applications (>20 000 lines of code) it can be very important.

Rexx anyone?
by somon on Fri 14th May 2004 07:12 UTC

Does anyone use Rexx!? I think ObjectRexx is used on the i86 world. But me knows just ARexx :-)

@somon
by Lumbergh on Fri 14th May 2004 07:32 UTC

Back in my old companies OS/2 days, a couple colleagues of mine used to swear by Rexx.

You use scripting when your first language sux?
by fuser on Fri 14th May 2004 08:49 UTC

I use a 'scripting language' as my first language.
I may add that I used to use C as a secondary language for extensions.

Now, luckily, my fav language has a wonderful library named 'dl' that is a portable interface to the dynamic linker, so I can completely avoid C.
I love it.

why the destinction?
by anon on Fri 14th May 2004 09:56 UTC

I've always felt that the defference between scripting and programming languages is no longer particually important. Both are means of telling the hardware what you want it to do, both require writing syntax with cirtain gramatical rules and the differences between them have become so blurred as to have no real importance, at least amoungst the new sets of both.

Programming languages that target bytecode and virtual machines (Pascal IIRC could, Java and .NET languages do by default), rather than machine code, as do most scripting languages (Python, Perl, Ruby) rather than being interpreted.

Some programming languages can run as interactively (Smalltalk) and I'm sure that you must be able to precompile some scripting languages to machine code.

Some programming languages are weakly typed (Lisp), and you can get strongly typed scripting languages (Perl, with the correct pragma).

Is it really useful to make a distiction which inevitably makes some languages (e.g. C, C++) seem like they are more "worthy" to write in rather than picking the one that has the feature set that will make the task at hand easiest.

scriptint languages
by fuser on Fri 14th May 2004 10:05 UTC

scripting is an attitude.
Even the author of the article agrees, I believe.
The point of thinking in scripting is to put the accent on getting the job done. In this sense, sripting may be a synonimous for agile

Ruby IDE?
by rod on Fri 14th May 2004 10:37 UTC

I've been doing some "experimentation" with Python lately and I gotta confess I love it.

Still, I am curious to check Ruby, since it seems to have such a passionate following.

So I'd like to know from the Ruby-lovers if there are any good IDEs for Ruby, for Linux and/or Windows, with auto-completion and this kind of nice stuff that I find on Eric3 for Python.

re: ruby ide
by fuser on Fri 14th May 2004 11:35 UTC

see this page:
http://tinyurl.com/23doj

BTW I'm using SciTE as my main ide ATM, it has code folding, syntax highlight, autocompletion (dumb), and there is really lot to fine tune in it.

RE: RE: Where is Pike?
by monkeyboy on Fri 14th May 2004 12:20 UTC

Wow - cool to see pike mentioned! =)
Pike is _really_ fast [0] and comes with some nice syntactic sugar. Above all, pike has a loot of neat fetures for string manipulations and a pretty nice set of extensions by modules.
There seems to be something like CPAN for pike emerging now as well.

@nate:
Of course you are right. People should really look around and try out a lot of languages. Even similar languages like
OCAML and SML. But when you say that If you cannot get over a syntax, that's not good. and You should study formal languages well and understand that syntax is really not a factor at all. I have to disagree.

Syntax is what makes a language to make sense for a certain type of use (methodology if you want). For instance switch statements on strings in pike or php is by far more readable and understandable than if/elseif or dictionaries (mapping a string to code).
--
[0] http://developers.slashdot.org/comments.pl?sid=106535&cid=9068697

Re: Ruby IDE?
by Anonymous on Fri 14th May 2004 12:20 UTC

There's a plugin for Eclipse.

http://sourceforge.net/projects/rubyeclipse

RE: RE: RE: Where is Pike?
by monkeyboy on Fri 14th May 2004 12:24 UTC

For instance switch statements on strings in pike or php is by far more readable and understandable than if/elseif or dictionaries (mapping a string to code)

in python. I forgot to mention the language =)

@LC
by Dewd on Fri 14th May 2004 13:02 UTC

"IMHO there is only a two type of programmers: hobby coders and professionals. The second group needs a strict type system and strict compilers, because it is decrease a number of the possible bugs."

Take a look at this article by Bruce Eckel on "Typing":
http://www.mindview.net/WebLog/log-0052

@LC
by Rayiner Hashem on Fri 14th May 2004 13:26 UTC

"IMHO there is only a two type of programmers: hobby coders and professionals. The second group needs a strict type system and strict compilers, because it is decrease a number of the possible bugs."
Explain that to the professional programmers at places like Google, Naughty Dog Software, Ericsson, etc, who make use of dynamically-typed languages to great effect.

re: anon
by ash on Fri 14th May 2004 14:34 UTC

"Some programming languages are weakly typed (Lisp), and you can get strongly typed scripting languages (Perl, with the correct pragma). "

Wrong. Lisp is a dynamic, strongly typed language.

You cannot substitute one type for another(strong typing).

Variables can be bound to any value/type however(dynamic typing).

@sam foocan
by bil on Fri 14th May 2004 17:01 UTC

> Fabled Programmers - the are many
species of programmers that claim
to exist but no one have ever met ...
programmers who go under the
label of 'FORTH', 'OCAML', 'Awk',
'Lisp', 'Eiffel', 'ADA', 'Modula-2'

Hey! I've spent all day writing Awk scripts! Its a great language for text processing and the like (poor for everything else of course but horses for courses). Every sys admin should know Awk (its very simple if you know Perl or C) it simple, lightweight, ported to every unix ever (plus Windows, OS2 etc) and powerfull in its field.

I've also been known to do bits of lisp and forth, ADA and Modula-2 stuff though I leave to the unicorn in the corner...

RE: Ruby Advocation
by phil on Fri 14th May 2004 17:13 UTC

Every time I hear someone talk about how great Ruby is, they sound so... similar to how everyone else saying the same thing sounds. You never, EVER read someone's post saying, "Ruby's great! It's pretty clean. It's my fav." Oh no. It's always more along the lines of, "I used to use other languages. Then I found Ruby. Until you learn Ruby, you know not the secrets of Universal Nirvana and Enlightenment, which I have attained through learning RUBY."

OK, I'll say it: Ruby's great! It's pretty clean. It's my fav. ;-)

The reason you hear about people saying they've 'found Ruby' is that Ruby is indeed a very nice programming language. So nice that programming in other languages just seems like a lot of work by comparison. Yes, I'll admit, at this point Ruby is my primary language (it's the tool I reach for first), but I still have to do some C/C++ (and when I do, oh, the pain!)

Give it a try and see if you come to the same conclusion. What's wrong, are you afraid that you'll be spoiled and not want to program in other languages?

and don't forget the Rebol plugin for internet explorer ... http://www.rebol.com/news4301.html

RE:Ruby IDE?
by megaman on Fri 14th May 2004 18:10 UTC

http://freeride.rubyforge.org
Is an IDE for windows an X (Fox lib ;) , but the gui part is modular, i'm trying to port to gtk )

RE: Ruby Advocation
by Nathan O. on Fri 14th May 2004 18:53 UTC

"Give it a try and see if you come to the same conclusion. What's wrong, are you afraid that you'll be spoiled and not want to program in other languages?"

I'd like to try it some time. I just had a kid, so free time is a little scarce, but I definitely plan to try it over the summer. I like everything I hear about it. It's just REALLY weird how people talk about it ;) Like clean zealotry, mixed with some cultism.

But the language itself sounds very cool.

I LOVE RUBY
by CitizenKane on Fri 14th May 2004 19:52 UTC

cos even RegExps are pure objects .... oh the joy, I weep for the elegance of this language. Perl and Python suck donkeys balls in comparison.

In Ruby
r1 = Regexp.new('^[a-z]+:\s+w+')

In python
p = re.compile('ab*') # ugh

In perl
(%@#$^*^) # double ugh


As Bruce Lee once said:

"Empty your mind. Be like water.
Put water into a cup, it becomes the cup.
Put water into a bottle, it becomes the bottle.
Put water into a teapot, it becomes the teapot.
Water can flow, it can creep, drip or crash!!!
Be water, my friend."

Ruby lets you be water.

Gee
by Rod on Fri 14th May 2004 21:01 UTC

"Ruby lets you be water."

Gee, what else? Got some "The Ruby Watchtower" booklets for sale?

RE: I LOVE RUBY
by phil on Fri 14th May 2004 21:17 UTC

In Ruby
r1 = Regexp.new('^[a-z]+:s+w+')


You can save a lot of typing by doing:
r1 = /^[a-z]+:s+w+/

r1 is now an instance of Regexp, and you can send messages to it, like so:
r1.source #=> converts the regexp to the string:
"^[a-z]+:s+w+"


I suppose the former way of doing it by using Regexp.new looks like a lot of extra typing to Perl folks, while the latter way of doing it looks susiciously too Perlish for Pythonistas. So depending on your audience you can keep both crowds happy ;-)


RE: Gee
by phil on Fri 14th May 2004 21:21 UTC

Gee, what else? Got some "The Ruby Watchtower" booklets for sale?

Look for "The Ruby Way", or post your name and address and we'll send a couple of guys on bikes over ;-)

RE: Ruby Advocation
by rff on Fri 14th May 2004 21:51 UTC

it's not the advocation. It's that matz just programmed most of the ruby brainz ;)
I mean: have you evern noticed that almost all the ruby presentations or articles out there talk about the *fun* of programming?

yeah, you can be efficient, productive, scalable in many languages, but ruby is the only language/environment I'm aware of that talks about being happy.

@rff
by Rod on Fri 14th May 2004 23:01 UTC

yeah, you can be efficient, productive, scalable in many languages, but ruby is the only language/environment I'm aware of that talks about being happy.

You'll hear exactly the same from the Pythonists (myself included)

@rod
by rff on Fri 14th May 2004 23:39 UTC

Mh, I'd say the key concept in most python's presentations I've read is 'clear' or anyway something on the line of OOWTDI.

Not that I'm saying fun is the more valuable feature of a language.

Say,
Being able to have aliases for methods is fun, cause it let me express things in a way that maps better to my own mind and to the use I'm making of a method.
Having lots of methods built-in in base classes is fun cause it relieves me from thinking to include external modules and use that.
No distinction beetween any object in the system is fun cause I don't have to think "oh, but I can't do that with this..".
callcc is fun.

Yet, all these things are commonly viewed as really evil things from all the python developers I've talked with.

I really believe OOWTDI is incompatible with fun in programming.
Quoting larry wall, it's like you teacher telling you that you can play any game you want as long as it is the game she chooses.

Saying that python is fun is fully agreeable, but sure this is not its defining feature.


PS
no need to convince me to use python, I already do and have fun with it ;)

@rff
by Rod on Sat 15th May 2004 00:06 UTC

Saying that python is fun is fully agreeable, but sure this is not its defining feature.

Oh yeah, after all it's Ruby the one name after that british guys Monthy Ruby - oh wait

For me Ruby and Python are so similar that it's hard to say one is funny and the other is not, and it's something subjective anyway. I have friends who say C# is very funny (me too, but usually it's something like "humm that's funny, it was working before...")

Pike and Ruby thoughts...and Tcl
by Bob on Sat 15th May 2004 00:16 UTC

Pike: very fast but the Windows build seems like an afterthought.

Ruby: I like it. Wish it were faster though.

Tcl: Has it been mentioned? Very nice scripting language as they go. : )

ruby vs python
by omnivector on Sat 15th May 2004 02:09 UTC

that's not true. they do many similar things, but they have some key philosophical differences. someone else in this thread may have mentioned "ruby eye for the python guy". google it and check it out sometime.

re: @omnivector
by Rodrigo on Sat 15th May 2004 02:42 UTC

I know the differences. I've done "pet projects" with both (although I use more Python, maybe because I managed to get some nice Python books first)

It's a question of perspective. In a close, 4-feet-high look, you may call Ruby and Python very different, but if you think on a panoramic, 5 miles-high view, and align Python, Ruby, C#, Lisp, Java, Pascal, etc etc, Ruby and Python are very similar.

The same way that I look at my brother and say "he's _completely_ different from me" but people outside my family say "you're almost clones!" ;)

@rod
by omnivector on Sat 15th May 2004 06:13 UTC

python doesn't support blocks. python classes are closed unless you hack with the reflection apis which can get nasty. python REQUIRES tabs. python has tacked-on OOP (passing self as a parameter everywhere). python can compile to bytecode when ruby cannot. every statement returns a value in ruby, which is not true of python.

though really out of all of that, the #1 difference is python does not support blocks. blocks are such a powerful and useful idom that it will radically change the way you code. if you don't agree with that, then you have not used ruby properly.

@omnivector
by Rod on Sat 15th May 2004 10:27 UTC

..Oh I should have heard it coming...

Are you reading my messages at all, or were just drooling for a chance to put the extremely well known "why Ruby is better than Python" mantra?

Where in my messages I said one is better than the other? I was just saying they were similar when it comes to "fun to program", having languages like C and Perl in mind..and yet I know that's very subjective, might be plenty of people out there who think Perl is very funny (and they certainly have a "why Perl is better than Ruby and Python" list for their own)

Let's all get bogged-down in diverse implementations!!
by Howie S on Sat 15th May 2004 18:45 UTC

The Gang of Four in "Design Patterns" recommends designing to the interface, not the implimentation. As a breed, programmers (or at least osnews posters) seem to be hyper-focussed on which tool or language implimentation or program implimentation of OS implimentation is 'better'. We fan the flames and it goes on and on and on... Great way to fragment our energies.

What software needs is clean open protocols, and clean, well-documented STANDARDIZED interfaces.

#1 Good ideas to solve real problems
#2 Good designs to fit those requirements
#3 Good implementations

In that order! Screw this Tower of Babel crap! I don't care which language you use. Show me your problem domain. Show me your program architecture, the overall and in-detail design. Show me how I can extend and modify while respecting the overall design interfaces. Then I'm in. Otherwise... talk is cheap. Blah, blah, blah....

re: @omnivector
by Bob on Sat 15th May 2004 23:48 UTC

Python does *not* REQUIRE tabs. As a matter of fact all of the Pythoneers I know use SPACES for indention.

Re:@LC
by LC on Sun 16th May 2004 05:25 UTC

I am mostly use C++ and Object Pascal in my work. And the strict typing system helped me to kill many-many bugs. This is my experience.
Google and other companies: I don't claimed that scripting languages are totally unuseable. This things are very good for small programs, little utilites. I am use PHP on my little webpage, and there is a small bash script in my linux setup program. But IMHO Google is use C or assembly in their search engine, not any scripting or managed language.

@LC
by Rodrigo on Mon 17th May 2004 11:28 UTC

Google and other companies: I don't claimed that scripting languages are totally unuseable

Google might be very happy with your tip, they need all the help they can get.

Scripting Not Interpreted?
by C. Whitman on Mon 17th May 2004 21:18 UTC

Interesting comments on what is or is not a scripting language, what is an interpreted language, and what makes a scripting language a scripting language. The lines between interpreted and compiled languages have been blurred through the years to an extent. However, one statement I will make is that scripting languages are, by definition, interpreted.

A scripting language is a language in which (by default anyway) the source code is the program. If the program that you run is the text file of the actual code that was written, then you are running the language as a scripting language. Since this program cannot be run without a binary program running underneath to translate programming syntax to something understood by the OS, it is interpreted.

It used to be that "scripting language" and "interpreted language" were synonymous. Now, though, we have Java and the like. Java programs are not (generally) run directly by the hardware or operating system, but require a separate program to run underneath them (a "virtual machine"). However, Java programs are also not the actual text files that the programmer wrote. So is Java an interpreted language or is it a compiled language? Yes. Or was that no? You can see the difficulty of these two classifications still being mutually exclusive. You might say that languages like Java are semi-interpreted (on the other hand perhaps you'd say they are semi-compiled :-)). You could also be tempted to say that since it requires a separate program running underneath, like a scripting language, it is an interpreted language (and the program is sometimes referred to as a "byte code interpreter").

Of course, the lines will be even further blurred if/when an operating system which actually runs all its programs from human readable scripting language code becomes somewhat popular.