2008-02-28

MacBook Air



2008-02-27

Wubi - Install Ubuntu Inside Windows

Wubi is an unofficial Ubuntu installer for Windows users that will bring you into the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other application. If you heard about Linux and Ubuntu, if you wanted to try them but you were afraid, this is for you.

2008-02-22

Firefox 3 Beta 3: The Home Button Has Gone

The Home button has been moved to the Bookmarks toolbar by default (but can be easily moved back) and the splitter that allows to resize the search and location bars when placed next to each other has become invisible.

对此网上骂声一片哈, 天晓得谁出的这馊主意 :)

2008-02-21

Phrase from Dennis

  • Eat your own dog food
  • Red Envelope

Google 了一下, 找到:

  • Eat one's own dog food
  • Sip your own champagne
  • Sip one's own champagne

2008-02-20

2008-02-19

[Ubuntu] Desktop vs. Server

Desktop 版跟 Server 版使用不同的 kernel:

desktop: linux-image (linux-image-2.6.15-23)
server: linux-image-server (linux-image-2.6.15-23-server)

desktop # uname -a
Linux ubuntu606 2.6.15-51-386 #1 PREEMPT Tue Feb 12 16:52:52 UTC 2008 i686 GNU/Linux
server # uname -a
Linux dapper-server 2.6.15-51-server #1 SMP Thu Dec 6 21:37:18 UTC 2007 i686 GNU/Linux

desktop 跟 server 的 /etc/lsb-release 也是相同的:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.06
DISTRIB_CODENAME=dapper
DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS"

Compiling Expect 5.43 on Ubuntu 6.06

  • $ apt-get install tcl8.4-dev
  • $ wget http://expect.nist.gov/expect.tar.gz
  • $ tar -xzf ...
  • $ ./configure --prefix=... --with-tcl=/usr/lib/tcl8.4 --with-tclinclude=/usr/include/tcl8.4/tcl-private
  • $ make
  • $ make install

2008-02-17

Apt-file does not work for Dapper

近日发现 apt-file 不好用了, 不解. 看了一下 apt-file 的 man page, 它要用到 server 上的一个叫 Contents-i386.gz 的文件, 所有的信息应该都在这个文件里面, 然而 server 上的这个文件大小只有 677 个 byte. 到 server 的 Edgy 的目录里面看了一下, 这个文件的大小有 11M 呢, 不晓得 Dapper 里面的这个文件为什么这么小了. 心生一计, 来个偷梁换柱, 把 Edgy 里面的文件 download 下来改名成 Dapper 的就好了!

2008-02-15

Locale variables

Variable What it's for
LANG The basic language setting used by applications on the system, unless overridden by one of the other locale environment variables
LC_CTYPE The character set used to display and input text
LC_NUMERIC How non-monetary numeric values are formatted on screen
LC_TIME How date and time values are formatted
LC_COLLATE How to sort various information items (e.g. defines the order of the alphabet so items can be ordered alphabetically by the sort command)
LC_MONETARY How monetary numeric values are formatted
LC_MESSAGES Which language is to display messages to the end user
LC_PAPER Definitions of paper formats and standards
LC_NAME How names are formatted
LC_ADDRESS How to display address information
LC_TELEPHONE How telephone numbers are structured
LC_MEASUREMENT What units of measurement are used
LC_IDENTIFICATION
LC_ALL This variable serves as a powerful override over all the other locale environment variables. When its value is set, applications use that value to determine which locale settings to use regardless of the values of the other variables

Perl 5.10.0 released

Perl 5.10.0 Released

Today (December 18th, 2007) the Perl Foundation announces the release of Perl 5.10, the first major upgrade to the wildly popular dynamic programming language in over five years. This latest version builds on the successful 5.8.x series by adding powerful new language features and improving the Perl interpreter itself. The Perl development team, called the Perl Porters, has taken features and inspiration from the ambitious Perl 6 project, as well as from chiefly academic languages and blended them with Perl's pragmatic view to practicality and usefulness.

Significant new language features

The most exciting change is the new smart match operator. It implements a new kind of comparison, the specifics of which are contextual based on the inputs to the operator. For example, to find if scalar $needle is in array @haystack, simply use the new ~~ operator:

  if ( $needle ~~ @haystack ) ...

The result is that all comparisons now just Do The Right Thing, a hallmark of Perl programming. Building on the smart-match operator, Perl finally gets a switch statement, and it goes far beyond the kind of traditional switch statement found in languages like C, C++ and Java.

Regular expressions are now far more powerful. Programmers can now use named captures in regular expressions, rather than counting parentheses for positional captures. Perl 5.10 also supports recursive patterns, making many useful constructs, especially in parsing, now possible. Even with these new features, the regular expression engine has been tweaked, tuned and sped up in many cases.

Other improvements include state variables that allow variables to persist between calls to subroutines; user defined pragmata that allow users to write modules to influence the way Perl behaves; a defined-or operator; field hashes for inside-out objects and better error messages.

Interpreter improvements

It's not just language changes. The Perl interpreter itself is faster with a smaller memory footprint, and has several UTF-8 and threading improvements. The Perl installation is now relocatable, a blessing for systems administrators and operating system packagers. The source code is more portable, and of course many small bugs have been fixed along the way. It all adds up to the best Perl yet.

For a list of all changes in Perl 5.10, see Perl 5.10's perldelta document included with the source distribution. For a gentler introduction of just the high points, the slides for Ricardo Signes' Perl 5.10 For People Who Aren't Totally Insane talk are well worth reading.

Don't think that the Perl Porters are resting on their laurels. As Rafael Garcia-Suarez, the release manager for Perl 5.10, said: "I would like to thank every one of the Perl Porters for their efforts. I hope we'll all be proud of what Perl is becoming, and ready to get back to the keyboard for 5.12."

2008-02-14

Searching Ubuntu Packages

http://packages.ubuntu.com/

[Ubuntu] Components

Components

The Ubuntu software repository is divided into four components, main, restricted, universe and multiverse on the basis of our ability to support that software, and whether or not it meets the goals laid out in our Free Software Philosophy.

The standard Ubuntu installation is a subset of software available from the main and restricted components. You can install additional software using installation software such as Synaptic Package Manager or Aptitude. Other components are added by editing the /etc/apt/sources.list file. See "man sources.list" for more information on editing the sources.list file.

"main" component

The main distribution component contains applications that are free software, can freely be redistributed and are fully supported by the Ubuntu team. This includes the most popular and most reliable open source applications available, much of which is installed by default when you install Ubuntu.

Software in main includes a hand-selected list of applications that the Ubuntu developers, community, and users feel are important and that the Ubuntu security and distribution team are willing to support. When you install software from the main component you are assured that the software will come with security updates and technical support.

We believe that the software in main includes everything most people will need for a fully functional desktop or internet server running only open source software.

The licences for software applications in main must be free, but main may also may contain binary firmware and selected fonts that cannot be modified without permission from their authors. In all cases redistribution is unencumbered.

"restricted" component

The restricted component is reserved for software that is very commonly used, and which is supported by the Ubuntu team even though it is not available under a completely free licence. Please note that it may not be possible to provide complete support for this software since we are unable to fix the software ourselves, but can only forward problem reports to the actual authors.

Some software from restricted will be installed on Ubuntu CDs but is clearly separated to ensure that it is easy to remove. We include this software because it is essential in order for Ubuntu to run on certain machines - typical examples are the binary drivers that some video card vendors publish, which are the only way for Ubuntu to run on those machines. By default, we will only use open source software unless there is simply no other way to install Ubuntu. The Ubuntu team works with such vendors to accelerate the open-sourcing of their software to ensure that as much software as possible is available under a Free licence.

"universe" component

The universe component is a snapshot of the free, open source, and Linux world. In universe you can find almost every piece of open source software, and software available under a variety of less open licences, all built automatically from a variety of public sources. All of this software is compiled against the libraries and using the tools that form part of main, so it should install and work well with the software in main, but it comes with no guarantee of security fixes and support. The universe component includes thousands of pieces of software. Through universe, users are able to have the diversity and flexibility offered by the vast open source world on top of a stable Ubuntu core.

Canonical does not provide a guarantee of regular security updates for software found in universe but will provide these where they are made available by the community. Users should understand the risk inherent in using packages from the universe component.

Popular or well supported pieces of software will move from universe into main if they are backed by maintainers willing to meet the standards set for main by the Ubuntu team.

"multiverse" component

The "multiverse" component contains software that is "not free", which means the licensing requirements of this software do not meet the Ubuntu "main" Component Licence Policy.

The onus is on you to verify your rights to use this software and comply with the licensing terms of the copyright holder.

This software is not supported and usually cannot be fixed or updated. Use it at your own risk.

mailsend

Mailsend is a simple program to send mail via SMTP protocol (That's how all emails are sent). I needed to send a piece of alert mail from a program in a networked Windows machine, but could not find a simple program like this installed. So I wrote one. You might find it useful in some situations. The program does not use any config file and I plan to keep it that way. At this time I don't have any plan to port it to Unix. Well I had a need and I ported it to Unix (v1.05, Feb-24-2004).

cygpath: Convert Unix and Windows format paths, or output system path information

Refer to cygpath(1) for details

[kw: cygwin]

2008-02-08

[Mac OS X] Remove the scrollbar but not the buffer from Terminal

Remove the scrollbar but not the buffer from Terminal

Coming from a Linux background, I miss having a terminal window that had a buffer but did not display a scrollbar. Terminal previously would not allow you to have one without the other.

While setting up a special terminal window, I noticed that the .term files have a separate entry for the scrollbar and the buffer. While the GUI combines these, you can go into the .term file itself and turn off the scroll bar and keep the buffer!

[robg adds: To make this work, first you'll need to create a saved Terminal using File -> Save. Hopefully it saves in the default location (your user's Library -> Application Support -> Terminal folder). This allows the saved Terminal to be used from the File -> Library menu. Regardless of where it's saved, once you have a saved Terminal, open it in your favorite editor and search for:


<key>Scrollbar</key>
<string>YES</string>
Change the YES to NO, save the file, and then open it in Terminal. You should now have a window with scrollback but without the scrollbar.]

2008-02-06

MacPorts upgraded

今天升级 MacPorts 到 1.6 了, 同时发现 Tcl 8.5 release 了, Subversion 也有 1.4.6 了.

Changes in Tcl 8.5

2008-02-05

acct(2)

NAME
acct -- enable or disable process accounting

SYNOPSIS
#include <unistd.h>

int
acct(const char *file);

DESCRIPTION
The acct() call enables or disables the collection of system accounting
records. If the argument file is a nil pointer, accounting is disabled.
If file is an existing pathname (null-terminated), record collection is
enabled and for every process initiated which terminates under normal
conditions an accounting record is appended to file. Abnormal conditions
of termination are reboots or other fatal system problems. Records for
processes which never terminate can not be produced by acct().

For more information on the record structure used by acct(), see
/usr/include/sys/acct.h and acct(5).

This call is permitted only to the super-user.

NOTES
Accounting is automatically disabled when the file system the accounting
file resides on runs out of space; it is enabled when space once again
becomes available.

2008-02-04

Jabber servers

  • MSN
    • nedbsd.nl
    • jabber.no
  • Yahoo
    • jaim.at
    • jabber.no
  • QQ
    • freelinq.com

[cygwin] Run crond service

$ cron-config