Apt-get make it easy

March 25th, 2008

Had this latex error this morning.


(/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd)kpathsea: Running mktextfm tcrm1095
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input tcrm1095
This is METAFONT, Version 2.71828 (Web2C 7.5.6)

kpathsea: Running mktexmf tcrm1095
! I can't find file `tcrm1095'.
<*> ...ljfour; mag:=1; nonstopmode; input tcrm1095

Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input tcrm1095

Transcript written on mfput.log.
grep: tcrm1095.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input tcrm1095' failed to make tcrm1095.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font TS1/cmr/m/n/10.95=tcrm1095 at 10.95pt not loadable: Metric (TFM) file no
t found.

relax
l.76 \item {
\bf (Important)} Read Chapters 15-17 over the break. I will lect…

apt-get install cm-super fixed it.

You gotta love debian(ubuntu).

Organick Memorial Lecture 2008: Fran Allen Turing Award Winner

February 21st, 2008

Organick Lecture 2008
High Performance Programs and Programmers: A Personal Perspective
Fran Allen

IBM Fellow Emerita
IBM T. J. Watson Research Center

University of Utah School of Computing
Wednesday, February 20, 2008 7:30 p.m.
Turing Award Winner

Fran calls supercomputers one of the miracles of our time.

“In the beginning there was Fortran.” Jim Gray

Fran’s first assignment was to teach the scientist of IBM Research Fortran which had just been released.
Up till then the scientists had written their code by hand in assembly.

John Backus set goals, stuck with them, and achieved them.

Fortran had two objectives:
Increase the productivity of programmers.
Be almost as efficient and hand crafted code.

Fran’s next project was the IBM Stretch 1956-1961
Fred Brooks
The stretch was announced to be 100x faster than any existing machine
Memory Access Time was the main performance limitation
The stretch had up to 6 overlapping storage references at one time.
Had up to 11 instructions in flight at a time in the processor.
The stretch was built for solving engineering and scientific problems

HARVEST
built for the NSA, delivered in 1962
Used for code breaking.
The HARVEST was a streaming data computation model.
It had eight instructions.
IO, memory, and computational where all balanced and synced to a clock.
Only machine that maintained this balanced.
The machines language ALPHA was designed for the NSA problem and the machine.

The stretch, when deliver to Los Alamos, missed its performance target by 50%.
The stretch was an attempt to do what was beyond the capabilities of the people and the technology of the time.
The stretch had huge influence on IBM future systems, particularly the IBM 360.
We don’t take risks developing new systems like we use too. The strech was taking a risk and eventually winning because of it.

The IBM 360 unified the business and scientific product roles.
This was a goal, particularly a unified instruction set, was set by Fred Brooks.
There were competitions of competing ideas to find the best solutions.

John Cocke was a engineer who “never wrote a “paper” or “gave a talk”".
John Cocke build the most difficult part of the machine, the look ahead.
John Cocke was in charge of the ACS project that was eventually cancelled in 1968.

The ACS compiler did many pioneering things in the area of compilers.

John Cocke decided to stop trying to create the worlds fastest computer, (the ACS machine), and decided to create the best performance/cost machine which resulted in the Power PC.

Ideas in our field come from problems.

Good an useful results come from problems that result from building something.

It takes twenty years from the appearance of a problem to it being totally solved in a product.

The new thing will be simpler, slower, cooler multicore processors.

The real challenge is to organize tasks to execute in parallel.
How do we use these multicores and get performance out of them?
Fran says we are not ready to do parallel yet. Maybe after 20 years we will be ready.

Everyone will have multicores, not just the high end scientific community.

How these cores will be used is a big question for the software and application people.
We now have a parallel hammer, how will we use it?

Parallelism
“The biggest problem Computer Science has ever faced.” John Hennessy
“The best opportunity Computer Science has to improve user productivity, application performance, and system integrity.” Fran Allen

Coming back to Elliot Organick
The things that succeed best are those that have complete clarity about what the problem is and what the solutions are.
Writing things down and engaging communication is the key to success.

Questions:
What have we learned from the transputer.
The CSP work done for the transputer I think is interesting.

Is the problem in conceptualization or in finding a language to describe our conceptualizations?
Tony Hoard wrote a paper called “Toward the understanding of parallel computers”.
John Nash had some ideas about a parallel machine while working for RAND.

Could you expand on your ideas system integrity?
Language integrity could be a second order effect of better languages.

Users still have to know about the raw details of the machine to get great performance.

Parallelism will increase and the hardware will get easier.
The complexity of hardware will move to parallelism in software.

We have a lot of work in front us and it will be interesting to see

You mentioned that you would like to see caches disappear.
Scratchpad memories may be a better solution than caches.
But being responsible for the memory hierarchy whether you want to or not can be as much a curse as a blessing.

Beating my head with PLT Scheme

February 21st, 2008

I’ve been trying to communicate with a perl process from PLT Scheme using the process library call from scheme/system.

I’ve been a good systems boy making sure that I call flush-output after every string I write to the perl process. But the perl process never gets any input unless I close the output side of the pipe connected to perl’s stdin filehandle.

After hours of no progress I found this

http://pre.plt-scheme.org/plt/doc/release-notes/mzscheme/MzScheme_300.txt

* File-stream output ports (including file ports, the initial output
port, and ports created by `subprocess’) are now block-buffered by
default, instead of line-buffered. The exception is when an output
port corresponds to a terminal, in which case it is line-buffered
by default. Also, the initial error port remains unbuffered.

TCP output ports are block buffered (instead of unbuffered) by
default.

The file-stream changes are especially likely to affect stdio-based
communication among OS-level processes. For example, when
communicating with an ispell subprocess, adding a newline at the
end of a command previously would have been enough to send the
command to ispell. Now, the output must be flushed explicitly
(using `flush-output’) or the buffer mode must be explicitly
changed to by-line (using `file-stream-buffer-mode’).

The TCP changes affect most TCP-based communication. Explicitly
flush output using `flush-output’ or change the buffer mode using
`file-stream-buffer-mode’.

So I said what the heck, I’ll just add a (file-stream-buffer-mode outp ‘line)
call for grins.

And it started working.

Hardy Heron Rocks, but…

February 19th, 2008

Yes, I’m a alpha geek and and early adopter.

Hardy Heron is working great, but the Firefox 3.0 packaging is still undergoing some revision.
I use three applications extensively, Firefox, Thunderbird, and Konsole.
I can’t deal with the extra large fonts that display by default in Firefox 3.0 in Hardy Heron.
So I used this set of instructions to temporarily downgrade the firefox package.

http://www.nowhere.dk/archives/2008/02/14/firefox_3_0_is_now_the_default_browser_in_ubuntu/index.php

Build Latest Linux Kernel for your Distro

October 26th, 2007

I run Linux on my laptop most of the time.
I like to run the latest version, but I don’t want to compile it myself and try to package it up in a deb every time a new kernel comes out.

I just found KernelCheck.

KernelCheck is a project that is designed to easily build the latest kernel for your distribution

The latest BETA even automatically builds in support for the latest NVIDIA proprietary driver.

So far its simple and seems to be working flawlessly.

I’ll let you know how it goes.

Linked-In Freeloading

May 8th, 2007

On Linked-In there are “those people” that mark their connections as private, so that the only connections you can see are people you are already linked-in with.

Linked-In is a community of sharing. Those who mark their connections as private are saying loud and clear, I’m attempting to freeload off others’ willingness to share openly.

It’s no surprise that the common private makers are head hunters, technical recruiters, or other individuals attempting to monetize their network. That being said, I have one technical recruiter in my Linked-In connections that openly shares their connections. Guess who I recommend and go to first when I need to work with a technical recruiter.

I’ve been seriously thinking about dropping people from my Linked-In profile that mark their connections private. So listen up Linked-In, I have a feature request: I want my connections to appear private to other users who mark their connections private. But wait a second, that feature doesn’t follow the golden rule though. Do unto others as you would have others do unto you. On second thought Linked-In, just drop private connections all together. They don’t help build a community.

So, If you find someone who looks interesting in my linked-in connections, that has their connections marked private, send me an email. I probably have some else I would recommend first.

Adobe Flex beats HTML/CSS/Ajax hands down

May 7th, 2007

I’ve been working on a new web application. Initially I started out with Ruby on Rails and HTML/Ajax. I also tried out Jifty, the latest hip Perl5 web framework from Best Practical.

I love puzzles. HTML/CSS/Ajax are always a puzzle. I’ve spend significant time debugging and solving HTML/CSS/Ajax problems. But when I am trying to get something done, and done quickly, the endless puzzles of HTML/CSS/Ajax just serve to frustrate me and leave me with a bitter taste in my mouth.

Complaints
1) Rendering and general application behavior is still inconsistent across browsers vendors.
2) Graphical layout is a hacked up mess compared to the gui toolkits such as SWING, .NET Winforms, or even XUL.
3) (Sarcastically) Wireshark (Ethereal) is my number one debugging tool for the “Browser Platform”.

Well I’ve spent the last couple of days sitting down and working with Flex and ActionScript 3.0. What a welcome relief. I’m starting to get things done and making progress.
Flex isn’t perfect, but Adobe is in process of making the Flex SDK open source.

I’d really prefer to be using the new Silverlight platform from Microsoft, but unfortunately is proprietary, doesn’t have a linux port, it doesn’t currently ship with any gui controls, and its barely been released as an alpha preview.

Bruce Eckel seems to be having similar frustrations.

Update:
Now, I’m not saying that HTML/CSS/Ajax doesn’t have its place. Flex isn’t indexable and searchable by search engines, but if you are building a web application that is username/password protected anyway why waste your time.

I’m using ruby on rails, but this video gives you an idea of what you can do:
Adobe - Developer Center : Video tutorial: Creating a Flex application using the TurboGears framework:

SVG content with Rails 1.2.3

April 21st, 2007

John Taber has been trying to use SVG in his Ruby on Rails app.
Unfortunately, Webrick and Rails have been uncooperative.

From railties/lib/webrick_server.rb we see that rails attempts to serve requests from the public directory before dispatching to controllers.

def service(req, res) #:nodoc:
    unless handle_file(req, res)
      begin
        REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency
        unless handle_dispatch(req, res)
          raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
        end
      ensure
        unless ActionController::Base.allow_concurrency
          REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
        end
      end
    end
end

If you put a svg file in the public directory of a rails app, webrick serves it up, but with the wrong mime type.

$ wget localhost:3000/rect1.svg
--15:54:54--  http://localhost:3000/rect1.svg
           => `rect1.svg.1'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 333 [application/octet-stream]

100%[====================================>] 333           –.–K/s

15:54:54 (12.92 MB/s) - `rect1.svg.1′ saved [333/333]

Firefox displays a friendly description based on file extension, but doesn’t display the svg because the mime type is wrong.

SVG download due to bad mime type.

So add a svg mime type entry to webrick

--- /usr/lib/ruby/1.8/webrick/httputils.rb.orig 2007-04-21 16:00:42.000000000 -0600
+++ /usr/lib/ruby/1.8/webrick/httputils.rb      2007-04-21 16:01:03.000000000 -0600
@@ -86,6 +86,7 @@
       "rtf"   => "application/rtf",
       "sgm"   => "text/sgml",
       "sgml"  => "text/sgml",
+      "svg"   => "image/svg+xml",
       "tif"   => "image/tiff",
       "tiff"  => "image/tiff",
       "txt"   => "text/plain",

And presto

$ wget localhost:3000/rect1.svg
--16:17:22--  http://localhost:3000/rect1.svg
           => `rect1.svg.2'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 333 [image/svg+xml]

100%[======================================>] 333           –.–K/s

16:17:22 (22.73 MB/s) - `rect1.svg.2′ saved [333/333]

SVG Box

SVG content delivered through a controller works just fine, you just have to set the content disposition to inline.

def index
  data = <<END_D
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">

<rect width="300" height="100"
style="fill:rgb(0,0,255);stroke-width:1;
stroke:rgb(0,0,0)"/>

</svg>
END_D
send_data data, :type => 'image/svg+xml', :disposition => 'inline'
end

Now a DSL for SVG creation would be cool, but that is a completely different project.

John Backus (creator of Fortran and Backus Normal Form, BNF) Passes Away

March 20th, 2007

I just read on Lambda the Ultimate that John Backus passed away this past Saturday.

John Backus Receives the Turing Award
John Backus in the 1990s. Courteous IBM.



In his speech accepting the Turing Award, John Backus admonishes developers and computer scientists to look towards functional programing. He states that the composability and mathematical rigor of functional programming empowers programmers to scale and best describe the ever increasing complexity of problems. Interestingly, Backus describes the von Neumann architecture and its associate imperative programming language as obese. Backus continues saying that these obesities encourage micro-managed word at a time computing. Instead of moving data between named locations, we should focus on the larger conceptual units of the problem says Backus.

I see this debilitating behavior every day, both in developers and managers. Most IS/IT managers get caught up in the word at a time or task at a time work flow that cripples teams and organizations. Senior developers and managers must be instructors and mentors in the enterprise. They must be experience practitioners of abstraction and modeling. Their first and most important priority must be to impart the skills of scale, abstraction, modeling, and reuse to those they mentor.

Lightning Talks (Mountain West Ruby Conf)

March 16th, 2007

Ruby Binary Lottery - Mike

WAX (Web Applications X) - Dan Kirkpatrick eparklabs.com

Managing SSH keys with Capistrano or How Jamis Buck made my life easier./- Jay ???

Goldberg Ruby on Rails Generator - Coby Randquist

CruiseControl.rb - ThoughtWorks Continuous Integration Tool written in Ruby.

Why would you want to use JRuby on Rails - Charles Nutter
RailsIntegration part of JRuby Extras Project on RubyForge

LogWatchR - Pat Eyler aggregates logging for 3,000 boxes to a central machine for operation notification.
Initially it handled 600 log entries per second. Right now it notifies via email and a log file. Looking to support nagios, jabber, etc.
Now supports 2250 log entries per second.