Older blog entries for SyntaxPolice (starting at number 34)

25 Mar 2003 (updated 25 Mar 2003 at 23:25 UTC) »
  • I got to a good milestone on my big Haskell project today. Woohoo!

  • Neat: someone wrote a History of Haskell

  • I'm working on gathering requirements for a short-term "cleanup and document" type project. It can be tricky to grasp the functionality of a complex program in order to document it in a short period.

  • While helping someone figure out do notation on #haskell today, I realized how much I enjoy helping people learn, especially programming. Maybe its partly an ego thing (showing off?), maybe procrastination since this particular problem was very easy for me, or maybe its just plain fun.

  • The Onion has their perspective on the war.

  • Galeon is still not working for me in Debian :( don't feel like tracking down the problem.

  • I went to a go playing club this weekend and had a nice game, but my handicap was too big so I won by too much.

  • robocoder RE: a tool to analyze content for potential liability, maybe you could make a google pluggin where you enter a company's name and it searches the internet for things you could sue them for.
  • I seem to have failed to post this entry some time ago:

  • Commited my changes to the Control.Monad.State documentation for Haskell. Not sure when it'll be deployed.

  • Yesterday at the climbing place, I found out that they had no record of my ever being there before. They apparently deleted my record from the computer. I've been going on and off for years and got a 6 month membership a few months ago. No one noticed until now because people always gave up looking through the list of Joneses and just let me in. They were nice enough about it, but I couldn't tell if they were going to try to send me another bill.

  • osullivj Thats a strange web site (the one w/ One True Language or something). Maybe a joke? I'd go with Haskell :)

  • Looks like I'll have to be doing more Java and less Haskell for a while.
  • Out of necessity I implemented partition to work in a monad:
    
    -- |Like 'List.partition' but works on Monads.  Uses 'Monad.filterM'.
    partitionM :: (Monad m) => (a -> m Bool) -> [a] -> m ([a], [a])
    partitionM f l = do a <- filterM f l
    		    b <- filterM (notM . f) l
    		    return (a,b)
    
    -- |Like 'not' but works on monads.
    notM :: (Monad m) => m Bool -> m Bool
    notM n = do n' <- n
    	    return (not n')
    

  • Also wrote a little more funcionality for an elisp interface to advogato. Its pretty ghetto though and untested (see previous diary entries)
    (defun advogato-post-buffer-as-diary-get-info (buffername username &optional password in-index)
      "Post the current buffer as your diary entry"
     (interactive "bPost What Buffer: \nsUsername: ")
     (if (null password)
         (let ((password (comint-read-noecho "Password: " t)))
           (save-excursion
    	 (set-buffer (get-buffer buffername))
    	 (advogato-post-string-as-diary (buffer-string)
    					(advogato-get-cookie username password)
    					in-index)))))
    
  • 11 Mar 2003 (updated 11 Mar 2003 at 16:39 UTC) »
  • Sorry for anyone seeing double on my last diary entry. I was under the false impression that if you posted an entry one day, subsequent entries on the same day would overwrite the previous entry.

  • So the idea, hatched by walters is to have the diary echoed on my home page, partly so I have a local backup.

  • Did I mention that I'm reading War & Peace?

  • Very sorry to hear about walter's laptop. Walters, I know you're looking at Mac laptops, but since I've been looking around a bit, I thought I'd share what I learned about buying non-mac laptops. Two places that apparently sell laptops w/ either Linux or no OS are here and here.

    I'm planning to look through this site to find information about laptops and supported features since I definitely want a working DVD player and built in wireless.

    Also, there was recently a slashdot thread on buying a linux laptop without paying the MS tax.

  • I saw Rilo Kiley last night with my gf and her sister. This is one of her sister's favorite bands.

  • Still really want a laptop linux machine.

  • Brian took some action shots from indoor rock climbing recently. Sorry they're big. I'll resize them eventually. It features my gf trying very hard to get over an edge, me cimbing both freestyle, on a rope, and with ice climbing equipment, lots of silly faces from Brian, and quite a number of random people, some of whom found the camera and created their own art. ;

  • I'm going to attempt to post this buffer as a test of my elisp ; "advogato-post-buffer-as-diary" function. Perhaps this has been done before, but who cares. ;
    
    (setq advogato-username "SyntaxPolice")
    (setq advogato-url "http://www.advogato.org/XMLRPC")
    
    (defun advogato-get-most-recent (&optional in-user)
      "Gets the last diary entry" (interactive)
      (let ((user (if in-user in-user advogato-username)))
    	(let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1)))
    	  (xml-rpc-method-call advogato-url 'diary.get user lastIndex))))
    
    (defun advogato-insert-most-recent (&optional in-user)
      "Inserts the most recent diary entry." (interactive)
      (let ((user (if in-user in-user advogato-username)))
        (insert-string (advogato-get-most-recent user))))
    
    (defun advogato-post-string-as-diary (diary-str cookie &optional in-index)
      "Post the given string as the diary entry.  Use -1 as an index for a new entry."
      (let ((index (if in-index in-index -1)))
        (xml-rpc-method-call advogato-url 'diary.set cookie index diary-str)))
    
    (defun advogato-post-buffer-as-diary (cookie &optional in-index)
      "Post the current buffer as your diary entry"
      (advogato-post-string-as-diary (buffer-string) cookie in-index))
    
    (defun advogato-get-cookie (ad-username ad-password)
    ;    (setq advogato-username username)
        (xml-rpc-method-call advogato-url 'authenticate ad-username ad-password))
    
    ; ------------------------------------------------------------
    ; Below is for testing:
    (setq foo (advogato-insert-most-recent "SyntaxPolice"))
    (advogato-post-buffer-as-diary cookie)
    
    (defun advogato-get-most-recent2 (user)
      "Gets the last diary entry" (interactive)
      (let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1))
    	)
        (xml-rpc-method-call advogato-url 'diary.get user lastIndex)))
    
    (advogato-get-most-recent2 "SyntaxPolice")
    
    
    (setq advogato-password "asdf")
    
    
    
    ;
  • I saw Rilo Kiley last night with my gf and her sister. This is one of her sister's favorite bands.

  • Still really want a laptop linux machine.

  • Brian took some action shots from indoor rock climbing recently. Sorry they're big. I'll resize them eventually. It features my gf trying very hard to get over an edge, me cimbing both freestyle, on a rope, and with ice climbing equipment, lots of silly faces from Brian, and quite a number of random people, some of whom found the camera and created their own art. ;

  • I'm going to attempt to post this buffer as a test of my elisp ; "advogato-post-buffer-as-diary" function. ;
    
    (setq advogato-username "SyntaxPolice")
    (setq advogato-url "http://www.advogato.org/XMLRPC")
    
    (defun advogato-get-most-recent (&optional in-user)
      "Gets the last diary entry" (interactive)
      (let ((user (if in-user in-user advogato-username)))
    	(let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1)))
    	  (xml-rpc-method-call advogato-url 'diary.get user lastIndex))))
    
    (defun advogato-insert-most-recent (&optional in-user)
      "Inserts the most recent diary entry." (interactive)
      (let ((user (if in-user in-user advogato-username)))
        (insert-string (advogato-get-most-recent user))))
    
    (defun advogato-post-string-as-diary (diary-str cookie &optional in-index)
      "Post the given string as the diary entry.  Use -1 as an index for a new entry."
      (let ((index (if in-index in-index -1)))
        (xml-rpc-method-call advogato-url 'diary.set cookie index diary-str)))
    
    (defun advogato-post-buffer-as-diary (cookie &optional in-index)
      "Post the current buffer as your diary entry"
      (advogato-post-string-as-diary (buffer-string) cookie in-index))
    
    (defun advogato-get-cookie (ad-username ad-password)
    ;    (setq advogato-username username)
        (xml-rpc-method-call advogato-url 'authenticate ad-username ad-password))
    
    ; ------------------------------------------------------------
    ; Below is for testing:
    (setq foo (advogato-insert-most-recent "SyntaxPolice"))
    (advogato-post-buffer-as-diary cookie)
    
    (defun advogato-get-most-recent2 (user)
      "Gets the last diary entry" (interactive)
      (let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1))
    	)
        (xml-rpc-method-call advogato-url 'diary.get user lastIndex)))
    
    (advogato-get-most-recent2 "SyntaxPolice")
    
    
    (setq advogato-password "asdf")
    
    
    
    ;
  • I saw Rilo Kiley last night with my gf and her sister. This is one of her sister's favorite bands.

  • Still really want a laptop linux machine.

  • Brian took some action shots from indoor rock climbing recently. Sorry they're big. I'll resize them eventually. It features my gf trying very hard to get over an edge, me cimbing both freestyle, on a rope, and with ice climbing equipment, lots of silly faces from Brian, and quite a number of random people, some of whom found the camera and created their own art. ;
  • I'm going to attempt to post this buffer as a test of my elisp ; "advogato-post-buffer-as-diary" function. ;
    
    (setq advogato-username "SyntaxPolice")
    (setq advogato-url "http://www.advogato.org/XMLRPC")
    
    (defun advogato-get-most-recent (&optional in-user)
      "Gets the last diary entry" (interactive)
      (let ((user (if in-user in-user advogato-username)))
    	(let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1)))
    	  (xml-rpc-method-call advogato-url 'diary.get user lastIndex))))
    
    (defun advogato-insert-most-recent (&optional in-user)
      "Inserts the most recent diary entry." (interactive)
      (let ((user (if in-user in-user advogato-username)))
        (insert-string (advogato-get-most-recent user))))
    
    (defun advogato-post-string-as-diary (diary-str cookie &optional in-index)
      "Post the given string as the diary entry.  Use -1 as an index for a new entry."
      (let ((index (if in-index in-index -1)))
        (xml-rpc-method-call advogato-url 'diary.set cookie index diary-str)))
    
    (defun advogato-post-buffer-as-diary (cookie &optional in-index)
      "Post the current buffer as your diary entry"
      (advogato-post-string-as-diary (buffer-string) cookie in-index))
    
    (defun advogato-get-cookie (ad-username ad-password)
    ;    (setq advogato-username username)
        (xml-rpc-method-call advogato-url 'authenticate ad-username ad-password))
    
    ; ------------------------------------------------------------
    ; Below is for testing:
    (setq foo (advogato-insert-most-recent "SyntaxPolice"))
    (advogato-post-buffer-as-diary cookie)
    
    (defun advogato-get-most-recent2 (user)
      "Gets the last diary entry" (interactive)
      (let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1))
    	)
        (xml-rpc-method-call advogato-url 'diary.get user lastIndex)))
    
    (advogato-get-most-recent2 "SyntaxPolice")
    
    
    (setq advogato-password "asdf")
    
    
    
    ;
  • I saw Rilo Kiley last night with my gf and her sister. This is one of her sister's favorite bands.

  • Still really want a laptop linux machine.

  • Brian took some action shots from indoor rock climbing recently. Sorry they're big. I'll resize them eventually. It features my gf trying very hard to get over an edge, me cimbing both freestyle, on a rope, and with ice climbing equipment, lots of silly faces from Brian, and quite a number of random people, some of whom found the camera and created their own art.
  • ; I'm going to attempt to post this buffer as a test of my elisp ; "advogato-post-buffer-as-diary" function. (setq advogato-username "SyntaxPolice") (setq advogato-url "http://www.advogato.org/XMLRPC") (defun advogato-get-most-recent (&optional in-user) "Gets the last diary entry" (interactive) (let ((user (if in-user in-user advogato-username))) (let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1))) (xml-rpc-method-call advogato-url 'diary.get user lastIndex)))) (defun advogato-insert-most-recent (&optional in-user) "Inserts the most recent diary entry." (interactive) (let ((user (if in-user in-user advogato-username))) (insert-string (advogato-get-most-recent user)))) (defun advogato-post-string-as-diary (diary-str cookie &optional in-index) (let ((index (if in-index in-index -1))) (xml-rpc-method-call advogato-url 'diary.set cookie index diary-str))) (defun advogato-post-buffer-as-diary (cookie &optional in-index) (advogato-post-string-as-diary (buffer-string) cookie in-index)) (defun advogato-get-cookie (ad-username ad-password) ; (setq advogato-username username) (xml-rpc-method-call advogato-url 'authenticate ad-username ad-password)) ; ------------------------------------------------------------ ; Below is for testing: (setq foo (advogato-insert-most-recent "SyntaxPolice")) (advogato-post-buffer-as-diary cookie) (defun advogato-get-most-recent2 (user) "Gets the last diary entry" (interactive) (let ((lastIndex (- (xml-rpc-method-call advogato-url 'diary.len user) 1)) ) (xml-rpc-method-call advogato-url 'diary.get user lastIndex))) (advogato-get-most-recent2 "SyntaxPolice") (setq advogato-password "asdf") (advogato-get-cookie "SyntaxPolice" "asdf") diary.set(string cookie, int index, string html) Set a diary entry. Use -1 as the index to post a new entry, although the value returned by diary.len() is also acceptable. (buffer-string)

  • I saw Rilo Kiley last night with my gf and her sister. This is one of her sister's favorite bands.

  • Still really want a laptop linux machine.

  • Brian took some action shots from indoor rock climbing recently. Sorry they're big. I'll resize them eventually. It features my gf trying very hard to get over an edge, me cimbing both freestyle, on a rope, and with ice climbing equipment, lots of silly faces from Brian, and quite a number of random people, some of whom found the camera and created their own art.
  • 25 older entries...

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!