<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3489168423454778696</id><updated>2011-04-21T18:57:41.723-07:00</updated><category term='php5'/><category term='00ber-n00b'/><category term='i_am_a_n00b'/><category term='php4'/><category term='emacs'/><category term='thisblog'/><category term='java'/><category term='python'/><category term='clojure'/><category term='php'/><category term='swank'/><category term='programming'/><category term='functional programming'/><category term='pear'/><category term='lisp'/><category term='oop'/><category term='testing'/><category term='slime'/><category term='recursion'/><title type='text'>You are the wolf</title><subtitle type='html'>My computers and programming blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-1572454593127838282</id><published>2009-01-18T00:40:00.001-08:00</published><updated>2009-01-18T00:40:21.741-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='slime'/><category scheme='http://www.blogger.com/atom/ns#' term='swank'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Setup mods (clojure)</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  After much tearing of hair, many emacs restarts, many killings of
  *inferior-lisp*, I finally decided to give up on the pure-swank way
  of calling &lt;code&gt;java&lt;/code&gt;. Up until yesterday I just had this:
&lt;/p&gt;
&lt;pre&gt;
  &lt;code&gt;
(setq swank-clojure-jar-path "/home/joseph/src/clojure/clojure.jar")
(setq swank-clojure-extra-classpaths 
      (list "/home/joseph/clojure/clojure-contrib.jar" 
            "/home/joseph/lib/commons-httpclient-3.1.jar"))
  &lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;
  Last night I reorganized everything basically following &lt;a href='http://bc.tech.coop/blog/081205.html'&gt;Bill Clementson's
  setup&lt;/a&gt;. Now all the classpath business goes into an environment
  variable and gets called by an almost empty shell script. For me,
  the main advantage of this setup is that it was easier to see how
  java was being called, so that it was easier to debug the rest of my
  setup. 
&lt;/p&gt;
&lt;p&gt;
  To make a long story short, I was finally able to import
  &lt;code&gt;org.apache.commons.httpclient&lt;/code&gt; this morning.
&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-1572454593127838282?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/1572454593127838282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=1572454593127838282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/1572454593127838282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/1572454593127838282'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2009/01/setup-mods-clojure.html' title='Setup mods (clojure)'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-6790761146420291492</id><published>2009-01-16T14:08:00.001-08:00</published><updated>2009-01-16T14:13:28.447-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='recursion'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><category scheme='http://www.blogger.com/atom/ns#' term='00ber-n00b'/><title type='text'>recur is a trip</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  This is really just an update to my &lt;a href='http://arethewolf.blogspot.com/2009/01/baby-clojure-step-number-two-my-very.html'&gt;previous
  post&lt;/a&gt;, but I just added &lt;code&gt;recur&lt;/code&gt; to my recursive function.
&lt;/p&gt;
&lt;p&gt;
  The Clojure documentation isn't that verbose, in general, and it
  took my n00b brain some time, and some luck, and some nasty messages
  from the compiler, to figure out how you actually use recur.
  Basically, it looks like that, just as you are about to have your
  function call itself, instead of using the name of your function,
  you call &lt;code&gt;recur&lt;/code&gt; instead. Wow. Why does that seem
  cool? 
&lt;/p&gt;

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-6790761146420291492?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/6790761146420291492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=6790761146420291492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6790761146420291492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6790761146420291492'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2009/01/recur-is-trip.html' title='recur is a trip'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-3801147793127584087</id><published>2009-01-16T09:18:00.001-08:00</published><updated>2009-01-16T09:18:28.446-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lisp'/><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><category scheme='http://www.blogger.com/atom/ns#' term='00ber-n00b'/><title type='text'>Baby clojure step number two: my very first mind expansion</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  So, today, after just a little bit more fiddling getting
  Clojure/swank/slime working on my desktop box, I was able to
  actually run into a more Clojurish obstacle. But first I had better
  explain my little project that I just mentioned yesterday.
&lt;/p&gt;
&lt;p&gt;
  I used to read RSS feeds with Gnus, but ever since I switched to
  using the Gmail IMAP interface with Gnus (rather than fetching mail
  to my local server and reading it from there), the extra time spent
  reloading all my feeds every time I wanted to check my mail started
  to discourage me. And that was the end of nnrss for me. At least for
  awhile. 
&lt;/p&gt;
&lt;p&gt;
  The other day I started to think that nnrss might work for me again
  if I kept local copies of the feeds and used wget or something to
  keep them up to date. As I started putting a bash script together, I
  started to realize that my specs were quickly surpassing my bash
  skills:  keeping track of the last time fetched (because wget won't
  do it if you change the name of the file you download, which you
  have to do because feeds often have the same filename...),
  conditionally running Atom feeds through an XSL stylesheet to make
  them readable for nnrss, and probably more as the list got
  longer. And I did look around for some kind of ready-made solution
  to all of this but everything I found was somehow &lt;em&gt;too
  complete&lt;/em&gt;.  So just as I was about to start writing some Perl, I
  thought: "you're in no hurry, do this in Clojure and learn a thing
  or two". So here I am.
&lt;/p&gt;
&lt;p&gt;
  Anyway, step one right now is to read a text file with a list of
  URLs and a feedname. Next I will add a "type" field or maybe an
  "atomp" field to pick out those that need furthing parsing. So then
  we end up looking at ideal material for a Perl one-liner but a
  metaphysical challenge for the Clojure 00ber-n00b that I am. &lt;a href='http://arethewolf.blogspot.com/2009/01/tiny-baby-clojure-steps.html'&gt;Yesterday&lt;/a&gt;
  I mentioned my first flailings that got me as far as reading a file,
  splitting the lines and printing them back out. Heady stuff, I know.
&lt;/p&gt;
&lt;p&gt;
  Today's challenge was stuffing everything back into what was to
  become my feed "database". Using Stuart Halloway's &lt;a href='http://blog.thinkrelevance.com/2008/9/16/pcl-clojure-chapter-3'&gt;rewrite&lt;/a&gt;
  of &lt;a href='http://gigamonkeys.com/book/'&gt;Peter Seibel's PCL&lt;/a&gt;,
  specifically the now-famous CD database, I had settled on using a
  set of structs to contain all my information.
&lt;/p&gt;
&lt;p&gt;
  Everything seemed very calm and smooth for awhile. I could write
  functions for making structs, adding them to the set
  (&lt;code&gt;#{}&lt;/code&gt;). I could read my data file, I was using
  &lt;code&gt;first&lt;/code&gt; and &lt;code&gt;second&lt;/code&gt; and felt like I was back
  in Lisp. 
&lt;/p&gt;
&lt;p&gt;
 And then suddenly I hit the wall of immutability.
&lt;/p&gt;
&lt;p&gt;
  Here is  what I wanted to do:
&lt;/p&gt;
&lt;pre&gt;
  &lt;code&gt;
(defn parse-rsslist-file [db feedlist-filename]
 (with-open [r (reader feedlist-filename)]
   (doseq [line (line-seq r)]
     (let [url (first (.split line " "))
           nam (second (.split line " "))]
       (add-feeds db (struct feed nam nil url nil)))))
       db)
  &lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;
  I was stupidly trying to loop through the lines and accumulate the
  results in &lt;code&gt;db&lt;/code&gt;. That is what I would have done in Common
  Lisp and just about anything else. When my function kept just
  returning an empty &lt;code&gt;#{}&lt;/code&gt;, I finally realized that I was
  face to face with &lt;em&gt;real&lt;/em&gt; functional programming and one of
  the aspects of Clojure that has been commented the most.
&lt;/p&gt;
&lt;p&gt;
  This led to a new exploration of the Clojure docs and a tentative
  understanding of the difference between a &lt;a href='http://clojure.org/sequences'&gt;sequence&lt;/a&gt; and a  collection
  and a list. I knew that I needed to write a recursive function but I
  was not sure exactly what &lt;code&gt;(line-seq r)&lt;/code&gt; was spitting
  out. Happily for me, it turns out that everything does end up
  working more or less like a list, and so with very little fiddling I
  was able to get my magnificent file reading function to work.
&lt;/p&gt;
&lt;p&gt;Behold!&lt;/p&gt;
  &lt;pre&gt;
    &lt;code&gt;
(defn parse-rsslist-file [db urlfile]
  (with-open [r (reader urlfile)]
    (parssrss db (line-seq r))))

(defn parssrss [db sq]
  (if (not sq)
    db
    (parssrss (db-add-line db (first sq)) (rest sq))))

(defn db-add-line [db line]
  (let [lspl (.split line " ")]
    (cons (struct-map feed 
                  :name (second lspl)
                  :title nil
                  :url (first lspl)) db)))
    &lt;/code&gt;
  &lt;/pre&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-3801147793127584087?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/3801147793127584087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=3801147793127584087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/3801147793127584087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/3801147793127584087'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2009/01/baby-clojure-step-number-two-my-very.html' title='Baby clojure step number two: my very first mind expansion'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-7590961578136827223</id><published>2009-01-15T10:36:00.001-08:00</published><updated>2009-01-15T11:50:08.551-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='i_am_a_n00b'/><category scheme='http://www.blogger.com/atom/ns#' term='clojure'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Tiny baby clojure steps</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Yesterday I started actually trying to do something with &lt;a href='http://clojure.org'&gt;Clojure&lt;/a&gt;. Here are my very, very first
  impressions of what it is like to actually get your feet wet, or
  your fingers dirty or whatever. This can probably all be resumed
  with:  everything is much more difficult if you don't have any
  experience with Java. Like me. 
&lt;/p&gt;
&lt;p&gt;
  This is of course assuming that your system is working correctly. I
  only finally ended up getting slime, swank and clojure all working
  together correctly. It isn't that hard, or at least it doesn't seem
  like it once you see how things fit together. Just a couple of
  variables for swank, your .jars in a good spot and you are ready to
  go. It took me a while to realize that of course. And I made stupid
  mistakes like not compiling clojure-contrib yet expecting it to
  work. Stupid stupid mistakes.
&lt;/p&gt;
&lt;p&gt;
  My initial task was to try to read a file line-by-line. A very
  Perl-ish thing to do I guess, but it seemed to be a reasonable thing
  to do. Also, in the initial version of my little project (more about
  that later), everything started with a config file full of URLs that
  I was trying to read with bash. 
&lt;/p&gt;
&lt;p&gt;
  So how &lt;em&gt;do&lt;/em&gt; you read a file line by line in Clojure?
&lt;/p&gt;
&lt;p&gt;
  Well, here is what I have right now. It works.
&lt;/p&gt;
&lt;code&gt;
(use '[clojure.contrib.duck-streams :only (reader)]) 
(with-open [r (reader "/home/joseph/localrss/rss_urls")]
        (doseq [line (line-seq r)]
          (println line)))
&lt;/code&gt;
&lt;p&gt;
  What is strange is that Java is always close by. Just for reading a
  file, you need Java objects. Here "duck-streams" are a wrapper
  around some Java stream things. And I had to bring the
  clojure-contrib .jar into my configuration for this to work. This is
  just something to get used to, I suppose, and probably feels
  perfectly natural for Java programmers.
&lt;/p&gt;
&lt;p&gt;
  The same seems to go for string functions. The official &lt;a href='http://clojure.org/data_structures'&gt;docs&lt;/a&gt; just say :
&lt;blockquote&gt;
  Clojure strings are Java Strings. See also Printing.
&lt;code&gt;
user=&amp;gt; (map (fn [x] (.toUpperCase x)) (.split "Dasher Dancer Prancer" " "))
("DASHER" "DANCER" "PRANCER")
&lt;/code&gt;
&lt;/blockquote&gt;
Those &lt;pre&gt;.toUpperCase&lt;/pre&gt; and &lt;pre&gt;.split&lt;/pre&gt;s look suspiciously
like macros calling Java functions, so it looks like I'll be getting
chummy with those soon too.
&lt;/p&gt;
&lt;p&gt;
  Interestingly, I haven't seen anything about strings being vectors
  or sequences of some kind, as in Common Lisp. I guess all of that
  gets thrown away once you beat into your n00b brain that "Clojure
  strings are Java strings".
&lt;/p&gt;

    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-7590961578136827223?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/7590961578136827223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=7590961578136827223' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/7590961578136827223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/7590961578136827223'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2009/01/tiny-baby-clojure-steps.html' title='Tiny baby clojure steps'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-2654190814625123056</id><published>2008-05-05T12:51:00.001-07:00</published><updated>2008-05-05T12:51:52.186-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><category scheme='http://www.blogger.com/atom/ns#' term='pear'/><title type='text'>The pros from Dover</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Is this sounding like one long rant about php? 
&lt;/p&gt;

&lt;p&gt;
  I wonder why...
&lt;/p&gt;
&lt;p&gt;
  Today's rant is about the quality of PHP documentation. I've taken
  to using the official PHP documentation on &lt;a href='http://www.php.net/manual/en/'&gt;the official
  website&lt;/a&gt;. Fairly often I am disappointed because there are
  missing parts: the developers wrote some code quickly and didn't
  bother to document. Odd for an official site, but okay.
&lt;/p&gt;
&lt;p&gt;
  So right now I am looking for info on doing HTTP digest
  authentication in php. There is a &lt;a href='http://fr2.php.net/features.http-auth'&gt;page about it&lt;/a&gt; that
  provides some examples that simply don't work. The regex for parsing
  Authorization headers is defective and none of the solutions people
  have offered up in the comments have helped me at all...
&lt;/p&gt;
&lt;p&gt;
  Fine.
&lt;/p&gt;
&lt;p&gt;
  The funny thing is that everyone insists on using regexes. I like
  regexes just fine, and with Perl I used to consider myself
  reasonably good with them. Anyhow, the consensus seemed to be that
  you needed a good regex. After screwing around for awhile, I was
  about to write my own solution using &lt;code&gt;explode&lt;/code&gt; and
  &lt;code&gt;substr&lt;/code&gt; and a lot of &lt;code&gt;strpos()&lt;/code&gt;. But it was
  getting late...
&lt;/p&gt;
&lt;p&gt;
  So, after wasting an evening thinking that there was something I
  wasn't getting, I decide to look around for a library. There isn't
  much that jumps out at me right away, but I end up finding &lt;a href='http://pear.php.net/package/Auth_HTTP/'&gt;Auth HTTP&lt;/a&gt; which
  extends the &lt;em&gt;Auth&lt;/em&gt; class. 
&lt;/p&gt;
&lt;p&gt;
   I don't want to install &lt;code&gt;Auth&lt;/code&gt; (trying to go light) but I download
   &lt;code&gt;Auth HTTP&lt;/code&gt; to look at how they parse the Authorization
   header. First of all, I am impressed by how clean the code is. Then
   I find my function, and guess what: &lt;code&gt;explode&lt;/code&gt;,
   &lt;code&gt;substr&lt;/code&gt;, &lt;code&gt;strpos&lt;/code&gt;.
&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-2654190814625123056?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/2654190814625123056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=2654190814625123056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/2654190814625123056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/2654190814625123056'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/05/pros-from-dover.html' title='The pros from Dover'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-7431844641650949457</id><published>2008-04-27T13:03:00.001-07:00</published><updated>2008-04-27T13:03:05.627-07:00</updated><title type='text'>For instance (more about functions as arguments)</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  So, passing functions as arguments by turning them into strings,
  that's fine I suppose for traditional functions. But what about
  object methods? How am I supposed to transform
  &lt;code&gt;$obj-&amp;gt;do_something()&lt;/code&gt; into a &lt;em&gt;string&lt;/em&gt; that I can
  feed to another function? That is what I would like to know.

&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-7431844641650949457?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/7431844641650949457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=7431844641650949457' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/7431844641650949457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/7431844641650949457'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/04/for-instance-more-about-functions-as.html' title='For instance (more about functions as arguments)'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-6982951264947052240</id><published>2008-04-27T07:22:00.001-07:00</published><updated>2008-04-27T07:22:58.464-07:00</updated><title type='text'>php5 makes php bearable</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Just to show what an amazingly open mind I have, I just wanted to
  add that after moving to php5 and trying to be as object-oriented as
  I can, I have started to find that programming in php &lt;em&gt;can&lt;/em&gt;
  be less painful than I originally thought.
&lt;/p&gt;
&lt;p&gt;
  I am starting to get used to some of the overall quirkiness of the
  language. I even forgive it for having so ding many functions, since
  Common Lisp has quite a few as well.
&lt;/p&gt;
&lt;p&gt;
  Overall, I find that there is a lack of coherence in the way the
  function are implemented. I still have to look everything up all the
  time, but that is probably just me. However I expect a function to
  work, php usually does the opposite. But hey, &lt;em&gt;they&lt;/em&gt; wrote
  the language, so they can do what they want. More substantially, I
  find completely counterintuitive and backwards the way that you pass
  functions as string arguments. At least in Perl, even though all
  arguments are passed as values, you are passing a reference, not
  just a string name. It just feels wrong, I'm telling you! I'd be
  willing to make function objects and pass them instead, but you
  still would have to feed those objects with strings naming
  functions... so back to square zero.
&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-6982951264947052240?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/6982951264947052240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=6982951264947052240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6982951264947052240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6982951264947052240'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/04/php5-makes-php-bearable.html' title='php5 makes php bearable'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-893076697604785546</id><published>2008-04-13T06:22:00.001-07:00</published><updated>2008-04-13T06:22:30.819-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php5'/><category scheme='http://www.blogger.com/atom/ns#' term='oop'/><title type='text'>From 4 to 5</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Well, I get to play with php5 instead of php4. This is huge news for
  me, as I intend to use stored procedures in MySQL, which is all but
  impossible with php4.
&lt;/p&gt;
&lt;p&gt;
  I'm taking advantage of this change to really make this new project
  object-oriented. I'm not much of an OOP fanatic myself, but I do see
  some advantages here, especially since it is so ding hard to write
  anonymous functions and to pass them around. (At least that is my
  impression.) php5 seems set up in a way that encourages you to pass
  objects around instead, so I will adjust.
&lt;/p&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-893076697604785546?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/893076697604785546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=893076697604785546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/893076697604785546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/893076697604785546'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/04/from-4-to-5.html' title='From 4 to 5'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-8173364203416938257</id><published>2008-03-24T10:25:00.001-07:00</published><updated>2008-03-24T10:25:01.978-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='testing'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Testing... Testing...</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Now that I have started using a test suite -- &lt;a href='http://www.lastcraft.com/simple_test.php'&gt;this one, in
  fact&lt;/a&gt; -- my life has improved. At least I can see why PHP is not
  doing what I want it to.
&lt;/p&gt;
&lt;p&gt;
  There is something very satisfying about testing as you go. It
  definitely improves the modularity of your code.
&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-8173364203416938257?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/8173364203416938257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=8173364203416938257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/8173364203416938257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/8173364203416938257'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/03/testing-testing.html' title='Testing... Testing...'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-6131976431370305751</id><published>2008-03-24T09:02:00.001-07:00</published><updated>2008-03-24T09:02:31.953-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>strlen!</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  So &lt;code&gt;strlen&lt;/code&gt; is just &lt;em&gt;way&lt;/em&gt; more intuitive than
  &lt;code&gt;length()&lt;/code&gt;!
&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-6131976431370305751?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/6131976431370305751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=6131976431370305751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6131976431370305751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6131976431370305751'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/03/strlen.html' title='strlen!'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-5788360892917461404</id><published>2008-03-24T07:36:00.001-07:00</published><updated>2008-03-24T07:36:34.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php4'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='php5'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Obviously</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Obviously, I'm using php4. Because I have to.
&lt;/p&gt;
&lt;p&gt;
  If I could use php5, I would.
&lt;/p&gt;
&lt;p&gt;
  If I could use (almost) anything besides, php, four or five, I
  would. Including languages I don't even know but would love to
  learn. Python, for example. That would be fun.
&lt;/p&gt;
    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-5788360892917461404?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/5788360892917461404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=5788360892917461404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/5788360892917461404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/5788360892917461404'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/03/obviously.html' title='Obviously'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-6065223288128831246</id><published>2008-03-24T07:27:00.001-07:00</published><updated>2008-03-24T07:27:45.253-07:00</updated><title type='text'>PHP rant : anonymous functions</title><content type='html'>
    &lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;

&lt;p&gt;
  Anonymous functions in PHP are a joke. Maybe not in their overall
  functionality but at least in their syntax, that is with
  &lt;code&gt;create_function&lt;/code&gt;.  I mean, really: the function is a
  string of code that somehow gets evaled into a function?
&lt;/p&gt;
&lt;p&gt;
  If you are going to have anonymous functions, it would be nice to be
  able to write them like functions.
&lt;/p&gt;

    &lt;/div&gt;
  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-6065223288128831246?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/6065223288128831246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=6065223288128831246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6065223288128831246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/6065223288128831246'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/03/php-rant-anonymous-functions.html' title='PHP rant : anonymous functions'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3489168423454778696.post-7308638608775077174</id><published>2008-03-24T07:21:00.001-07:00</published><updated>2008-03-24T07:22:52.964-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thisblog'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Hey...</title><content type='html'>This is obviously my first post here. This blog is going to be about programming. Right now it is going to be about why I hate the php programming language. That is why I decided to create this blog today. I would have eventually done it anyway, but it would have been later.

So there you are. I'm going to publish this and then go see what this thing looks like. Back with some rants quickly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3489168423454778696-7308638608775077174?l=arethewolf.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arethewolf.blogspot.com/feeds/7308638608775077174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3489168423454778696&amp;postID=7308638608775077174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/7308638608775077174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3489168423454778696/posts/default/7308638608775077174'/><link rel='alternate' type='text/html' href='http://arethewolf.blogspot.com/2008/03/hey.html' title='Hey...'/><author><name>skillet-thief</name><uri>http://www.blogger.com/profile/02379583528990564272</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
