It doesn't need Cocoa at all. Right now it just depends on -lffi -lobjc and Foundation.framework. Foundation could be removed (I think it's just for -retain and -release). I know GNUstep's -lobjc is different from Apple's, but it should have equivalent functionality that would be easy to port to if it doesn't have the same functions.
Makefile twiddling would probably be required in unusual environments.
I'd be happy to help. :)
-Jason
On Sun, May 19, 2013 at 3:51 PM, Jeff Read bitwize@gmail.com wrote:
Quick question: Will this bridge work in the absence of a Cocoa runtime? I use Objective-C in places that don't have a Cocoa/Openstep/GNUstep stack, and something like this would be hella useful, even there. On May 19, 2013 1:22 PM, "Jason Felice" jason.m.felice@gmail.com wrote:
Someone reminded me that I didn't include the link. Duh.
It's here:
https://github.com/maitria/gambit-objc
On Sat, May 18, 2013 at 12:12 PM, Jason Felice jason.m.felice@gmail.comwrote:
Hi!
I've just released gambit-objc 0.1.0. This is the "it has the basics, and the implementation is complete enough for real projects" release.
It gives you access to Objective-C class objects. The easiest way is:
(import-classes (NSString NSDictionary))
after which, you can refer to them.
It dynamically dispatches Objective-C methods:
(: NSString stringWithUTF8String: "hello, world")
It supports marshaling of native Scheme objects to C/Objective-C types
for parameter and return values, including structures, selectors, all integral types, and UTF8 strings. It wraps Objective-C objects with foreign.
- It has a objc-repl, an extended version of gsi which supports
square-brace syntax, like so:
[NSString stringWithUTF8String: "Hello, world!"]
You'll find a minimal sample Cocoa app in the distribution as well.
There are many cool things that can be added. I'd love to collaborate, help people use it, and otherwise enable its adoption.
I'm really happy with how elegant it ended up (after a couple partial implementations were scrapped). My next focus will be making it easy to boot on iOS and bring into iOS projects.
-Jason
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list