Saturday, April 12, 2008

Shell History Meme

Reading YC's post about the meme happening at the Fedora Planet, I also gave it a try:

history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head

113 cd
88 ls
53 hg
38 ant
28 fsc
23 ln
17 ssh
13 java
10 ../../../bin/java
9 scala

In words:
I am guy who likes to be at many places [cd] and to know the surroundings [ls] - I try to keep record of everything [hg]. Further, I don't want to bother with annoying repetitive tasks: things should be done automatically [ant] and fast [fsc]. Mental links [ln] help me not to get lost while my mind is far away [ssh]. Finally, you know I used to program in Java [java,../../../bin/java] but nothing can stop the rise of Scala [scala]. ;-)

Saturday, February 02, 2008

A *new* Scala Bundle for Textmate

No doubt, the upcoming Scala Module will make Netbeans the No.1 Scala IDE. I use the current pre-release version on my linux box at work without any difficulties. Unfortunately, I have encountered problems running the recommended daily development builds of Netbeans on my private macbook pro. I hoped that I could at least use my favorite editor for MacOS X, Textmate, but the bundle shipped with Scala 2.6.1 still seems to be a dummy/placeholder. Well, instead of falling into a deep depression, I invested half a day to create a new bundle myself.

For those interested, please find the download below:

- The Scala Bundle
- An Example Project (with some sources ripped from scala-lang.org)

The main goal was to have simple syntax highlighting, which actually looks quite good using the 'Cobalt Theme'. (I'm not 100% sure that value:Type is always displayed correctly, but it seemed to work with the samples.)

Further, there is a template for an Ant-Script which includes a compile, run & deploy task. These can be executed as bundle commands (menu or shortcuts), if the file is called 'build.xml'. Customization should be easy with a few properties at the top of the file.

Finally, there are a few snippets to write new code quickly. E.g. typing

trait ->| Adder ->| def ->| add ->| Int ->| 2 ->| left ->| Int ->| right ->| Int

results in
/**
* Adder
*/
trait Adder
{
def add ( left : Int, right : Int ) : Int
}
without pressing two keys at the same time (no SHIFT)!

But of course you can sketch your own (and share them with me =) ) !