From david at david-steuber.com Mon May 2 23:28:27 2005 From: david at david-steuber.com (David Steuber) Date: Mon, 2 May 2005 19:28:27 -0400 Subject: [cl-carbon-devel] Hello, new members! Message-ID: Hi, List membership is exploding! Not counting myself twice, there are now three members. For a while I've been unhappy with how event.lisp maps calls to the callback function to actual objects for event handling. I thought closures would be a nice solution to the problem but wouldn't have thought it possible. I mean, what does C know about closures? Well, it looks like OpenMCL may be clever enough to do it: $ openmcl Welcome to OpenMCL Version (Beta: Darwin) 0.14.3-050429! ? (defun make-ff (ret) (let (fn) (declare (special fn)) (defcallback fn (:int) ret) fn)) MAKE-FF ? (defvar ff-foo (make-ff 10)) FF-FOO ? (defvar ff-bar (make-ff 20)) FF-BAR ? (%ff-call ff-foo :signed-fullword) 10 ? (%ff-call ff-bar :signed-fullword) 20 ? (quit) This will mean some major surgery to the event handling code, but I think it will be much cleaner afterwards once I've got it all sorted out. There are other callback types used in the Carbon APIs that can also be handled by a more generalized mechanism. I've also just added an Example module to CVS. It's there to show how CL-Carbon can be used to make a self contained application bundle work. I removed all slime references in that code to keep things very simple. I'm not sure right now how to unwed from OpenMCL. I'm hoping that can be achieved with the appropriate macrology and CLOS classes. At the moment, I'm placing a higher priority on getting a class structure worked out that favors CLOS's features. From enderx12 at mac.com Mon May 2 23:51:13 2005 From: enderx12 at mac.com (Chris Curtis) Date: Mon, 2 May 2005 19:51:13 -0400 Subject: [cl-carbon-devel] Hello, new members! In-Reply-To: References: Message-ID: <29350c1d7417df2936b89c2aabbfd2d0@mac.com> On May 2, 2005, at 7:28 PM, David Steuber wrote: > Hi, > > List membership is exploding! Not counting myself twice, there are > now three members. > > For a while I've been unhappy with how event.lisp maps calls to the > callback function to actual objects for event handling. I thought > closures would be a nice solution to the problem but wouldn't have > thought it possible. I mean, what does C know about closures? Well, > it looks like OpenMCL may be clever enough to do it: This does look nice! > I'm not sure right now how to unwed from OpenMCL. I'm hoping that can > be achieved with the appropriate macrology and CLOS classes. At the > moment, I'm placing a higher priority on getting a class structure > worked out that favors CLOS's features. That's exactly how I was starting to sketch out the abstraction... so far the main conceptual difficulty is the fight between macro vs. OO-style, and I haven't come down on one side or the other yet. --chris From david at david-steuber.com Tue May 3 04:33:26 2005 From: david at david-steuber.com (David Steuber) Date: Tue, 3 May 2005 00:33:26 -0400 Subject: [cl-carbon-devel] Building Example and CL-Carbon from CVS Message-ID: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> Hello, The way I've organized files in CVS may be a little weird. I wanted to keep CL-Carbon separate from anything that may use it like Example. Here is a simple step by step 'script' that should allow you to build a working application bundle from the CVS sources provided you have OpenMCL properly installed with the interfaced databases. I'm assuming ~/usr/src/ which is where I like to keep my projects. cd ~/usr/src cvs -d :pserver:anonymous at common-lisp.net:/project/cl-carbon/cvsroot login cvs -z3 -d :pserver:anonymous at common-lisp.net:/project/cl-carbon/cvsroot co Example cd Example/lib cvs -z3 -d :pserver:anonymous at common-lisp.net:/project/cl-carbon/cvsroot co CL-Carbon cd .. ln -s lib/CL-Carbon/cl-carbon.asd cl-carbon.asd sh make.sh This should result in a working Example.app in the bin directory. I've not included swank in Example. I recomend setting up another project for that. OpenGL Demo on my personal website shows how swank is used so that you can use Emacs + Slime to connect to the running application. It may be a good idea to make the build system part of CL-Carbon. That's the way Bosco handles it. From enderx12 at mac.com Tue May 3 06:10:49 2005 From: enderx12 at mac.com (Chris Curtis) Date: Tue, 3 May 2005 02:10:49 -0400 Subject: [cl-carbon-devel] Suggestion for the web page In-Reply-To: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> References: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> Message-ID: <5b6aedd45f72d9b453f5721609158678@mac.com> David: I finally got tired of the same old "Carbon is dead" argument that seems to keep popping up every time CL-Carbon gets mentioned on #lisp. So I did a little digging.... and I was thinking it might be nice to put a little blurb on the project web page that points out the following *Apple* applications that are Carbon apps (no Cocoa): Finder Dock iTunes and yes ... Spotlight There are more, but that ought to be enough to answer the question definitively. If you'd like, I can write up a more polished blurb, or feel free. It just would be nice to have a simple URL to reference rather than having the same discussion every time. Or even teach it to minion. ;-) --chris From ipmonger at delamancha.org Tue May 3 14:10:14 2005 From: ipmonger at delamancha.org (Jon Allen Boone) Date: Tue, 3 May 2005 10:10:14 -0400 Subject: [cl-carbon-devel] Building Example and CL-Carbon from CVS In-Reply-To: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> References: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> Message-ID: <9EFB3301-27D5-4976-B99C-5677B5F0DE32@delamancha.org> On May 03, 2005, at 00:33, David Steuber wrote: > The way I've organized files in CVS may be a little weird. I > wanted to keep CL-Carbon separate from anything that may use it > like Example. Here is a simple step by step 'script' that should > allow you to build a working application bundle from the CVS > sources provided you have OpenMCL properly installed with the > interfaced databases. I'm assuming ~/usr/src/ which is where I > like to keep my projects. > > cd ~/usr/src > cvs -d :pserver:anonymous at common-lisp.net:/project/cl-carbon/ > cvsroot login > cvs -z3 -d :pserver:anonymous at common-lisp.net:/project/cl-carbon/ > cvsroot co Example > cd Example/lib > cvs -z3 -d :pserver:anonymous at common-lisp.net:/project/cl-carbon/ > cvsroot co CL-Carbon > cd .. > ln -s lib/CL-Carbon/cl-carbon.asd cl-carbon.asd > sh make.sh > > This should result in a working Example.app in the bin directory. I'd recommend the following changes to your script: * install CL-Carbon in ~/usr/src * make the symbolic link to ../CL-Carbon/cl-carbon.asd This makes it clearer that the CL-Carbon module is separate from those modules that make use of it. > I've not included swank in Example. I recomend setting up another > project for that. OpenGL Demo on my personal website shows how > swank is used so that you can use Emacs + Slime to connect to the > running application. That seems acceptable. I'd even recommend that we find out if there is a way to get swank w/out getting all of slime. If so, then I'd suggest putting it in the same ~/usr/src directory and linking back to it. Of course, these are temporary hacks to start off with. We should really use defsystem or asdf to include these lisp libraries. > It may be a good idea to make the build system part of CL-Carbon. > That's the way Bosco handles it. I've not used Bosco, so I'm not totally sure what you mean. --jon From david at david-steuber.com Wed May 4 09:41:40 2005 From: david at david-steuber.com (David Steuber) Date: Wed, 4 May 2005 05:41:40 -0400 Subject: [cl-carbon-devel] Building Example and CL-Carbon from CVS In-Reply-To: <9EFB3301-27D5-4976-B99C-5677B5F0DE32@delamancha.org> References: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> <9EFB3301-27D5-4976-B99C-5677B5F0DE32@delamancha.org> Message-ID: On May 3, 2005, at 10:10 AM, Jon Allen Boone wrote: > > On May 03, 2005, at 00:33, David Steuber wrote: >> >> This should result in a working Example.app in the bin directory. > > I'd recommend the following changes to your script: > > * install CL-Carbon in ~/usr/src > * make the symbolic link to ../CL-Carbon/cl-carbon.asd > > This makes it clearer that the CL-Carbon module is separate from those > modules that make use of it. This will certainly work. Although I have had recompile trouble due to stale dfsl files not being deleted by the make.sh script like this. It seems find does not follow symlinks. Perhaps there is a switch for that? >> I've not included swank in Example. I recomend setting up another >> project for that. OpenGL Demo on my personal website shows how swank >> is used so that you can use Emacs + Slime to connect to the running >> application. > > That seems acceptable. I'd even recommend that we find out if there > is a way to get swank w/out getting all of slime. If so, then I'd > suggest putting it in the same ~/usr/src directory and linking back to > it. > > Of course, these are temporary hacks to start off with. We should > really use defsystem or asdf to include these lisp libraries. I'm actually using ASDF. There should be an example.asd for building the example application. It depends on cl-carbon.asd. Unlike SBCL, OpenMCL does not have any default locations for systems out of the box. I've not tried to set any of that up. >> It may be a good idea to make the build system part of CL-Carbon. >> That's the way Bosco handles it. > > I've not used Bosco, so I'm not totally sure what you mean. Bosco is an OS X application building tool created by Mikel Evins. I used it as a spring board to figure out how to create application bundles using OpenMCL. I'm not really using any Bosco code anymore, but the make.sh script is a vague remnant of what Bosco used. I'm doing things rather differently though like setting a main function in the save-application call and not even providing for Cocoa. I've just checked in some interesting changes for CL-Carbon. I believe I have vastly improved the Carbon event to CLOS method dispatch mapping code. If you want to get e-mail when CVS check ins happen, there is a cl-carbon-cvs mailing list on common-lisp.net that you can sign up for. I'm not sure when my next set of changes will be. Now that I've scratched the event handling itch (and assuming it holds up), I'm back into a thinking about what's next mode. From david at david-steuber.com Wed May 4 09:50:16 2005 From: david at david-steuber.com (David Steuber) Date: Wed, 4 May 2005 05:50:16 -0400 Subject: [cl-carbon-devel] Re: Suggestion for the web page In-Reply-To: <5b6aedd45f72d9b453f5721609158678@mac.com> References: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> <5b6aedd45f72d9b453f5721609158678@mac.com> Message-ID: On May 3, 2005, at 2:10 AM, Chris Curtis wrote: > I finally got tired of the same old "Carbon is dead" argument that > seems to keep popping up every time CL-Carbon gets mentioned on #lisp. > So I did a little digging.... and I was thinking it might be nice to > put a little blurb on the project web page that points out the > following *Apple* applications that are Carbon apps (no Cocoa): > > Finder > Dock > iTunes > > and yes ... > > Spotlight > > There are more, but that ought to be enough to answer the question > definitively. If you'd like, I can write up a more polished blurb, or > feel free. It just would be nice to have a simple URL to reference > rather than having the same discussion every time. Or even teach it to > minion. ;-) I had a look through the logs on meme.b9.com for the past few days and didn't really see much in the way of criticism. However, a "Why Carbon" section on the project page could be useful. Hopefully anyone interested in Carbon over Cocoa will already have some good reasons though. If you can think up some specific wording, that would be great. I don't have any ideas right now. I'm thinking more about the architecture than the advocacy ;-) From ipmonger at delamancha.org Wed May 4 17:02:07 2005 From: ipmonger at delamancha.org (Jon Allen Boone) Date: Wed, 4 May 2005 13:02:07 -0400 Subject: [cl-carbon-devel] Building Example and CL-Carbon from CVS In-Reply-To: References: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> <9EFB3301-27D5-4976-B99C-5677B5F0DE32@delamancha.org> Message-ID: <98C9F0D0-9315-46CE-9FC2-0BEDA73DA821@delamancha.org> On May 04, 2005, at 05:41, David Steuber wrote: > This will certainly work. Although I have had recompile trouble > due to stale dfsl files not being deleted by the make.sh script > like this. It seems find does not follow symlinks. Perhaps there > is a switch for that? Not with the BSD utils. The Gnu version of find has a "-follow" option. > I'm actually using ASDF. There should be an example.asd for > building the example application. It depends on cl-carbon.asd. > Unlike SBCL, OpenMCL does not have any default locations for > systems out of the box. I've not tried to set any of that up. Sorry if I'm providing useless feedback.. I haven't had a chance to review the package yet. > Bosco is an OS X application building tool created by Mikel Evins. > I used it as a spring board to figure out how to create application > bundles using OpenMCL. I'm not really using any Bosco code > anymore, but the make.sh script is a vague remnant of what Bosco > used. I'm doing things rather differently though like setting a > main function in the save-application call and not even providing > for Cocoa. I'll look into this more before commenting further... > I've just checked in some interesting changes for CL-Carbon. I > believe I have vastly improved the Carbon event to CLOS method > dispatch mapping code. If you want to get e-mail when CVS check > ins happen, there is a cl-carbon-cvs mailing list on common- > lisp.net that you can sign up for. Cool... > I'm not sure when my next set of changes will be. Now that I've > scratched the event handling itch (and assuming it holds up), I'm > back into a thinking about what's next mode. Neat. I'm planning on starting off looking at what's necessary to port to some other implementation. --jon From enderx12 at mac.com Thu May 5 01:52:06 2005 From: enderx12 at mac.com (Chris Curtis) Date: Wed, 4 May 2005 21:52:06 -0400 Subject: [cl-carbon-devel] Re: Suggestion for the web page In-Reply-To: References: <4cc7bc61f18fa296bd8f97c3190fcab6@david-steuber.com> <5b6aedd45f72d9b453f5721609158678@mac.com> Message-ID: <4C66C5B1-825C-45FA-A498-D564CFFF129A@mac.com> I sketched out a short "why Carbon" fragment as a starting point. Nothing too fancy, just a short justification of why it's not insane. Edit at will. :-)

Why Carbon?

Because diamonds shouldn't have marshmallows in them. Cocoa is an immensely powerful tool, but for some classes of problems it's a rather awkward fit. Often Carbon's event model and API are simply cleaner and more natural. CL-Carbon is an attempt to make it even more natural for Common Lisp applications.

And because it seems to come up as a question from time to time, no, Carbon is not a "dead" API. In fact, Spotlight is written with Carbon, and that's about as new as it gets.

From david at david-steuber.com Sat May 21 07:39:29 2005 From: david at david-steuber.com (David Steuber) Date: Sat, 21 May 2005 03:39:29 -0400 Subject: [cl-carbon-devel] Fixes to utils.lisp and package.lisp Message-ID: <656482cf74703c424172701bb6c0b271@david-steuber.com> Hello list, I just committed some minor fixes for bugs discovered by Chris Curtis and I forgot to give him due credit in the CVS log message (which I fully intended to do, but my brain fogged over just describing what I did). Sorry about that, Chris. At least this mailing list is archived, so you get your public recognition here if that is OK with you. At least you don't have to worry about sending patches now ;-) I also compiled with the very latest bleedingest edgiest version of OpenMCL from CVS: 0.14.3-050520b. It looks like the OS package for the symbols interned by the #_ and #$ reader macros has been changed to DARWIN32. Just an irrelevant observation. I was happy to find the CVS version of OpenMCL compiling itself though.