Are there any smartphones with good Python interpreter support? - iphone

I'm getting a new phone and I am looking to do some programming on it. Python is my language of choice, so I was wondering what phones have support for Python interpreters.
I know, I know, "you program too much already", yeah my girlfriend says that all the time too, but I can't help it.
I'll probably do a lot of on-the-go style simple debugging, and I'd like to also get into programming some simple custom apps to streamline my smartphone workflow.
I see there is support on Android through SL4A and Py4A but I couldn't figure out which version of Python it resembles. I also see that PyS60 on Symbian is available, based on 2.5.4. Also, there's a string of Python-iPhone threads starting here which were very informative but not very current. Lastly I found a cool youtube video of a guy doing something geeky in python on his iPhone.
Yes I am still researching on my own but I figured someone on SO might be able to give me a pointer in the right direction. Which of these options is halfway decent?
Does anyone know which of these is easiest to get started with? How about which is most powerful for development using the native smartphone capabilities? Anything

With regards to Py4A, in view of discussion at the link below, my guess would be Py 2.7.1, 2.7.2.
http://code.google.com/p/python-for-android/issues/detail?id=10&q=python

The Nokia n900 comes with Maemo 5 Linux, and can easily run a full Debian Linux for ARM. It's not locked down in any way. I have one (in the shop, really hope they can fix it) and it's great.
Python? Basically like using it on any desktop Linux distribution.

Related

Do you need Xcode to program iPhone apps?

I'm interested in making apps for the iphone. I was wondering if it were possible to make apps, WITHOUT Xcode. the only reason is because I'm dirt poor, and can't afford an Apple.
If it's games you're interested in developing, then another option might be to take a look at Unity (http://unity3d.com/). This would let you develop on the PC for free in a friendly environment for a beginner. If you then develop something that you decide you want to publish on iPhone, then at that point you could invest in a Mac and just rebuild the Unity app for iPhone on that.
Also, Unity lets you write scripts in both C# and Java so you wouldn't have to learn Obj-C.
The short answer is no. The long answer is "not exactly," but you can get started in some ways while you're working on getting access to a Mac you can do the work you'd like to do on.
"XCode" is more or less really two things:
(1) an IDE
(2) a toolchain with a C/ObjC/C++ compiler (really a version of gcc) and a big library of apps
You don't have to use #1 in order to build iPhone Apps, though it's genuinely helpful. You can get by with #2.
But without #2, you're going to have a hard time building an App you can sell in the App store.
So, it depends on what your goal is.
If it really is to build an app and get it out there, the easiest path is probably going to be to find some way to get access to a machine running OS (probably 10.5 and up) you can do development on. That might be talking a friend who has one into letting you spend some scheduled time on it, or it might be working and saving up for a used intel-based Mac mini (probably something you could get for $300), or it might be turning a PC you've got into a Hackintosh (or maybe setting up a Hackintosh VM on the PC if you're sharing it with others who might not want it transformed thusly :).
If your goal is to start learning how to do things while you work out how you're going to do the above, though, the good news is that it's not hard to get a hold of tools that will help you learn the technologies/languages involved in iPhone apps. Like I said earlier, Apple's compiler is really just a version of gcc. You can probably install gcc on your machine and write objective C programs with it. You could also look into GNUStep which could help you get familiar with a lot of the concepts and practices underlying how the Cocoa libraries work for the iPhone and OS X. And you could learn OpenGL ES, which would be great help if you ever end up working on an iPhone game.
Actually You can develop apps without a Mac. You can use a number of languages and tools that enable writing apps for iOS like:
- Python
- PhoneGap
- Appcelerator
- Mono
- Unity3D
- Unreal Engine
These all can export to iOS.
The only step that requires a Mac is publishing to the app store. But You can use any Mac for that, so You can publish from a friend's/neighbour's or actually anyone's Mac. That is the last step when You're sure everything is running perfectly. Perhaps Your application will earn You Your own Mac.
Also there are a number of publishing service providers in the internet (which don't cost nearly as much as a Mac). I don't remember any particular one at the moment, but I'm sure if You search You will find many. Good luck!
Unfortunately, although there are 'alternatives' (phonegap, mono touch, etc.) I believe you ultimately need Xcode and its tools to package/sign/publish your applications.
If you are really motivated though, you can look about ways of installing Mac OS X on a PC, though that is beyond the scope of this website.
In short, you need a mac. There a number of screwed up ways to do this without a mac, but for all intents and purposes you need a mac. A mac mini you can buy used for $300 on ebay will do the trick. You don't need a powerful machine.
Though Xcode itself is free it does require an Intel based Mac running Snow Leopard. You have 2 options:
Buy a refurbished Mac Pro or Mac mini from Apple website. They are not that expensive. You can use non-Apple peripherals with them to bring down the cost. And you will not be disappointed with quality.
Use Hackintosh to run the OS X on other Intel platform. Its hacky, difficult (carshes) and illegal.
Update:
For Objective C you can refer a pretty good documentation of Objective C language at iPhone developer portal. There are many other documents like memory management and human interface guidelines which should help you get started.
Once you have developed the familiarity with Objective C, you can then browse through various programming guides on iPhone development centre. If you want to follow a systematic approach, you may refer to "Beginning iPhone Development" book which I found pretty good.
Yes it's possible to develop applications for the mac/ipad/iphone without Xcode and without a mac/ipad/iphone.I own a imac,an ipad,and and a mac book pro.I tried to develop in xcode.
After some quick search on the internet I found this http://www.gnustep.org/. This is a framework you can use to develop in the objective C language,using GCC (the GNU compiler).There are other tools you can use,like GNU STEP Application project:this seems to be a sort of IDE (I didn't test it yet).
Yes and no. You can use alternative SDK's but they can be a pain to use and don't offer the publish/signing capabilities that Xcode does.

I need help on how to start developing an iPhone application

I have been programming in Microsoft Dot net for the past 4 years. Now, I want to develop an iPhone application. I have no idea where to start. I do not know anything about MAC OSX or any other Apple "words":). Searches on the google about books and online articles fetch a lot of results which is confusing. It would be great if anybody can share their beginner's experience. Thank You.
I've learn all about iPhone programming with this great book: Beginning iPhone 3 Development.
I found it surprisingly easy to pick up. The Apple dev center includes a lot of sample code, and because it's the programming language du jour, there's a lot of forum links and StackOverflow questions about it, as well as plenty of people looking to answer new questions.
It's pretty satisfying to do too, if you've never done mobile development before.
Get yourself a machine and download XCode, the supplied Apple IDE. It's a bit lamer than Eclipse right now, but the new version which is on the verge of release looks much better. Grab yourself access to the developer center (which is worth the investment) and build a simple App or two. Get to know Interface Builder first, because you may not have worked with things like this before.
There are some idiosyncracies in the syntax and whatnot, but you get used to it pretty fast. And then come here and ask more questions. :)
I just ran through this tutorial to get familiar with XCode and Interface Builder.
Then joining a local group about it should be helpful - I'm a member of the Iphone London Users Group and chats with other developers is the most useful tool I have to find out how to do things.

Do i have to buy mac for iphone application development?

Is there any MacOS virtual machine that can run on PC?
Is there any source to get it?
What is the best way to develop apps for iphone?
Yes all the developer tools are OSX only.
There are lots of iPhone development books out there go check out amazon and find one with some good reviews and that will get you started.
You might not, in the strictest terms, have to get a Mac to develop for iPhone; but it will be extremely helpful. Apple is relatively talented at squashing efforts directed towards Hackintoshes and virtual machines running OS X.
The shortest answer that will give you the least hassle is: Yes you need a Mac.
But, as far as I know there are a few possibilites, that try to reimplement some Cocoa Frameworks (however they might be Mac OS X only and not iPhone): GNUStep is an example.
But I don't think you get something aquivalent to Xcode (the IDE for iPhone development) this way.
And I think there are some OSX86 Virtual Machines (however these seem to be against Apple's EULA and thus seem to be clearly illegal so I won't point you anywhere to get them).
So to conclude - if you want to develop for iPhone: getting a Mac is the easiest way, even though not cheap.
Hope this helps.
The short answer is - yes.
One possibility for learning some of what you need to know before getting a Mac is GNUstep.
However, GNUstep is mainly useful for learning Objective C, especially since it provides many of the classes that the Cocoa toolkit for iPhone does. This can be run on Windows.
It doesn't, however, support some of the key 2.0 language features that are used 'all the time' in any sample code.
What it will allow you to do is design a UI using their UI designer GORM, and use a near-identical message-based system for implementing a UI, and you could theoretically write Objective C classes in GNUstep and then use them on iPhone.
However, to compile an app for iPhone you basically need to have a Mac, because then you can get the key for signing an app, etc. Since you need to get a Mac at some point, there's really little point in going the much harder route of using GNUstep first and learning a more limited implementation, unless you really need to get started before funds are available.
Despite the new SDK terms that can other programming languages, if you're really wanting to start without a Mac, I'd probably be tempted to look at something like Unity, or perhaps even Appcelerator Titanium, and figuring out all the non-platform-specific logic first on whatever platform (Unity has a free version that can be run on Windows, for example).
I'm not that big a fan of xcode, but is is far and a way the best IDE for Objective C development simply because there's almost nothing else out there.
There are, as always, other options. If you do a web app type project, you can implement the website and test a lot of it in a browser. Furthermore, since Android and iPhone browsers are both WebKit based, you can use the free Android SDK to see what pages look like on a comparable mobile device. And since you can use C and C++ classes as well as Objective C (N.B. not for the GUI, since that needs the Objective C extensions for messaging between objects), another option for making a start without a Mac would be to use Eclipse, QT Creator or some other C/C++ IDE to implement non-GUI classes, so long as you make sure you don't use platform-specific libraries.
But the end of the long answer is still that whatever you do, to compile a proper iPhone app you'll be using xcode and associated tools to finally build it and sign it, and so you need a Mac in the end. If you want to create something targetting the iPhone and won't have access to a Mac, then perhaps you're best off looking at creating an iPhone-adapted website using iui or a similar toolkit to give the site a suitable look and feel.

Examples of interpreters embedded in iPhone Applications?

I'm trying to find examples of interpreted languages ported to the iPhone, with source code available to show how to embed it, without Jailbreaking the device:
I've found:
Ruby: http://www.cocos2d-iphone.org/forum/topic/1163
Lua: http://www.mobileorchard.com/announcing-iphone-wax-native-uikit-iphone-apps-written-in-lua/
and I'd like to see what else is out there. I know that Apple may or may not allow usage of an interpreter in an app (or downloading new code to run in the interpeter), but I'm ok with that, as I want this mostly to simplify development.
Are there any other examples out there?
There's Nu.
Nu is a Lisp-on-ObjC-runtime thing. The link above is to information on iPhone embedding. The language homepage is here.
PHP, Python, Tcl.
iPhone Frotz is an interpreter for the Z-Machine and is open source.
How about C#?
And soon also Flash..
The Processing environment has been adapted for the iPhone. I believe that it comes from ProcessingJs which translates the Processing code to Javascript.
Processing for IOS (if the link doesn't work, search for it)
http://itunes.apple.com/sg/artist/boyd-rotgans/id492576046
or a commercial version that allows you to import/export scripts
http://itunes.apple.com/app/pr0c0d1n6/id493549542?mt=8
There is also a tool to convert ProcessingJs scripts to native iPhone Apps.
http://luckybite.com/iprocessing/

Is there any sort of programming environment that runs ON an IPhone?

I'm just recalling the days when Radio Shack used to sell pocket computers. (Many moons ago, w/ only a few K of memory.) They had the ability to write small programs on Pocket computer. Maybe it's just nostalgic, but I alway thought that was handy. (Through the fog of my memory.) Is there any capability like that for an Iphone?
Edit:
I can kinda understand not allowing a like a GameBoy emulator on the App-store, it's kinda like saying your ok with people loading "ROMs" and could get them in trouble. When you start profitting from an Emulator the license holders get pissy, just think about "Bleem" and Sony. Sony buried those guys. I suppose Javascript is better than nothing. What about Java in a sandbox? Or if they want something they aren't afraid is going to cannibalise there market, a BASIC interpreter.
I don't believe that you are allowed to in the terms of service for the App store. Isn't this why mono programs have to be staticly compiled if they are going up to the App store.
If you are looking to go off the beaten path, James Long's blog details how to run Gambit Scheme code on the iPhone. Load the application once and then load code changes progressively as needed.
In a following blog post, he details how to debug your applications remotely with an REPL. Very cool stuff. Between the simplicity of Scheme and the existing work he's done on his blog, a lot of the work/difficulty involved with developing in a "non-standard" way on the iPhone is taken care of for you. It's worth a shot!
Python is possible:
http://mail.python.org/pipermail/python-list/2008-November/686098.html
The only thing remotely close to that (without Jailbreaking) is Javascript/HTML in Mobile Safari.
While "on" your iphone is relative www.tilestack.com is a web based development environment that can produce webapps.
Terminal.app can be compiled for limited distribution (w/o jailbreaking). /bin/sh is a valid programming language. QED.
Yes, it is possible to set up a node.js programming environment that lets you run your own server on the iPad. It's also possible to run javascript using the textastic code editor. See Is it possible to do programming using iPhone?.