Tag Archives: Coding

My own programming style convention for most languages

I write code mainly in R, and from times to times, in C, C++, SAS, bash, python, and perl. There are style guides out there that help make your code more consistent and readable to yourself and others. [Here](http://geosoft.no/development/cppstyle.html) is a style guide for C++, and [here](http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html) is Google’s style guide for R and [here](http://had.co.nz/stat405/resources/r-style-guide.html) read more »

flags for compiling source code: pkg-config command

so i was trying to compile some C code on my server at school that involves the math and the GNU Scientific Library (gsl) libraries. that is, the source has the following lines: those link the header files. however, when compiling, gcc would complain that they can’t see functions such as sqrt, abs, etc, from read more »

stumpwm on mac os x

stumpwm is to window managing (tiling?) system what emacs is to text editing and conkeror is to web browsing. very cool. if i was on a linux laptop/desktop like i used to be, i would definitely use this. i’m even debating on quitting my mac os x for this (with emacs and conkeror). however, i read more »

emacs key bindings in mac os x (cocoa)

so im very used to emacs keybindings. i use it for emacs and conkeror so often times i hit M-w etc and these keys don’t work in mac os x. this sucks. i googled it, and found this and this. guess u can have emacs keybindings in mac os x…for programs that use the cocoa read more »

Compiling and Cross-compiling R packages for Windows (win32)

so recently i’m learning how to compile and cross-compile R packages from source for windows machines, which means i have to create windows binaries. the first option is to build on a windows system, and the 2nd is to cross-build on an intel-based linux or mac system. i will outline my experience. Send it off read more »

using pastebins for irc: pastie.org

so i’ve been using erc for irc these days to get help on compiling stuff, eg, shell-fm and madplay. i usually just paste the errors i get which sometimes can be long. however, that is bad courtesy in the irc channels as that junk takes up a lot of room. jkramer from #shell-fm on the read more »

record music from last.fm using shell-fm

as i mentioned before again and again, i’ve been working on to get shell-fm to record music from last.fm. originally, i was trying to get shell-fm pipe to tee to save the songs and play using madplay (or mplayer) based on this method. this worked. i just need to write scripts to post process the read more »

hacking/editing portfile (MacPorts) to compile madplay for use with shell-fm (last.fm)

so recently i compiled shell-fm, a command-line last.fm player. in order to record music with shell-fm, i can output the stream of incoming data into tee, which saves the data to a file and at the same time pipes it out to stdout, and have that piped to madplay, a command-line player. i had mplayer read more »

installing shell-fm on mac os x

i blogged recently that i couldn’t compile shell-fm on mac os x. hopped #shell-fm on the freenode, and talked to the author himself. the error i got was: he suggested i go to the source and do: that is, remove the main.c in the middle and libshellfm.a to *.c that did the work and i read more »

create custom keyboard shortcuts / hotkeys in mac os x: spark + applescript

in any linux gui environment, u can define custom keyboard shortcuts for anything, whether its executing a shell command to anything u can think of. i love my macbook, but i really hate how Apple WILL NOT let me customize things the way i want it. they really force you into their philosophies: we say read more »