Category Archives: Gentoo

Stop Social Distributed Version Control Diaspora!

A ton of people use github, gitorious, and bitbucket these days.  Aside from the obvious benefits of dVCS, these sites have excellent features such as:

  • Code review
  • Merge requests
  • Repository “forking” (in a good way)/cloning and easy methods to let upstream know about your branch
  • Project following/notification

Basically, the buzzword they billet this as is social coding.  The idea isn’t entirely new considering mailing lists with patches have been in use for ages, but the new interfaces are intuitive and visually appealing.

The problem?  Walled garden.  One system doesn’t work with the other.  Worse if you want to run your own project infrastructure.  You’d think as FOSS programmers we’d know better than this and not fall into the same pitfall that social networks are currently in.

I plead with you, social coding providers, come together and create a universal API in which we can uniformly share and exchange information such as followers, branches, notifications, and merge requests.

I believe this situation is important enough to warrant the attention of community leaders.  I have sent email to the Free Software Foundation and The Linux Foundation asking for guidance.   If you would kindly pass this along to them and members of Canonical, Debian, and other large FOSS groups we will stymie community fragmentation and develop a way to further the openness that has allowed the creation of such fantastic tools.

Sincerely,
The Undersigned Free Software Advocates: place comment on this entry

———-

Edit #1: Response to a couple frequently asked questions:

  • The idea is to keep the information open, free, and interchangeable as information is what these sites add. We’ve had public VCS repos and web interfaces for ages.  The fact that gitorious is open source does not address this.
  • The value of these sites is the social factor, and for the most part they bottle it up. If you prefer github, but a project you want to follow uses gitorious (like Qt), there is no means of exchanging the social factor.  This is nearly identical to facebook->Diaspora.While some of these sites do have extended APIs, we need to come together and make sure that they inter-operate and also work with self-hosted systems like trac and redmine.

Edit #2: A good summary of what needs to be done on reddit.

Edit #3:  A response from Richard Stallman, Atlassian (bitbucket), and github!

An email from RMS:

> There is a chance to increase openness and productivity by making these
> systems as well as self-hosted solutions such as trac, redmine, and
> reviewboard inter-operate. Developing a standard protocol for the social
> features such as clone notification, merge requests, and commit comments
> would also make integration into the commandline and GUI tools easily
> possible.

It seems like a good idea to me, to the extent it is feasible. I
don’t know how these tools work, but I think that most of them use
communication protocols based on their data formats, which are unique
to each program. So we could only unify the aspects of the protocols
which don’t depend on those internal data formats. But that much
could be useful.

Both Atlassian and github saw this as a valid point and were not opposed to such a standard but did not indicate they were working toward anything. Can anyone advise on how to start a working group or RFC to define such a protocol?

Software Freedom Day 2010 – Gentoo Linux

I’m doing a presentation/Q&A for Software Freedom Day 2010 in Charleston, SC.  CSCLUG is putting on the event.

Here is the presentation.  Feel free to use or modify this under the terms of CC-SA3.0.

KDE SC 4.4 – Steady, Incremental Improvements

I haven’t noticed any killer features in KDE SC 4.4 and I’ve been running it since Beta 1. I’ve noticed a lot of subtle improvements.  Things like app stacking and selection in the task bar seem much more responsive.  All around, plasma looks subtly better and my favorite KDE apps seem to just keep getting better.

KSysGuard is really impressive and now has the ability to connect to remote hosts for monitoring.  However, the biggest change is in the greater ecosystem.  It seems all the external apps like Amarok, K3b, and digiKam are coming along to fruition.

Other than that, this is a smooth release and shows that the platform is starting to mature.  I think the Summer release distros will be able to do a good job delivering a nice desktop experience based on KDE 4.4.  I’ll end with my obligatory “try KDE 4.4 if you had previous bad KDE4 experiences”.

2010 SpamAssasin Public Service Announcement

If you run a public mail server, there is a good chance you run SpamAssassin.

There is a New Year’s SNAFU in which any dates 2010+ are marked “grossly in the future”.  That is a problem since it is now 2010.

Run sa-update and restart SpamAssassin ASAP, or install the following rule to local.cf:

score FH_DATE_PAST_20XX 0.0

Thanks to LWN for pointing this out to me before too much damage was done.

Sun Ultra 27 Review – The Ultimate Linux Workstation

Sun Microsystems has a powerful and favorably priced entry in the x86 workstation space with the Ultra 27.  Such is the power of this workstation and its natural fit for *nix workloads, combined with a compelling price tag, I pronounce it the Ultimate Linux Workstation in its class.  He’s a short overview and review as well as a video entry at the end.

Ultra 27 Front View

Ultra 27 Front View

The Ultra 27 is a single socket system but packs a powerful quad core punch. With the Nehalem Xeon (similar to the consumer Core i7), markets that used to demand dual socket systems can now comfortably look to cheaper single socket alternatives. With the return of HyperThreading, the chip handles 8 hardware threads and unlike its previous guise in the Pentium 4, HT contributes noticeably and favorably to performance.  Due to the extreme performance and number of execution threads, I think the Nehalem Xeon represents a paradigm shift where most high end systems will no longer carry two discrete CPUs.

The Ultra 27 competes in the same league as the Lenovo ThinkStation S20, HP Z400, Mac Pro Quad and various other boutique workstation manufacturers. Through channel vendors, all but the Mac can be comfortably configured for around $2000.

The price of this system is attractive and affordable to anybody who makes their livelihood off of professional computing. The components on a workstation like this are well engineered and thoroughly tested together. 3rd party vendors will also commonly certify software and hardware against popular workstation offerings. The Ultra 27 is comfortably expandable and can be equipped with Intel’s best CPUs on the market, plenty of disk, and high end graphics. With two PCIe2 16-lane slots and ample cooling and power, the Ultra 27 has a lot to offer anyone in digital content creation, CAD, CAM, CAE or other visualization activities. With the speedy Nehalem chip and 4 disk bays programmers doing large builds or staging large applications should be more than content.

Ultra 27 Rear View

Ultra 27 Rear View

The Ultra 27 comes in a robust light gray case.  The Spartan design is free of all the unsightly plastic that usually adorns HP machines and looks more substantial than either the Lenovo or HP competition.  The interior isn’t quite as beautiful as the Mac Pro’s, but there is plenty of room and the internal drive bay keeps any need for user cable management to a minimum.

Ultra 27 Inside Overview

Ultra 27 Inside Overview

My configuration is as follows:

  • Intel Xeon w3570 Quad Core at 3.20GHz (has intel Turbo Boost to 3.46GHz)
  • 6GB RAM ECC DDR3-1333
  • nVIDIA Quadro FX 380 graphics
  • 500GB 7200 RPM SATA hard disk
Ultra 27 Drive Bay

Ultra 27 Drive Bay

I am upgrading from a previous IBM IntelliStation A Pro which had two physical single core AMD Opteron CPUs.  The increase in performance is remarkable.

It is noteworthy that this system is much quieter than my previous.  Indeed, the large fan is seldom audible even under heavy load.   The heat output is negligible and the components have never been more than warm to the touch even after hours of maximal CPU usage.

Ultra 27 Main Board

Ultra 27 Main Board

The case is for the most part toolless and very clean and spacious inside.  Every aspect of the system can be easily upgraded so the Ultra 27 should be a good investment and grow with time and requirements.

Ultra 27 Case Diagram

Ultra 27 Case Diagram

With well engineered hardware and plenty of power, the Ultra 27 is awesome as a general UNIX-class workstation.  I am happily running Gentoo and even the largest builds are a cakewalk for this box.  I push my computer harder than most people.  Commonly running several browser instances loaded with tabs, several terminals, email, music, the Eclipse IDE, and more, interactivity has not diminished even when running parallel compiles.

I’ll conclude that anyone looking at the Mac Pro should consider the alternative in machines like the Sun Ultra 27.  This computer represents a latest in a powerful linage of Sun workstations and is ideal for just about any demanding workload you can throw at it.

DRBD merged with kernel 2.6.33

DRBD has been a long standing external patch in many distribution kernels.  It has finally been merged in the 2.6.33 window.  Colloquially the “Distributed Redundant Block Device”, this piece of code allows you to mirror blocks of storage across multiple nodes.

drbd_overview

This is primarily useful in high availability setups.  By synchronously mirroring storage across two systems, you can run an active-passive cluster where the backup machine will take over if the primary fails.  Using a more advanced clustering file system such as GFS2 or OCFS, you can even do active-active setups although there are certain considerations there.

This is exciting because it alleviates the need for specialized hardware like SAN storage.  Standard Linux servers with direct attached storage may be used and indeed even give appreciable performance.  In practice, redundancy will be even greater than all but the highest end SAN equipment due to the lack of single point of failure.

DRBD also allows for asynchronous mirroring, that is, writes to the primary do not wait on completion to the secondary.  This is useful for cold site backups and perhaps meeting legal compliance in certain industries as well.

Take a look at the DRBD site for more information and use cases.

Getting Beautiful Fonts in Gentoo Linux

Here’s my easy and modern guide to getting pleasant looking fonts on Gentoo with minimal effort.

Wikipedia rendered with the end result of this guide

Wikipedia rendered with the end result of this guide

USE Flags

Enable the following USE flags:

euse --enable truetype type1 cleartype corefonts

and make sure everything is built with them enabled:

emerge -uDNa world

Emerge Fonts

X.org and other apps should pull in some common fonts.  Here are some additional fonts useful for OpenOffice and other programs.  Dejavu provides excellent default fonts which we will enable in the next section.

app-admin/eselect-fontconfig
media-fonts/corefonts
media-fonts/dejavu
media-fonts/font-bh-ttf
media-fonts/font-bh-type1
media-fonts/freefonts
media-fonts/ttf-bitstream-vera
media-fonts/unifont
media-fonts/artwiz-aleczapka-en

Enabling fontconfig options

Use ‘eselect fontconfig list‘ to see a list of available configuration options.

eselect fontconfig list

eselect fontconfig list

Try enabling the following with ‘eselect fontconfig enable <num from list above>’:

10-autohint.conf
10-sub-pixel-rgb.conf
20-unhint-small-dejavu-sans-mono.conf
20-unhint-small-dejavu-sans.conf
20-unhint-small-dejavu-serif.conf
25-unhint-nonlatin.conf
57-dejavu-sans-mono.conf
57-dejavu-sans.conf
57-dejavu-serif.conf

This will give you very nice hinted fonts suitable for the great majority of RGB LCD displays.

The 57- series rules enable dejavu fonts as the default Serif and Sans Serif fonts.  This will improve the look of your desktop environment and programs like Firefox immediately.

~/.fonts.conf

This file controls your user fontconfig settings.  We will reiterate RGB hinting and disable it for bold fonts so they are not overly bold.  There are plenty of other tricks you can perform in this file to get more Windows-like text, but I’m quite satisfied with the following and find it very easy to read.

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
 <edit mode="assign" name="rgba">
 <const>rgb</const>
 </edit>
 </match>
 <match target="font">
 <edit mode="assign" name="hinting">
 <bool>true</bool>
 </edit>
 </match>
 <match target="font">
 <edit mode="assign" name="hintstyle">
 <const>hintfull</const>
 </edit>
 </match>
 <match target="font">
 <edit mode="assign" name="antialias">
 <bool>true</bool>
 </edit>
 </match>
 <!-- Disable autohint for bold fonts so they are not overly bold -->
 <match target="font" >
 <test compare="more" name="weight" >
 <const>medium</const>
 </test>
 <edit mode="assign" name="autohint" >
 <bool>false</bool>
 </edit>
 </match>
</fontconfig>

Conclusion

Please share any thoughts and tips in the comments.  I recommend browsing the X.org Font Guide on Gentoo Wiki, though some of the information there is out of date or more complex than the method I just outlined.

Java: The Good Parts

javascript-the-good-partsA while back, a book entitled JavaScript: The Good Parts made waves on the internet, especially social networking sites.  This book purported to show the inner beauty of a language that was long considered second or third rate, coming of age.  With the advent of toolkits like JQuery, Javascript/AJAX development has become easy and even fun.

I aim to do the same by showing “Java: The Good Parts” here at a high level.java_powered_logo_rgb

When I was younger, I used to despise Java for political reasons and bad memories of early applets and applications.  I suspect many users and developers (especially Libre software devs!) are on the same boat.  By the end of this article, I hope I swayed your opinion or at least caused you to reevaluate your bias.  I also wish to encourage further discussion about these points and ways we can improve any deficiencies.

Rough and Tumble Upbringing

When Java first started gaining popularity, it was loudly hyped as the end all language.  It was expected that Java would take the “rich client” by storm, and applets would be the go to solution for enhancing web pages.  What happened was a bit different.  Java floundered and struggled to find a niche.  On the client side, AWT apps looked horrendous despite using native widgets.  Then Swing came about and despite easing development, it looked equally bad on all platforms (by default).  Applets were basically a stillbirth.  The ugly gray box, loadtime sometime measuring in minutes, and no coordination with the DOM and web browser made the average user hate Java.

One area Java was able to develop and secure a foundation, however, was the back end of large web applications.  The Virtual Machine approach provided a marked advantage over the CGI and interpreted scripts of the day.  Java’s rich networking libraries, clean Object Oriented design, and safety made this the language de jour for large web applications.

Open Source Matters

In my opinion, the open sourcing of Java during its early infancy would have had little impact on most of the teething issues.  The Virtual Machine, JIT, and Garbage Collection required many years of tuning to get acceptable performance and Sun did an acceptable job keeping it under wing.  The relatively limited CPU and RAM of the mid ’90s also made these concepts a bit ahead of their time.  Somewhere in the 1999-2002 time frame, though, Sun really dropped the ball.  An Open Source Java would have led to ubiquity on the booming Linux platform and a chance for all sorts of cross-platform software.

Open Source matters, and not just for the source code.  Open Source projects naturally bring about very pragmatic and intelligent developers.  These are the folks that thoroughly enjoy their hobby, work, and tools.  The marketing guys and pointed haired bosses have much less pull here.  On one hand, a vibrant community built itself with the many Apache Software Foundation projects.  However, most of these were squarely focused on web applications or low level things such as build tools, testing frameworks, and message buses.

ThumbsUpDue to the void, interpreted languages such as Python rose to the challenge while C and C++ remained the mainstay for applications programming.  Microsoft started dominating Windows development with their .NET CLR languages.  The glib/Gtk+ and Qt toolkits brought about a renaissance in cross-platform development with C and C++ respectively [though not limited].

It wasn’t until the open-sourcing of SWT that GUI development in Java became attractive.  The obvious killer apps here were the Eclipse IDE and the Azureus (now Vuze) bittorrent client.

Sun’s closed grip of Java really stagnated any chance of abundant expansion in these middle years (2001-2006).  Microsoft leveraged this weakness to create the excellent .NET platform and associated languages to maintain their closed platform and market dominance.  The counterbalance that would have been Java was thus left playing catchup.

We are just beginning to see the fruits of this labor from 2006 through today.  The OpenJDK project is now distributed with popular Linux distributions such as Ubuntu and Fedora.  We finally have decent browser plugins and Java Web Start applications across 32 and 64-bit machines.  The Java deployment problem will slowly fade from memory.

Application Development

SWT made Java apps beautiful.  OpenJDK should make them ubiquitous.  We finally have an Open Source platform that is widely deployed.  The strong built in standard library and clean OO design patterns of Java make it a very pleasant host for developing rich client apps.  Obvious areas for improvement here include better layout/form design tools and closer integration with upstream Linux distributors.

qt-logoSomewhere along the line, Trolltech/QT Software (now owned by Nokia) released Jambi — the complete Qt bindings, GUI framework, and incredibly rich library — for Java.  Oddly, this bombshell received little of the community and fanfare I thought it would or deserves.  Indeed, QT Software demoted Jambi from their teir-1 platforms and hopes the community will pick it up.  I hope this project isn’t allowed to stagnate as there is a lot of potential here.

Web Apps

Along the “Enterprise Web Application” lineage of Java, we wound up with some disgustingly overcomplicated and bloated frameworks for building web apps.  Ruby on Rails and Python Django came about and put a new spin on the development of rapid and robust web apps.  The learning curve of these frameworks is much less than Java EE and I will go as far as saying they are more capable because of it.

By using Java, JSP, and Servlets directly on top of a light Model-View-Controller, I believe Java is just as compelling as some of the more popular scripting languages.  Developers need to know they can trim the fat and that there are many advantages to developing in Java, namely because of the next topic…

Dynamic Languages, its all about the VM

It’s all about the JVM stupid!  One of the best features of Java and .NET are the underlying Virtual Machines.  By using JIT compiled VMs, Java code has a distinct advantage over the common interpreted languages such as Perl, Python, and PHP.  In the case of Java, the resultant is even naturally crossplatform.

The really interesting developments here focus on extending the JVM to syntax and paradigms other than the statically typed C++ lookalike.  Clojure and Scala deliver innovative new techniques while Jython and JRuby bring these excellent languages to the Java software platform and virtual machine.

In short, Java provides everyone with a counter to Microsoft’s .NET CLR.  The Java VM has been around the block and tuned by giants such as Sun, IBM, Oracle, SAP and more.

I call on the community to discuss how we can encourage use of the JVM for languages other than Java and build this into a defacto runtime.  Continued tuning and integration with Windows, Mac OS X, and Gnome/KDE *NIX systems is paramount.  Research for easy multi-core development is also worthwhile.  Meanwhile, distributions need to continue packaging the JRE and make it a default.  Individual developers need to be made aware of “Java: The Good Parts” and myths debunked.

Applets, Rich Media, Native Code!?

javafx_logoWith the release of Java FX, widespread deployment of the JRE, and better browser integration, Java has set the stage for a comeback to its roots.

During the late ’90s and 2000s, Adobe Flash became the tool of choice for web animation and interactive pages.  It really exploded with the advent of Youtube and other internet streaming sites making use of the Flash video format.  Unfortunately, Flash player is notoriously insecure, resource intensive, and crash-prone.  It is also not widely available for the millions of smartphones that have become more accessible than computers.

Luckily, there seems to be a shift back to the browser with new developments in AJAX, JavaScript, and HTML.  The <video> tag will hopefully make video as easy and portable as graphics are today in the browser.  Clean JavaScript libraries and fast JIT JS engines make it practical to use this paradigm for many domains.

Yet one must acknowledge that somewhere along the line, manipulating a DOM/markup language with a scripting language isn’t the most effective development platform for everything.  Google even thinks it poignant to run x86 machine code in a sandboxed environment in your browser.  I personally fail to see the logic behind this.  Java provides a well evolved, cross-platform solution.   Java can run on your ARM powered Android.  Requiring an x86 CPU just seems like the wrong track in this modern age.  Hopefully JavaFX will pick up the slack and return Java to its roots.  I would love to see the demise of the terrible Flash plugin.

Future and Conclusion

It’s time we considered Java for The Good Parts.

I hope some of my points caused you to reevaluate any bad preconceptions or past experiences you may have had with Java.  Java has undergone great change since its birth and I think it is capable of becoming the premier development platform for applications programming of all types.  Particularly interesting are some of the new languages such as Scala and Clojure.  Java has long been a staple in web development, but has traditionally scared away amateur coders.  If you cut the fat, Servlets and JSP are not much harder to set up than common place scripting languages.  Frameworks such as Grails bring it to parity with Rails or Django.

Java underwent a sea change in 2006 with the releasing of the source code and opening of the development process.  Java and the JVM should be championed by Libre software developers and users alike!

javascript-the-good-parts

Computer e-Recycling (an I.T. WTF Odyssey)

Story Time: Computer e-Recycling

an I.T. WTF Odyssey

I had the displeasure of working at an erecycler several years ago. Even watching stuff come off the trucks, it was very hard to get anything before it was utterly destroyed by the yard goons. Inserting a forklift blade into a 19″ rack cabinet was common practice and I witnessed on numerous occasions the dropping of them in this fashion. Once, they even rolled a forklift off the ramp. These events were always followed by a flurry of Spanish profanity and I usually had to check my pants for continence afterward from laughing so hard. It is a miracle nobody has ever been seriously maimed there to the best of my knowledge.

The highlight of this job experience was when the greedy goons resold a defective Siemens blood handling instrument of some sort that was sent specifically to them to be destroyed (as was EVERYTHING, in theory). The serial number was traced back to them and there was an all out shitstorm. A team of inspectors was flown out from Germany. The goons put on a particularly hilarious show buying hardhats, safety vests, warning signs, identification badges, and more. Somehow, they kept the contract (it was probably just “check you ass” on Siemen’s part — dumping obsolete X-Ray, MRI machines, medical waste, etc for free must be hard to pass up) and all of this change disappeared within a couple days.

What is remarkable is that the above business got multi-millions of dollars of inventory for FREE every year. I really can’t think of any other business model like it. The owner is completely incompetent and morally bankrupt. Very little was put back into the company’s facilities, employees (except maybe a couple at the top), or development. None of the employees had an IQ above room temperature, and everybody seemed content to keep it that way.

There is a happy ending though. A skid of IBM RS/6000 7012 systems from Intel came in at one time. Among the 20-30 machines was a lone -397 that I snagged. This is my favorite collectors box to date (it is the same POWER2 CPU type used in the famous Deep Blue super computer).

Kernel 2.6.30 is a Go

I initially thought this would be a rather uninteresting release, especially when we learned Xen dom0 didn’t make the cut. Following the changelog line-by-line, this one still didn’t seem very interesting to me. But analyzing the sum of parts, I have to consider 2.6.30 a ‘golden’ kernel — certainly the best in a while.

There is solid improvement top to bottom here.  A lot of the new KMS/DRM stuff from Fedora 11 has worked its way up stream.  File system work is too much to mention, but highlights include relatime, writeback by default for Extfs, NILFS2, Btrfs development and more. FSCache works as advertised.  Also some groundwork for NFS 4.1, which will eventually bring us pNFS.

Boot speed seems fast as ever, but I haven’t taken the time to do any empirical analysis.  Your results here will be hardware dependent but async initialization of certain subsystems is a welcome move in the right direction.

Basically, a solid release with a good balance of new stuff but mainly refinement of existing systems and merging of longstanding patches.

Kernel Newbies has, as usual, a great change summary: http://kernelnewbies.org/Linux_2_6_30