[Openmcl-devel] Hemlock IDE available for review

alex crain alexcrain at mail.widgetworks.com
Mon May 23 10:39:35 PDT 2005

I've put together an alpha release of the OpenMCL Hemlock port that 
I've been working on. It isn't
finished and it's buggy but many of the features work and it doesn't 
crash very often. I'd appreciate it
if anyone with a little time would take a look at it and give me some 
feedback or suggestions.

The current feature list includes:
	Trace Window (not fully functional under 0.14.3)
	Backtrace Viewer
	Symbol Completion
	Syntax highlighting
	integrated documentation browser

It will work with vanilla 0.14.3 although the trace window requires 
some bleeding edge code in order
to be fully functional. I'll be testing it with the bleeding edge code 
and I hope it will be part of 0.14.4.

It's available here: 

This is the readme file in Hemlock.app/README.txt:

How to build hemlock from the 0.14.3 distribution

1) Hemlock will not build with vanilla 0.14.3. You will need to make the
following edits:

a) comment out (#_GetCurrentEventQueue) in 
ccl/examples/objc-runtime.lisp like so...

(def-ccl-pointers cocoa-framework ()
    #'(lambda ()
        ;; We need to load and "initialize" the CoreFoundation library
        ;; in the thread that's going to process events.  Looking up a
        ;; symbol in the library should cause it to be initialized
        ; (#_GetCurrentEventQueue)

b) replace the definition for %OBJC-DOMAIN-SLOTS-VECTOR in 
    with this one:

(defun %objc-domain-slots-vector (p)
        (let* ((type (%macptr-type p))
              (flags (ldb objc-type-flags type))
              (index (ldb objc-type-index type)))
         (declare (fixnum type flags index))
         (ecase flags
           (#.objc-flag-instance (or (gethash p 
                                     ; try to allocate the slot vector 
on demand
                                     (let* ((raw-ptr 
(raw-macptr-for-instance p))
(create-foreign-instance-slot-vector (class-of p))))
                                       (when slot-vector
                                         (setf (slot-vector.instance 
slot-vector) raw-ptr)
                                         (setf (gethash raw-ptr 
*objc-object-slot-vectors*) slot-vector)
p raw-ptr)
                                       (initialize-instance p))
                                     (error "~s has no slots." p)))
           (#.objc-flag-class (id->objc-class-slots-vector index))
           (#.objc-flag-metaclass (id->objc-metaclass-slots-vector 

2) install the ccl/scripts/openmcl script somewhere in your $path.

3) Unpack the Hemlock distribution

4) Set two enviroment variables (using correct values):

# This the location of the top level ccl distribution
setenv CCL_DEFAULT_DIRECTORY  /Users/alex/Desktop/ccltest/ccl
# This is the Resources directory for the Hemlock distribution

4) cd to Hemlock.app/Contents and do

    % make

There will be some compiler warnings when hemlock compiles - ignore 

5) Launch Hemlock.app. This will fork off an iconified Terminal window 
which can be used
for debugging. After a very long time, a hemlock listener window should 
appear. do

    ? (ide::compile-ide)

There will be more compiler warnings - ignore these too.

6) Once the system is installed and compiled, it still a little slow to 
boot but nothing
like loading the uncompiled sources.

More information about the Openmcl-devel mailing list