- Recent
- Popular
- Tags (0)
- Subscribers (1)
- Back on the HorseNovember 25
-
Nothing quite like a meme to get you back into the swing of things. Following up on the programming meme from Eric Florenzano, I've decided to implement the challenge in the modicum of lisp I know.
Code
(defun prompt-read (prompt) (format *query-io* "~a: " prompt) (force-output *query-io*) (read-line *query-io*)) (defvar name (prompt-read "name")) (defvar age (parse-integer (prompt-read "age"))) (loop for i from 1 to age do (format t "~{~a: Hello, ~a~}~%" (list i name)))Results
; SLIME 2008-11-02 CL-USER> (defun prompt-read (prompt) (format *query-io* "~a: " prompt) (force-output *query-io*) (read-line *query-io*)) PRO - And the wall comes tumbling downNovember 18
-
So I've officially missed a day at Post-A-Day. While I applaud those who can keep up their post count and quality, such as Eric Florenzano, Eric Holscher and James Tauber, I'm not at that stage yet. For now, I'm planning to recoup (sick), and prepare posts which are thought through a bit better. Expect more on the emacs front and hopefully more django posts.
- Macports and PYTHONPATHNovember 16
-
Setting up my new macbook, I've had to go through the joy and pleasure that is macports. Overall, it wasn't so bad. A few missing packages here or there. Everything was going fine until I tried to install Fabric. Its dependency on pycrypto kept failing. I had installed pycrypto via macports and no luck. Turns out there are two paths under opt which need to be added to the python path in order to get it to work.
/opt/local/lib/python/site-packages /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/After adding those, things work perfectly. Hope it helps someone!
- Top 5 BookmarkletsNovember 15
-
1. Insert jQuery: This bookmarklet is amazing if you're a firebug user. It allows you to use jquery in firebug, even when the site doesn't support it. I use it for things ranging from checking a bunch of checkboxes or checking the number of uses for a particular css class. You don't know that you're missing it until you don't have jQuery at your fingertips. (The bookmarklet is towards the middle)
2. Url Shortening Service: This allows you to convert huge urls into really small ones. My preferred service is bit.ly because their urls are quite short and their site is appealing to the eyes.
3. Amazon Wishlist: Influenced heavily by the upcoming holiday season, I like to keep this bookmark around so I know what it is I actually want. (I draw a blank when put on the spot). It allows me to add to the list all year round and cherry pick things from it when I want to treat myself.
4. Read Later: I actually just picked this one up today. The service, Instapaper, allows you to flag a specific website to read later. This in and of itself isn't very revolutionary. Bookmarks have been doing this for years. The real boon is the accompanying iPhone application which allows you to view these when you're on the go. I h
- Emacs III: Being ProductiveNovember 14
-
As not to give false ideas of what this post is about, let's lay it out up front. I'm going to show you how to be able to get work done in emacs. You're not going to be an emacs guru after reading this. You're not even going to be as productive as possible. That being said, you will be able to accomplish your work as well as you could as a mid-level vim user.
Note: For those unfamiliary with emacs shortcut notation, C-m means ctrl+m. M-x refers to meta+x. For me (a `carbonemacs`_ user, my meta key is command. It could also be alt or escape so experiement if that doesn't work for you.
Configuration for an Effective Session
Following Steve Yegge's epic post, there are a few things in there that you might question. I know I did. He suggests swapping the places of capslock and control. At first this just seemed pointless. After 2 days of trying the keyboard shortcuts without it, I got a case of emacs pinkie (pain from over use). Taking his suggestion, however, has proven to be quite helpful. It keeps my fingers on the home row a majority of the time which allows for speedier typing. Another change he suggested, C-w as kill-word, seemed to be another one of those small gains that wasn't worth doing. I can attest, however, that if you can type at a reasonable speed (50wpm+) its a godsend. rewriting an entire word is actually much quicker than backspacing 10 times to get rid of your last
