[Openmcl-devel] OpenMCL / Cocoa

Gary Byers gb at clozure.com
Tue Jan 24 19:52:01 UTC 2006



On Tue, 24 Jan 2006, Gary King wrote:

> I know that progress continues with the Objective C / Cocoa bridge

A few post-1.0 bugfixes will make it into 1.1 (whenever things stop
spinning around), but I haven't had time to do significant development
recently and I don't know if anyone else has.  Hopefully, that'll
change.

> but I'm wondering if anyone has worked on running OpenMCL and a Cocoa
> application using sockets to communicate between them. I have some
> ideas I'd like to play with where the GUI could be Cocoa and some of
> the smarts could be OpenMCL. I think that sockets would be fast
> enough, etc. to handle simple needs. Unfortunately, I'm pressed for
> time and would rather not much with setup unless I have to so...

A few years ago, I did something (small and simple) that was intended
to allow something running without useful standard input and output
(e.g. a typical MacOS GUI application where file descriptor 0 is
opened on /dev/null and fd's 2 and 3 go to /dev/console or some
similar logging device) to obtain a file descriptor that basically
had a simple Cocoa listener window on the other end.  (Data written
to that fd appeared in an NSTextView in another application; 
text entered in the NSTextView was sent back over the file descriptor
and appeared as input to the "client" application.)  It was intended
to allow commercial MCL to have a kernel debugger, so the "remote
GUI console" just hid in the background until something did I/O
over the file descriptor.

That was pretty crude: there wasn't any IPC protocol besides the
impiclit "display this text" and "here's some input", but I
suppose that it might be possible to steal someone else's protocol
(SWANK ?) and implement some of the server side of that.  (If
that turns into "implementing Emacs on the server side", you'd
know that this is probably a bad idea.)

The source to this is in CVS at:

:pserver:cvs at clozure.com:/usr/local/publiccvs

in the CVS module "altappservices", and the anonymous CVS password
there is "cvs".  Invoking "make" in the directory created by a
checkout builds the code and an installer that installs a framework
in /Library;  I think that there's a README in there that explains
the (very simple) API for client programs.

(The code in the library is all ObjC/Cocoa stuff.)

>
> Has anyone else build any infrastructure along these lines that
> they'd like to share? Also, is this a _bad_ idea? Am I missing
> something?

There's certainly not a lot of infrastructure in that code, but
there's a little (which might make it a useful starting point).
I don't remember what the IPC mechanism was (pipe/pty/socket ?),
and whatever the choice was may have been influenced by random
concerns (e.g., whatever I could get to work.)

I'd have to believe that people have done slicker/more complete/
more usable things, but the only widely-used client-server 
protocol for this sort of thing that I'm aware of is X11, which
is kind of overkill/irrelevant.

>
> Thanks,
> -- 
> Gary Warren King
> metabang.com
> http://www.metabang.com/
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list