Adios 2011 !

After finishing my final concert of the year 2 weeks ago, I finally had some time to organize my computer, configure the working enviroment, renew my blog. and study many different things!

The first thing that I wanted to study is VIM in order to get used to it more and more and be comfortable when programming. My final goal will probably be to make my osx Lion into Linux. But so far there are too many issues to solve in order to do that, such as to find a nice soundcard that I can work on both systems.

Well, anyway, I was not so close to terminal for instance. Few years ago, when my friend was telling me that some of the people are checking their email on terminal, I was baffled by it. Who knew if I would do that.. So, I was digging into the possibility and found ‘Mutt.’

Mutt

It took a while to configure everything. The main issue was to use both Gmail and Hotmail, and to make it possible to read RSS feed. Due to many helps in google search, anyway, I am now using it.

Another big change is to use Midnight Commander instead of Finder as the window manager.Midnight Commander

The main issue for me on Lion was of course its usage of memory, but above all, I dislike this closed format that I cannot change anything, cannot watch the hidden files well, and without mouse, is hard to be flexible in use, and the amount of finder windows that I need to deal with.

Of course at the beginning, I was very much struggling with all shortcuts. But the best way to get used to it is to use lots and lots. and now, I feel pretty much comfortable.

 In order not to use finder (turn it off), I turn on ‘Path Finder’ when I log in to my system. Path finder has an option to ‘kill’ the finder without any harm on system. Then I turn it off, and turn on iTerm2, the replacement for osx Ternimal.

The black background, together with this new blog design, is due to the condition of my eyes. According to what doctor says, I have a brighter sight than others. So that I feel tired easily. Black background feels always comfortable to me. Also, in finder this is totally impossible.

Well, then I fixed this blog. I was using ‘Textyle,’ one of the blog environments from Korea, and it was way to slow. I really wanted to change it into WordPress but didn’t want to blow away the whole posts that I have written for 10 years. Yes!! Next year will be 10 years birthday of my blog. That became a motivation, and at the same time, I found a nice converter that a Korean programmer developed. Thanks to him, here I am.

Yes. time goes by. I am quite surprised that I have been running this blog for 10 years. But quite embarrassed by the content. Since I am developing myself, as I have been aiming to share what I have and think, I would like to make more efforts on running the blog. To post nice contents, first I need to study more though. 🙂

Happy that some of the missions have done. Personally I had a difficult year; finishing my study, hit by motorbike, and trying to stay in the Netherlands, etc etc.

But this moment that I am saying good bye to the year 2011, I am sure that next year it will be very much fruitful, and I go for it.

I never knew how much people are actually enjoying my posts. But whoever reads this, Merry christmas and Happy new year!

oh, and someday, I will get back to the subject of configuring Mutt and MC.

Supercollider and Vim (SCVim) in OSX

After a while struggling with the supercollider editor, which for me has an issue with lots and lots of windows floating around the window, I decided to move to another editing environment to code SuperCollider.There are several options for this, such as using TextMate with sc bundle(https://github.com/sbl/scmate.tmbundle), but I wanted to have a more simple platform.

Then there was ”VIM’ and SCVim. (for more options : http://supercollider.sourceforge.net/wiki/index.php/Systems_interfacing_with_SC)

I will explain a bit how to make a proper install in OSX. (Lion, 10.7.2 at the moment of this posting)
First of all, I normally compile SC from the latest source using git. (for more information about download the latestSC source codes: http://supercollider.sourceforge.net/developers/)
In the source folder, there already is the editor source for SCVIM in the editor folder.
Go to the folder /yourSCSourcedirectory/editor/scvim.
If you want to compile scvim seperate, using those command

cmake ..
make
sudo make install

Then your scvim is located in /usr/local/bin/scvim (to see where your scvim is located: type this in terminal ‘which scvim’)
I assume that your SuperCollider is located in /Applications/SuperCollider, which by default this newly compiled supercollider should be there,
scvim is working by an application called ‘sclangpipe_app,’ which makes possible to run sclang.
When you run scvim, it automatically opens up this sclangpipe_app and this should be able to link all your SCClassLibrary and library files.
In your folder, you see the library files such as libsclang.dylib.
(In the official SuperCollider, you don’t see this so that you can skip this part) and those files should be symlinked to sclangpipe.
To do so, type this in your terminal

cd /usr/local/lib; sudo ln -s <build-dir>/SuperCollider/lib* 

There is another problem with scvim + sclangpipe_app.

When you run scvim on your terminal, your sclangpipe_app is not entirely loading SCClassLibrary, which somehow doesn’t work properly.
So that you need to execute sclangpipe_app seperate from scvim.
In order to do so, I use shell script that automaticallt does this job.
This is the example.

#!/bin/bash
open -a "iTerm.app"
  killall sclang
  /usr/local/bin/sclangpipe_app -l /Applications/SuperCollider&
  sleep 0.5
  open -a "iTerm.app" /usr/local/bin/scvim

I saved this file as ‘scvimsc’ and did ‘chmod +x scvimsc’ to make it executable, and put it into the folder /usr/local/bin/ .
Then what you need to do is in terminal, just type

scvimsc

Then it will automatically open both scvim and sclangpipe_app in a proper way.

 

Optional use of iIerm2 for scvim

I use iTerm2.app(free application) instead of default osx terminal, because I like the way it can do window management.
I wanted to put both ‘post window’ and ‘editing window’ on ‘one window’ so that I do not need to have several windows floating around.
In order to do that, you need to use apple script instead of shell script to set up this.
This is the apple script that I use.

tell application "iTerm"
activate
  -- my project workspace
  set myterm to (make new terminal)
  tell myterm
  launch session "sclang"
  set number of rows to 150
  set number of columns to 40
  tell the last session to write text "killall sclang"
  tell the last session to write text "/usr/local/bin/sclangpipe_app -l /Applications/SuperCollider"
  tell i term application "System Events" to keystroke "d" using command down
  tell the last session to write text "scvim"
  set number of columns to 100
  set number of rows to 10
  end tell

I saved it as an application called ‘iscvim.app’ (from the apple script editor) and put it into /Applications/
So that I can only execute this application to open up iTerms, and scvim, and sclang together in one window!

In theory, this compiling process should be all to make scvim to happen. But surely there is an issue with library links.
But for now all are working fine with some lines on terminal, and can be solved with premade script to make things work.

A nice part of using vim is not only ‘window management’ but also using plugin for VIM. such as snippets for supercollider.
I will get back to this subject some day.
any remarks and commends and questions are welcome.