Monday, October 26, 2009

[SW] Learning Lsip using Vim as the editor

I prefer Vim over Emacs. One day, I happened to be curious about Lisp, and then found the page ``Practical Common Lisp.'' The so-called ``programming environment'' confused me. Furthermore, Emacs seems to be the standard (or mainstream) editor/environment for the Lisp programming.

I've set the Emacs and SLIME for a try, but it's not easy for me to remember the key stroking in Emacs. So I also found some approaches to let me learning Lisp with my beloved Vim.

The first approach I found was: slime.vim, but I do neither understand the script nor the steps. After trying and trying, I gave it up.

The second approach is to install the Limp, a plugin for Vim. It does not work identically to what has shown on the web page, but it seems not bad and simple enough for me.

(Maybe my problems are due to my poor understanding of how Lisp works.)

[SW] Emacs and SLIME for Common Lisp

I am not familiar with Emacs, but I still tried to install Emacs as well as SLIME for trial.

Here are simple steps for setting all these up:
$ sudo apt-get install clisp emacs slime sbcl cl-asdf

Then, in the .emacs file:
(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/usr/share/common-lisp/source/slime/")
(require 'slime)

Ref: How to set up Emacs + SLIME + SBCL under GNU/Linux

[QnA] Using the terminal in Ubuntu -- simple but useful commands

Here is a web page for newbies: UseingTheTerminal. Most of the commands are simple but could be useful in daily operation.

Sunday, October 25, 2009

[SW] Taglist -- a Vim plugin for browsing the source code

To make Vim handier for programming, the taglist is a good choice. It works with Exuberant Ctags to make you browse the variables, functions, or classes of the source code easily.

Just make sure you have installed Exuberant Ctags:
$ sudo apt-get install exuberant-ctags

It's a good idea to set hot-key to toggle the TlistToggle function (use <F12> as the example):
nnoremap :TlistToggle
nnoremap <F12> :TlistToggle <CR>

[SW] Vimperator -- Let you use Firefox as in Vim

I read the article and it mentioned Vimperator, an add-on for Firefox. You would like it if you are a Vim fan. :-)

Tuesday, October 13, 2009

[QnA] Redirect the error message given by gcc compiler

I tried the redirect operator ``>'' to write the error and warning message to files, but it didn't work. There was nothing written into the files. Then, I found the solution:

$ gcc $> file

The ``$'' character is needed to make the redirection work.


[QnA] Mount smb folders from command line

Here are simple procedures to mount remote folders using command line interface.

$ sudo apt-get install smbfs
$ sudo mkdir /media/theFolderInYourPC
$ sudo mount -t smbfs -o username=theUsername,password=thePassword //theRemotePCsIP/theRemoteFolder /media/theFolderInYourPC


Monday, October 05, 2009

[Chat] Just write down what you've learned

When I was searching some solutions for data sorting in Python, I met this article: If you are in tech and don't have a blog.

This article has given two important reasons why we should have a blog to record something we've learned:
  1. For our own reference. We are human beings, and human beings are prone to forgetting things. This is why I write down things here.
  2. For someone else who needs the solutions you've just found or figured out. When someone else are trying to Google the solutions and you happen to have them in your blog, then people might have more chances to find these solutions. That's good!
Just blog it, for recording as well as sharing.