ECL for iOS updated to work with SDK 4.2

I've pushed a new branch (centaur) of the ECL for iOS project to github, which contains a number of fixes to get ECL compiled under the latest 4.2 SDK from Apple. This release has been tested on iPhone and iPad devices running iOS 4.2 as well as the older 3.1.3. Please refer to the updated README for further details.

http://github.com/kriyative/ecl-iphone-builder/tree/centaur

Many thanks to Terje Norderhaug and Anthony Fairchild for their bug reports and feedback.

Displaying a daily Org-mode agenda reminder in Emacs

Here's a simple hack to get an Org-mode agenda view to popup in an Emacs buffer, daily at a specified time.

(defvar daily-agenda-timer (parse-relative-time "9:00 am"))
;; (decode-time daily-agenda-timer)
 
(defun show-daily-agenda ()
  (unless (time-less-p (current-time) daily-agenda-timer)
    (setq daily-agenda-timer (time-add daily-agenda-timer
                                       (seconds-to-time 86400)))
    (org-agenda-list)))
 
(add-hook 'display-time-hook 'show-daily-agenda)
(display-time)

The parse-relative-time function helps in initializing the daily-agenda-timer using a human readable string.

(defun parse-relative-time (time-str)
  (destructuring-bind (sec min hour day month year dow dst zone)
      (parse-time-string time-str)
    (destructuring-bind (sec1 min1 hour1 day1 month1 year1 dow1 dst1 zone1)
        (decode-time)
      (encode-time (or sec sec1)
                   (or min min1)
                   (or hour hour1)
                   (or day day1)
                   (or month month1)
                   (or year year1)
                   (or zone zone1)))))

Snapshot of ECL for iPhone

I've uploaded a snapshot of fully patched ECL-9.12.3, and Boehm GC sources to help anyone trying to build this environment from scratch. I realize a lot of the external dependencies tend to be in flux, so hopefully this snapshot will provide a fully functional starting point.

The snapshot is available at: http://github.com/kriyative/ecl-iphone-snapshot

The snapshot includes:

README
build.sh
bdwgc/
ecl/
eclshell/
iphone/

The bdwgc/ and ecl/ directories contain the patched sources for Boehm GC, and ECL 9.12.3. The eclshell/ folder has the sources for the sample iPhone app, including a snapshot of slime (CVS head as of 2010-01-29).

The iphone/ folder contains the built product – a set of header and static library files built for the iPhone architecture. The iphone/universal/ folder contains `fat' versions of the libraries which maybe used with either simulator or device builds.

As always, feedback and patches are welcome.

UPDATE: I moved to a github repo for the snapshot as well. It's easier this way to track any patches that may arise.

my other lisp blog

I haven't been working in Clojure for a couple of months now, hence the absence of new posts here.

However, I have been posting some updates on my other Lisp related blog (yes, I have two Lisp blogs :) … about my work in porting the Embedded Common Lisp system to the iPhone. Sound interesting, check it out at:

ECL on iPhone update

I've just checked in a significant set of changes to the ecl-iphone-builder repository, incuding the following updates:

  • builds with ECL 9.12.3
  • requires the CVS head version of the Boehm Weiss collector
  • smoother build process (should "just work")
  • better SLIME integration (with :spawn communication style as the default)
  • expanded `eclshell' example (more goodies to follow)

As always feedback and bug reports are appreciated.