Tuesday, December 31, 2013

"Uncreative Writing"?

I heard a discussion on "Uncreative writing" from the "On the Media" fro NPR. Host Brooke Gladstone and her guest Kenneth Goldsmith discusses plagiarism. What interests me is what Kenneth Goldsmith's experiments, that includes the "Uncreative Writing" course he has been teaching. See the course description on his website at

The radio episode I was listening is
that also includes the transcript of the program.

Goldsmith has a book bearing the name of "Uncreative Writing".


Find more  of Goldsmith's work at his website at,

Story Told in Photos ... "Faces of Addiction"

I heard the story about Chris Arnade's photographic work, called "Faces of Addiction". I checked it out when I got back to my computer. It was an indeed powerful story. His photographic work has been actually widely reported. Check his work out at Flickr. 

Several related ...

Friday, December 13, 2013

Octave Complains About Termnial ...

When I ran most recent version of octave after the compilation and installation on an Ubuntu host, I observe the following problem,


octave:99> set terminal aqua enhanced title "Figure 1"  font "*,6"
                        ^
     `line 0: unknown or ambiguous terminal type; type just 'set terminal' 
for a list`

Web searches directed me either to add setenv('GNUTERM', 'x11') to $HOME/.octaverc or do add the environment variable in shell, e.g., export GNUTERM=x11. Unfortunately, it did not solve my problem. It turns out the message comes from gnuplot since octave uses gnuplot to plot. To fix the problem, we can install the gnuplot-x11 package, i.e.,
sudo apt-get install gnuplot-x11 

Monday, December 9, 2013

VMWare Tools Failed to Load on Ubuntu 13.10 (Saucy)

I am running a Ubuntu guest OS using VMWare Player. I upgraded my guest Ubuntu to Ubuntu 13.10 through "do-release-upgrade" and upgraded my VMWare player to 6.01. When I was upgrading the VMWare Tools, I encountered a problem that the VMWare Tools cannot be loaded. I did a quite a few web searches and many suggested to disable the vmware-tools-thinprint service. On my guest, it did not help by disabling the vmware-tools-thinprint service. What actually helped was to upgrade vmxnet to vmxnet3, which can be accomplished by directly editing the virtual machine's configuration file. To edit the configuration file, in my case the Ubuntu.vmx file, add a line to the file, e.g.,


ethernet0.virtualDev = "vmxnet3"


The solution was hinted by the error message when I ran vmware-install.pl,


The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

In some case, as indicated by the comment below, you may also need to uninstall (by running vmware-uninstall-tools.pl that should have been installed, by default at the /usr/bin directory) and reinstall VMWare tools.

Thursday, November 21, 2013

Octave Forge's Audio Package on Windows

To use the sound and soundsc functions in Octave, we can install the audio package in Octave Forge by installing the package in Octave -- depending on how you installed Octave, you may need administrative privilege.


octave: 1> pkg install -forge audio
 
On Linux systems, there is no problem at all. However, when I tried to duplicate the experience on Windows, I ran into a problem. Namely, when I run the "sound" function, I keep getting the error,

error: sound.m: No command line utility found for sound playing

Examining the sound.m, we see the following code,

  ## What do we use for playing?
  global sound_play_utility;
  if ~isempty(sound_play_utility),
    ## User specified command
  elseif  (file_in_path(EXEC_PATH, "ofsndplay"))
    ## Mac
    sound_play_utility = "ofsndplay -"
  elseif (file_in_path(EXEC_PATH, "play"))
    ## Linux (sox)
    sound_play_utility = "play -t AU -";
  else
    error("sound.m: No command line utility found for sound playing");
  endif

It looks that Octave needs an audio player that can play audio data piped from the standard input. A little bit web search, I found the answer. Here is the summary what I did,
  • Download sox Windows 32 binary from http://sourceforge.net/projects/sox/files/sox/
  • Install sox
  • Go to sox's installation directory, make two copies of sox.exe, one copy named as play.exe, and one named as play (without extension). From Windows command line, you would do the following,
    
    copy sox.exe play.exe
    copy sox.exe play
    

  • Update the Octave shortcut (.LNK) file by adding command line option "--exec-path "C:\Octave\sox-14-4-1". Replace sox's path with your own. 
  • Run Octave
  • Test it by playing some random noise, such as,
    
    Octave:1> y = rand(1, 10000);
    Octave:2> sound(y, 44100);
    

    You should hear the noise.

Thursday, October 24, 2013

Free GUI Applications for LaTeX (WYSIWYM)?

For those who do not want to memorize syntax and commands, a few applications with GUI can produce LaTeX documents,


Among the above, only LyX is free with a GPL license. Wikipedia has a comparison page for TeX editor.  

Wednesday, October 23, 2013

Remove Old Linux Kernel Images in Ubuntu from Command Line

As you upgrade your Ubuntu Linux, the number of different versions of Linux kernel images grow. The Linux kernel images can occupy quite some disk space. Your /boot file system may be short of space for future upgrades of Linux kernels. It may look for a method to remove the old Linux kernel images. The following discussion suggests that we remove old kernel images using "Synaptic Package Manager",


However, it requires a graphical user interface. I am more interested in removing the old Linux kernel images using command line tools only, as sometimes, I simply do not have the luxury of running a GUI. However, the discussion above indeed a good guide. I simply follow the steps below,

  1. Find the versions of Linux kernel images and their packages.

    You may first list the content of the /boot directory, which gives you an idea what kernel images are installed. Then you can use dpkg to find out the package names. Here is an example,
    userfoo@ubuntu:~$ dpkg -l | grep linux | grep 3.0
    ii linux-image-3.0.0-12-generic 3.0.0-12.20 i386 Linux kernel image for version 3.0.0 on x86/x86_64
    userfoo@ubuntu:~$

    In the above, I am looking for "3.0" because I figured from listing the content of the /boot directory that I have a Linux image of version of 3.0.0 installed. The above tells me that the corresponding package of the Linux image is "linux-image-3.0.0-12-generic".
  2. Remove the Linux image package.

    I remove the above Linux image package using apt-get.
    userfoo@ubuntu:~$ sudo apt-get remove linux-image-3.0.0-12-generic
Repeat the above steps for other versions of old Linux images. Typically, as suggested by many other people, you want to keep at least one or two old Linux image to fall back on in case there is an issue with your newest Linux kernel image.

Similar method can be applied to CentOS and Fedora Linux. You can accomplish it using yum alone.