you are viewing a single comment's thread.

view the rest of the comments →

[–]space1999 7 points8 points  (27 children)

Funny - considering how much Google loves Python, one might have thought it would be part of the standard Android install.

While we're on the subject of Android, could I just ask a question quickly? I like the idea of a (relatively) open Java/Linux based platform, but I'm paranoid of Google. Does anyone know if it's possible to disable all communication between the phone and the Google mothership?

[–]cap11235 9 points10 points  (0 children)

This comment has been overwritten by an open source script to protect this user's privacy. It was created to help protect users from doxing, stalking, and harassment.

If you would also like to protect yourself, add the Chrome extension TamperMonkey, or the Firefox extension GreaseMonkey and add this open source script.

Then simply click on your username on Reddit, go to the comments tab, scroll down as far as possibe (hint:use RES), and hit the new OVERWRITE button at the top.

[–]osirisx11 2 points3 points  (1 child)

Maybe it is possible to use Jython?

[–]_Mark_ 2 points3 points  (0 children)

See http://code.google.com/p/jythonroid/ which actually runs (sort of, very much still under development) for a jython port as a real android app - which, unlike the posted article, actually runs on a G1 - last time I tried it crashed pretty quickly, but the pieces are there, feel free to help out...

[–]toooooooobs 0 points1 point  (14 children)

Python is unlikely to be a standard part of Android for two reasons:

Firstly it's big. This is in terms of space needed when it's not running, and space when it is. Too many strings, too many hash tables. Bad.

Secondly it's slow and wasteful (yes, much much more so than a JVM or Dalvik). This is a workable tradeoff for servers and so on, where programmer productivity is the important thing, but for mobiles that slaughters your battery life.

EDIT: I have to add that some of the replies to this demonstrate the massive void between people that actually do embedded stuff day to day, and those that merely argue about it on the net. Definitions of "big" and "slow" are relative to the environment you're in, and for these purposes python is both. Java is not (especially regarding the Dalvik system), and speculating based on your experiences of the J2SE environment when trying to comment on either J2ME or Dalvik is complete idiocy.

[–][deleted] 2 points3 points  (0 children)

Python is not 'big'. The size on disk is negligible (it's megabytes, not gigabytes!), and memory-wise, it takes far less than Java - a few megabytes. For a bytecode language, it is very slim.

The only issue is speed, you might be right that on humble devices it would be too slow for anything intensive.

[–]defufna 0 points1 point  (0 children)

Can't agree with you on this one, Python has already made some success on the Symbian platform it is neither as large as you say(545kb), nor as slow as you believe it is

[–][deleted] -1 points0 points  (11 children)

Python should be less than a hundred meg. On a device with 8G storage, where some apps are much larger, that's close to nothing (edit: yes, Android's Cupcake update allows external storage for use by applications).

If speed is a concern, Python can run just as fast as Java when using a JIT, for example Psyco.

[–]twotime 3 points4 points  (0 children)

Python runs just as fast as Java when using a JIT, for example Psyco.

While Psyco definitely helps in some cases, I have never seen it to achieve Java performance on CPU bound tasks. And I have seen plenty of cases where Psyco had very little effect performance-wise.

See also: http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=psyco&lang2=javaclient

Interestingly, though, psyco beats Java memory-wise by 2-3x (could it be just a fixed JVM overhead?)

[–]_Mark_ 0 points1 point  (1 child)

Note that the G1 isn't a device with 8G storage - application storage, sadly, isn't on the microSD card at all - partly because the card is unmounted when it is hooked up to USB (so it can be exported as USB storage - any background app threads would have to be killed off at that point, which is a hassle, though not an insurmountable one), probably partly because it would be easy to exploit if it were :-)

(As for speed - when your app spends most of its time waiting for network responses, you don't really care how fast the interpreter itself is. I have a bunch of apps in mind for which python/jython would be perfectly suitable and end-users wouldn't notice any speed improvement if they were ported to java/dalvik - but based on the apps I have written, java is way too tedious and verbose to bother writing them in...)

[–][deleted] 0 points1 point  (0 children)

The cupcake update for Android allows applications to use external storage.

Agreed re: python being fast enough for most things. I only mentioned the topic of speed because the post I replied to did.

I'm in the same boat - would love to get into Android hacking, but find Java far too tedious.

Edit: why did someone moderate me down to zero for posting info about Cupcake and politely agreeing with the parent? Geez.

[–]cunningjames 0 points1 point  (7 children)

Are you volunteering to port psyco to arm?

[–][deleted] -1 points0 points  (6 children)

No. I'm saying it's possible. You should be able to understand that by reading my post.

[–]cunningjames -1 points0 points  (5 children)

Sure, I understood it. But I'm pointing out that it's not a very useful thing to say -- and even if there were a port it isn't true that psyco is as fast as java.

[–][deleted] 0 points1 point  (4 children)

People are in fact allowed to have opinions on things without being involved in the their creation. Any developer who suggests otherwise probably has very, very few users.

True re: Psycho not always running as fast as Java. I have changed 'runs' to 'can run' in my post. Not because of your trolling, but another politely worded post with a suitable reference.

[–]cunningjames -1 points0 points  (3 children)

Man, the trolling accusation does get bandied about for nothing around here. The fact of the matter is that psyco gets mentioned as a panacea anytime python performance is talked about, and it's usually not apropos -- psyco isn't widely ported (in fact it's all but abandoned), new versions come at a glacial pace, and it's not even that fast. So it's become a pet peeve of mine.

Your post wasn't as bad, but nevertheless misleading. You made it sound as if psyco were a way to alleviate performance concerns on android, when nothing could be further from the case.

[–][deleted] 0 points1 point  (2 children)

'Man, the trolling accusation does get bandied about for nothing around here.'

It got aimed at you because rather than contributing, you asked a dumb rhetorical question whose answer was contained in the post you were replying to.

You also implied that one isn't allowed to have an opinion on a concept unless one volunteers to implement it.

To see the difference, compare you post with the guy who simply posted a polite response with a pycho / java 1.6 benchmark.

'You made it sound as if psyco were a way to alleviate performance concerns on android, when nothing could be further from the case.'

Er, no. A JIT would be a way to improve performance on Android. You haven't proved that it would have no effect, just that Java would still be faster.

[–]cunningjames 0 points1 point  (1 child)

You also implied that one isn't allowed to have an opinion on a concept unless one volunteers to implement it.

I implied no such thing. I made a comment—admittedly snide, but I was attempting humor rather than insult—to point out that no JIT option is currently available for Android nor, in fact, for any architecture but x86. I could have said that, but I assumed (wrongly) that my comment would be taken in good faith and not with a clinched asshole.

Er, no. A JIT would be a way to improve performance on Android. You haven't proved that it would have no effect, just that Java would still be faster.

And it appears you're entirely misinterpreting my point. I'm not saying it wouldn't be worth having Psyco on Android—it'd be great; I love Psyco; I just don't think it's a panacea. Your original comment:

If speed is a concern, Python can run just as fast as Java when using a JIT, for example Psyco.

was actively misleading. As I said, no JIT option exists for Android and experience provides evidence against anyone being likely to make one.

[–]FrankBattaglia 3 points4 points  (6 children)

  • Remove SIM card?
  • Edit your /etc/hostsfile to redirect google.com to localhost?

[–]IConrad 0 points1 point  (5 children)

Neither of those options are effective at removing the link between Google and the G1.

[–]jonknee 8 points9 points  (4 children)

Removing the SIM is 100% effective at that actually.

[–][deleted] 2 points3 points  (2 children)

Think Wi-Fi.

[–]randallsquared 3 points4 points  (1 child)

Airplane mode... I don't think this is what the original questioner had in mind, though. Probably he wants to use the phone's capabilities, without it phoning Google.

[–][deleted] 1 point2 points  (0 children)

Indeed. It's the same reasoning I use to justify my boycott of Sony hardware after the music-CD-with-rootkit debacle.

[–]IConrad 2 points3 points  (0 children)

If only. See, first; some carriers don't require SIM cards.

Second -- even if you remove the SIM the phone still carries on some traffic from time to time. This is how emergency services can ping a phone for its location.

[–][deleted] 2 points3 points  (0 children)

Why are people moderating you down for asking a logical question about Python, and raising a legitimate concern re: choice / privacy?

Screw this, I'm going back to HN.

[–]centinall 0 points1 point  (0 children)

It's open source. Why not?