Nikodemus Siivola

<< next | top | previous >>

June 14th 2005 #
random, June 14th 2005

Work-for-pay, not-lisp front: I've been lately swimming in the quagmire called Delphi, and while I can see why it can be attractive to some people, I must vent:

  • The actual text editing capabilities (you know, writing code as opposed to waving the mouse around) are neolithic. Part of this is just my mind reeling from lack of basic emacs keybindings, but not nearly all. The editor is a bad joke.
  • In a normal, sane, textual environment replacing a class with another, particularly when they are fully isomorphic in the context used, is downright trivial — just change the name at the creation time to the one needed (and if the language happens to be kinky in the way of BDSM, adjust declarations to suit). What is more, noticing and verifying the isomorphism is relatively easy at least on the level of compatible method-call signatures, etc. Enter Delphi. Your mission is to replace a proprietary third-party GUI components with ``standard'' Delphi supplied ones. To your relief you eventually realize that 99% of the stuff is isomorphic to Delphi components. To your dismay you realize that to replace the components you have to (1) add the Delphi component to the GUI (2) copy all the properties by hand from the old to the new one (3) delete the old one from the GUI (4) rename to new one to whatever the old one was called (5) adjust all the hand-written code to suit using the aforementioned excuse for an editor.
  • Say you have several spreadsheet-like grids in the application, each displaying a table in a database. In Delphi this eg. translates to dragging and dropping a database, table, datasource, and grid components to the RAD/GUI thingamagic and hooking them to the appropriate DB, table, and each other. What's wrong with this picture? (1) functional components like the DB ending up as (essentially) part of the GUI — granted, you could write the code instead of letting the environment do it for you, but given that the editor is on par with Notepad you really don't want to. (2) There is now way to sanely abstract this: every time you need to do this you get to do it all over again. It's not just databases either, it's the whole frigging world.
  • It makes the wrong things easy, letting twittering idiots who should not be allowed within 100 meters of a keyboard do "Application Development" and end up with a shiny GUI, leaving the business logic all a-tatter.

I could go on, but I'll leave it at that. Also, I may be giving Delphi the short shrift here, as I've not been using it for all that long yet. I actually hope so: mayhaps someone even points out the error of my ways to me, and makes my life better. ;-)

Lisp/SBCL front: callbacks Coming Real Soon Now: I've finally gotten off my lazy arse and started working on merging the callback/alien-function patch by Thomas F. Burdick (based on the work by Helmut Eller for CMUCL) into SBCL proper. Both the implementation and the interface have mutated a bit, but the core remains the same.

CL-USER> (sb-alien::alien-callback
               '(function int int int)
               (lambda (x y)
                 (print (list x y '=> (+ x y)))
                 (+ x y)))

  :SAP #X0851DAE0
          (SIGNED 32)
          (SIGNED 32))>
CL-USER> (alien-funcall * 3 4)

(3 4 => 7)