+Vote!
Planet Lisp (Free subscription) | 07/31/2008
No time for anything but the equivalent of musical scales today. Converted straightforward code from the Java Basic Math Demo to Lisp. public class BasicMathDemo { public static void main(String[] args) { double a = -191.635; double b = 43.74; int c = 16, d = 45; System.out.printf("The absolute value of %.3f is %.3f%n", a, Math.abs(a)); System.out.printf("The ceiling of %.2f is %.0f%n", b, Math.ceil(b));...
+Vote!
Planet Lisp (Free subscription) | 07/25/2008
George: "That's why I'm different. I can sense the slightest human suffering." Jerry: "Are you sensing anything right now?" - Seinfeld, "The Couch" In my last post, the last paragraph, I said I'd be posting code shortly. Ahem...I like to think I'm ok at what I do, but I'm one guy. Any distraction stifles forward progress and yesterday a it was simply a traffic jam that did me in. I'll be posting code...
+Vote!
Planet Lisp (Free subscription) | 07/23/2008
I forgot to mention one small but important detail in the last article about incremental development using Lisp. While building the guts of the app, I never quit it. Added a line of code, triggered a menu, tested and verified the new change. Lather, rinse, repeat. That level of interactivity certainly makes incremental development easy (passe even.) Lisp is cool that way. The editor's (Emacs, Hemlock...
+Vote!
Planet Lisp (Free subscription) | 07/23/2008
Reworked the menu structure for Hemlock Apps on the train last night. Nothing significant, just a minor change to storage. Also, the first implementation built static menus and there's a need for some menus to be dynamic, so I sketched a solution to make them dynamic if desired. Gave some thought to walking ASDF definition files and parsing lisp code to extract content for presentation. Parsing the...
+Vote!
Planet Lisp (Free subscription) | 07/22/2008
Build some menus and the next thing you know, you're supporting them for the rest of your life... Feature request, huh? Well, that didn't take long...was using the new menubar/menus scheme with Ed Vecto commands, inserting Vecto commands into a lisp function when I decided to extend the Ed Vecto app to add my Vecto extensions and customizations. Ok, so now the Hemlock apps menus would need to be open...
+Vote!
Planet Lisp (Free subscription) | 07/22/2008
Yesterday, while writing up a function, I used a combination of anaphoric macro and menu selection. A short time ago, I'd changed this same idiom from this: (let ((res (select-menu items))) (when res (menu-item-dispatch res))) To this: (awhen (select-menu items) (menu-item-dispatch it)) And I looked at the anaphoric form and said, that's not (awhen (select-menu ...)) that's (amenu ...) (amenu items...
+Vote!
Planet Lisp (Free subscription) | 07/22/2008
It took more time to write the last blog entry than it did to make the menus work. Added all the Ed Vecto menus and tested them. All forms insert fine - with a couple of exceptions; the forms that have keywords or body parameters aren't parsed yet. Going to add my Vecto extensions and charting calls. Added some lisp forms and ran into limitations. The menubar/menu/insert forms work for simple, straightforward...
+Vote!
Planet Lisp (Free subscription) | 07/21/2008
In my last post, I documented some interface code that I was playing with for Hemlock, the Common Lisp Editor. I'd written two macros, 'definsert and 'defchoice for the purpose of creating functions that provided a means to quickly insert lisp forms at the point while making it possible to present custom options for selection on a per form basis. Friday night, I had a little time to play with the code...
+Vote!
Planet Lisp (Free subscription) | 07/19/2008
In my last post, I wrote a macro 'definsert to insert a lisp form in Hemlock. At first, I used it only for Vecto commands, but now it's working for some lisp forms, too. That's a nice bonus. Later, I was working with the Hemlock Vecto app. I wrote all the definsert's for all the Vecto commands. There were two functions that took a single keyword argument out of a set of three choices. Seemed to make...
+Vote!
Planet Lisp (Free subscription) | 07/18/2008
What's in a name? That which we call a rose, By any other name would smell as sweet, But it would suck if you had to type |rose| all the time. It's the things you don't use often that trip you up. It's been a while since I wrote a macro that defined a function and I was scratching my head when the definition came back in bars. (defmacro definsert (name &rest args) `(defun ,(intern (format nil "insert-~A"...