Tag Archive - programming

Go Replicants!

Protein

Last November I wrote a molecular simulator called Go Replicants! that uses Go potentials to simulate protein folding processes and study some of their thermodynamic properties. Its source code and some instructions can be found here.

Continue Reading…

Emacs bankruptcy

Emacs

I decided to follow the zeitgeist and declare .emacs bankruptcyThis is the outcome.

Trivial doctests in Common Lisp

Lisp illustration by Conrad Barski

The pros and cons of doctests have been discussed elsewhere so I won’t enter that debate here.

I was told it was trivial to roll your own doctest suite in Common Lisp. I have done that and it is easy indeed but I have included the code in incf-cl for those who would like to use it right away.
Continue Reading…

Call graphs using the GNU Project Debugger

Chris Ball asked everyone who likes Unix for a tool which would be to function calls what strace and ltrace are for system and library calls respectively.

I wanted to write this myself for a long time but what prevented me from doing so was the fact that I had come up with a trivial shell/awk script that achieved almost the same goal. Continue Reading…

List comprehensions in Common Lisp

List comprehensions are a programming language construct that closely mimics the way you declare a set in mathematics and sometimes are more succinct and readable than using a composition of mapcar, delete-if or an ad hoc imperative loop.

Having list comprehensions in Lisp was something I was missing from Python and Haskell. So I tried to find something similar and discovered that Continue Reading…

cl-buchberger is out!

I’ve just released the first version of cl-buchberger, a Common Lisp
implementation of Buchberger’s algorithm for the computation of
Gröbner bases.

Lisp logo

There are many improvements waiting in the pipeline but the basic
functionality is there.

 

You can read more about cl-buchberger here.

Interoperability between Source Code Management systems with Tailor

Tailor is an application that lets you migrate changesets between different kinds of source code repositories. It is written in Python and supports most open source SCM systems.

With Tailor you can:

  1. Create a local repository using your favorite source control system of a project managed by another source control system.
  2. Do your work.
  3. Export your changes back to the original repository.

Here’s an example of using Tailor to import a branch of Axiom (uses Subversion) into a local darcs repository:

First of all, we create a configuration file for the project

$ tailor –verbose –source-kind svn –target-kind darcs \
–source-repository https://svn.sourceforge.net/svnroot/axiom \
–source-module branches/build-improvements \
–start-revision INITIAL \
–target-repository file:///home/rwx/lab/math/axiom/axiom-darcs/ \
–target-module axiom-build-improvements axiom-build-improvements \
> axiom-build-improvements.tailor

Now that we have the config file stored in axiom-build-improvements.tailor, we can launch the tool to do the initial import

$ tailor –configfile=axiom-build-improvements.tailor

After a while, we have a local darcs repository for that branch and we can write:

$ darcs get ~/lab/math/axiom/axiom-darcs

to get a working copy in which to do your modifications.

Today, there are a myriad of SCM tools available and projects like Tailor will become increasingly important because they let you stick to your tools of choice. In this way, instead of learning the details of other source control systems, you can focus on what you do best: writing code.

Halberd screen shots

snapshot4

Because a picture is worth a thousand words I uploaded some screen shots of halberd in action

Halberd 0.2.1 is out!

Halberd

I just released the next revision (0.2.1) of halberd, my load balancer detection tool. If you’re curious about the way the program works, you can read this part of the user’s guide.

Halberd has been tested in real world scenarios for quite some time and it seems to be solid. I hope the wider audience it is gaining now will uncover some bugs and after fixing those I’ll think of it as stable software. Future work could happen in the following areas:

  • Clustering algorithm
    • The module Halberd.clues.analysis currently implements an ad-hoc hierarchical clustering algorithm to isolate possible real servers. I would like halberd to report to the user the degree of trust he should place in its conclusions.
    • I think the way to go would be to test some algorithms in R (fuzzy clustering comes to mind) using real world data and see what works best before implementing anything.
  • SSL session reuse
    • When an SSL/TLS session begins, the server issues an SSL session ID to the client. This ID will be used to resume transactions between client and server (remember the stateless nature of HTTP).
    • Some load balancers can keep track of which real server dealt with which SSL session and direct the client to the right server (the one having the client’s session ID in its cache). This could be used by halberd as an extra technique to enumerate real servers.
  • Test suite improvements
    • The test harness is tied to my own development environment. This should change.
    • More tests never hurt.

Introduction to the lambda calculus

A Brave New Hope briefly reviews an interesting text on the lambda calculus. This reminded me of one of the books that got me started in functional programming: An introduction to functional programming through lambda calculus by Greg Michaelson. It is an enjoyable and fast-paced text which I’d recommend if you’re looking for a good introduction to the subject.

Page 1 of 212»