Re: [MacRuby-devel] Contributions (Was: Experimental branch status)

2009-06-04 Thread Laurent Sansonetti

On Jun 3, 2009, at 6:30 PM, Charles Oliver Nutter wrote:


Laurent Sansonetti wrote:
Very good question... We currently need to access readline (for  
IRB), so porting the readline extension to FFI will be very useful.


There's actually a (partial?) port of readline to FFI by Koichiro  
Ohba. I'll try to find out where it's located.


Other extensions part of the Ruby distribution that might be  
interesting to port: openssl, syslog, zlib.


syslog and zlib are also already ported to FFI.


Excellent!

OpenSSL might be way harder given the richness of its API (as well as  
the fact that every release seems to introduce API breakage).


Other than that, I guess that once we start to be able to run  
larger applications/libraries (like Rails for example) we might  
need to access more native code, but this is more a future thing.  
I'm not a Rails expert but I guess we will need access to sqlite3,  
mysql, etc. which are surely wrapped into C extensions for now.  
Porting these to FFI might help too.


I'd love to see them ported to FFI too.

Other than core extensions, I'd say start looking at the most  
popular gems and pick the first one on the list that's a C  
extension. Port it, and repeat with the next one.



What about creating a list somewhere of popular C extensions that we  
would like to see ported? This way volunteers would have a TODO list.


I googled a little bit but I wasn't able to find an existing list.

It looks like the Ruby-FFI official homepage is http://kenai.com/projects/ruby-ffi/pages/Home 
, it does contain a "projects using FFI" page but it's not very  
complete. I will google more and try to fix the page, first (any help  
is welcome :)).


Laurent
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] syslog Re: Contributions (Was: Experimental branch status)

2009-06-04 Thread Laurent Sansonetti

On Jun 3, 2009, at 8:43 PM, Ernest N. Prabhakar, Ph.D. wrote:


On Jun 3, 2009, at 6:30 PM, Charles Oliver Nutter wrote:
Other extensions part of the Ruby distribution that might be  
interesting to port: openssl, syslog, zlib.


syslog and zlib are also already ported to FFI.


Hmm, just out of curiosity, any chance we could have MacRuby use  
Apple's System Logger instead (compatible API, but much richer  
backend):


http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/asl.3.html#/ 
/apple_ref/doc/man/3/asl


I'm pretty sure it is open source, so it could even be used cross- 
platform:


http://www.opensource.apple.com/source/syslog/syslog-69.0.4/


Well, the syslog C extension is just a wrapper around the syslog.h  
API, which appears to be implemented on top of ASL. So it does not  
really matter here, if you use this API it will end in the ASL backend.


Now, ASL comes with its own API, to do custom filters for example, and  
this API is already covered in the libSystem.bridgesupport file, so it  
can be used by PyObjC, RubyCocoa, MacRuby etc. already today.


(See the /Developer/Examples/Ruby/RubyCocoa/Scripts/libSystem/asl*.rb  
scripts as an example.)


Laurent
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] LLVM version snafu, PPC workaround

2009-06-04 Thread Rich Morin
In today's build of the experimental branch (revision 1719), I
got the following nastygram:

  /usr/bin/g++ -I/usr/local/include  -D_DEBUG  -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3
-fno-common -Woverloaded-virtual -I. -I./include -g -Wall
-arch ppc -arch i386 -Wno-parentheses
-Wno-deprecated-declarations -Werror -c vm.cpp -o vm.o
  vm.cpp: In constructor 'RoxorVM::RoxorVM()':
  vm.cpp:210: error: 'CodeGenOpt' has not been declared
  vm.cpp:210: error: 'None' was not declared in this scope
  vm.cpp: In constructor 'RoxorVM::RoxorVM()':
  vm.cpp:210: error: 'CodeGenOpt' has not been declared
  vm.cpp:210: error: 'None' was not declared in this scope
  lipo: can't figure out the architecture type of:
/var/tmp//ccrdSEKd.out
  rake aborted!
  Command failed with status (1):
[/usr/bin/g++ -I/usr/local/include  -D_DEBU...]
 ...

Laurent informed me that I needed to update my copy of LLVM, as
discussed in the MacRuby README file.  In order to do this on a
PowerPC, I had to modify the commands slightly:

  ... UNIVERSAL_ARCH="ppc i386" ...

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Technical editing and writing, programming, and web development
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel