Ovi.com E71 sync fail

January 24th, 2009

Title says it all, really … I have 375 contacts, but after 300 of them I get an out-of-memory error during the inital sync with ovi.com (immediately after reboot, no other applications running).
:(

ʇsodƃoʃq-uʍop-ǝpısdn x-W

January 12th, 2009

Things to do when you’re vacationing in one of the most beautiful places in the world (i.e., Bali):

Why, implement code to turn text upside-down in your favorite editor, of course!

Emacs switcheroo

April 21st, 2008

I realized that I had customized Aquamacs to the point where it was behaving just like standard emacs, except when it wasn’t (“Ok, M-q to reindent, then … gnah, it quit again!”), so I switched to a normal Carbon Emacs build. So far I’m happy and not missing anything.

Some days, I hate the internet

April 3rd, 2008

I’m currently being joe-jobbed, that is, some spammer forges mail from my email address.  This means the “delivery failed” mails from various mailer demons come in at a rate of about 3 per minute.  I hope no one thinks I’m really ”eLvitra Vigara”, ”beauregard hiroki” or ”issiah monty” sending out these spam mails. Similarly, I’m still listed as a “suspected attack site” by google; don’t know when they’ll get around to re-checking my status.  This is just no fun.

Another public service announcement

February 9th, 2008

Ladies and gentlemen, update your Wordpresses!I just got a nice mail from google telling me that this here blog was spreading malware.  I updated to the latest WordPress release and weeded out an iframe and a noscript.  Hope no one was infected because of me… 

Economic indicators

February 6th, 2008

People used to spam me with get-rich-quick penny-stock schemes.  Since about a month, they offer tips about how to “get rid of debt legally”…

Public Service Announcement

February 5th, 2008

If you compile sbcl from source yourself, and you want to have threading enabled, then look at the top of the file base-target-features.lisp-expr and do what it says therein.

Thank you.

Just for fun …

December 19th, 2007

cocoa-listener.png

The McCLIM listener in a cocoa window, running on the latest Clozure CL beta.

It took some time, since on OS X 10.5 CGFloat can be either single-float or double-float, depending on the processor. At the moment, I just rewired the hardwired (coerce … ’single-float) calls and numeric constants in the beagle backend. Also, it crashes on the all-important “Show Class Subclasses t” benchmark. Still, very nice.

ParenScript vs script.aculo.us

December 12th, 2007

Currently, my job does not involve a whole lot of programming, and I’m getting a bit rusty and irritated. So, last weekend I decided to noodle around aimlessly with some systems I meant to try out for a while now.

Parenscript advertises itself as being easy to integrate with javascript libraries such as Prototype, but the manual gives no examples on how to do this. Furthermore, the Parenscript manual uses aserve / htmlgen for its examples, while much of the action these days is with hunchentoot. So, without further ado, a pointless example integrating hunchentoot, cl-who, parenscript and script.aculo.us. Load the code after loading hunchentoot, cl-who and parenscript into your running Lisp.

;;; Just the standard intro
(defpackage :js-hax
  (:use :common-lisp :hunchentoot :cl-who :parenscript))
(in-package :js-hax)
(start-server :port 8080)

;;; Set the path to where you unpacked script.aculo.us
;;; create-folder-dispatcher-and-handler publishes subdirectories:
;;; http://.../js/lib/prototype.js
;;; http://.../js/src/scriptaculous.js
(push (create-folder-dispatcher-and-handler
       "/js/" #p"/home/someone/source/scriptaculous-js-1.8.0/")
      *dispatch-table*)

(defmacro js-script (&rest body)
  "Utility macro for including ParenScript into the HTML
   notation of cl-who"
  `(with-html-output (*standard-output*)
     (:script :type "text/javascript"
              (format t "~%// <!--[CDATA[~%~A~%//]]-->~%" (ps ,@body)))))

;;; Slider example, taken from the scriptaculous wiki
(defun foo ()
  (with-html-output-to-string (*standard-output* nil :prologue t)
    (:html
     (:head (:title "script.aculo.us Tests")
            (:script :language "JavaScript" :type "text/javascript"
                     :src "/js/lib/prototype.js" "stupid firefox")
            (:script :language "JavaScript" :type "text/javascript"
                     :src "/js/src/scriptaculous.js" "stupid firefox"))
     (:body
      (:h1 "script.aculo.us vs. ParenScript")
      (:p "The humble slider.")
      (:p
       (:div :id "track1"
             :style "width:200px;background-color:#aaa;height:5px;"
             (:div
              :id "handle1"
              :style "width:5px;height:10px;background-color:#f00;cursor:move;"))
       (:div :id "debug1" :style "padding-top: 5px;"))
      (js-script
       ;; Create the Slider object
       (new (*control.*slider
             ;; Hook it up to the UI elements ...
             "handle1" "track1"
             ;; ... and assign behavior
             (create on-slide (lambda (v)
                                ;; Prototype-style DOM accessors:
                                ;; $('debug1').innerHTML = ...
                                (setf (slot-value ($ "debug1")
                                                  'inner-h-t-m-l)
                                      (+ "slide: " v)))
                     on-change (lambda (v)
                                 (setf (slot-value ($ "debug1")
                                                   'inner-h-t-m-l)
                                       (+ "changed! " v)))))))))))

(push (create-prefix-dispatcher "/foo" 'foo) *dispatch-table*)

All in all quite painless. The only point where I had to sit and think a bit was the translation of the prototype-style DOM accessors to parenscript notation.

Edit: Oh, and the js-script code above is missing the CDATA bits which were eaten by the web. Check page 6 of the parenscript documentation for the missing pieces.

Edit2: Thanks to Aankhen for pointing out that the CDATA wasn’t et after all, just hiding. I’ll go wrestle with this blog now to fix the stupid smartquotes.

Stupid Leopard

December 10th, 2007

Two crashes in a row while upgrading this site to the latest WordPress …Symptoms: Transmit ftp upload hangs, Transmit tries to reconnect to the server, then all other outgoing network connections fail.  Shortly thereafter, the Grey Curtain and “Please reboot” message. Â