Groovy JSR: A New Era for Java?
fastdecade writes "Groovy, the open-source scripting language, has been submitted for a Java Specification Request (JSR). And not without strong support from venerable J2EE practitioner/author, Richard Monson-Haefel, who labels this "the beginning of a new era in the Java platform". Groovy can use Java objects easily and compiles to JVM byte code, but it is nonetheless a scripting language at heart and a great companion for the more heavyweight Java programming language. Most JSRs concern new APIs, and this is the first JSR for an alternative language. Imagine a common platform of standardised languages talking to each other ... this looms as a big threat to .Net and a rejuvenation of the Java platform."
this isn't nearly as revolutionary as the article spins it as. .Net will continue to gain ground solely because of microsoft's promotional dollars, regardless of its merits as a language.
Repeal the DMCA!
As a hardcore Ruby lover, I've been unhappy that I can't use Ruby with the vast libraries available for Perl and other established libraries.
But this groovy thing looks like a really nice smalltalk-esque language that hooks right into Java, enough to satisfy both sides of my brain.
This is cool and I can benefit from this *right now* in my work. Forget Parrot or Perl 666 (heh).
How come I never heard of this? And why doesn't jpackage have it?
This is like Python,
Except it's actually elegant, based on Smalltalk, not whatever the heck Python is inspired by.
And Python reference counting stinks, I just spent weeks debugging a C extension that keeps killing a Python-based server.
I use Python, but I sure don't think there's anything "great" about it, at least not enough to explain why it seems *every* language discussion includes somebody who thinks Python is god's gift to computer science.
Python came along at a time when people where starting to use Perl for bigger projects and realizing that Perl is really BAD for big projects. Momentum took over from there.
Ok, we got that out of the way.
.o files, which is cool in its own way, but what I really want is:
S PATH=$CLASSPATH:Blink
S PATH=$CLASSPATH:Blink
I hate scripting languages, except Bash shell.
Why...because when I program I want an object oriented language. Notice the period at the end of that sentance. If I didn't want the Benefits of Java, I would not program in Java.
Yes, I would love it if the Runtime environments for PERL, Python, Java, Ruby, and a slew of other Lagnugaes could be combined so I could have one and only one virtual machine required.
What I really want is to not have to wrap any Java program I write in a Bash script just to get the Damn thing to run. I realize the gcj way is to compile to
Environmental Variables. Java used to have them. But because of the Mac (oS 9 and before, mind younot OSX) it was removed from the language. Instead, we have -D parameters on the command line. Oh Joy. So to run a program with a different config directory than expected I get:
CLASSPATH=Blah
CLASSPATH=$CLASSPATH:Blue
CLAS
java -Dcustom.config.dir=/home/adam/blah -classpath=$CLASSPATH com.younglogic.app.Executable
and then I stick this whole thing into a bashscript. Will Groovy fix this for me? Nope, I'll just end up with
#!/usr/local/bin/groovy
#cus you know they'll want to stick it in local
CLASSPATH=Blah
CLASSPATH=$CLASSPATH:Blue
CLAS
exec com.younglogic.app.Executable
#Or what ever groovy decries is the right way to execute a java executable.
I still won't use it to extend Mozilla, since that will involve spinning up the JVM and Mozilla already has one of those. Maybe be nice for Eclipse plugins, but, wait, now we are back to real programming tasks and those I want to do in Java.
Hey, Maybe we can call groovy from inside JSP, just to get two layers deep in the scripting. I bet that will speed up development.
Pan Pant, Ahh. now I feel better.
Open Source Identity Management: FreeIPA.org
which outputs 1 2 3 and 4 on a line. the cool thing about this style of coding is it makes it's very easy to extend functionality like this to hashes such as:
notice how that code was able to do that much, without having to use "special" syntax like perl and php (foreach blocks, etc).
i definitely will have to give this language a shot.
- tristan
Unless you want access to any of the miriad of Java libraries that are available,
No, I don't.
Python might be king of quick hacks, but for a large-scale project where bits of scripting code might be appropriate, this sounds like an excelent option where you would NOT be better off with python.
There are plenty of scripting languages for that. Jython and JavaScript have both C and JVM-based implementations. Beanshell is small and integrates particularly well with Java. I really don't see why we need Groovy.
But it works well enough, and it sure is a lot more practical than running a JVM just to execute Groovy.
I like to point out that running Groovy in a JVM means: you want to script java code.
I also do not really see the difference between running a PVM or a JVM (python virtual machine versus java virtual machine).
But: I know that Java Byte Code is Hot Spot compiled to machine code. A groovy script running in a JVM scripting Java classes or classes of other languages (like SmallTalk or Lisp or Prolog or Eiffel or Ada or: Python) is java byte code, isnt it? So it is compiled to machine code during runtime.
Goovy is an excellent language. And in case it gains momentum like one has written here, there is no doubt that people will port it to Parrot and the Python VM just like Python is ported to the JVM.
angel'o'sphere
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
It was just a joke. :)
//, the Atari 800 had no expansion slots, and the memory was only expandable to 48K (though it used VERY easy to use cartridges to expand memory), despite using a chip that could (in theory) address 256K.
//e), but I'm thinking of getting one just to play around with. There are connectors now to hook up your Atari 800 to your PC to store software, etc. on the PC, while still being able to use them on the Atari 800, plus access other hardware on the PC. New OS boot cartridges allow the 800 to start up in 2 seconds. Wish I could do THAT with my Win2k box!
I've become rather fascinated of late with the Atari 800, and with what "could have been," had it been upgraded properly.
The Atari 800 was the brainchild of Jay Miner (who later created the Amiga), and you can see the Atari 800 really _was_ the precursor to the Amiga, with its use of coprocessors for video, sound, & memory management, in addition to the CPU. The only thing that hobbled the Atari 800 was its expandability, or, lack thereof. Unlike the Apple
Later Atari 800 machines (XL & above) wound up being expandable to more than 48K, but the way the machine was designed, software that took advantage of memory over 48K wouldn't work on the original 800s, thus, few software makers took advantage of that ability, understandably wanting to sell products usable on as many machines as they could. Thus, despite several generations of barely-different upgrades to the Atari 800, the line died.
Too bad. It used a much faster version of the CPU than the Apple or Commodore machines of the day (1.89mHz vs 1 or 1 for the Apple ][ & C64), as well as speeding up everything else by using coprocessors. Had the expandability been better, things may have turned out much different.
It's also interesting to see people making new software & hardware (!) for the Atari 800 line even today. Bizarre, but amusing. I never had an Atari 800 when I was a kid (I had an Apple