|
|
Hello, I've been thinking about Scripting on the BUG, or perhaps more accurately, writing BUG apps in a scripting language instead of Java. I'm starting this thread to continue this discussion which started here: http://bugbeta.com/forums/viewtopic.php?t=46 Also, Ken sent me an interesting related thread on the Java Community News forums: http://www.artima.com/forums/flat.jsp?forum=276&thread=216815 |
|
|
I've been working on using Jython to write BUG apps and I've had some success. Once I go over what I've done with Ken and clean it up a little, I'll post a Hello World-type app on buglabs.net and a tutorial. In the meantime I'll outline my approach (there are certainly other approaches, and probably better approaches, but so far what I've done is working):
If you're interested and still confused, wait a couple of days and I'll have a good sample app on buglabs.net for you to pull apart. |
|
|
I know I promised this a while ago, but I finally got my Jython BUG application documented and ready for BUGnet. Here it is: http://buglabs.net/application/show/22. It's called JythonGps. Please check it out. If you're into Python or Jython, definitely take a look. Perhaps you can think of a different or better way to get Python on the BUG. Or perhaps you can use this method to make an application that we've never seen before. I am interested in seeing something unique that would be difficult to do in Java. Cheers! |
|
|
Hi, |
|
|
myaliasisrithm, I was interested in having Python run within Java so I could take advantage of the OSGi runtime, where we’ve done a lot of work providing bindings to the module drivers, for example. This code could also access other OSGi bundle services and other BUG applications. I’m pretty sure the BUG won’t ship with Python on it (because of space issues), but we plan to provide our kernel and root file system build tools. You could use these tools to put Python on the BUG pretty easily. If I’m right about the space concerns, but the community is hankering for Python, we will consider creating a separate package that you can install. Another thing to keep in mind is, at this time, we don’t have bindings to hardware drivers written for any language other than Java. If you wish to access your modules from Python code, your options are to write your own bindings, wait and hope that we do it, or use the web services running on the BUG internally—the BUG ships with a simple suite of web services that provide access to the modules through http. I hope this helps. |
|
|
myaliasisrithm, One addition to what Brian said; if your language of choice already supports a given device-type in Linux, then that support should work on the BUG. Since the beginning we’ve tried to keep with standard Linux APIs. Java is not the only language/environment we care about…obviously different people and applications require different tools. As we work to native support we will update the wiki, in addition if you’d like to work on this (once you have a BUG :) ) that would be great! |
|
|
Hi, Thanks! |