tag:blogger.com,1999:blog-20975090.post6101950269326188393..comments2024-03-11T10:18:55.852-05:00Comments on Headius: Busy Week: JRuby with Android, Maven, Rake, C exts, and More!Charles Oliver Nutterhttp://www.blogger.com/profile/06400331959739924670noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-20975090.post-22718153403570484582010-01-27T13:54:32.120-06:002010-01-27T13:54:32.120-06:00Charles: I gave that a try and made a little IRB +...Charles: I gave that a try and made a little IRB + source code editor + script manager app that should make it more convenient to experiment with stuff on the phone.<br /><br />Check out http://code.google.com/p/jruby-for-android/ if you're interested :)Pascal Chatterjeehttps://www.blogger.com/profile/17751205415094899461noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-53082168702886765582010-01-23T16:46:52.863-06:002010-01-23T16:46:52.863-06:00Rake/Ant integration and Maven gem can simplify se...Rake/Ant integration and Maven gem can simplify several hybrid Ruby/Scala/Java tools I work on. Definitely worth having around. Many thanks!Michaelhttps://www.blogger.com/profile/04068753572848885780noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-26672529233747576552010-01-21T13:11:47.864-06:002010-01-21T13:11:47.864-06:00Pascal: Yes, basically any Ruby code you want to r...Pascal: Yes, basically any Ruby code you want to run on the device should run just fine. Currently, only interpreted mode is supported; but I'm adding improvements to JRuby's compiler and JIT to allow producing all your application's bytecode before building an app for the device. At any rate, if you ship JRuby's parser and interpreter, you can load arbitrary .rb source at any time.<br /><br />Ed: Good to hear from you :) I'll be in town for most of the week, so perhaps we can grab a beer somewhere.Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-56956210170984369512010-01-21T13:02:16.294-06:002010-01-21T13:02:16.294-06:00Charles, I don't have your post-sun address. ...Charles, I don't have your post-sun address. I hope to see you a Jfokus. Please drop me a line to my Sun address if you have a chance.<br /><br />Thanks,<br /><br />EdAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-23401553589819277502010-01-19T15:13:17.900-06:002010-01-19T15:13:17.900-06:00comment_bot: Neither Jython nor Groovy nor Clojure...comment_bot: Neither Jython nor Groovy nor Clojure nor Scala have an interpreted mode, which means all code they execute has to be compiled to JVM bytecode. Since the Dalvik VM on the device does not run JVM bytecode (it precompiles to Dalvik bytecode when installing) none of those languages can create new code while on the device.<br /><br />Rhino (JavaScript) does have an interpreter, but I'm not sure anyone's using it for Android stuff.Charles Oliver Nutterhttps://www.blogger.com/profile/01770148973571270871noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-91808072751600851182010-01-19T11:01:00.482-06:002010-01-19T11:01:00.482-06:00Nice work, I managed to get Ruboto IRB working per...Nice work, I managed to get Ruboto IRB working perfectly on the emulator.<br /><br />Sorry if I'm missing something obvious, but is it possible to execute ruby scripts with the application or are we limited to running in interactive mode?Pascal Chatterjeehttps://www.blogger.com/profile/17751205415094899461noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-70579147220933590442010-01-19T10:44:35.892-06:002010-01-19T10:44:35.892-06:00Could you expand on this: "JRuby is just abou...Could you expand on this: "JRuby is just about the only mainstream JVM languge that can create *new* code while running on the device"<br /><br />Is jruby doing something different to jython and groovy here?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-49946857783757393102010-01-16T16:59:56.055-06:002010-01-16T16:59:56.055-06:00@charles I was afraid someone would say that ;)
I ...@charles I was afraid someone would say that ;)<br />I would be interested in getting HornetsEye running with JRuby. I'll put it on my TODO list. At the moment however I want to implement lazy computation in order to get sufficient performance for doing real-time feature matching and hopefully 3D object recognition in the end.Jan Wedekindhttps://www.blogger.com/profile/00554109214750252562noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-33488366622330766802010-01-16T13:23:09.843-06:002010-01-16T13:23:09.843-06:00Jan: Perhaps you would be interested in helping us...Jan: Perhaps you would be interested in helping us with the C extension shim for JRuby?<br /><br />Phoet: Yes, we know of buildr, and it's a great tool if you want to (and are able to) follow the maven conventions. But it does not provide full two-way integration between ant and rake, which we would like to have out of the box for JRuby. I could see buildr being reworked to run atop JRuby's rake/ant integration in the future, or JRuby integrating maven logic more directly, but our current intention is to provide the lowest levels of integration without imposing project structure on users.Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-71839844447656859762010-01-16T12:02:39.310-06:002010-01-16T12:02:39.310-06:00@grimen Thanks for your response. I implemented ma...@grimen Thanks for your response. I implemented <a href="http://wedesoft.github.com/malloc/" rel="nofollow">malloc</a> and currently I am working on <a href="http://wedesoft.github.com/multiarray/" rel="nofollow">multiarray</a>. The plan is to rewrite the core to support lazy computation and split up HornetsEye into multiple "Gems". Furthermore I want to write a backend which makes use of GCC (something like <a href="http://rubyforge.org/projects/rubyinline" rel="nofollow">RubyInline</a>). I don't know how long that will take. But if there is an easy way to get part of HornetsEye to work with JRuby and on Android, that would be very interesting. There are various interesting things one can do on a mobile with a camera (panorama stitching, barcode reader, augmented reality, ...).Jan Wedekindhttps://www.blogger.com/profile/00554109214750252562noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-11646893856433931862010-01-16T10:40:26.188-06:002010-01-16T10:40:26.188-06:00..and yea, thanks for the Marvin link, it might be.....and yea, thanks for the Marvin link, it might become very useful.grimenhttps://www.blogger.com/profile/18170503252509408174noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-28401418275622080762010-01-16T10:39:33.826-06:002010-01-16T10:39:33.826-06:00@Jan: Interesting research! Regarding ARM, I found...@Jan: Interesting research! Regarding ARM, I found some info that hints about ARM-support for libjit is very much in progress:<br /><br />http://code.google.com/p/libjit-linear-scan-register-allocator/wiki/WhyToLibJIT<br />http://old.nabble.com/libJIT-Linear-Scan-web-site-updated-td24004253.html<br /><br />I plan to test out HornetsEye with jruby very soon (had issues on OS X, so will use ubuntu this time). Will post in HornetsEye forum about the outcome.grimenhttps://www.blogger.com/profile/18170503252509408174noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-16010464975613671782010-01-16T10:05:55.996-06:002010-01-16T10:05:55.996-06:00did you ever have a look at buildr (http://buildr....did you ever have a look at buildr (http://buildr.apache.org/) ? this already combines rake and ant pretty well.phoethttps://www.blogger.com/profile/05278622763235309820noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-37905154214674619662010-01-15T09:39:34.930-06:002010-01-15T09:39:34.930-06:00@charles @grimen Looks like I was wrong. I looked ...@charles @grimen Looks like I was wrong. I looked into it some more. According to <a href="http://en.wikipedia.org/wiki/Android_(operating_system)" rel="nofollow">Wikipedia</a> it is possible to build and install C-libraries on Android (so far I thought you are required to use the Android SDK). Also I found some post related to <a href="http://osdir.com/ml/android-porting/2009-07/msg00172.html" rel="nofollow">V4L on Android</a>. However according to Wikipedia, Android does not have X11 and the C-library is different. Furthermore I am not sure how well libjit supports ARM. So it might be possible to build HornetsEye for Android. So it might be possible to build HornetsEye (without X11 support) for android. However so far I haven't even tried to run HornetsEye with JRuby.Jan Wedekindhttps://www.blogger.com/profile/00554109214750252562noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-18085210150441680562010-01-15T07:40:23.876-06:002010-01-15T07:40:23.876-06:00@charles: Since development of OpenMoko was suspen...@charles: Since development of OpenMoko was suspended indefinitely, Maemo is probably the most promising project. But all the mobiles I am aware of are at best "mostly open". The other thing is that you need to utilise the GPU/GPGPU of the mobile in order to reach acceptable performance. But ordinary people like me usually have to wait to get access to new technology like this ;)<br /><br />@grimen: No problem. The <a href="http://marvinproject.sourceforge.net/en/index.html" rel="nofollow">Marvin Project</a> looks quite interesting. But I don't think it will run on the Android SDK. Another projet is <a href="http://code.google.com/p/zxing/" rel="nofollow">ZXing</a> which is a barcode reader running on Android.Jan Wedekindhttps://www.blogger.com/profile/00554109214750252562noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-13550924939136764942010-01-15T04:55:21.091-06:002010-01-15T04:55:21.091-06:00@Jan: OK, thanks for the heads up. Will have to us...@Jan: OK, thanks for the heads up. Will have to use some java library I guess.grimenhttps://www.blogger.com/profile/18170503252509408174noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-4964097393468355852010-01-15T01:34:23.213-06:002010-01-15T01:34:23.213-06:00Jan: That is unfortunate. When will they learn!Jan: That is unfortunate. When will they learn!Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-8188984247094050962010-01-14T12:04:34.436-06:002010-01-14T12:04:34.436-06:00@grimen: HornetsEye makes full use of the Ruby C-e...@grimen: HornetsEye makes full use of the Ruby C-extension API (including memory allocations with 'xmalloc'). Furthermore it makes use of libJIT and Video4Linux. I'm quite sure that the current version of HornetsEye will <b>not</b> run on Android without modifications.Jan Wedekindhttps://www.blogger.com/profile/00554109214750252562noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-9418965153207189432010-01-13T23:39:25.775-06:002010-01-13T23:39:25.775-06:00grimen: I think it would be useful to start playin...grimen: I think it would be useful to start playing with JRuby's current compiler and try to precompile Ruby code and get it to load on Android. There are some challenges, like the extra code it generates for method bindings, but I don't think there's anything we can't overcome. If you started playing with it and hit specific roadblocks, it would help me prioritize some of the heavy lifting on the JRuby side.Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-55399344840461124202010-01-13T06:15:11.178-06:002010-01-13T06:15:11.178-06:00@Charles: More specifically...what would you want ...@Charles: More specifically...what would you want help with? I'm experienced in Ruby (and Java programming...well haven't touched in 2 years now), but if we talking c coding my passion is sort of non-existing. =)<br /><br />P.S. I'm busy now with Rails, but when it's time for master thesis (in Mars at earliest) I need to do some research on android/jruby so maybe I ould help out somehow by then.grimenhttps://www.blogger.com/profile/18170503252509408174noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-74572898320644936252010-01-12T19:55:48.069-06:002010-01-12T19:55:48.069-06:00grimen: In my head, there's a roadmap...but fi...grimen: In my head, there's a roadmap...but finding time and resources to work on it is rather tricky. There's a lot of stuff happening with JRuby right now, and Android is one of many projects. I really need more help to flesh it out and get it ready for prime time. Maybe you can help? :)Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-58786509349549243732010-01-12T01:04:48.842-06:002010-01-12T01:04:48.842-06:00@Charles: OK, fascinating. The reason I ask is tha...@Charles: OK, fascinating. The reason I ask is that I might do my master thesis this spring on augmented reality, and I elaborated with the idea of using jruby on android. =) Follow-up question: Is there any roadmap for getting jruby + android rock 100%? With that I mean "stable enough for development at least".grimenhttps://www.blogger.com/profile/18170503252509408174noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-56879406487978179152010-01-11T15:02:44.657-06:002010-01-11T15:02:44.657-06:00grimen: Absolutely! My desire is that you'd be...grimen: Absolutely! My desire is that you'd be able to write an app entirely in ruby, including the use of gems, and then package that all up as an Android application, possibly precompiling it all to improve performance. It would probably be easiest if instead of using RubyGems proper you used Bundler, since then the RubyGems logic would not need to be shipped.Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-87570421410899717662010-01-11T11:37:33.597-06:002010-01-11T11:37:33.597-06:00I haven't had time to explore jruby more than ...I haven't had time to explore jruby more than in IRB...to take an explicit example: Will it be posible to run - say - HornetsEye ruby gem on jruby + android in the near future?grimenhttps://www.blogger.com/profile/18170503252509408174noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-90096975733185379702010-01-08T22:57:29.986-06:002010-01-08T22:57:29.986-06:00Phil: Yes, Duby would probably work fine if it had...Phil: Yes, Duby would probably work fine if it had all the features in place necessary to do Android dev. As it stands, it's missing a few key items like accessing other classes' public fields. But in theory with the missing features added it would work fine.<br /><br />I'm hoping we're able to reduce the JRuby startup time on Android by stripping out a lot of initialization logic we don't need. It's pretty poor right now, though we've done basically no work to improve it.<br /><br />I'm actually surprised Clojure had poor boot times, since the amount of code they generate is signficantly smaller than us. Perhaps it's because they opted to generate a class per function, and so many classes really confounds Dalvik?Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.com