Hacker News new | ask | show | jobs
by danpalmer 700 days ago
There's a bigger issue here: OP describes writing prototype software on a desktop, and compares this to writing more production-style software on a highly constrained mobile device. This isn't an apples-to-apples comparison.

Python packaging is notoriously bad, and while you can get a Linux/Windows compatible script without too much work, getting to a single executable that just runs is much harder. Cloning a repo, setting up a virtualenv, installing an openssl dependendcy or whatever, is just not something that exists in the mobile world. We have to put more effort into the packaging, and that means a higher bar for things like this. There are answers to this in Python that claim to produce single, relocatable, Python binaries, and I've never seen one without a huge list of caveats. Even yesterday I was patching an open source library that didn't work inside one of these because it had the gaul to use... checks notes, os.path.

> Well, looks like modern mobile phones are not a great hacker's playground, huh?

This sums it up. They are not. The security environment on these devices pretty much ends this before you even get to writing any code, and that's generally a good thing. Phones are appliances for most people. There's a reason why "apps" took off in a way that boxed desktop software never did, and there's a reason why boxed desktop software on Windows did far better than package managers on Linux. Almost everyone wants more a more polished experience. Shipping a Python script running OpenCV to a phone is not going to produce a polished experience.

2 comments

amazingly, the browser has pretty much solved all of this. fully compatible EMCAscript implementations on every single device with hardware access (such as the camera, as is needed in this post)

I don't buy your "security through difficulty" argument for that reason alone.

I don't really mean "security through difficulty", I mean that on phones we have sandboxing, permissions, and a bunch of other factors that make phones much more secure than the average desktop/laptop. Browsers do provide a pretty good option here, but that comes at the cost of the browsers themselves being highly complex, and privileged software on the devices.

OP writing this prototype as a web app would likely have been the path of least resistance to having something work on mobile.

I'd argue they were trying to do prototype software for Android as well, and that's not a thing you can do. Which is the problem...