Thread: Re: [tcljava-dev] tcljava-dev Digest, Vol 5, Issue 2
Brought to you by:
mdejong
From: Patrick F. <pfi...@oz...> - 2007-02-17 20:36:29
|
> > (Hi there Tcl enthusiasts and Jacl devs! This is kind of a form letter, > but I'm serious about getting this event together with devs from > multiple languages. I'd love to hear your thoughts on such an event and > see if you'd be interested in attending.) > > Hello all! > > I am attempting to organize an outside event for JavaOne this year > entitled "Dynamic Languages on the JVM: The Future". It is my intent to > have as many alternative (dynamic) language implementers together in the > same place as well as Java and JVM developers and specifiers. This would > be our opportunity to talk about areas that have caused us trouble, > features we'd like to see in Java or the JVM (or features we'd like to > remove) and other related topics. I really want to break down the > boundaries between the language implementations/implementers so we can > cooperatively work toward making the JVM a more dynlang-friendly platform. I think the future of dynamic languages in the JVM really depends on whether non Java developers find Java based deployment of their favourite dynamic language an attractive proposition. There are two approaches to integrating C based dynamic languages with the JVM. One is to rewrite the underlying implementation in Java instead of C so that the language runs within the JVM. The dynamic language commands and syntax are interpreted into Java rather then C. The other is Java Native Interface. The dynamic language loads a JVM into the C runtime and makes calls to JAVA using JNI pointers. Running dynamic languages within the JVM is attractive to Java developers who wish to develop hybrid or mixed language applications because it allows development within a single IDE and deployment to a single runtime environment. However it has some major drawbacks. Most of the dynamic languages have a small core command set and are dependent on external packages or extensions to provide the rich set of features required for enteprise development. In most cases it's only the core that has been ported to Java and developers soon find that they have to make extensive use of of the java class libraries to provide features that are missing from the embedded version of the dynamic language. No ldap support in JACL. No smtpd support in Jython. No Rails support in JRuby(Current version). That makes it difficult if not impossible to port a dynamic language application written for a C runtime environment directly to a Java runtime environment without an extensive rewrite. Then there is the catch up issue. New features in dynamic languages need to be back ported to Java. This is a huge overhead that could cripple application development budgets. Most Java programmers would rather use a native Java dynamic language like Groovey rather than jump on the backport treadmill. Non Java developers already have a complete toolset for dynamic language development and the most popular dynamic languages are certified to run on most operating platforms. So they already have write once run anywhere capability. However there is a demand for an interoperability layer between dynamic languages and JAVA that allows the C based runtime call Java class libraries and interact with Java applications. This is partially satisfied by the JNI interface. The Perl inlineJava module and the Tcl tcljava extension both use JNI to provide connectivity to the JVM. Historically there have been runtime issues with JNI because the extension only supports the specific version of the JDK it's compiled against and the location of the Java runtime on the installation server is picked up from environment variables. Problems occur when either the JDK is not at a supported level or environment vararibles are not set properly. The latest version of TclBlend(Tcl + tcljava) overcomes this by embedding the JVM runtime in it's install directory. It ships with it's own JVM. The Windows beta version is available here: http://www.patrickfinnegan.com/ I suppose the holy grail for dynamic languages and Java is really reverse JNI i.e a C runtime environment inside the JVM that would allow JAVA to support any C based interpreted language natively without the need for expensive rewrites in Java. Java needs something conceptually similar to the Common Language Runtime engine in the .NET framework that would allow transparent execution of C processes under Java. Application portability across Java and C runtime environments is the best way to attract dynamic language developers to Java. |
From: Charles O. N. <cha...@su...> - 2007-02-22 09:13:27
|
Bruce Johnson wrote: > I agree to some extent with what you say, but personally I think that > when the core of a language like Jacl catches up with the C version > (and it is not that far now), that progress can potentially occur > much faster. There are so many APIs built-in to Java that writing > extensions is much faster than with C development, and once written > they are cross-platform. For example, I have scripted access to > Oracle databases with just a few lines of Jacl calling the JDBC > APIs. I probably never would have set out to write a C interface to > Oracle (like Oratcl etc.), but doing this with Jacl was a breeze. I was going to respond myself, but Bruce is exactly right here. What library exists in the C world that we don't have an analog for in Java? Generally porting over "extensions" just means providing a compatible interface to the same library in Java. In JRuby, that's exactly how we've provided socket support, zlib support, and so on. There are cases where a technology needs to be ported because it's based on a very specialized library (OpenSSL) or a technology is too new to have a Java equivalent (YAML) but we've had community members step up to the challenge of implementing those too. I think in general the problem most dynamic languages on the JVM have had is that they target the wrong goal: some amorphous measure of "compatibility" with the target language. What's needed is a concrete goal people can latch onto and get excited about; some endpoint that will actually help developers do something they couldn't do before. For JRuby that milestone is Rails support (and BTW, Rails does run fine in JRuby apart from a few remaining interpreter bugs since it's generally pure Ruby), which has been a compelling enough goal to get folks really excited about JRuby. Similar targets exist for Jython, and perhaps Grails will be the first really compelling use of Groovy. The big question then becomes "what milestone can we set for our implementation of language X that will get people excited about using it?" - Charlie |
From: Virden, L. W. <lv...@ca...> - 2007-02-22 12:43:42
|
-----Original Message----- From: Charles Oliver Nutter > What=20 library exists in the C world that we don't have an analog for in Java?=20 Tix, BLT ... I suspect there are dozens of Tcl specific C libraries which have no Java counterpart... |
From: Bruce J. <nm...@ma...> - 2007-02-22 15:36:15
|
My point was not so much that there were Java libraries that exactly duplicated the functionality of Tcl specific C libraries, but that developing such libraries is much faster in Java than in C. Additionaly, there are libraries that can be rapidly interfaced to Jacl that give similar, and often more extensive, functionality. For example, as an alternative to the graphing tools found in BLT I've written some simple interfaces to JFreeChart ( http:// www.jfree.org/jfreechart/ ). With these interfaces I can put put JFreeChart graphs on the Swank canvas. A bit more work and one would have a much more extensive charting library than what BLT provides. And as far as I can tell there are platform issues with BLT. For example, it seems from the wiki pages on BLT ( http://wiki.tcl.tk/ 199 ) that it doesn't run with Tk Aqua on the Mac. Jacl/Java implementations pretty much run anywhere, often no compilation needed, just plug in the jar file. As an alternative to the vector tools in BLT I use Colt ( http:// dsd.lbl.gov/~hoschek/colt/ ). Again, just add one jar file to your classpath and have scripted access to a huge library of math and statistics. What's not to like? Bruce On Feb 22, 2007, at 7:43 AM, Virden, Larry W. wrote: > > > > -----Original Message----- > From: Charles Oliver Nutter >> What > library exists in the C world that we don't have an analog for in > Java? > > Tix, BLT ... I suspect there are dozens of Tcl specific C libraries > which have no Java counterpart... > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > tcljava-dev mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-dev |
From: Virden, L. W. <lv...@ca...> - 2007-02-22 16:26:29
|
I am wondering if anyone has gathered tips on the modifications necessary to the current tcljava code so that it will build on SPARC Solaris.=20 The first problem I encountered is that the configure looks for: Looking for /vol/javaNFS/jdk1.5.0/jre/lib/sun4u/libjava.so However, Sun uses the path /vol/javaNFS/jdk1.5.0/jre/lib/sparc/libjava.so So I edited the tcljava.m4 file, as noted by the output from configure. But configure doesn't seem to=20 Recognize that change. So I decided to try and regenerate configure after making this change. However, autoconf indicated that I needed an autoconf newer than ships with Sun . So I get a newer one and use that. I get farther at this point - now I'm told that the gcc in my environment has a bug that breaks Tcl Blend and that I should use another version.=20 So I set CC to point to a non-gcc compiler. That doesn't appear to matter - configure continues to tell me that the gcc is broken. checking for gcc... cc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables...=20 checking for suffix of object files... o checking whether we are using the GNU C compiler... No And then later: checking for GCC 4.1.0 optimizer bug... yes configure: error: This gcc release contains an optimizer bug that breaks Tcl Blend, please use another version of gcc The real problem, looking into the config.log, is: configure:4564: checking for GCC 4.1.0 optimizer bug configure:4601: cc -o conftest -g -O2 conftest.c >&5 cc: Warning: option -2 passed to ld /usr/ccs/bin/ld: illegal option -- 2 Am I forced to use gcc? I'd prefer to use Sun's compiler. Oh, and note that the version of gcc that was used, as far as I can tell, earlier, was 3.3.1, not 4.1.0. I don't have a newer gcc available... |
From: Bruce J. <nm...@ma...> - 2007-02-17 20:48:29
|
I agree to some extent with what you say, but personally I think that when the core of a language like Jacl catches up with the C version (and it is not that far now), that progress can potentially occur much faster. There are so many APIs built-in to Java that writing extensions is much faster than with C development, and once written they are cross-platform. For example, I have scripted access to Oracle databases with just a few lines of Jacl calling the JDBC APIs. I probably never would have set out to write a C interface to Oracle (like Oratcl etc.), but doing this with Jacl was a breeze. Bruce On Feb 17, 2007, at 3:37 PM, Patrick Finnegan wrote: > >> >> (Hi there Tcl enthusiasts and Jacl devs! This is kind of a form >> letter, >> but I'm serious about getting this event together with devs from >> multiple languages. I'd love to hear your thoughts on such an >> event and >> see if you'd be interested in attending.) >> >> Hello all! >> >> I am attempting to organize an outside event for JavaOne this year >> entitled "Dynamic Languages on the JVM: The Future". It is my >> intent to >> have as many alternative (dynamic) language implementers together >> in the >> same place as well as Java and JVM developers and specifiers. This >> would >> be our opportunity to talk about areas that have caused us trouble, >> features we'd like to see in Java or the JVM (or features we'd >> like to >> remove) and other related topics. I really want to break down the >> boundaries between the language implementations/implementers so we >> can >> cooperatively work toward making the JVM a more dynlang-friendly >> platform. > > > > I think the future of dynamic languages in the JVM really depends > on whether > non Java developers find Java based deployment of their favourite > dynamic > language an attractive proposition. > > There are two approaches to integrating C based dynamic languages > with the > JVM. One is to rewrite the underlying implementation in Java > instead of C > so that the language runs within the JVM. The dynamic language > commands > and syntax are interpreted into Java rather then C. The other is Java > Native Interface. The dynamic language loads a JVM into the C > runtime and > makes calls to JAVA using JNI pointers. > > Running dynamic languages within the JVM is attractive to Java > developers > who wish to develop hybrid or mixed language applications because > it allows > development within a single IDE and deployment to a single runtime > environment. However it has some major drawbacks. Most of the > dynamic > languages have a small core command set and are dependent on external > packages or extensions to provide the rich set of features required > for > enteprise development. In most cases it's only the core that has been > ported to Java and developers soon find that they have to make > extensive > use of of the java class libraries to provide features that are > missing > from the embedded version of the dynamic language. No ldap support > in JACL. > No smtpd support in Jython. No Rails support in JRuby(Current > version). > > That makes it difficult if not impossible to port a dynamic language > application written for a C runtime environment directly to a Java > runtime > environment without an extensive rewrite. Then there is the catch > up issue. > New features in dynamic languages need to be back ported to Java. > This is a > huge overhead that could cripple application development budgets. > Most > Java programmers would rather use a native Java dynamic language like > Groovey rather than jump on the backport treadmill. > > Non Java developers already have a complete toolset for dynamic > language > development and the most popular dynamic languages are certified to > run on > most operating platforms. So they already have write once run > anywhere > capability. However there is a demand for an interoperability > layer between > dynamic languages and JAVA that allows the C based runtime call > Java class > libraries and interact with Java applications. This is partially > satisfied > by the JNI interface. The Perl inlineJava module and the Tcl tcljava > extension both use JNI to provide connectivity to the JVM. > Historically > there have been runtime issues with JNI because the extension only > supports > the specific version of the JDK it's compiled against and the > location of > the Java runtime on the installation server is picked up from > environment > variables. Problems occur when either the JDK is not at a > supported level > or environment vararibles are not set properly. The latest version of > TclBlend(Tcl + tcljava) overcomes this by embedding the JVM runtime > in it's > install directory. It ships with it's own JVM. > > The Windows beta version is available here: > > http://www.patrickfinnegan.com/ > > I suppose the holy grail for dynamic languages and Java is really > reverse > JNI i.e a C runtime environment inside the JVM that would allow > JAVA to > support any C based interpreted language natively without the need for > expensive rewrites in Java. Java needs something conceptually > similar to > the Common Language Runtime engine in the .NET framework that would > allow > transparent execution of C processes under Java. Application > portability > across Java and C runtime environments is the best way to attract > dynamic > language developers to Java. > > > > > > > > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > tcljava-dev mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-dev |