Archive for the ‘Uncategorized’ Category
Handy Makefile
The following is a snippet for a handy and concise Makefile that will make executables for all C files in a directory. It’s good for “sandboxing” this illustrates some of Make’s useful features without before consulting a larger resource. Tip of the hat to Erik for helping me polish it up.
# Flags for gcc FLAGS = -D_GNU_SOURCE -O3 -g # All C files as sources, and chop off the .c for targets SOURCES = $(wildcard *.c) TARGETS = $(patsubst %.c, %, $(SOURCES)) all: $(TARGETS) # All targets without an extension depend on their .c files %: %.c @echo "Building $@" @gcc $(FLAGS) $< -o $@ # The "@" symbol suppresses Make actually displaying the command. clean: @echo "Removing hidden files" @rm -rf .*.swp *.dSYM ._* 2> /dev/null @echo "Removing executables" @rm -rf $(TARGETS) 2> /dev/null
The nice thing about Make is that it’s useful not only for things like C code. I’ve even used it (quite some time ago) to piece together tracks of music using ecasound.
Community structure paper added to shoebox
Though there are a variety of interesting papers on community structure (many of which I still have yet to read), I thought I’d place the Clauset-Newman-Moore paper as downloaded and in my shoebox because it seems that paper was one of the important ones in taking the developed idea and making it practical for very large networks. I like how it starts from the modularity optimization and takes it all the way to the data-structure specific solution into one packaged solution, whose code is readily available on the web–now that’s good research. I may consider that also for Shalizi and company’s CSSR, which has always intrigued me but I’ve never really sat down to really understand what’s going on.
A shoebox
I have recently added a “shoebox” to my home page. The basic idea is any papers, images, code, etc. that I feel at some level is worth storing locally, I place there in reverse chronological order.
What makes something worthy of the shoebox? Beats me, but you may get an idea by looking in it.
In the interim…
I’ve completed the first draft of the next technical entry I’ll post soon (revised title): “What is an energy landscape?”. While I have a couple of friends look at that, I’m going to be developing some other thoughts. Technical entries make themselves obvious not only by their crappy titles, but also by the fact that they’ll usually link to a “TeX note” (a variation of the term “tech note” borrowed from a friend) of some sort or contain words that mean nothing to a lot of people. Non-technical ones should be more engaging, I hope. I consider these first few entries me “warming” up to the habit of using the web log. Hope everyone is enjoying the new year.