2013-04-29

今度の Fedora 19 は…

7 月にリリースされる予定の Fedora 19 についてですが、開発コードネームはちょっと意味深な Schrödinger's Cat(シュレディンガーの猫)になっています。例年だと、ゴールデンウィークの頃には、次のリリースのβ版か、RC 版が出ていて試すことができる時期ですが、現 Fedora 18 のリリースが今年の 1 月 15 日と、2 ヶ月ほど遅れた影響で、Fedora 19 のリリースもズレてしまっています。α版が 4 月 23 日にリリースされましたが試す勇気はありません。リリーススケジュールは遅れるのが常ですので、今度はきっと、お盆休みぐらいが Fedora 19 へ移行するのに良い時期になるのでは、と予想。

さて、Fedora 19 に収録されるパッケージの目玉は、Releases/19/FeatureList によると以下の通りです。個人的に興味があるものについては、行を薄い赤の背景色にしました。

Name Summary
3D Printing Bring 3D printing tools to Fedora and allow users of 3D printers, such as RepRap, to be fully satisfied with software in the repositories, without having to download binary blobs or run Python code from git.
AnacondaNewUI Followup The purpose of this feature is to describe the high level work items we have for anaconda related to newui in F-19.
Anaconda Realm Integration Kickstart will have a 'realm join example.com' command, to join the machine during install to an AD or FreeIPA domain. This will take place using one time passwords or password-less joins to an AD or FreeIPA domain.
BIND10 BIND10 is next generation of the popular BIND9 DNS server rewritten from scratch. BIND10 suite includes both DNS and DHCP service servers.
CUPS 1.6 Update CUPS to the latest upstream release and use PDF rather than PostScript as baseline document format.
Checkpoint/Restore Add support to checkpoint and restore processes. Checkpointing processes can be used for fault tolerance and/or load balancing.
Developers Assistant Perform a series of various changes to improve developer experience on Fedora.
Dracut HostOnly Only create "host-only" initramfs images. A generic fallback image will be generated, if it does not exist and never ever be removed.
Erlang/OTP R16 Update Erlang to the upstream R16 release.
Fedora 19 Boost 1.53 Uplift This feature brings Boost 1.53.0 to Fedora 19.
Federated VoIP Make it easier for the deployment of federated SIP and XMPP (Jabber) networks, functioning much like federated SMTP email.
firewalld Lockdown This feature adds a simple configuration setting for firewalld to be able to lock down configuration changes from local applications.
firewalld Rich Language This feature adds a rich (high level) language to firewalld, that allows to easily create complex firewall rules without the knowledge of iptables syntax.
First-Class Cloud Images This feature expands Fedora's current cloud image deliverables beyond just EC2, and overhauls how they are produced. The goal is to produce cloud images for EC2 and other cloud deployments for the Alpha, Beta, and Final compose process and distribute them on the mirror network. There will also be nightly or weekly image builds for Rawhide to assist with early development. All images should be constructed using a newer generation of tools.
FreeIPA Two Factor Authentication Provide Kerberos enabled, LDAP replicated, two-factor authentication for FreeIPA.
GCC 4.8.x Switch GCC in Fedora 19 to 4.8.x, rebuild all packages with it.
GLIBC 2.17 Switch GLIBC in Fedora 19 to GLIBC version 2.17
GNOME 3.8 Update GNOME to the latest upstream release
Guile2 Update GNU Guile to version 2.0.7 in Fedora 19.
High Availability Container Resources The Container Resource feature allows the HA stack (Pacemaker + Corosync) residing on a host machine to extend management of resources into virtual guest instances (KVM/Linux Containers) through use of the pacemaker_remote service.
FreeIPA v3 Trust Improvements Multiple Domain Controllers and multiple additional DNS domains managed by FreeIPA can now be accessible via trusting relationship by Active Directory domain members. Additionally, Global Catalog service is provided for use by AD clients, allowing FreeIPA users to be included into access-control lists of AD resources.
Features/JRuby 1.7 JRuby is an alternative Ruby implementation with fast growing user base due to its great performance in parallel tasks. Although JRuby 1.6.7 is already in Fedora, this feature brings in new minor version and better Fedora integration.
Java 8 Add a tech preview preview of the the upcoming version of Java (OpenJDK8) to Fedora 19
KDE Plasma Workspaces 4.10 Rebase to KDE Plasma Workspace 4.10 including Plasma Desktop and Netbook workspaces, the KDE Applications and the KDE Platform.
KScreen Replace current KDE screen management software by KScreen.
Less Brittle Kerberos Make kerberos in Fedora simpler to use by removing some of the brittleness that are common failure points. In particular we remove the need for kerberos clients to sync their clocks, and remove the need to have reverse DNS records carefully setup for services.
MATE Desktop 1.6 MATE Desktop is based on GNOME 2 and provides an intuitive and attractive desktop to Linux users who seek a simple, easy to use traditional interface.
MEMSTOMP Include the MEMSTOMP DSOs in Fedora 19 to enable developers to more quickly detect certain library calls which result in undefined behaviour due to overlapping memory arguments.
MinGW GCC 4.8 Update the mingw-gcc cross-compiler to gcc 4.8 and rebuild all MinGW packages against it
More Mobile Broadband New mobile broadband devices supporting multiple technologies (eg, CDMA/EVDO/LTE and/or GSM/UMTS/LTE) and using new proprietary protocols are becoming common in the marketplace, and are not well supported by ModemManager 0.6 and earlier. We developed ModemManager 0.7/0.8 with a new API specifically to address this issue and to be more compatible with future mobile broadband devices.
NFStest Provides a set of tools for testing either the NFS client or the NFS server, most of the functionality is focused mainly on testing the client.
New firstboot This feature proposes new initial setup application with better integration to the NewUI anaconda and to Gnome Initial Experience.
Node.js The Node.js JavaScript runtime and associated ecosystem, including the npm package manager.
Ease Of Use: System Management with OpenLMI Add providers and capabilites to the OpenLMI infrastructure that would ease the remote system management.
OpenShift Origin OpenShift Origin is a cloud application platform as a service (PaaS). It is the open sourced, community supported version of OpenShift
OpenStack Grizzly OpenStack will be upgraded to the next major stable release, called "Grizzly". In addition the new OpenStack "heat" and "ceilometer" incubation projects will be included.
Feature Name: Performance Co-Pilot Feature Update A new feature release of PCP (Performance Co-Pilot).
PHP 5.5 To provide the latest PHP stack.
Pillow Replace PIL (python-imaging) with Pillow, an actively maintained fork which is also heading for python3 compatibility
QXL/Spice KMS Driver Currently the QXL driver is X.org only, a KMS driver is required to move forward with projects like spice 3D, and also to allow more features to be show in virt environments like plymouth.
Update RPM to 4.11 Update RPM to 4.11 in Fedora 19.
Realmd FreeIPA Support realmd currently supports discovery and configuring of Active Directory domains. With this feature it will also include support for FreeIPA domains.
Remove PyXML from Fedora The goal of this Feature is to remove the PyXML package from Fedora.
Replace MySQL with MariaDB MariaDB, a community developed fork of MySQL, will be the default implementation of MySQL in Fedora 19.
Ruby 2.0.0 Ruby 2.0.0 is the latest stable version of Ruby, with major increases in speed and reliability. With this major update from Ruby 1.9.3 in Fedora 18 to Ruby 2.0 in Fedora 19, alongside JRuby, Fedora becomes the superior Ruby development platform.
Ryu Network Operating System Ryu Network Operating System http://osrg.github.com/ryu/
SSSD improve AD integration The next major release of SSSD will include support for more advanced AD features for domain members. This includes site support and trusted domains. Additionally it will include a plugin for the cifs-utils package which would allow a CIFS client to use SSSD for lookups which were currently only possible with winbind.
Scratch for Fedora Scratch is an educational programming environment which makes it easy to create games, animations, and art. It's open source and would be a great addition to Fedora.
Shared System Certificates Make NSS, GnuTLS, OpenSSL and Java share a default source for retrieving system certificate anchors and black list information. This is an initial but useful step in the direction of a comprehensive solution.
Simplify Java/Maven Packaging using XMvn Introduce new Maven packaging tooling with new macros, automated install section and more
Syslinux Option This feature will make Syslinux an optional bootloader for Fedora, in kickstart and via a hidden Anaconda option. When used this way, it will replace grub2.
systemd Calendar Timers systemd has supported timer units for activating services based on time since its inception. However, it only could schedule services based on monotonic time events (i.e. "every 5 minutes"). With this feature in place systemd also supports calendar time events (i.e. "every monday morning 6:00 am", or "at midnight on every 1st, 2nd, 3rd of each month if that's saturday or sunday").
systemd Lightweight Containers For a longer time systemd already included the systemd-nspawn tool as a more powerful version of chroot(1), primarily inteded for use in development, experimenting, debugging, instrumentation, testing and building of software. With Fedora 19 we want to make nspawn considerably more useful, so that it can easily be used to start containers capable of booting up a complete and unmodified Fedora distribution inside as normal system services.
systemd Message Catalog Logging is essential for finding and tracking down system problems. Just finding and tracking them down however is seldom enough to actually get them fixed. With Journal Message Catalogs we want to link helpful meta information directly to many log messages applications generate, keyed off an ID identifying the type of message. This localized meta information can help the user to fix the problem, refer him to additional documentation, or even inform him where to get further help.
systemd/udev Predictable Network Interface Names The udevd service has a long history of providing predicatable names for block devices and others. For Fedora 19 we'd like to provide the same for network interfaces, following a similar naming scheme, but only as fallback if not other solution such as biosdevname is installed or the administrator manually defined network interface names via udev rules or the old network scripts.
systemd Resource Control systemd already has support for assigning specific resources to system services using various configuration settings. With Fedora 19 we'd like to build on that, and add the ability for the admin to dynamically query the resource control parameters and change them at runtime.
Systemtap 2.2 A new feature release of Systemtap
Thermostat 1.0 Improved monitoring and serviceability tool for Java applications
Trusted Network Connect (TNC) This feature provides Trusted Network Connect(TNC) framework that can be used to assess and verify end clients' system state (such as network ports/firewall status or legitimate binaries) and its compliance to a predefined policy with existing network access control (NAC) solutions.
Virt Storage Migration Migrate a running virtual machine from one host to another, including in use storage, with no downtime. No need for a shared storage location between the two.
Virtio RNG Provide a paravirtual random number generator to virtual machines, to prevent entropy starvation in guests.
Add LVM Thin provisioning support to the yum-fs-snapshot plugin For the purposes of system rollback: Provide the ability to create a snapshot of all thinly provisioned LVM2 volumes associated with FS mount points that are relevant to a yum transaction.
Yum Groups as Objects Change the default yum configuration from group_command=compat to group_command=objects.
GSS Proxy The main purpose of this project is to replace rpc.svcgssd(8), the server-side rpcsec_gss daemon.
libkkc libkkc, a new Japanese Kana Kanji input library, will be available in Fedora 19, along with an IBus input method engine which uses libkkc as backend (ibus-kkc). ibus-kkc will be the default Japanese input method in place of ibus-anthy.

関連サイト

  1. 2013年4月24日 “シュレディンガーの猫”がやっとお目覚め─Fedora 19アルファ版がリリース

2013-04-02

【備忘録】jOpenDocument

Java で利用できるスプレッドシートのクラスが公開されていないかと探しているのですが、なかなか手頃なものが見つかりません。スプレッドシートと言っても、Excel のような高機能なものではなく、シンプルで好きなように加工しやすいものが欲しいのですが、いつもオープンソースで公開されていることを期待するのは、ちと虫のいい願いなのかもしれません。ここは諦めてスクラッチから自作するしかなさそうです。

目的とするものには出会えていませんが、jOpenDocument という面白そうなライブラリを見つけたので備忘録として紹介します。

jOpenDocemt は、OASIS で標準化された OpenDocument フォーマットを操作するための Java で記述されたライブラリです。ライセンスは GPL か(二種類の)商用ライセンスで配布されています。今回試したバージョンは jOpenDocument-1.3rc2.jar (Version 1.3 rc 2, March 11, 2013) です。Java 6 以上の環境が必要です。

使用環境

  • OS : Fedora 18 (Linux)
  • JDK : jdk-1.7.0_17-fcs.x86_64
  • IDE : NetBeans IDE 7.3
  • (libreoffice-calc-3.6.5.2-8)

以下は、紹介されているサンプルそのままを自分の環境にコピーしたものです。

package jopendocumenttest;

import java.io.File;
import java.io.IOException;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import org.jopendocument.dom.OOUtils;
import org.jopendocument.dom.spreadsheet.SpreadSheet;

public class JOpenDocumentTest {

    public static void main(String[] args) throws IOException {
        // Create the data to save.
        final Object[][] data = new Object[6][2];
        data[0] = new Object[]{"January", 1};
        data[1] = new Object[]{"February", 3};
        data[2] = new Object[]{"March", 8};
        data[3] = new Object[]{"April", 10};
        data[4] = new Object[]{"May", 15};
        data[5] = new Object[]{"June", 18};

        String[] columns = new String[]{"Month", "Temp"};

        TableModel model = new DefaultTableModel(data, columns);

        // Save the data to an ODS file and open it.
        final File file = new File("temperature.ods");
        SpreadSheet.createEmpty(model).saveAs(file);

        OOUtils.open(file);
    }
}

実行例を以下に示しました。

プログラムを実行すると、自分の環境にインストールされている LibreOffice Calc が起動されます。これは作成した文書の内容を確認するためです。プログラムの主目的は文書を作成する事です、一応念のため。

何かオフィス系の文書などの作成業務を自動化できる用途に威力を発揮できそうです。

参考サイト

  1. jOpenDocument Homepage. Open Document library

2013-04-01

NetBeans IDE で Commons Math を試す

Cmmons Math a. は 、Apache のトッププロジェクトである Apache Commons にある Apache Commons#Commons Proper に属する、数学と統計学の軽量コンポーネントです b.Apache License Version 2.0 に従って配布されています。いろいろなコンポーネントを利用できますが、まずは、今までの流れで多項式係数を最小二乗法で求めてみます。

JLAPACK の時と同じサンプル、100000 組の xy が対になっているデータ fdata01.zip (fdata01.txt) を使って、JLAPACK の時と同じように c.、次の 4 次の多項式でフィッティングするために、その係数 c0,  c1,  c2,  c3,  c4 を最小二乗法で求めます。

y = c0 + c1x + c2x2 + c3x3 + c4x4

使用環境

  • OS : Fedora 18 (Linux)
  • JDK : jdk-1.7.0_17-fcs.x86_64
  • IDE : NetBeans IDE 7.3

以下が Commons Math を利用したサンプルプログラムです。なお、使用した Commons Math は Version 3.1.1 (09 January 2013) です。なお、Java 1.5 以上が必要です。

package commonsmathtest;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import org.apache.commons.math3.stat.regression.OLSMultipleLinearRegression;

public class CommonsMathTest {

    public static void main(String[] args) {
        int m = 100000, n = 5;
        double X[][], y[];
        X = new double[m][n];
        y = new double[m];

        File file = new File("/home/bitwalk/work/ex101_01/fdata01.txt");

        try (BufferedReader br = new BufferedReader(new FileReader(file))) {
            String str;
            int i = 0;
            while ((str = br.readLine()) != null) {
                double xValue = Double.parseDouble(str.substring(0, 6));
                y[i] = Double.parseDouble(str.substring(6, 20));
                for (int j = 0; j < n; j++) {
                    X[i][j] = Math.pow(xValue, (double) j);
                }
                i++;
            }
            br.close();
        } catch (FileNotFoundException e) {
            System.out.println(e);
        } catch (IOException e) {
            System.out.println(e);
        }

        OLSMultipleLinearRegression regression = new OLSMultipleLinearRegression();
        regression.setNoIntercept(true);
        regression.newSampleData(y, X);

        double[] c = regression.estimateRegressionParameters();
//        double[] residuals = regression.estimateResiduals();
//        double[][] parametersVariance = regression.estimateRegressionParametersVariance();
//        double regressandVariance = regression.estimateRegressandVariance();
        double rSquared = regression.calculateRSquared();
//        double sigma = regression.estimateRegressionStandardError();

        // Result
        System.out.println("# of DATA\t" + m);
        System.out.println("Coefficients");
        for (int j = 0; j < n; j++) {
            System.out.println("C(" + j + ") =  " + c[j]);
        }
        System.out.println("R-squared = " + rSquared);
    }
}

この線形重回帰式を求めるクラスでは、デフォルトでは切片項 c0 = c0 × x0x0 をモデル行列 X に含める必要はありません。含める場合は、setNoIntercepttrue にする必要があります d.。このサンプルでは他のサンプルとやり方を揃えるために true としています。

実行例を以下に示しました。ここでは R2 (決定係数)も計算しています。

run:
# of DATA 100000
Coefficients
C(0) =  37.76585776133079
C(1) =  0.04968384703750148
C(2) =  6.988983959849906E-6
C(3) =  -4.217424916004741E-7
C(4) =  2.686562674530066E-10
R-squared = 0.7654053656031088
ビルド成功(合計時間: 1秒)

同じ次数で比較した場合、JAMA より時間がかかっているように見えますが、n を大きくすると(すなわち、多項式の次数を大きくすると)計算速度に違いが見られ、JAMA よりは速いが、JLAPACK には劣ると言ったところです。しかし、線形問題ばかりでなく、他の機能もいろいろと揃っているので使い甲斐がありそうです。

参考サイト

  1. Commons Math: The Apache Commons Mathematics Library
  2. Apache Commons Math
  3. NetBeans IDE で JLAPACK を試す (2)
  4. The Commons Math User Guide - Statistics 1.5 Multiple linear regression
  5. bitWalk's workshop - CommonsMath