News for hackers. Stuff that matters.
Re:Python, JRuby on the Android Platform in 10 Steps by alanh on Saturday February 19, 2011 @01:07AM (#2238562)
Wow, title does not match the article at all. Doesn’t look you like can actually develop in Python yet, or at least without considerably more work.

The title, to me, implies Google backing & compilation for Dalvik.

Re:Python, JRuby on the Android Platform in 10 Steps by nailer on Saturday February 19, 2011 @09:08AM (#2239013)
Indeed. Flagging the post as it's misleading.
Re:Python, JRuby on the Android Platform in 10 Steps by technomancy on Friday February 18, 2011 @11:50PM (#2238421)
I'm skeptical towards the ASE approach; Tim Bray's post on the subject has a good overview of the challenges inherent in getting nicer languages working for Android apps: http://www.tbray.org/ongoing/When/201x/2010/07/28/Ruby-and-P...

My money is on Mirah, a new fast, lightweight JVM language that feels like Ruby but compiles to identical-to-Java bytecode: https://github.com/mirah/pindah I don't think shoehorning existing runtimes is a suitable long-term approach.

Re:Python, JRuby on the Android Platform in 10 Steps by cageface on Saturday February 19, 2011 @12:51AM (#2238534)
Agreed. Something like Mirah, designed to run the the Java ecosystem from the ground up, makes more sense and brings along far less baggage. You lose the Python libraries if you go this route but I suspect you're mostly just going to be gluing together bits of the Android APIs anyway so it's less of a loss.
Re:Python, JRuby on the Android Platform in 10 Steps by ddkrone on Saturday February 19, 2011 @02:04AM (#2238653)
I am currently pulling my hair out just trying to get various activities to send stuff between each other. Doing this stuff in Javascript is so much easier with JSON and it's too bad there is no JSON equivalent for Java and the static typing doesn't help matters either so I can't wait until there is another option other than Java for writing applications.
Re:Python, JRuby on the Android Platform in 10 Steps by cageface on Saturday February 19, 2011 @04:21AM (#2238782)
It's funny. Half the time people claim Android's static typing is an advantage vs iOS and half the time people instead really hate it.

I have to say that now that I'm slowly getting over the verbosity of Objective-C I'm finding ansi C + a dynamic messaging layer to be a pretty nice combination on iOS. It looks like I'd have to work both below Java with the NDK (painful) and above it with some kind of scripting layer to get similar speed + flexibility on Android.

Re:Python, JRuby on the Android Platform in 10 Steps by ddkrone on Saturday February 19, 2011 @04:38AM (#2238793)
I started programming in dynamic languages like Javascript and Ruby so I'm really hating it. I have no idea how people manage to get anything done in Java. I was hoping generics would help me out but when I started using them all of a sudden interfaces started to pollute everything. I really wish palm/hp had more competent management because their webOS operating system is light years ahead of android/iOS.
Re:Python, JRuby on the Android Platform in 10 Steps by cturner on Saturday February 19, 2011 @06:37AM (#2238890)
I've lived both worlds. Java is strong where you have a large codebase with a team working on it. Even more if you have multiple versions of your platform running in different places and need to manage the code forward. Static typing is really useful for this stuff. I think single-person teams, or very-well-gelled small teams (who can all buy into a single syntactic style) are far more effective with dynamic languages.
Re:Python, JRuby on the Android Platform in 10 Steps by cageface on Saturday February 19, 2011 @10:14AM (#2239133)
Good point. Context is everything for language choice.
Re:Python, JRuby on the Android Platform in 10 Steps by th0ma5 on Saturday February 19, 2011 @02:49AM (#2238694)
actually there's a JSON library with the Android SDK ... check out this great document that describes a bare bones webview based android development path, sort of like phonegap but with thinner gloves: http://itp.nyu.edu/~sve204/mobilemedia_spring10/androidWebVi...
Re:Python, JRuby on the Android Platform in 10 Steps by DanielRibeiro on Saturday February 19, 2011 @08:34AM (#2238975)
Weird nobody else mentioned ruboto: https://github.com/ruboto/ruboto-core

It even has an app for android (https://market.android.com/details?id=org.ruboto.irb), which works very well, even with OpenGL.

Re:Python, JRuby on the Android Platform in 10 Steps by rst on Saturday February 19, 2011 @11:32AM (#2239290)
Ruboto still seems to have a few problems. According to the current faq on github[1], a "hello world" app currently takes over 3 mb compressed, and takes 10 seconds or so to start. (They're working on it.) So it works, but not really well yet.

[1] https://github.com/ruboto/ruboto-core/wiki/FAQ

Re:Python, JRuby on the Android Platform in 10 Steps by koush on Saturday February 19, 2011 @01:29AM (#2238600)
Fairly old news. I ported Mono to Android a few years ago and got Python and Ruby running that way.

http://www.koushikdutta.com/2009/02/monodalvik-interop.html

Re:Python, JRuby on the Android Platform in 10 Steps by koush on Saturday February 19, 2011 @01:30AM (#2238605)
Re:Python, JRuby on the Android Platform in 10 Steps by th0ma5 on Saturday February 19, 2011 @02:43AM (#2238684)
really great effort, i will try it out, but why is it so large?
Re:Python, JRuby on the Android Platform in 10 Steps by Groxx on Saturday February 19, 2011 @03:37AM (#2238745)
Because it's .NET, therefore has to include the .NET library (to be of any use at all aside from a virtual machine). Or in this case, the Mono version of the .NET library. It's a big library.
Re:Python, JRuby on the Android Platform in 10 Steps by ianhawes on Saturday February 19, 2011 @10:47AM (#2239198)
I can't believe no one has mentioned Appcelerator Titanium yet (http://appcelerator.com). Titanium allows you to create Android applications in JavaScript. Even though its not python, for all the Java haters (and there are plenty) its drastically easier than creating an app in Java. Plus, its significantly faster than using a WebView (a la PhoneGap).

With Titanium you get access to all the native controls, maps, audio/video, camera, Facebook, and a _ton_ of other stuff. You can check out their Github profile for more info: http://github.com/appcelerator/titanium_mobile. Beyond the basic UI stuff, Don Thorp and his excellent Android develops have recently added the ability to use Android.R resources, intents, activities, services, notifications, and other advanced API's that you'd be hard pressed to find in an app developed via PhoneGap. Not only is it free, but you can use the same codebase (with some changes) to create an iOS (iPad or iPhone) app.

Unlike Mono Droid/Mono Touch, Titanium is 100% free.

Re:Python, JRuby on the Android Platform in 10 Steps by shirtless_coder on Friday February 18, 2011 @11:36PM (#2238395)
Yeah but how feasible is it to actually distribute an app on the market with this bundled in? Can that even be done?
Re:Python, JRuby on the Android Platform in 10 Steps by jefe78 on Friday February 18, 2011 @11:42PM (#2238409)
Its feasible and can certainly be done! http://code.google.com/p/android-scripting/wiki/SharingScrip...

Enjoy! I know we'll be using this soon.

Re:Python, JRuby on the Android Platform in 10 Steps by noodle on Saturday February 19, 2011 @12:33AM (#2238493)
if you do, could you write up a post about it somewhere and share? i'm not doing android dev, but making python viable really makes me want to try, and i'd be curious to hear more.
Re:Python, JRuby on the Android Platform in 10 Steps by th0ma5 on Saturday February 19, 2011 @02:45AM (#2238688)
i haven't seen any word from anyone distributing everything together. most conversation is around an app that would need python (and probably even SL4A) installed separately and manually by the end user.
Re:Python, JRuby on the Android Platform in 10 Steps by evilmushroom on Saturday February 19, 2011 @08:35AM (#2238976)
Still do not get all the Java hate--- it's plenty valid enough for Android dev-- and easy to use. Some people just like hating it because they think it's cool to do so. :)
Re:Python, JRuby on the Android Platform in 10 Steps by udp on Saturday February 19, 2011 @09:59AM (#2239103)
I find both Java and the Android APIs ugly, overengineered and more importantly - boring! I'd rather write a webapp in HTML/CSS/Javascript than a native Android application any day.

What I'd like to see is applications for things like Android becoming packaged up "web pages", with platform-specific extensions to access the native APIs. Considering webkit/V8 are already bundled, it'd make a lot of sense...

Re:Python, JRuby on the Android Platform in 10 Steps by bad_user on Saturday February 19, 2011 @10:37AM (#2239180)
I tried doing a simple application with Javascript + native hooks for the iPhone, using UIWebView + hooks to native functionality. I did it like that because the UI needed fast updates if available.

It was a horrible experience. Mobile Webkit is buggy and inconsistent and comes with restrictions; and trying to emulate the native look&feel ... it's like trying to provide a native look an feel for a Java AWT interface, running on top of IExplorer 6.

I don't see it happening, and I don't wish to see it happening. Just build the damn thing with whatever native platform the phone comes with, and leave the platform-specific extensions out of WebKit.

Thanks,

Re:Python, JRuby on the Android Platform in 10 Steps by udp on Saturday February 19, 2011 @10:50AM (#2239205)
Isn't it up to the platform to give web applications the "native" look and feel, though? If an application is just standard HTML controls, it can't be difficult for (eg) iOS to make them look like iOS controls, surely?

If mobile webkit is as "buggy and inconsistent" as you describe, than I'd rather see that fixed than have developers write for a completely different language/API for each platform they want to target.

HTML/CSS/JS are open standards and supported relatively consistently across desktop operating systems and mobile devices. I just think it makes a lot more sense for each platform to expand that when they need to, rather than reinvent the wheel with, for example, their own button API every time.

Re:Python, JRuby on the Android Platform in 10 Steps by bad_user on Sunday February 20, 2011 @05:26AM (#2241584)
Yes, because that worked so well for Swing.
Re:Python, JRuby on the Android Platform in 10 Steps by cpeterso on Saturday February 19, 2011 @03:54PM (#2239882)
And WebKit != WebKit. The fragmentation of WebKit versions (and bugs) on different mobile phones is a growing problem:

http://www.quirksmode.org/webkit_mobile.html

Re:Python, JRuby on the Android Platform in 10 Steps by evilduck on Saturday February 19, 2011 @10:56AM (#2239212)
I'm not an Android dev so I'm not positive, but can't you already do that with Android's WebView pointing to local apk assets and Java -> JS bindings to control the API? You don't totally escape Java, but it looks like you can really reduce it.
Re:Python, JRuby on the Android Platform in 10 Steps by ddkrone on Saturday February 19, 2011 @02:52PM (#2239734)
Java hate has nothing to do with being cool. I can honestly say that it is a horrible language because I have programmed in several dynamic languages and the amount of grief you have to put up with in Java to get simple things done is unbearable when you have seen how much easier things are in dynamic languages. How many people are developing missile guidance systems on android? Most people write small applications to automate some aspect of their lives and forcing people to use Java for that kind of stuff is just beyond me.
Re:Python, JRuby on the Android Platform in 10 Steps by hdragomir on Saturday February 19, 2011 @03:19AM (#2238723)
Now this will bring me back to native apps for Android!

Sadly, thought, this still won't make apps easier to sell on the Android Market, but that's for another discussion.

Re:Python, JRuby on the Android Platform in 10 Steps by pan69 on Saturday February 19, 2011 @03:19AM (#2238722)
Hello Java. Thank you Jython and JRuby.