New JavaFX Script Build Posted To OpenJFX
We just posted a new build of JFX which contains the following fixes
and features:
UI -
1) Shape Morphing
- Added class javafx.ui.canvas.Morph
This provides binary shape morphing. To use it assign an initial and
terminal Shape to its start and end attributes respectively. Then
animate its morph attribute between 0 and 1.
Morph is a Shape and can be used like any other Shape.
Here's a simple JFXPad example:
import javafx.ui.*;
import javafx.ui.canvas.*;
import javafx.ui.filter.*;
Morph {
morph: bind [0,.01..1] dur 2000
fill: blue
start: Rect {
x: 10
y: 10
width: 460
height: 140
}
end: Circle {cx: 200, cy: 200, radius: 100}
}
2) JavaFXPad
- Added a dialog to add additional directories or jar files to the
source path for JavaFXPad to search for dependent classes
- Added rudimentary support for searching in the source editor
3) Mouse Wheel support in Canvas
Swing components (Widgets) embedded in a Canvas now receive mouse
wheel events.
4) Baseline alignment of Text
It's now possible to align Text at its baseline, by means of its
verticalAlignment attribute, e.g
Text {
content: "Blah"
verticalAlignment: BASELINE
}
Interpreter -
1) bind is now only allowed in initialization contexts
2) Fixed array assignment problem reported on openjfx forum
3) Fixed bug with while condition of dur expression reported on
openjfx user list
JSR 223 -
1) Fixed problems reported on openjfx user list
Weird Windows XP Pro Problem
I've been having some stability problems with the work PC. It's been going on since Monday. Brian and Dale both saw the problem. But until three minutes ago, I thought I was the only one having the problem.
I was chatting with Kevin in the hallway when Chuck walked by.
Kevin: Chuck. I'm having some PC problems.
Chuck: Funny you should mention it. I'm having some problems too.
Kevin: Something-something-host is crashing.
Me: svchost. I'm having the same problem.
Kevin: My PC has been crashing twice a day.
Me: Mine too. It's been crashing at least twice a day since Monday.
Chuck: I have the same problem. It seems to have started Monday.
Kevin: Early when it crashed, it allowed me to start Visual Studio to debug the thing. Now it simply crashes the machine.
Me: I debugged into it. It's an illegal access error.
Kevin: Did you patch the binary and make a new release?
Chuck: I don't know what it is.
Kevin: There was a Windows Update this week. But it doesn't seem to fix this problem.
Chuck: The update came in mid-week. So it couldn't have been the cause of all the problems.
Me: Shortly after I clicked on the "Do not Send" button in the crash dialog box, my Explorer.EXE process seems to freeze.
Kevin: I can still use the programs that are already started. But I can't start any new programs.
Me: Wow. I'm glad to know that I'm not the only one having this problem. I thought I had a hardware problem.
Kevin: It's so weird. It turned all the windows into Windows 95 style at one time.
Me: Yeah, yeah, mine too.
It could be a secret Microsoft ploy to get us to buy Vista.
TAO DDS 0.12 Released
(Via the OCI internal DDS mailing list.)
Adam Mitz: TAO DDS version 0.12 is now available for download. Please see http://download.ociweb.com/DDS for the download.
An updated version of the TAO DDS Developer's Guide is available from the same site in PDF format.
Features added and bugs/fixes in TAO DDS version 0.12: (This is an excerpt of the release notes, for full change information see the release notes and the ChangeLog within the source distribution)
- DCPSInfoRepo service now has a file based persistence mechanism. This can be configured to actively persist the InfoRepo's current state and in cause of a fatal failure to resurrect the same into the saved state.
- It is now possible to build DDS without Built-In-Topic (BIT) support in order to reduce the footprint of DDS.
- The reliable multicast transport was added. See the DDS developers guide for details.
- Fixed an issue with GCC 4 "hidden visibility" for shared libraries.
- Support for Built-In-Topics and the TRANSIENT_LOCAL value for DURABILITY QoS is now complete. This means that BITs will now work as specified.
- Implemented initial support for zero-copy read.
- Various bug fixes and robustness improvements
TAO DDS is an open source implementation of the OMG Data Distribution Service For Real-Time Systems Specification. For more details see the DDS page on Wikipedia.
Jython 2.2 Beta 2 Is Out, Final In Weeks
Frank Wierzbicki: The Jython development team is proud to announce the release of Jython 2.2's second beta.
Much like the last beta:
Get it here:
Install like this:
java -jar jython_installer-2.2b2.jar
Cheers!
-Frank Wierzbicki
Here's the blurb I got from the installer when I finished my installation:
Welcome to Jython 2.2b2 ======================= This is the second beta release towards the 2.2 version of Jython. It contains all of the new features for the 2.2 release: - new-style classes - Java List integration - a PEP 302 implementation - iterators - generators - __future__ division - support for running on modern JVMs - a new installer In addition to these major features, many bugs have been fixed from 2.2b1. See the NEWS file for a more complete list of changes. The release was compiled on Windows XP with JDK 6 but it should run on 1.4.2+. This release exists to solicit feedback about any bugs or missing features; if you can provide it, it is greatly appreciated. Bug reports can be created at http://jython.org/bugs whereas more general questions can be sent to the Jython-dev mailing list, jython-dev@lists.sourceforge.net. The current plan calls for a release candiate in a few weeks, and if it proves stable, the final release of 2.2 a few weeks after that.
Go Listen To Linus
Kyle Cordes: Linus Torvalds explains distributed source control
On several occasions over the last year, I’ve pointed out that distributed source control tools are dramatically better than centralized tools. It’s quite hard for me to explain why. This is probably because of sloppy and incomplete thinking on my part, but it doesn’t help that most of the audiences / people I’ve said this to, have never used a distributed tool. (I’ve been trying out SVK, bzr, git, etc.) Fortunately, I no longer need to stumble with attempts at explaining this; instead, the answer is to watch:
Linus Torvalds explain distributed source control in general, and git in particular, at Google
I Read Your Blog. I Read Yours Too.
Since I started blogging roughtly four years ago, I met a few people who's first greeting is "I read your blog." I usually answer back "Thanks." or "I had fun writing it." But last week, I suddenly realized something. Everybody who told me they read my blog have their own blogs. For example, shortly after last Thursday, when I was greeted thusly twice, I stumbled upon (no, not that StambledUpon) two new blogs.
Maybe this is an Netiquette that I just haven't heard of, or maybe this is something new entirely. But from today on, when someone greets me with "I read your blog." My acknowledgement will be either "Thanks, I read yours too." or "Thanks. Where is your blog?"
Hmm, I Haven't Been To Reddit Before
I only heard of Reddit, but never took a closer look at it before. Then, yesterday I got more than a thousand hits from http://programming.reddit.com/ because my last blog entry got modded up to the front page and stayed there for close to a day:
That's nearly ten times the hit I get from being popular on JavaBlogs.com. The number difference probably simply mean there are a lot more programmers out there than Java programmers. But still.
And scanning around the front page, the articles seem to be genuinely interesting. I've added Reddit to my blogroll.
Farewell To GCJ, Sun Hires GCJ Architect For JavaFX
With Sun releasing OpenJDK into the Free Software community at JavaOne three days ago, the landscape of Free Java will shift.
Stacy Cowley, CRN: One high point of the session came when Red Hat engineer Tom Tromey essentially offered to throw the project he's worked on for nearly a decade, Java compiler GCJ, onto the funeral pyre.
Panelist Dalibor Topic also sees a dimming future for a project he co-maintains called Kaffe, an open-source initiative to build a Java virtual machine (VM).
One panelist took a markedly different view, arguing that the Java community needs rivals to Sun's official implementation. Geir Magnusson, Jr., chair of the Apache Software Foundation's Harmony project, said Harmony still draws participants and plans to stick around.
I wrote an article about GCJ 1591 days (four years) ago. Looking back, I can clearly see that a major role it served is it steered Java toward the direction of Free Software. With the release of OpenJDK, GCJ and GNU Classpath (and other projects) should feel its historical mission fulfilled.
The fate of project Harmony is less certain. From a software ecosystem point of view, the existence of competing implementations tend to keep the technology moving forward. A Free Software license alone will not assure liveliness of OpenJDK. Even the venerable GCC needed a little fork (the egcs project) to push it out of stagnation in the 90's. So Apache Harmony staying around could only be a good thing for Java. And the interim governing board would do better to think long term, to a time when Java may no longer be strategic for Sun. (For example, what are they going to do after Java 7? Add a macro system?)
Incidentally, Per Bothner, who played a part in both the egcs project and the GCJ project, announced on the Kawa (a language implementation toolkit for the JVM, with Scheme and Xquery bytecode compilers, see my article here) mailing list three days ago:
Per Bothner: I'd like to let the Kawa community know that as of a week ago I became a Sun employee. I'll be working 80% time for Sun and 80% on Kawa (well, perhaps a little less). The hire process took a lot longer than expected because of the Kawa IP issues and resolving potential conflicts of interest with my existing Kawa support/consulting business. (No real disagreements; just figuring everything out.)
I'm working on the JavaFX project (which used to called F3), which was just announced this morning. See
http://www.infoworld.com/article/07/05/07/javafx-javaone_1.html
My main task is compiling JavaFX to bytecode. There are obvious Kawa synergies and parallels; in fact I've been hacking together a prototype compiler for JavaFX using Kawa. (That doesn't mean Sun will ship a product using Kawa, though it is not out of the question.) I'll also be working with Chris Oliver and other smart people on language specification.
Google Web Toolkit, JRuby At The JUG
We had one of those days at the St. Louis JUG yesterday. An hour before the meeting, right around the time when folks would leave work for the JUG meeting, it rained really hard.
Once we arrived, we found the auditorium door locked. The building person told us the day user of the auditorium left all their stuff inside, locked the door, so that they can resume their meeting tomorrow. It took the building person fifteen minutes to track down the organizer and convince him to let us in. Of course we have to promise not to touch any of their stuff.
And then, two minutes before the start of the meeting, the fire alarm was triggered. As we have to wait for the fire department to come and issue the all-clear. They came in three minutes. (The fire department is only a couple of blocks away.)
And then Mark Volkmann gave his JRuby talk. Mark have given this talk several times already. I have heard the talk last at the OCI internal Java lunch. One of the interesting points Mark makes is about the readiness of JRuby for a 1.0 release. In several of the slides, Mark points out things that are clearly wrong in JRuby and made the claim that JRuby is not ready for a 1.0 release at JavaOne 2007. Yesterday, Mark was relieved to report that the JRuby team wisely did not release JRuby 1.0 at JavaOne 2007.
The slides are here. You can also get it from Mark's blog.
I forgot to blog about last month's JUG meeting. We had a well attended meeting last month when Brad Busch and Andrew Prunicki talked about the Google Web Toolkit (GWT). What happend was that I took copious notes during the talk, meaning to blog about it the next day. But I was moving some furnitures around and I misplaced the notes. It was the best notes I have taken in any of the JUG meetings, full of funny quotes and witty one-liners. The world will never see them. Sigh. :(
The only quote I can remember now is "I know I'll never do a Struts project again." But all is not lost, the presentation material can be found in the St. Louis JUG Knowledge Base
Talking about the St. Louis JUG Knowledge Base, it is worth noticing that it is exactly ten years ago, in May 1997 that the St. Louis JUG started its life. Take a moment, if you please, to check out the first presentation, also by Mark Volkmann: Java—What's All the Excitement About.
The excitement continues after ten years. And the St. Louis JUG will continue to bring new and exciting contents to the audience. Next month, Tom Wheeler will be talking about the NetBeans Platform. And in July, will be talking about, get this, JavaFX Script.
Yes, after all the "this is not ready" bashing I did yesterday, I still find the JavaFX Script language fascinating, and I'll do my best to get to the bottom of things and report back to you in two months.
Microsoft, Sun Endorse Adobe Flash/Flex Paradigm
Over there in San Francisco, at JavaOne, Sun announced something peculiar—a new line of product whose flagship programming language is still in early alpha. The product line is some sort of a phone, and the programming language is called JavaFX Script.
I downloaded the language and tried a few simple programs. Instead of showing you a screencast of what it is capable of doing, let me show you the interpreter error I received when my hello world program contained a couple of syntax errors:
[weiqi@gao]$ cat basic-types.fx
var x = 1024
var y = 2048
[weiqi@gao]$ javafx.sh basic-types.fx
compile thread: Thread[AWT-EventQueue-0,6,main]
compile 0.0080
file:/home/weiqi/temp/src/javafx/basic-types.fx:2: Encountered "var" at line 2, column 1.
Was expecting one of:
"format" ...
"dur" ...
"order" ...
"index" ...
"in" ...
"or" ...
"xor" ...
"and" ...
"instanceof" ...
"++" ...
"--" ...
";" ...
"+" ...
"=" ...
"." ...
"(" ...
"[" ...
"<" ...
">" ...
"==" ...
">=" ...
"<=" ...
"<>" ...
"-" ...
"+=" ...
"-=" ...
"*=" ...
"/=" ...
"%=" ...
"*" ...
"/" ...
"%" ...
[weiqi@gao]$
This thing is clearly not ready for prime time. I'm not saying it won't be ready in two years. If Sun keeps the project alive, and throw a bunch of resources at it, in all likelihood it will be ready. But that's a big "if."
And you can understand my skeptism by asking yourselves a very simple question: "What was the new Sun language demoed at JavaOne 2006?" ... if you answered "a Visual Basic compiler" you are 100% correct. Where is it now?
A lot of things happened between the last JavaOne and this JavaOne, you say. Yes, that's true. By the same token, a lot can happen between now and the next JavaOne.
And that brings me to my next question: Why now? Sure the Java SE in a phone thingy is interesting. But there is also talk about an (as of now vaporware) slimmed down Java plugin for Web browsers. And the technical press people and the general programming public are already putting it in the same category of tools as Adobe Flash/Flex and Microsoft Silverlight.
All of a sudden, fake competition is happening in the Rich Internet Application tools market. And the winner in this category is clearly Adobe Flash/Flex (by virtue of Microsoft Silverlight not being cross-platform, and by virtue of the JavsFX thin/kernel/modular plug-in not being.)
So I can only interpret Microsoft and Sun's entering (or threatening to enter) into the RIA tools market place as their way of endorsing the Adobe Flash/Flex paradigm. If Adobe plays its cards right, Flash/Flex will be a dominating force in this space for the next three to five years. While Microsoft Silverlight will never be successful on the internet, the Sun JavaFX thin-thingy still have a chance if it rides the open source wave and become bundled with Linux distributions and Firefox downloads.
The biggest loser in this round of RIA hype is AJaX. Again, I'm not saying AJaX will fade away immediately. But the phrases "AJaX" and "standard-based web apps" will lose their novelty and star quality and be attacked from above by the RIA toolkits. One way to save the "standard-based web app" is to extend the standards, and by that I mean the HTML/CSS/JavaScript standards, to include elemets like <canvas>, <menu>, <audio>, <video>, <treeview>, <progressbar>, etc., and language features like modularity, isolation (memory protection), resource quotas (so that one page can't keep using 100% CPU for an unlimited time), etc.
One responsibility of being a platform is to absorb some of the most commonly used innovations done on top of the platform into the platform itself. I still remember adding a tooltip to one of the buttons in a Win16 application—the hard way—by creating a Window that is to be the yellow bubble and track how long the mouse pointer has been hovering over a button and make the Window visible if it is longer than 750 milliseconds. Nowadays nobody will use a GUI toolkit without declarative support for tooltips.
It will be interesting to see what comes out of all these.
Bloglines vs. Google Reader: The Verdict
I have been running Bloglines and Google Reader side by side for 71 days. Both show up as part of my Firefox home pages, at home and at work. The idea is that I should make them equally available for an extended evaluation period, and whichever one I instinctively go to at the end of the evaluation period wins.
Today, I removed Google Reader from my Firefox home pages. And here's the Bloglines feature that won me over (or kept me there, to be exact):
Notice the "Keep New " checkbox at the lower right corner. It allows me to keep the post as new, so that it will show up the next time I view the same blog. Why would I want to keep the post new? Because it contains information that warrants further examination (in this case, Kyle pointed his readers to a set of pretty good JavaScript videos at Yahoo!Video).
I can't do something similar in Google Readers. The closest thing I can find is the " Mark as read" checkbox underneath each post. However the effect of checking that checkbox isn't very durable. It goes away the next time I read the entry.
Prior to today's decision, I have already accumulated several reasons in favor of Bloglines:
In Bloglines, as soon as I click on a subscription in the left pane, all of the unread and keep new entries of that subscription show up in the right pane and everything is marked as read. This allows me to scan my subscriptions very quickly.
In Google Reader, the posts are marked unread after I click on a subscription in the left pane. I have to go to the right pane and click on each individual posts to mark each as read. This is very clumsy and slowed me down considerably. This puts a little hesitation in to my choosing Google Readers.
I understand this Blogline feature is quite controversial in REST circles, it not being idempotent and all. But I'll take usability over programming orthodoxy any day.
Both Bloglines and Google Readers offer the choice of displaying all feeds or displaying only updated feeds. However, in Google Reader, this is a one click option. During the evaluation period, I switched between the two modes several times, unsatisfied with either of them.
In Bloglines, this is a three click option which isn't obvious at all. So I did not fiddle with this option during the evaluation period. The end result, my Bloglines experience is more consistent while my Google Reader experience has a split personality.
Similar things can be said about Google Reader's one click choice between the expanded view and the list view, a la GMail. I ended up switching between them, unsatisfied with either.
With Bloglines, I liked the expanded view just fine.
Bloglines and Google Reader both offer some vi-like keyboard shortcuts. I never use those in Bloglines, and my experience there is just fine.
With Google Reader, I ended up trying them (because they are very similar to the keyboard shortcuts in GMail and I use them in GMail all the time) and not liking them. The problem has to do with the way the focus is switched from the left pane to the right pane and back. The commands are simply too complicated. And that somehow became yet another negative for Google Reader.
I know, I know, this is not fair. But I did not promise a fair evaluation.
All of these, plus Bloglines "Sub with Bloglines" bookmarklet and "Blogroll web service" features, which I use quite heavily, tipped my balance towards Bloglines.
I'm sorry, Google Reader.
I’ve heard this will actually happen in Java 7. I hope it’s true.
(In a comment on Neil’s point-free blog.)
Charles Oliver Nutter: Regarding removing deprecated code: I’ve heard this will actually happen in Java 7. I hope it’s true.
Yay!
Flex 3 SDK and Silverlight: Is Java Applet An Idea Whose Time Has Come?
Twelve years after the original Java applet in the browser announcement, the march to a richer GUI runtime in the browser seems to be back on. On the heels of Adobe announcing the plan to open source its Flex 3 SDK, Microsoft entered the race with an open source (BSD-ish licensed) Silverlight, a cross-platform, cross-browser version of the .NET Windows Presentation Foundation.
All of a sudden, what didn't work a decade ago is being tauted as something new again. And this time, there are indications that the whole thing might just work.
Of course, Linux is absent from Microsoft's definition of cross-platform (Windows and Mac OS X is all they care about). Fortunately, it looks like the Mono project will do a Silverlight implementation:
Miguel de Icaza: It makes tons of sense for us to start looking at an implementation of Silverlight on Linux with Mono. There is already a XAML loader, it is the perfect excuse to use Antigrain for high-speed graphics and that only leaves the pesky media issue to be solved.
Now, what about Java? Are people so tired of the Java on the client story that we have already lost?
Not necessarily. It is true that Java in the browser has been neglected for many years. However, many of the basic ingredients that make up Flash or Silverlight are already there in Java.
If only someone can produce a stripped down version for the browsers.