Planet Classpath

You can find the original announcement here

It was a very a difficult choice this time and it took a bit to understand the best schedule and try to get the most tracks.

This is the list of approved talks, in no particular order. Thanks to anyone who participated, unfortunately we were not able to select every one, and the choice this year was insanely difficult!

I hope the speaker who we could not select will still join us to enjoy what we are preparing for this year Free Java DevRoom celebrations!

  • Packed Objects, Object Layout & Value Types – a Survey
  • Shenandoah – Project overview
  • Sustaining the zero assembler port in OpenJDK: An inside perspective of CPU specific issues
  • Open Heart Surgery: HotSpot Debugging at the OS Level
  • Life in the trenches
  • The State of OpenJDK
  • Java 9: Make Way for Modules!
  • Beyond Java 9
  • What Three Big Development Trends Mean for Java
  • The ARM microJIT
  • What Lies Beneath?: Lessons learned hacking the OpenJDK interpreter/compilers
  • JCP State of the Union & Progress Report
  • Diagnosing Performance Issues Using Thermostat
  • Caciocavallo, or how we ported OpenJDK from embedded to cloud and still liked it
  • Java restart with WebFX
  • The Wisdom Of Crowd Testing OpenJDK
  • InvokeBinder: Fluent Programming for Method Handles
  • OpenJDK Adoption Group Q&A
  • Fortress
  • IcedTea-Web goes offline and beyond
  • MappedByteBuffer Operations SpeedUp of 150x
  • Cache2k, Java caching turbo charged
  • Building an open Internet of Things with Java and Eclipse IoT
  • JFree – The Long and Winding Road (Ahead)
  • Jitsi Videobridge in Cryptoland: the adventures of a Java WebRTC video router on the road to supporting 1000s of video streams

As I wrote previously, Project Jigsaw is coming into JDK 9 in several large steps. JEP 200 defines the modular structure of the JDK, JEP 201 reorganizes the JDK source code into modular form, and JEP 220 restructures the JDK and JRE run-time images to support modules. The actual module system will be defined in JSR 376, which is just getting under way, and implemented by a corresponding JEP, yet to be submitted.

We implemented the source-code reorganization (JEP 201) last August. This step, by design, had no impact on developers or end users.

Most of the changes for modular run-time images (JEP 220) were integrated late last week and are now available in JDK 9 early-access build 41. This step, in contrast to the source-code reorganization, will have significant impact on developers and end users. All of the details are in the JEP, but here are the highlights:

  • JRE and JDK images now have identical structures. Previously a JDK image embedded the JRE in a jre subdirectory; now a JDK image is simply a run-time image that happens to contain the full set of development tools and other items historically found in the JDK.

  • User-editable configuration files previously located in the lib directory are now in the new conf directory. The files that remain in the lib directory are private implementation details of the run-time system, and should never be opened or modified.

  • The endorsed-standards override mechanism has been removed. Applications that rely upon this mechanism, either by setting the system property java.endorsed.dirs or by placing jar files into the lib/endorsed directory of a JRE, will not work. We expect to provide similar functionality later in JDK 9 in the form of upgradeable modules.

  • The extension mechanism has been removed. Applications that rely upon this mechanism, either by setting the system property java.ext.dirs or by placing jar files into the lib/ext directory of a JRE, will not work. In most cases, jar files that were previously installed as extensions can simply be placed at the front of the class path.

  • The internal files rt.jar, tools.jar, and dt.jar have been removed. The content of these files is now stored in a more efficient format in implementation-private files in the lib directory. Class and resource files previously in tools.jar and dt.jar are now always visible via the bootstrap or application class loaders in a JDK image.

  • A new, built-in NIO file-system provider can be used to access the class and resource files stored in a run-time image. Tools that previously read rt.jar and other internal jar files directly should be updated to use this file system.

We’re aware that these changes will break some applications, in particular IDEs and other development tools which rely upon the internal structure of the JDK. We think that the improvements to performance, security, and maintainability enabled by these changes are, however, more than worth it. We’ve already reached out to the maintainers of the major IDEs to make sure that they know about these changes, and we’re ready to assist as necessary.

If you have trouble running an existing application on JDK 9 build 41 or later and you think it’s due to this restructuring, yet not caused by one of the changes listed above or in JEP 220, then please let us know on the jigsaw-dev mailing list (you’ll need to subscribe first, if you haven’t already), or else submit a bug report via bugs.java.com. Thanks!

The first release candidate is available. It can be downloaded here or from NuGet.

What's New (relative to IKVM.NET 7.4):

  • Merged OpenJDK 8 b132.
  • Support for Java 8 features.
  • Improvements to sun.misc.Unsafe compatibility.
  • Various bug fixes.

Changes since previous development snapshot:

  • Assemblies are strong named.

Binaries available here: ikvmbin-8.0.5449.0.zip

Sources: ikvmsrc-8.0.5449.0.zip, openjdk-8-b132-stripped.zip

With the fixes I did in the snapshot released on October 29, it is now possible to run Minecraft on IKVM.NET (on Windows). To be clear, I'm talking about the Minecraft client, not the server that has been running on IKVM.NET for a long time.

The Minecraft client uses native code for the 3D graphics and sound, so it doesn't run into IKVM limitations there.

To get it to run download the most recent IKVM.NET snapshot (currently available here) and unzip it. Download minecraft.jar and run it like this:

ikvm -jar minecraft.jar

It takes a while to start up, so be patient.

If you get an exception when trying to log in, you may have to visit https://authserver.mojang.com/ in Internet Explorer to add the root certificate to the Windows certificate store (just visiting the site causes IE to download it from Microsoft). After that you have to restart Minecraft.

Alright, I repeat, I’m not a lawyer. But the recent move from Microsoft to release part of the .Net runtime under the very permissive MIT license still hides the usual issues.

Unlike what Miguel De Icaza says on his blog, this patent promise does not address the “historical concerns that the open source, Unix and free software communities have raised over the years“.

MIT doesn’t protect you from patents by default, as Miguel noted, so Microsoft added a patent promise.

Unfortunately, I don’t think this is satisfactory, let me quote the main point for you:

Microsoft Corporation and its affiliates (“Microsoft”) promise not to assert any .NET Patents against you for making, using, selling, offering for sale, importing, or distributing Covered Code, as part of either a .NET Runtime or as part of any application designed to run on a .NET Runtime.

Let me quote again:

…as part of either a .NET Runtime or as part of any application designed to run on a .NET Runtime…

So, here it is. Modify this source code, and you’ll get into the trap. This is very different than using the code of course. I would be very surprised if Microsoft would sue me for writing a .Net application, it would be silly and counter productive, so anyone can just assume that as well. But modifying and redeploying the original code of the runtime itself?

If you are writing a program for the modified runtime, as long as it works without any issue on the original runtime you should be fine, but as an ISV, where does it put you in respect to the runtime code itself?

I don’t think there will be any issues in the immediate future, Microsoft itself can’t afford to start suing anyone just because they try to bundle the .Net code, but I fear it will happen once adoption is high enough to justify it. After all, Microsoft main business model those days seems to be heavily based on patent trolling, they are doing tons of money over patent disputes, why should they give up this remunerative model?

I suggest, if you didn’t do before, to read as an example this very interesting article from my dear friend Simon Phipps.

So, just to be clear, I’m not trying to FUD over Microsoft here, it’s entirely possible that Microsoft is really changing. I do believe that this may open the option of adoption of the .Net runtime on non Microsoft platforms, as long as it remain the .Net runtime as Microsoft intended it be. It will be interesting to see what Linux distribution will do with this code, for example, but I hardly doubt it will ever be the first level choice, especially when so great and better alternatives exist that are truly open.

For example, Microsoft refusal to join the Open Invention Network is an hint that the runtime is still largely hostile territory. This may radically change if they decide to join OIN though, so only time can tell us.

My suggestion would be, if you’re into investing in .Net, to double check with your lawyer first and then put pressure on Microsoft to join OIN.

Now, a word of disclaimer. I usually don’t really express many opinion that are deeply work related on this blog, but now it’s quite needed.

The opinion expressed in this blog are mine, they are not based on any informed facts of my company line of business, they are solely my own point of view, they do not necessarily represent the point of view of my Employer in any form or mean and are to be taken as is.


For almost a year now I’ve had a Yoga 2 Pro. Despite some people thinking the name is silly and me only using the screen rotation once (on a plane), it’s a nice machine and Fedora 20 running GNOME is great on it. The only non-stock thing to do1 is, in Firefox, open about:config and set layout.css.devPixelsPerPx to 2.

When I bought it, I cheaped out and got the 256 GB disk. I shouldn’t have, so I recently bought a 1 TB mSATA disk to replace it. I also bought an mSATA -> USB3 enclosure to use for dding everything over to the new disk.

For reasons I can’t recall I have my encrypted /home *not* on a logical volume so growing it into the free space on the new disk basically just involved booting from a live USB stick, unlocking the LUKS volume, using gdisk to delete the existing partition and creating a new, larger one starting at the same offset, e2fsck, and resize2fs. If you’re going to do this yourself, you should of course back up your data first.

Physically changing the disk involved removing the 11 T5 bolts on the bottom and the pesky Phillips 00 bolt holding the SSD in place.

[1]

Well, depending upon how old your kernel is, you may also need to rmmod/blacklist ideapad_laptop.

After Pantomime a GNUMail release had of course to follow.
The same words as for Pantomime apply.


Due to the inactivity of CollaborationWorld and Ludovic, we(*) decided to import the sources in gnustep-nonfsf at gna.org.

(*)German, Sebastian and myself with the contributions of others

The download is at:
http://download.gna.org/gnustep-nonfsf/GNUMail-1.2.2.tar.gz

This release contains updates and some important, long-needed fixes:
* critical fixes on GNUstep which finally make SMTP usable again (including security detection in preferences)
* use the corresponding Pantomime to finally run on NetBSD
* Many 64bit fixes
* port to MacOS re-instantiated (10.3/10.4 tested)
* Memory problem fixes
* General code cleanup to compile on modern compilers (gcc4 and clang) and on modern obj-c runtimes
* works slightly better on small displays
* crash fixes

There is still quite some stuff to do, but at least GNUMail can be compiled, run and used again and I hope other will enjoy it!


GNUMail on MacOS


GNUMail on GNUstep

Version 0.6.2 of ProjectCenter, GNUstep's IDE (together with GORM), is out!

For more information and to download it, check the GNUstep website:
http://www.gnustep.org/experience/ProjectCenter.html

What's new?
  • Better compiler output parser, which includes fatal error
  • Compiler parser extended beyond gcc, like egcs and clang now get reasonable output
  • GoTo Line panel rewritten, works and can be extended in other editor plugins (like Gemas)
  • Find Panel fixes to work in detached editors, use of the standard find pabel
  • Crash fixes in the editor
  • Crash fixes in the highlighter
  • usage on Windows improvements
  • 64Bit fixes
  • Updated to current GNUstep drag operation (you need this release to work on current GNUstep)
  • some NetBSD/OpenBSD/FreeBSD support fixes (warnings et al.)

I'll be back again at EclipseCon Europe in Ludwigsburg, Germany on October 28th to speak Tuesday afternoon at 3 PM, and enjoy Simon Ritter's Lambda tutorial on Tuesday morning at 9 AM.

As usual, if there is something around OpenJDK you'd like to chat about, let me know on Twitter (or send me an e-mail), and we'll find some space and time.

See you there!
This year's JavaOne featured a new press release from Oracle mentioning OpenJDK. Here are the relevant excerpts:

Since its launch, Java SE 8 has seen record adoption, and the OpenJDK Community continues to thrive with contributions from Oracle as well as from other companies, researchers, and individual developers.

Oracle has begun work on the JDK 9 Project in the OpenJDK Community. New features will focus on modularity, performance, stability, and portability.

The OpenJDK Community continues to host the development of both the Java SE Platform Specification and its Reference Implementation, the JDK, fueled by contributions from Oracle and new and existing organizations and individuals. New participants in OpenJDK include:
* The FreeBSD Foundation, which will be collaborating with Oracle and others on producing OpenJDK binaries targeted to FreeBSD users via the FreeBSD Ports Collection
* The Digital Energy Business of the General Electric Company, which recently joined the OpenJDK Community and will be collaborating with Oracle and others on improving stability and performance of multilanguage virtual machine support via the invokeDynamic (JSR 292) API
* Microsoft Open Technologies, Inc., which will be contributing its expertise in networking, performance, and integration to the community.
The OpenJDK Community hosts many new projects that will continue to move the Java SE platform forward. These include Valhalla, which is exploring advanced language and JVM features; Panama, which aims to improve the connections between Java and native code; and smaller efforts such as Annotations Pipeline 2.0, Javadoc.next, Device I/O, and Memory Model Update.


Taken from the Oracle press release titled Oracle Highlights Continued Java SE Momentum and Innovation at JavaOne 2014.

The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK.

This release updates our OpenJDK 7 support in the 2.5.x series with the Octobner 2014 security fixes.

If you find an issue with the release, please report it to our bug database under the appropriate component. Development discussion takes place on the distro-pkg-dev OpenJDK mailing list and patches are always welcome.

Note that alternate virtual machines (e.g. CACAO, JamVM) will be broken by this release, until such a time as they introduce support for JVM_FindClassFromCaller, a new virtual machine interface function added by S8015256

Full details of the release can be found below.

What’s New?

New in release 2.5.3 (2014-10-14)

  • Security fixes
  • Backports
    • S4963723: Implement SHA-224
    • S7044060: Need to support NSA Suite B Cryptography algorithms
    • S7122142: (ann) Race condition between isAnnotationPresent and getAnnotations
    • S7160837: DigestOutputStream does not turn off digest calculation when “close()” is called
    • S8006935: Need to take care of long secret keys in HMAC/PRF compuation
    • S8012637: Adjust CipherInputStream class to work in AEAD/GCM mode
    • S8028192: Use of PKCS11-NSS provider in FIPS mode broken
    • S8038000: java.awt.image.RasterFormatException: Incorrect scanline stride
    • S8039396: NPE when writing a class descriptor object to a custom ObjectOutputStream
    • S8042603: ‘SafepointPollOffset’ was not declared in static member function ‘static bool Arguments::check_vm_args_consistency()’
    • S8042850: Extra unused entries in ICU ScriptCodes enum
    • S8052162: REGRESSION: sun/java2d/cmm/ColorConvertOp tests fail since 7u71 b01
    • S8053963: (dc) Use DatagramChannel.receive() instead of read() in connect()
    • S8055176: 7u71 l10n resource file translation update
  • Bug fixes
    • PR1988: C++ Interpreter should no longer be used on ppc64
    • PR1989: Make jdk_generic_profile.sh handle missing programs better and be more verbose
    • PR1992, RH735336: Support retrieving proxy settings on GNOME 3.12.2
    • PR2000: Synchronise HEAD tarball paths with release branch paths
    • PR2002: Fix references to hotspot.map following PR2000
    • PR2003: –disable-system-gtk option broken by refactoring in PR1736
    • PR2009: Checksum of policy JAR files changes on every build
    • PR2014: Use version from hotspot.map to create tarball filename
    • PR2015: Update hotspot.map documentation in INSTALL
    • PR2025: LCMS_CFLAGS & LCMS_LIBS should not be used unless SYSTEM_LCMS is enabled
    • RH1015432: java-1.7.0-openjdk: Fails on PPC with StackOverflowError (revised comprehensive fix)
  • CACAO
  • AArch64 port
    • AArch64 C2 instruct for smull
    • Add frame anchor fences.
    • Add MacroAssembler::maybe_isb()
    • Add missing instruction synchronization barriers and cache flushes.
    • Add support for a few simple intrinsics
    • Add support for builtin crc32 instructions
    • Add support for Neon implementation of CRC32
    • All address constants are 48 bits in size.
    • array load must only read 32 bits
    • Define uabs(). Use it everywhere an absolute value is wanted.
    • Fast string comparison
    • Fast String.equals()
    • Fix register usage in generate_verify_oop().
    • Fix thinko in Atomic::xchg_ptr.
    • Fix typo in fsqrts
    • Improve C1 performance improvements in ic_cache checks
    • Performance improvement and ease of use changes pulled from upstream
    • Remove obsolete C1 patching code.
    • Replace hotspot jtreg test suite with tests from jdk7u
    • S8024648: 7141246 breaks Zero port
    • Save intermediate state before removing C1 patching code.
    • Unwind native AArch64 frames.
    • Use 2- and 3-instruction immediate form of movoop and mov_metadata in C2-generated code.
    • Various concurrency fixes.

The tarballs can be downloaded from:

We provide both gzip and xz tarballs, so that those who are able to make use of the smaller tarball produced by xz may do so.

The tarballs are accompanied by digital signatures available at:

These are produced using my public key. See details below.

SHA256 checksums:

  • 44df11ac8e5ace7194e7372ef169909e0dab31d6b2f6bbae9a9c33af2cc54540 icedtea-2.5.3.tar.gz
  • ac7c1ae97eef2d1c650ab7a21091f71e83a984f37a12c802c0f319f1438b0101 icedtea-2.5.3.tar.gz.sig
  • f4f2922cfec262496e935f81c1d39af66a789f69aa12d1ceee51bcca8934f1f0 icedtea-2.5.3.tar.xz
  • ed9b9cbc1237bfbf619e2cccfddf1002901371e94177a8becd85036be1ccf29a icedtea-2.5.3.tar.xz.sig

The checksums can be downloaded from:

A 2.5.3 ebuild for Gentoo is available.

The following people helped with these releases:

We would also like to thank the bug reporters and testers!

To get started:

$ tar xzf icedtea-2.5.3.tar.gz

or:

$ tar x -I xz -f icedtea-2.5.3.tar.xz

then:

$ mkdir icedtea-build
$ cd icedtea-build
$ ../icedtea-2.5.3/configure
$ make

Full build requirements and instructions are available in the INSTALL file.

Happy hacking!

The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as a PulseAudio sound driver, the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK.

This release updates our OpenJDK 6 support in the 1.13.x series with the October 2014 security fixes.

If you find an issue with the release, please report it to our bug database under the appropriate component. Development discussion takes place on the distro-pkg-dev OpenJDK mailing list and patches are always welcome.

Note that alternate virtual machines (e.g. CACAO, JamVM) will be broken by this release, until such a time as they introduce support for JVM_FindClassFromCaller, a new virtual machine interface function added by S8015256.

Full details of the release can be found below.

What’s New?

New in release 1.13.5 (2014-10-14)

  • Security fixes
  • Import of OpenJDK6 b33
    • OJ37: OpenJDK6-b32 cannot be built on Windows
    • OJ39: Handle fonts with the non-canonical processing flag set
    • OJ41: OpenJDK6 should be compatible with Windows SDK 7.1
    • OJ42: Remove @Override annotation on interfaces added by 2014/10/14 security fixes.
    • S6967684: httpserver using a non thread-safe SimpleDateFormat
    • S7033534: Two tests fail just against jdk7 b136
    • S7160837: DigestOutputStream does not turn off digest calculation when “close()” is called
    • S7172149: ArrayIndexOutOfBoundsException from Signature.verify
    • S8010213: Some api/javax_net/SocketFactory tests fail in 7u25 nightly build
    • S8012637: Adjust CipherInputStream class to work in AEAD/GCM mode
    • S8028192: Use of PKCS11-NSS provider in FIPS mode broken
    • S8038000: java.awt.image.RasterFormatException: Incorrect scanline stride
    • S8039396: NPE when writing a class descriptor object to a custom ObjectOutputStream
    • S8042603: ‘SafepointPollOffset’ was not declared in static member function ‘static bool Arguments::check_vm_args_consistency()’
    • S8042850: Extra unused entries in ICU ScriptCodes enum
    • S8052162: REGRESSION: sun/java2d/cmm/ColorConvertOp tests fail since 7u71 b01
    • S8053963: (dc) Use DatagramChannel.receive() instead of read() in connect()
  • Backports
    • S4963723: Implement SHA-224
    • S6578658: Request for raw RSA (NONEwithRSA) Signature support in SunMSCAPI
    • S6753664: Support SHA256 (and higher) in SunMSCAPI
    • S7033170: Cipher.getMaxAllowedKeyLength(String) throws NoSuchAlgorithmException
    • S7044060: Need to support NSA Suite B Cryptography algorithms
    • S7106773: 512 bits RSA key cannot work with SHA384 and SHA512
    • S7180907: Jarsigner -verify fails if rsa file used sha-256 with authenticated attributes
    • S8006935: Need to take care of long secret keys in HMAC/PRF compuation
    • S8017173, PR1688: XMLCipher with RSA_OAEP Key Transport algorithm can’t be instantiated
    • S8049480: Current versions of Java can’t verify jars signed and timestamped with Java 9
  • Bug fixes
    • PR1904: [REGRESSION] Bug reports now lack IcedTea version & distribution packaging information
    • PR1967: Move to new OpenJDK bug URL format

The tarballs can be downloaded from:

We provide both gzip and xz tarballs, so that those who are able to make use of the smaller tarball produced by xz may do so.

The tarballs are accompanied by digital signatures available at:

These are produced using my public key. See details below.

SHA256 checksums:

  • 7bc21b8fa532c44279591372a77a76ae5976f54ae02ea8bdcd3dd7740511f1cb icedtea6-1.13.5.tar.gz
  • daf5b5132e73091af7bdf1040ae234773fa62c4ee8600a4abfdb7b2db205ce3a icedtea6-1.13.5.tar.gz.sig
  • 3579852895dcce8dcb0277b221c5b27d57baf7e642e9cbb92c1b67d9af9e2cbb icedtea6-1.13.5.tar.xz
  • 8b5de1b8c814d9743c7531ad58e0cb1de1c40e56c7f2315ae01c45c36faa20f1 icedtea6-1.13.5.tar.xz.sig

The checksums can be downloaded from:

A 1.13.5 ebuild for Gentoo is available.

The following people helped with these releases:

We would also like to thank the bug reporters and testers!

To get started:

$ tar xzf icedtea6-1.13.5.tar.gz

or:

$ tar x -I xz -f icedtea6-1.13.5.tar.xz

then:

$ mkdir icedtea-build
$ cd icedtea-build
$ ../icedtea6-1.13.5/configure
$ make

Full build requirements and instructions are available in the INSTALL file.

Happy hacking!

I started hacking on firefox recently. And, of course, I’ve configured emacs a bit to make hacking on it more pleasant.

The first thing I did was create a .dir-locals.el file with some customizations. Most of the tree has local variable settings in the source files — but some are missing and it is useful to set some globally. (Whether they are universally correct is another matter…)

Also, I like to use bug-reference-url-mode. What this does is automatically highlight references to bugs in the source code. That is, if you see “bug #1050501″, it will be buttonized and you can click (or C-RET) and open the bug in the browser. (The default regexp doesn’t capture quite enough references so my settings hack this too; but I filed an Emacs bug for it.)

I put my .dir-locals.el just above my git checkout, so I don’t end up deleting it by mistake. It should probably just go directly in-tree, but I haven’t tried to do that yet. Here’s that code:

(
 ;; Generic settings.
 (nil .
      ;; See C-h f bug-reference-prog-mode, e.g, for using this.
      ((bug-reference-url-format . "https://bugzilla.mozilla.org/show_bug.cgi?id=%s")
       (bug-reference-bug-regexp . "\\([Bb]ug ?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)")))

 ;; The built-in javascript mode.
 (js-mode .
     ((indent-tabs-mode . nil)
      (js-indent-level . 2)))

 (c++-mode .
	   ((indent-tabs-mode . nil)
	    (c-basic-offset . 2)))

 (idl-mode .
	   ((indent-tabs-mode . nil)
	    (c-basic-offset . 2)))

)

In programming modes I enable bug-reference-prog-mode. This enables highlighting only in comments and strings. This would easily be done from prog-mode-hook, but I made my choice of minor modes depend on the major mode via find-file-hook.

I’ve also found that it is nice to enable this minor mode in diff-mode and log-view-mode. This way you get bug references in diffs and when viewing git logs. The code ends up like:

(defun tromey-maybe-enable-bug-url-mode ()
  (and (boundp 'bug-reference-url-format)
       (stringp bug-reference-url-format)
       (if (or (derived-mode-p 'prog-mode)
	       (eq major-mode 'tcl-mode)	;emacs 23 bug
	       (eq major-mode 'makefile-mode)) ;emacs 23 bug
	   (bug-reference-prog-mode t)
	 (bug-reference-mode t))))

(add-hook 'find-file-hook #'tromey-maybe-enable-bug-url-mode)
(add-hook 'log-view-mode-hook #'tromey-maybe-enable-bug-url-mode)
(add-hook 'diff-mode-hook #'tromey-maybe-enable-bug-url-mode)

I’ve been working on an odd Emacs package recently — not ready for release — which has turned into more than the usual morass of prefixed names and double hyphens.

So, I took another look at Nic Ferrier’s namespace proposal.

Suddenly it didn’t seem all that hard to implement something along these lines, and after a bit of poking around I wrote emacs-module.

The basic idea is to continue to follow the Emacs approach of prefixing symbol names — but not to require you to actually write out the full names of everything.  Instead, the module system intercepts load and friends to rewrite symbol names as lisp is loaded.

The symbol renaming is done in a simple way, following existing Emacs conventions.  This gives the nice result that existing code doesn’t need to be updated to use the module system directly.  That is, the module system recognizes name prefixes as “implicit” modules, based purely on the module name.

I’d say this is still a proof-of-concept.  I haven’t tried hairier cases, like defclass, and at least declare-function does not work but should.

Here’s the example from the docs:

(define-module testmodule :export (somevar))
(defvar somevar nil)
(defvar private nil)
(provide 'testmodule)

This defines the public variable testmodule-somevar and the “private” function testmodule--private.

Thanks to Jonathan Lin and Spencer Hui some of the talks that were presented at the recent “bootcamp” are appearing on Air Mozilla and more will do so as we get them ready. They’re all in Air Mozilla’s engineering channel: https://air.mozilla.org/channels/engineering/

Thanks to everybody who commented on the JamVM 2.0.0 release, and apologies it's taken so long to approve them - I was expecting to get an email when I had an unmoderated comment but I haven't received any.

To answer the query regarding Nashorn.  Yes, JamVM 2.0.0 can run Nashorn.  It was one of the things I tested the JSR 292 implementation against.  However, I can't say I ran any particularly large scripts with it (it's not something I have a lot of experience with).  I'd be pleased to hear any experiences (good or bad) you have.

So now 2.0.0 is out of the way I hope to do much more frequent releases.  I've just started to look at OpenJDK 9.  I was slightly dismayed to discover it wouldn't even start up (java -version), but it turned out to be not a lot of work to fix (2 evenings).  Next is the jtreg tests...

JFreeChart version 1.0.19 has been uploaded to SourceForge and the Maven Central Repository. This release contains additional rendering hints to improve output quality across a range of targets, plus some important fixes for the recently added JavaFX support.

jfreechart-1.0.19.png

In the download we've also included a preview of JSFreeChart, a 2D charting framework written in JavaScript that is conceptually similar to JFreeChart but runs directly in browsers. This is being developed in collaboration with KNIME.com AG, creators of the open source KNIME Analytics Platform.

I'm pleased to announce a new release of JamVM.  JamVM 2.0.0 is the first release of JamVM with support for OpenJDK (in addition to GNU Classpath). Although IcedTea already includes JamVM with OpenJDK support, this has been based on periodic snapshots of the development tree.

JamVM 2.0.0 supports OpenJDK 6, 7 and 8 (the latest). With OpenJDK 7 and 8 this includes full support for JSR 292 (invokedynamic). JamVM 2.0.0 with OpenJDK 8 also includes full support for Lambda expressions (JSR 335), type annotations (JSR 308) and method parameter reflection.

In addition to OpenJDK support, JamVM 2.0.0 also includes many bug-fixes, performance improvements and improved compatibility (from running the OpenJDK jtreg tests).

The full release notes can be found here (changes are categorised into those affecting OpenJDK, GNU Classpath and both), and the release package can be downloaded from the file area.

Overview

We've just released FXGraphics2D version 1.1, a Java2D to JavaFX bridge, a small and fast library that takes Java2D API calls and maps them to a JavaFX Canvas node. We developed this library to add JavaFX support to our charting libraries (JFreeChart and Orson Charts) but, as you'll see later in this post, FXGraphics2D is a standalone library that can be used by other Java code as well.

What's New?

First, we've added detection for the KEY_STROKE_CONTROL rendering hint, which provides sharper looking output particularly for horizontal and vertical lines. Compare the axis and grid lines in the following two charts (based on one of the JFreeChart demos). The first chart has the stroke normalisation applied (the axis and gridlines are sharp and well defined):

The second chart has no stroke normalisation and you can see that the axis lines are blurred (and, in some cases, the grid lines also):

A clipping issue that was affecting a subset of charts (combined plots) in JFreeChart has been fixed.

We addressed an issue with glyph positioning when using TextLayout rendering, first reported by Christoph Nahr in relation to our other Graphics2D implementations, JFreeSVG and Orson PDF.

We addressed a memory leak that was reported for the demo applications (it is important that each repaint for the Canvas is preceded with a call to clearRect() to clear an internal queue of drawing commands that JavaFX uses).

Finally, we've included Maven build support and you can now find FXGraphics2D on the Central Repository.

General Use

FXGraphics2D includes demos that use JFreeChart and Orson Charts to generate the graphical content that is rendered by the FXGraphics2D code. However, it is important to realise that FXGraphics2D is a standalone API and can be used with any Java code that uses the Java2D drawing API, so it enables a lot of existing Java2D code to be retained for use in JavaFX applications.

To illustrate, here is a screenshot of a small demo application that renders equations using JLaTeXMath and FXGraphics2D:

jlatexmath_example.png

You can see the source code and some discussion about this example at Stack Overflow.

Summary

FXGraphics2D 1.1 is a general purpose graphics utility that extends the reach of Java2D code to include JavaFX applications. This latest release improves the quality of the library following community feedback.

Sad to receive news this morning that a long time friend and colleague, Peter Miller, had passed.

Peter Miller

“After fighting cancer for many years, finally lost”. No, not lost; if there was ever anyone who fought the battle of life and won it was be Peter. Even knowing he was at his last days he was unbowed. Visiting him last week he proudly showed us the woodworking plans and cut lists for some cabinets he was making for his wife MT. He had created the diagrams himself, writing C++ code to call manually drive a drawing library, outputting postscript. Let’s see you do architectural drawing without a CAD program. The date on the printout was two weeks ago.

“The world is a less interesting place today,” wrote another friend. No. Peter firmly believed that interest comes from within. The world is there to be explored, I can hear him saying. He taught us to go forth, wonder, and understand. And so we should.

AfC

Project Jigsaw has, for the last several years, been in an exploratory phase in which we’ve designed and prototyped one particular approach to addressing a draft set of requirements.

It’s now time to switch gears and focus on creating a production-quality design and implementation suitable for JDK 9 and thence Java SE 9, as previously proposed.

To begin this phase I’ve drafted a new document to collect goals and requirements. It reflects a new emphasis on security, as motivated by recent experience, it takes into account lessons learned from the prototype, and it’s written at a broader and more abstract level than the previous document so as not to over-constrain the solution space. This document will be one of the starting points of the upcoming Java Platform Module System JSR.

Jigsaw as a whole will bring enormous changes to the JDK; it would be unwise to wait until it’s completely finished before merging any of it. Our intent, therefore, is to proceed in large steps, each of which will have a corresponding JEP. The first three JEPs will propose a specific modular structure for the JDK, reorganize the JDK source code (but not binaries) along those lines, and then later modularize the binary images.

A fourth JEP will introduce the module system itself, which will be aligned with the module-system JSR. It may seem odd that the module system JEP comes last, but the earlier JEPs need make only minimal assumptions about its capabilities, hence work on them can proceed in parallel with work on the module-system JEP and JSR.

Comments, questions, and suggestions are welcome on the jigsaw-dev mailing list. (If you haven’t already subscribed to that list then please do so first, otherwise your message will be discarded as spam.)

There’s an interesting spectrum of events in the technical space. Conferences are the mainstay obviously; usually very intense and high-calibre thanks to the hard work of papers committees and of course the presenters themselves. You become invigorated hearing the experiences and results of other people, sharing ideas in the hallway, and of course the opportunity to vehemently explain why vi is better than emacs over drinks in the bar later is essential to the progress of science.

For a given community, though, conferences are relatively infrequent; often only once a year for a given country (linux.conf.au, Australia’s annual Linux conference, say) and sometimes only once a year globally (ICFP, the international functional programming conference with numerous collocated symposiums and events taking advantage of the fact it’s the one event everyone turns up at is a notable example in computing).

More locally, those in major cities are able to organize monthly meetups, networking events, user groups, and the like. Which are fun; lovely to see friends and continue to build relationships with people you’d otherwise only see once a year.

Finally there are hackfests, often on the order of a weekend in duration. The tend to draw people in from a wide area, and sometimes are in an unusual milieu; Peter Miller’s CodeCon camping and hacking weekends are infamous in the Sydney Linux community; rent a small quiet generator, find a state forest, set up tents and hack on whatever code you want to for a few days. Blissful.

The local monthly events are the most common, though. Typically two or three people offer to give presentations to an audience of 30-50 people. And while hearing talks on a range of topics is invaluable, the fact that so many smart people are in the room passively seems a lost opportunity.

For a while now I’ve been musing whether perhaps there is something between meetups and hackfests. Wouldn’t it be cool to get a bunch of people together, put a problem on the board, and then for an hour go around the room and have a debate about whether the problem is even the right question to be asking, and different approaches to tackling the issue? Something short, relatively focused, and pragmatic; rather than being a presentation of results a consideration of approaches. If we do it in a bit of rotation, each time one person being tasked with framing the question, then over time participants each have the benefit of bringing the collective firepower of the group to bear on one of the problems they’re working.

Needs a name. Seminar? No, that’s what university departments do. Symposium? Too grand. Something more informal, impromptu, but organized. You know, like a jazz jam session. Ah, there we go: gonna call these sessions.

It might be nice to complement the monthly functional programming meetup (fp-syd) that happens in Sydney with something a little more interactive and Haskell focused. And as I’m looking to improve the depth of experience with Haskell in the Engineering group at Anchor, this seemed like a nice fit. So we’re holding the first of the Haskell Sessions tomorrow 2pm, at Anchor’s office in Sydney.

Here’s one to start us off:

Industrial code has to interact with the outside world, often on external dependencies such as databases, network services, or even filesystem operations. We’re used to the ability to separate pure code from that with side-effects, but what abstractions can we use to isolate the dependent code from the rest of the program logic?

I know we’re not the first ones to blunder in to this; I’ve heard plenty of people discussing it. So I’m going to hand around a single page with the type signatures of the functions involved at various points, freshly sharpen some whiteboard markers, and we’ll see what ideas come to light!

If you’re interested in coming, drop me a line.

AfC

Another company is refusing to issue a Java RIA code signing certificate for individual. Even if they openly declare they do in they website. Even after I provided the notary-confirmed copies of all documents they requested and they have had two phone interviews with me. Seems really the end of the project. Dalibor, are you reading this?

I wrote a quick fuzzer for libiberty’s demangler this morning. Here’s how to get and use it:

$ mkdir workdir
$ cd workdir
$ git clone git@github.com:gbenson/binutils-gdb.git src
  ...
$ cd src
$ git co demangler
$ cd ..
$ mkdir build
$ cd build
$ CFLAGS="-g -O0" ../src/configure --with-separate-debug-dir=/usr/lib/debug
  ...
$ make
  ...
$ ../src/fuzzer.sh 
  ...
+ /home/gary/workdir/build/fuzzer
../src/fuzzer.sh: line 12: 22482 Segmentation fault      (core dumped) $fuzzer
# copy the executable and PID from the two lines above
$ gdb -batch /home/gary/workdir/build/fuzzer core.22482 -ex "bt"
...
Core was generated by `/home/gary/workdir/build/fuzzer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000040d5f2 in op_is_new_cast (op=0x7ffffac19930) at libiberty/cp-demangle.c:3064
3064	  const char *code = op->u.s_operator.op->code;
#0  0x000000000040d5f2 in op_is_new_cast (op=0x7ffffac19930) at libiberty/cp-demangle.c:3064
#1  0x000000000040dc6f in d_expression_1 (di=0x7ffffac19c90) at libiberty/cp-demangle.c:3232
#2  0x000000000040dfbc in d_expression (di=0x7ffffac19c90) at libiberty/cp-demangle.c:3315
#3  0x000000000040cff6 in d_array_type (di=0x7ffffac19c90) at libiberty/cp-demangle.c:2821
#4  0x000000000040c260 in cplus_demangle_type (di=0x7ffffac19c90) at libiberty/cp-demangle.c:2330
#5  0x000000000040cd70 in d_parmlist (di=0x7ffffac19c90) at libiberty/cp-demangle.c:2718
#6  0x000000000040ceb8 in d_bare_function_type (di=0x7ffffac19c90, has_return_type=0) at libiberty/cp-demangle.c:2772
#7  0x000000000040a9b2 in d_encoding (di=0x7ffffac19c90, top_level=1) at libiberty/cp-demangle.c:1287
#8  0x000000000040a6be in cplus_demangle_mangled_name (di=0x7ffffac19c90, top_level=1) at libiberty/cp-demangle.c:1164
#9  0x0000000000413131 in d_demangle_callback (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259, callback=0x40ed11 , opaque=0x7ffffac19d70)
    at libiberty/cp-demangle.c:5862
#10 0x0000000000413267 in d_demangle (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259, palc=0x7ffffac19dd8) at libiberty/cp-demangle.c:5913
#11 0x00000000004132d6 in cplus_demangle_v3 (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259) at libiberty/cp-demangle.c:6070
#12 0x0000000000401a87 in cplus_demangle (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259) at libiberty/cplus-dem.c:858
#13 0x0000000000400ea0 in main (argc=1, argv=0x7ffffac1a0a8) at /home/gary/workdir/src/fuzzer.c:26

The symbol that crashed it is one frame up from the bottom of the backtrace.

It was pretty easy to write a new graphical backend for Jainja using the Pepper Plugin API. So it's possible to write Java graphical user interfaces on NaCl now !

A demo is available on the Chrome Web Store.


Bradley M. Kuhn wrote an analysis on the recent Appeals Court Decision in Oracle v. Google. Pointing out who the real winners are and that it will now take years before we will have more clarity:

The case is remanded, so a new jury will first sit down and consider the fair use question. If that jury finds fair use and thus no infringement, Oracle’s next appeal will be quite weak, and the Appeals Court likely won’t reexamine the question in any detail. In that outcome, very little has changed overall: we’ll have certainty that API’s aren’t copyrightable, as long as any textual copying that occurs during reimplementation is easily called fair use. By contrast, if the new jury rejects Google’s fair use defense, I suspect Google will have to appeal all the way to SCOTUS. It’s thus going to be at least two years before anything definitive is decided, and the big winners will be wealthy litigation attorneys — as usual.

You will want to read the whole thing to know why from a copyleft perspective this decision will give that strange feeling of simultaneous annoyance and contentment.

Java browser plugin has been here for a very long time, and for many years it was available on lots of machines. Yet, there were relatively few reports about somebody successfully using any security holes ever discovered.

We are currently under heavy rain of reports about Java applet security exploits on the wild. Some of these are, most likely, true.

How this could be? If some security bug (or fundamental platform weakness whatsoever) already existed for more than a decade, why nobody used if for exploit before? Why intruders spend so much of they time writing exploits of the now rather legacy platform? Where were they using this time before, instead of attacking the platform that at that time was significantly more widespread and relevant?

Jainja is a JVM (Java Virtual Machine) written in Java. Focus is set on portability, not on performances. Jainja supports Java 1.5 features.

This release adds support for Minix, Haiku and Dart.

So Jainja currently works on Linux, Windows, xBSD, Minix, Haiku, Java SE, Android, GWT, and Dart

More infos

 

The JogAmp community held a Ji Gong freedom talk that reminded people to exercise the 4 freedoms granted by the free software licenses in front of the free java developer room audience. The talk also proposed and showcased technical enhancements for High Availability JVM Technology on All Platforms.
Slides from the Ji Gong talk can be obtained at: https://jogamp.org/doc/fosdem2014/

During the same week JogAmp released version 2.1.4 of its high performance java opengl audio & media processing librarys.
This release includes some new highlights:
* Android OpenCL test apk’s. This enable you to compile and test an OpenCL JOCL application on desktop and then deploy on Android without using any OpenCL SDK for the phone, the JOCL binding will locate and bind the OpenCL drivers at runtime.
* Enable use of custom mouse pointers and window icons using the NEWT window and input toolkit.
* Multi window support on the Raspberry Pi including mouse-pointer use directly from console!
Complete list of bugs resolved for this 2.1.4 release can be found at:
https://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.1.4

JiGong-Panorama-extracted-from-video Panorama-of-JiGong-JogAmp-talk-audience-at-FOSDEM-2014-Free-Java-Devroom 14020010 14020025 14020026 14020034 14020069 JamVM-OpenJDK8-FOSDEM-2014-panorama 14020032 14020027

Last weekend I’ve been talking about the Shenandoah GC at FOSDEM 2014. I announced the availability of the Shenandoah source code and project pages. Until Shenandoah becomes a proper OpenJDK project, it will be hosted on IcedTea servers. We currently have:

We also filed a JEP for Shenandoah, here you can find the announcement and discussion on hotspot-gc-dev.

If you are interested in the slides that I prsented at FOSDEM, you can find them here.

Implementation-wise we’re making good progress. Concurrent evacuation is working well and support for the C1 compiler is almost done.