From edu500ac at yahoo.com Sat Oct 29 17:20:39 2011 From: edu500ac at yahoo.com (Eduardo Costa) Date: Sat, 29 Oct 2011 10:20:39 -0700 (PDT) Subject: [Able-devel] ABLE does not compile out of the box Message-ID: <1319908839.43688.YahooMailClassic@web31802.mail.mud.yahoo.com> Windows, ltk-0.96.? BTW, I teaching Common LISP for engineers, and using ABLE/SBCL.? However, since ABLE does not compile out of the box, I am distributing binaries to the my students. It would be nice if you people could fix the compilation problems that I describe below. 1 -- able-0.21, SBCL 1.0.52, ltk-0.96, cl-fad-0.6.4, ?????? trivial-gray-streams-2008-11-02 2 -- I tried to compile and load the programs: * (require 'asdf) ("ASDF") * (asdf:oos 'asdf:load-op :able) ... debugger invoked on a ASDF:COMPILE-ERROR: ? Error while invoking # on ? # 3 -- I substituted sb-introspect:function-lambda-list ????? for all instances of sb-introspect:function-lambda-list I also corrected the obvious error (format nil "1.0" temp) 4 -- I repeated step? 2. * (require 'asdf) ("ASDF") * (asdf:oos 'asdf:load-op :able) Compilation was uneventful, but I got a runtime error ---- Invalid intialization arguments: :PADY, :PADX, :CONTAINER In main.lisp, I replaced (setf *editor-frame* (make-instance 'ltk:frame)) for (setf *editor-frame* (make-instance 'ltk:frame :container nil :padx 1 :pady 1)) I compiled the editor once more: * (require 'asdf) ("ASDF") * (asdf:oos 'asdf:load-op :able) Again, the compilation was uneventful, but... Invalid initialization arguments ? :PADY, :PADX I substituted (setf *listener* (make-instance 'listener )) for (setf *listener* (make-instance 'listener :padx 1 :pady 1)) This time the error was Tcl/Tk error: unknown option "-background" I commented one line at the end of the controls.lisp file: (defmethod initialize-instance :after ((sb statusbar) &key) ? (setf (label sb) (make-instance 'ltk:label :master sb :font *buffer-font*)) ?? ; (ltk:configure sb :background *highlight-background*) ? (ltk:configure (label sb) ??? :background *highlight-background* ??? :foreground *highlight-text*) ? (ltk:pack (label sb) :side :left :pady 1 :padx 5 :fill :both)) Now, ABLE works perfectly well. My suggestion is that you modify the sources, so that the user get an uneventful compilation. In the mean time, I would like to know whether I can post my modified sources in my son's website, so my students will have a working copy of ABLE. Of course, I will remove it from my site as soon as the official distribution is fixed. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edu500ac at yahoo.com Sat Oct 29 22:18:45 2011 From: edu500ac at yahoo.com (Eduardo Costa) Date: Sat, 29 Oct 2011 15:18:45 -0700 (PDT) Subject: [Able-devel] A bug in ABLE In-Reply-To: Message-ID: <1319926725.89541.YahooMailClassic@web31807.mail.mud.yahoo.com> Whenever there is a spac after an open parenthesis, one gets a TK error. For instance, try and type the following definition: (defvar xxx ? '(?? abc ????? x y z )) Leave a space between the open parenthesis and abc. The Tk message is: ?Index 0 out of bounds for (SIMPLE-ARRAY CHARACTER(0)), should be nonnegative and <0. I guess the problem has to do with the token coloring algorithm. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edu500ac at yahoo.com Sun Oct 30 00:24:00 2011 From: edu500ac at yahoo.com (Eduardo Costa) Date: Sat, 29 Oct 2011 17:24:00 -0700 (PDT) Subject: [Able-devel] Pro tempore fix Message-ID: <1319934240.18982.YahooMailClassic@web31802.mail.mud.yahoo.com> As I told before, ABLE crashes whenever there is a space between an open parenthesis and a token. For instance (defvar xxx ???? '(?????? abc ?????????? d e f)) causes a TK crash.A quick fix is to add a condition that deals with an empty token into the get-indent-level macro (see macro.lisp). Thus (defmacro get-indent-level (token) ? "Deduce how much to indent based on the token supplied. The user ? can supply their own indentation rules in the configuration file." ? `(cond ???? ((< (length ,token) 1) 1) ???? ((equal (char ,token 0) +lparen+) 1) ???? ((equal (length ,token) 1) 3) ???? ,@(mapcar #'(lambda (rule) ?????????????????? `((equalp ,token ,(car rule)) ,(cdr rule))) ???????? *indentation-rules*) ???? (t 2))) -------------- next part -------------- An HTML attachment was scrubbed... URL: