Hackers, Pastry Chefs, and Tradition

April 24th, 2008 OMouse

Stumbled upon an old post by Jeff Atwood titled Hackers and Pastry Chefs. In it, Atwood posts a quote citing a key difference between software development and painting (doesn’t get you laid), and then a quote noting the “rockstar” quality of some programmers and bloggers/writers on the Internet. The second quote is more interesting to discuss because Eric S. Raymond is blamed for, “bringing this kind of schlock writing [portraying the software developer as a rockstar] onto the Internet”.

This alleged schlock writing asks important questions and reveals much for those seeking to understand the history of computing. Eric S. Raymond’s How to Become a Hacker essay is a guide for newbies and gives them a starting point to work from and, according to Maciej Ceglowski, “in which you quickly begin to understand that a hacker is someone who resembles Eric Raymond”. Perhaps this is true, but it is important to understand what the background of Raymond is and the tradition of writing in the computer science field. There are two points I wish to make: you should know your history, and writing to explore is not a sin or schlock.
Click to continue reading »

Posted in Writing, Programming | 2 Comments »

Toronto Lisp Meetup! 3 April 2008

April 4th, 2008 OMouse

It went really well. We had the back room of the Bloor Fox & Fiddle with more than enough tables and it was much quieter than the rest of the place. I think the next meetup will take place there as well.

What was Discussed

  • ContextL
  • Cells
  • Art of the Meta-Object Protocol
  • Someone mentioned they were replacing Perl scripts with Chicken Scheme scripts.
  • Clojure was discussed, in particular how well it integrated with Java libraries and the type annotations/tagging.
  • Snippet.el, an Emacs Lisp script which gives Emacs TextMate-like snippets. This means that when an abbreviation is expanded, you can press Tab to move to the next part of the abbrev that needs replacing. An example is a C-style for loop where you have to replace the variables, end condition, and iteration, not to mention the body of the loop.
  • There was a University of Waterloo student who mentioned doing analysis of source code indentation and how it indicates complexity. I think this is it.

Arc was mentioned briefly but no one has really messed around with it much.

Next meetup

The only thing that we have to decide for the next meetup is whether it will take place next month or the month after. June seems a little too far away and the weather is good so maybe next month would be a good idea especially for those that missed out on this meetup.

More information on the Toronto Lisp meetups

Posted in Programming, Scheme, Lisp | 1 Comment »

Emacs: Turning Day into Night

March 27th, 2008 OMouse

I have gained an interest in cyberpunk novels again and have been looking at the Shadowrun RPG. One of the hallmarks of cyberpunk is a dark, depressing atmosphere. This darkness is also associated with the coolness that is running the shadows or jacking into the Matrix or whatever. But, I believe, there is a benefit to a dark-themed desktop: it hurts the eyes less after hours of staring at a light-themed desktop.

In any case, I spend most of my time in Emacs so I needed a way to change the colour of the background and the text easily.
Click to continue reading »

Posted in Emacs, Lisp | No Comments »

Firefox3.0beta4

March 20th, 2008 OMouse

I just installed Firefox 3.0 beta 4 and I must say it’s much faster than before. Especially the Javascript engine. I can really see the difference between Epiphany (which uses Gecko, the same rendering engine Firefox uses) and Firefox. I’m actually typing this short post from Firefox, using the ScribeFire add-on. I’m not sure if there’s an add-on like that for Epiphany.

So far so good! I may turn into a Firefox fan once again :D

Posted in Linux | No Comments »

Quick tip: Parenface

February 13th, 2008 OMouse

This is just a tip for my future self.

Parenface is an Emacs mode that changes the colour of your parentheses. By default it makes them “DimGray” but I prefer “Gray” or some other pastel colour (”Azure” and “Cornsilk” come to mind, but they may be a bit too light). This makes the parens slightly lighter and really lets you forget about them.

For the more adventurous, change the default dim colour to “White”…

Download here: http://www.davep.org/emacs/parenface.el

Posted in Emacs, Writing, Scheme, Lisp | No Comments »

Bits and Pieces of Lisp: Romanize

February 13th, 2008 OMouse

Update: Zach has pointed out that you can use FORMAT to print out Roman numerals using the “~@R” control string.

Before I go to sleep, I was curious to find out what kinds of bits and pieces of Lisp code I’ve written. Below is some code that converts an integer to its Roman numeral equivalent. I wrote it because someone wrote code to do it in a functional manner in Python.

(defpackage :roman
  (:use :common-lisp)
  (:export :romanize
           :+numerals+))
 
(in-package :roman)
 
(defconstant +numerals+ #((1000 "M") (900 "CM") (500 "D") (400 "CD")
                          (100 "C") (90 "XC") (50 "L") (40 "XL")
                          (10 "X") (9 "IX") (5 "V") (4 "IV") (1 "I"))
  "Set of Roman Numerals used by the conversion function.")
 
(defun romanize (x)
  "Converts an integer to its Roman numeral equivalent."
  (declare (integer x))
  (cond
    ((> x (car (aref +numerals+ 0)))
     (error "~D is too large. The largest integer we can handle is ~D." x (car (aref +numerals+ 0))))
    ((<= x 0) (error "~D is too small. The smallest integer we can handle is 1." x))
    (t (labels ((recurse (x nums acc)
                  (if (<= x 0)
                      (apply #'concatenate 'string (reverse acc))
                      (let* ((pos (position-if #'(lambda (n) (<= n x)) nums :key #'car))
                             (obj (aref nums pos)))
                        (recurse (- x (car obj)) (subseq nums pos) (cons (cadr obj) acc))))))
         (recurse x +numerals+ '())))))

I am searching for other bits and pieces and hopefully I can find something useful to post.

Posted in Algorithms, Lisp | 2 Comments »

Renaming Photos Using EXIF Information

January 16th, 2008 OMouse

Someone has created a Windows-only application that will rename photos using EXIF data. This is the same exercise that I did using MzScheme a few months ago. Maybe I should expand my Scheme program to have a GUI and package it up?

Posted in GUI, Scheme | 1 Comment »

I’m in an Insane State (a Few Good Links)

January 4th, 2008 OMouse

Zed Shaw used to be a Ruby/Rails developer and he created the Mongrel server that is quite the rival to Apache. Just a few days ago he wrote a giant rant about how the Rails community sucks and the blood-sucking con artists are moving in (example: consultants who train on the employer’s dime and time).

He also wrote something interesting about Finite State Machines. Specifically, creating one with Ragel State Machine Compiler. By far, the coolest thing is that it’ll generate code for “C, C++, Objective-C, D, Java or Ruby code” without external dependencies. Also, it produces pretty charts :)

One other interesting thing (though I’m not sure how accurate it is) is the statement he makes about Mongrel vs. Apache:

… most of the security attacks that worked on Apache were rejected outright when tried on Mongrel. In fact, we’d put Mongrel behind Apache and watch Mongrel reject about 80% of the attacks while Apache let them right on through.

I know these links appeared on reddit in the last few days. This is basically a post to let people know I’m still alive and still hacking away at Emacs-Lisp, Scheme and just started looking at Common Lisp again.

Posted in C++, D, Algorithms, Java, Ruby, Programming | No Comments »

TaskScheduler Domain Specific Language converted to Lisp

December 6th, 2007 OMouse

Oren Eini has written a DSL that uses the Boo language and does a bit of sub-classing. This was in response to a reply to one of his posts by a blogger named Tim Wilde. The purpose of a domain-specific language is to make it easier to talk about the domain. The DSL written is written for the domain of scheduling tasks. Instead of typing out the following:

myTask = new Task("warn if website not alive", (3 * 60), ... )
myTask.start()

You would type out:

task "warn if website not alive" every 3 minutes starting now ...

It’s more readable for other users and it hides details that are unnecessary when talking about the domain.
Click to continue reading »

Posted in Algorithms, Ruby, Programming, Scheme, Lisp | 1 Comment »

The Death of PayPerPost and 3 Ways to Avoid PayPerPost Blogs

November 29th, 2007 OMouse

Update: Matt Cutts has a great article explaining why PayPerPost and other services such as that are bad for the general public.

TechCrunch has posted a brief article about PayPerPost users being upset with Google at the loss of PageRank. What frustrates me most is that the people participating in scams such as PayPerPost are discarding the trust of their fellow man. They are practicing a terrible marketing strategy and cluttering up the Internet with their garbage.

Some have gone as far as declaring Google’s PageRank algorithm pointless! PageRank moved the Internet forward and for this reason, Google remains one of the best search engines out there.

Anyway, here are 3 ways to tell if a blogger is blogging for a PayPerPost type service.
Click to continue reading »

Posted in Writing | 9 Comments »