Configuring LeafNode on OSX

May 18th, 2010

Getting LeafNode to work on OSX is a bit of a pain, messing with that today I found that little exists in terms of documentation on how to make this happen. The real problem isn’t specifically with the base install of LeafNode, but getting it configured is where the problem is at:

Installing Leafnode:
port install leafnode

Once leafnode is installed, you have a few commands that you can use at this point:
fetchnews – This will be used to get the listing of groups, which once read, will start pulling the actual documents themselves
leafnode – This can be run a few different ways, but with the macports option it’s really not a bad idea to run this through launchctl (assuming you’re on a later version of OSX).

Once it’s installed, your configuration file that you’ll need to edit is in /opt/local/etc/leafnode/config. Most of the stuff in the config.example will help in configuring leafnode. The important elements that should be edited are:
server – The server name itself
username – Obvious
password – Again, obvious
expire – I personally wanted everything that a newsgroup had, and to continue to fetch as much as possible since I want to be able to search off archived messages. I set this really high, I’d recommend the same.
hostname – This can be configured from your newsreader, but I added this as something if I forgot to configure it correctly.
maxfetch – Similar to expire, just sets the max number of initial articles to fetch. I set this insanely high as well.

The plists for launchctl are located in /opt/local/etc/LaunchDaemons/org.macports.leafnode
One way to load this right away is:
sudo launchctl load /opt/local/etc/LaunchDaemons/org.macports.leafnode/org.macports.leafnode.plist

I’ve also created a symlink from the above location to /Library/LaunchDaemons
cd /Library/LaunchDaemons
ln -s /opt/local/etc/LaunchDaemons/org.macports.leafnode/org.macports.leafnode.plist .

At this point, you can use emacs to connect to your server. Much of the stuff left is to configure your emacs variables. Some example stuff I use is:

;; GNUS Setup
(setq user-mail-address “youremail@domain”)
(setq user-full-name “Your Name”)
(setq gnus-select-method ‘(nntp “localhost”
(nntp-address “127.0.0.1″)
(nntp-authinfo-file “~/.authinfo”)
(nntp-port-number 119)))

(setq gnus-summary-make-false-root ‘dummy)
(setq gnus-build-sparse-threads ’some)
(setq gnus-fetch-old-headers ’some)

(setq gnus-posting-styles
‘((“.
(signature-file “~/.signature”)
(x-url “http://www.thedarktrumpet.com/”)
(organization “The Dark Trumpet”))))

I do have a ~/.authinfo file, but the contents aren’t that important for leafnode.

In your news reader, or in GNUS, you can get the full newsgroup listing after running the initial fetchnews. Subscribe and view each newsgroup you want, then rerun the fetchmail again after. I use:
“fetchmail -v -n” to accomplish this.

The last thing that really needs to be done is setting up your crontab. I used the root crontab to do this, using “crontab -e” as root, then I have the following line:
/60 /opt/local/sbin/fetchnews -v -n

Developing focus the “agile” way

May 15th, 2010

There is a lot about the Agile project methodology way that I despise, but short term focus goals isn’t one of them.

First, I should probably introduce the agile methodology. In project management, there are multiple ways of handling how a project is run. The agile methodology focuses heavily on minor but often corrections to a project to help facilitate communication, reduce churn (when something has to be recoded due to requirement changes), and come up with more accurate short-term timelines and less focus on the long term. I won’t get into much more about the agile methodology, but the above should sum it up well.

The part I want to focus on is how this develops focus. When I was talking to my father yesterday, he asked why I am getting rid of stuff and buying less. I told this it had to do with focus. In my free time I’m interested in the following activities: martial arts, art (book binding, drawing and painting), music (playing and listening), reading, programming side projects, doing some work for work, watching some tv/movies, motorcycle riding, language study (writing blogs, learning new languages), and volunteer work. This doesn’t even take in account that I’m a graduate student and work full time. The reason I mention all this is to really illustrate the worst case of someone who has no focus and does too much.

The agile way comes to the rescue. I first had to realize that I want to become a master at some stuff and let other stuff fall back a little. To accomplish this, I am starting (actually did this in the past too) to pick a few things of my interests to focus on for one week. After the week, I want to spend a bit on Sunday morning in a mini retrospective to come up with ways of improving a bit.

To further sticking to the goals, it’s helpful to stick all the times one will do stuff on a calendar. Even when willpower is low, the calendar helps to keep things on track. It also reinforces the thought that being successful each day.

To give my week plans, I decided to focus on martial arts, language studies, and work reading/coding. My short term goal is to do this M-F with a retrospective on Sunday. If all goes well, I’d like to keep this focus a month. 3 hours each night dedicated to this isn’t much to ask.

I focused much of this writing as in what my plans were instead of the more generic what could be done because I feel this type of thing isn’t a known science and is adaptable by the individual. I would be very interested in hearing your opinions and ideas to improve this. Please use the comment area below.

On Minimizing

April 17th, 2010

On minimizing….

I’ve been asked before two big questions. The first is why do I work to minimize my possessions/needs, and the second is how does one know when it’s taken too far? My goal is to try and answer these questions in a fairly concise way. The art of minimizing is a fairly recent one. Some people who are very well off decided that life is too complex when it comes to how much we own. Furthermore, movements such as 7-habits, GTD, “zen”, and so on – they all point to a general issue we have in life. That issue, simply, is that people tend to try and cram more and more things into their life, and need ideas on how to get more done, faster. I know a number of people who enjoy this thrill of having lots of friends, being more in the limelight, and so on – in short this sort of life style makes us feel important, needed and so on. I know people who want to go to meetings and find them helpful if for nothing else likely the reason of feeling important or moving up the corporate chain.

I’m going to address the first question now – why did I bother with this? The reason started some number of years ago, and I’ll keep the story short. I used to be, and still am in many ways, a pack rat. To those who are not familiar with this term, it’s coined as someone who tends to accumulate possessions and never lets things go. It’s a sense of security to have many things, to know that if anything arises, that you’d have all you needed and wouldn’t have to depend on anyone else. This sense of security is why I also gained as much weight as I did in my younger years as well. About 8 or so years ago, I was introduced to Zen Buddhism, and practiced quite a bit. After awhile, I learned it’s not what you do only in meditation that matters, but also what one does outside of the meditation room. Much of this wisdom came, in part, from Shoken (An abbot from Ryumonji Monastery). From around that point, I began to heavily question why I needed to own as much as I had, and determined in some ways what I should do about it.

Over the past year and some, I’ve spent much of my time trying to give/donate and/or sell much of my possessions. It’s been one of the hardest things I’ve had to do, but not really for the usual reasons. It wasn’t due to the fact I was inconvenienced from the less number of items, but more from looking at something and saying “Oh, I remember when I used to have fun with this…” sorta feeling. This happened a lot; but considering I haven’t seen that particular item in a number of years, it’s all the more reason why I don’t need it. I’m still working heavily on trying to get rid of other possessions I have. Random game consoles, computers, TV/couches/etc, DVDs and CDs – and so on, all are being analyzed and dealt with accordingly.

I’ve learned of some benefits I’ve gained from this way of doing things:
1. I have greater awareness of when I want something. This can be in the form of food, or whatever. In a lot of ways this drive died down a whole lot, but not in all ways (lifts ipad).
2. I am able to spend more concentrated time at home. I used to go elsewhere to concentrate, but find being at home works just as well now. I spend far less time cleaning, because I have less things to clean up after. This saves money from the coffee shop, and I really do have a much nicer work area at this point.
3. I less often come across stuff saying “I didn’t know I had this!” As I was cleaning up one area some months ago, this feeling happened a lot.
4. I spend more time on activities that matter. I have an issue where I like to do too much. I like to keep myself busy, and pride myself on not being bored. I jump around different activities like a jack rabbit. Since I removed a lot of areas that I used to do as random activities, and have further plans to remove even more – I’m spending far more time perfecting areas that I should have been doing for the past 10 years. Mostly this relates to martial arts, where at this point I’m spending a few hours a day working out/practicing.
5. I’ve learned to limit pleasure. Specifically this came in the form of video games, TV, and chatting on the net. I’ve worked at going an entire work week without Internet at home, and that’s been beneficial for me. I commonly will go a day or two without net with no issues as well.

I still have far to go though, but I am making good progress

To tackle the second question – how far is too far? This specifically came up with a coworker, when I was talking about building a PC (I have too many computers, but am thinking of settling on a PC tower and a MBP – long story). Anyways, looking at the data processing I do, he said that going the route of a PC is likely not a bad idea and would help me a lot. He brought up the idea that he knows I’m trying to minimize stuff, but when can it be taken too far?

I thought a lot about this question, both from that point, and afterwards. My initial answer was as follows: You can take it too far once it becomes uncomfortable. Upon further reflection, this isn’t entirely accurate of an answer. The reason being is that if one is comfortable, one really stops growing. This doesn’t mean the goal is to be constantly uncomfortable, but more to not be totally comfortable at the same time. This is a bit tricky because it really depends on the person for when something is taken too far. For myself, I really haven’t fully found the answer yet. I suppose, when I have enough to be happy but enough to not be distracted – that at that time it’s on the border of being taken too far. Does this mean I need that PC, and I should build it? Perhaps…but not yet, not until I finish getting rid of all but 1 of my remaining computers. When I can accomplish the idea of having just my MBP, maybe an ipod/ipod touch, and my ipad – I’ll reconsider the PC thing. I can find many ways of justifying the purchase, but in all actuality, I’ve gotten by this long without building it for now.

I hope this clarifies a bit about my position on trying to minimize my possessions. Much of my own story, I feel, is similar to what Siddhartha Gautama Buddha felt around my age some years ago when he left his life of luxury. Unlike the Buddha, I’m not really leaving a life of luxury – but instead trying to cherish fully the stuff I have and to be satisfied with that. Looking back at all this, I’m very happy to have gone this far and have much to learn.

Dealing with Introverts – a guide for extroverts

April 4th, 2010

I hate categories that define people into groups, since things are so complicated – Over the past few months though I wanted to address issue related to extroverts vs introverts. The reasoning for this really started from our move to agile – and specifically “Agile Bob” on what he said during one of the social events. Really from that, I realized really how difficult it really is for people to understand an introvert well.

First let me start by describing what, exactly, an introvert is. An introvert is someone who is usually claimed as being shy. An introvert usually has few friends, dislikes large group events, and generally doesn’t brag about their accomplishments and abilities. This differs from an extrovert because an introvert needs to have “alone” time to really recharge. What this means is that an introvert likes to spend at least some time by themself doing something they love.

In comparison to extroverts, introverts have as much drive when it comes to their goals in life as extroverts do. Extroverts like to meet many people, and chat with others – introverts (depending how much one is) tends to not go out to meet others. What’s important to note is that introverts don’t do this because they dislike others, but because the trust isn’t there. An introvert can be mistaken for disliking another person because they don’t chat personally with the other person – again, this should not be assumed. Speaking from myself, I can’t name one person that I really dislike. Generally, I feel fairly neutral toward everyone and consider few really friends. When an introvert doesn’t speak, it also shouldn’t be assumed they are annoyed or upset about anything. As I’ve mentioned to others – the more people involved with something, the less an introvert may actually talk. Speaking from my experience, if the meeting has more than say 4 or so people at it, my participation tanks big time. With everyone trying to make their point, trying to be right or whatever, I personally don’t want to be any part of that. On the other hand, if someone asks for my opinion 1-on-1 or even in a smaller group setting, I’ll near talk their ear off. My boss (not my direct supervisor) has a lot of my respect because he understands this point and makes good use of it.

So now that I explained a bit about introverts, how does one handle them? Before I get into that though – one thing I want to correct “Agile Bob” on is that introverts do not try to avoid being accountable for their actions any more than extroverts do. Introverts may feel a bit more shy about talking about what they are working on. Speaking from experience, I really dislike standups in the sense of trying to describe what I’m doing – yet I work on a lot more for the office than most see (in my off time – including 2 projects currently that may end up helping the office a lot – just few know about them yet).

Ok, so now how to handle an introvert.

1) Don’t be shy of just going up and talking to one. This doesn’t mean infront of everyone asking something personal – think 1 on 1. It’s not that hard, either through IM or just go up to them. Speaking from experience – I tend to be very open in how I feel about stuff and that includes my opinion. I don’t like being infront of others talking about my opinion unless I’m extremely passionate about it – but I still have opinions.

2) During meetings, the more people there are, the less introverts talk. This isn’t bad, the solution is simple – ask questions or give space for introverts to give their opinion. Frankly the meeting coordinator should do their best to get everyone’s opinion, but I haven’t experienced many people who do this worth anything. Extroverts can easily take up all the space when it comes to giving their opinions on how something can be done. Again, introverts do have opinions, and the danger one runs into without getting balanced opinions in general is someone just doing it their own way in the end anyways. This goes for both extroverts and introverts and is just human tendency. People want their input to feel valuable and their presence to feel valuable.

3) Don’t expect introverts to go to parties, out to eat with large groups of people, and so on. Large social gatherings are likely just not an introvert’s thing. Speaking for myself, I am more than glad to go out to eat with one or two other people maximum – but any more than that and I usually pass. This is why I go for tea with Jeff often, he figured this part out easily. Greg’s done a good job with this as well.

Those are the biggies – but really all this comes down to is communication. Introverts can have a depth of knowledge, experience, and feelings that most people see the tip of the iceburg when it comes to that. Introverts tend not to for bonds as easily as extroverts do for more reasons than I can really count. The important thing to remember is that assumptions in near anything in life is an evil that needs to be watched for.

This only gives a smaller chunk about introverts – but the most relevant to what I deal with on a day to day basis, so that’s why I’m focusing on that more here.

Using the email library Mel with CL

March 30th, 2010

The mel library, if people aren’t familiar with it, is an extremely nice library for parsing various email sources. I started using this as a bit of a project to pull in emails to my central search store. I was extremely surprised how well done this library was – although I admit the documentation is a bit rough around the edges.

So first, if you want to install this you can either install via asdf, likely clbuild, or just grab the darcs repository. Personally I had problems with the asdf install so I went with the stable darcs repo instead. For my install I’ve done the following:

cd /usr/lib/sbcl/site
darcs clone http://common-lisp.net/project/mel-base/darcs/mel-base/
cd ../site-systems
ln -s /usr/lib/sbcl/site/mel-base/mel-base.asd .

The one problem I’ve found is that there is little documentation out there, but we can create some to give a starting point at the very least.

cd /usr/lib/sbcl/site/mel-base/docs/manual
texi2pdf mel.texinfo

You’ll get a mel.pdf if you have texinfo installed.

I will concentrate a bit on using Maildir, since that’s kinda what I was starting with. You connect to a Maildir directory by the following:

(defvar inbox (make-maildir-folder “/home/dthole/Maildir/”))

Form there, you can run quite a few things. The most notable ones around are the functions:

messages
map-messages

messages itself, as the docs describe it, will return all the messages. This is fairly helpful, but the real power comes from map-messages. With map-messages, we can pass a function to evaluate from each message that’s processed. Some sample code of what I’ve done to determine specific email from/to is the following:

(defun mapMessageTest ()
  "From the map-messages, we're given an object, and we can call methods on that."
  (let ((num-ui-froms 0)
        (num-to-greg 0))
    (map-messages #'(lambda (x)
                      (if (scan "foo@bar.com" (address-spec (from x)))
                          (incf num-ui-froms))
                      (if (and (to x) (scan "bar@foo.com" (address-spec
                                                            (if (listp (to x))
                                                            (car (to x))
                                                            (to x)))))
                          (incf num-to-greg)))
                  *inbox*)
    (format t "Num from foo@bar.com: ~a~%" num-ui-froms)
    (format t "Num to bar@foo.com: ~a~%" num-to-greg)))

So what I’m doing here is passing an anonymous function that does two if conditions. x in this case is an message CLOS-type object from mel. We can call (from), (to), (message-string) and so on. Many of these aren’t documented, but the code is there. Anyways, the one curious part people may notice is the issue related to the (address-spec (if ..)) section. The to address can contains a list of elements, if you have more than one email, since you can have multiple tos in an email. I check to say if it’s a list, then get the first element else just return the element. All this is doing is creating two counters and outputting the result at the end.

Another function I mentioned just breifly a bit ago is (message-string). There are a lot of message-* functions out there, this one returns the text of the email.

One big reason why I enjoy this library is the caching it does. I found from my testing that going through 14k emails in my MailDir folder took about 10 seconds or so. Subsequent calls to (mapMessageTest) was MUCH quicker, taking less than a second. There’s some interesting caching the library implemented that’s really helpful while in the REPL. I haven’t looked at the code yet for this, but I’m excited to do it.

The reason I’m finding to use this library is to do some recognition on the emails and copy them to another area on disk. This discussion on documentation and search will be in a later blog article.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes