Programming On Pandora


I certainly would not be into computers nearly as much as I am today if it weren't for 80's home PC's with their Basic programming languages, and easy to get started attitude. I totally agree with Torpor and Gruso that ease of access to the programming side of the Pandora should be one of it's primary attractions. Not an afterthought.
 
torpor said:
You're making excuses again, poor ones.

Time to set up your system: some 30 minutes faffing around.
Time to use compiler on-board: 3 seconds to transfer a tarball, 30 seconds to run make and watch it build, 1 second to run it.

The excuse: there are none, I just prefer it. You are happy with your setup and maintaining all that stuff on your one PC, I'm happier having the machines themselves involved in their own porting ..
If you prefer to compile on board, that's fine, you should do that, but it still doesn't explain the animosity you're displaying against cross compilers. Earlier posts suggested you didn't want to use a cross compiler because you didn't know what cross compiler to use, or how to get the libraries. I told you where to find a cross compiler, demonstrated how easy it was to get the libraries, and even provided a basic Makefile. And then you continued with your "which cross compiler, which library" argument, so I tried again, and again. I have no idea what you want! I've given you everything you need to cross compile on Linux and Mac (you'll need to find and figure out Cygwin on your own if using Windows) to be up and running with nothing more than a couple downloads and an untar. You also need to edit the Makefile, but this is a zero sum item since you'd need to do something similar whether you're cross compiling or not.
And 30 minutes? Really? That's the kind of argument you've devolved to? I said 15, and that was to build everything, including building the cross compiler from source, something that you don't have to do.
 
Last edited by a moderator:
the animosity you're displaying against cross compilers.

Its really simple: Barrier to entry for newbies who don't have the time, patience, inclination or desire to load up their main system with foreign libs and tools and so on, just so they can get started on targeting the Pandora for development.

Its really, really that simple: I prefer to have a compiler-onboard philosophy because it means I can give the device to a programmer and say "everything you need is onboard, write code and put it here, press here to build, press here to run and test" and this just plain works.

How many times I have had to explain to people how to install a cross-compiler environment, or switch between cross-compiler A and B for different targets, same code-base, and so on .. its just a hassle when you're trying to get something done.

I know, for the lone programmer who has everything under their control and is highly skilled and competent, this shouldn't be an issue. Well, I think there are more potential-programmers out there who will be turned off by the whole cross-compiling investment, and thats what I want to avoid. We should make it as *easy as possible* to write code for the Pandora : forcing people to have to use a cross-compiler just because thats what the elite programmers do, is not going to work. Far better to have a simpler environment that will get someone productive rather than have a hurdle to even the getting-started stages.

I told you where to find a cross compiler, demonstrated how easy it was to get the libraries, and even provided a basic Makefile. And then you continued with your "which cross compiler, which library" argument, so I tried again, and again

All that explanation does *nothing* - I still have to go out and do the work, and so does anyone else who wants to get involved in Pandora development, and if you add up all that work over 1000 programmers it quickly results in man-years of time being spent on just setting up the environment. With compiler-onboard, none of that is necessary, no time is wasted, and people can just get on with creative code-writing.

You're thinking inside your own sphere. I'm thinking about how its going to be to manage a team of programmers for devices like Pandora. And I'm also thinking about what its going to take to get other programmers onboard the Pandora bus - certainly if the Pandora itself is all you need to start writing nice apps, then thats a huge bonus over all the setup hassle you are advocating as 'being easy'. It may be easy for you, but please don't assume that all skilled programmers want to have to deal with that. Compiler-onboard is the *Best* solution to the problem.


Earlier posts suggested you didn't want to use a cross compiler because you didn't know what cross compiler to use, or how to get the libraries.

Actually there are multiple cross compilers for ARM out there, and not all of them are going to be great to use on the Pandora. And anyway, why should 1000's of programmers have to make this decision themselves? The absolutely best choice for the compiler only needs to be made once, and then installed as part of the PandoraOS itself .. I'm talking about ARM versions, NEON optimizations, VFP versus non-VFP, etc. Maybe you're content with writing a few SDL games here and there, and certainly there is nothing wrong with that - but for audio applications, for example, its going to be a whole different kettle of fish when you use compiler A versus compiler B. Again, this decision would have to be made every time someone goes about setting up a cross-compiler, and they can get it wrong actually, quite easily. Better to just have it come from a canonical source (the guys building PandoraOS) and then nobody has to hassle about it again: the compiler onboard will be configured for the very specifics of the Pandora hardware, and thats about all there is to it.

Just add source.

I said 15, and that was to build everything, including building the cross compiler from source, something that you don't have to do.

Just curious, does your compiler have VFP and NEON extensions?


In short, and I know this is getting boring for others in the thread, my point of view is this: "Compiler On-board: Just Add Source."
 
torpor said:
the animosity you're displaying against cross compilers.

Its really simple: Barrier to entry for newbies who don't have the time, patience, inclination or desire to load up their main system with foreign libs and tools and so on, just so they can get started on targeting the Pandora for development.
1: I was making suggestions FOR YOU and you alone, trying to quell YOUR problems with the system. I wasn't writing for newbs, I was writing for a developer experienced in using tools.
2: Counter argument - If they already have an environment on their PC, it'd be easier to continue using the exact same environment they're familiar with bundling in a different set of libraries than to move to an entirely new environment with it's own unfamiliar quirks. Wouldn't it be nice to write an application on your computer in an IDE you're familiar with, hit compile, and run it right there to test, change to Pandora in the project drop down and hit compile again and run it immediately off your Pandora, change the project drop down to Mac, compile it and send it to your friend, change it to Windows and hit compile and get a Windows EXE file that I'm sure someone somewhere will use? Four different binaries compiled from single source from a single IDE. Even if I were writing for newbs, how is an onboard compiler that they have to learn in any way simpler than a cross compiler package that they have to learn?

torpor said:
I told you where to find a cross compiler, demonstrated how easy it was to get the libraries, and even provided a basic Makefile. And then you continued with your "which cross compiler, which library" argument, so I tried again, and again
All that explanation does *nothing* - I still have to go out and do the work, and so does anyone else who wants to get involved in Pandora development, and if you add up all that work over 1000 programmers it quickly results in man-years of time being spent on just setting up the environment. With compiler-onboard, none of that is necessary, no time is wasted, and people can just get on with creative code-writing.
The work is being done though, it's just not seen by the end user. The on board compiler still needs to be baked into the OS image and then copied onto the firmware 4000 times. That is not a free operation. It's obviously going to be less than if the user has to untar the package themselves, but not in a measurement of years. If every user has to do what I had to do, it will be 15*4000 = 1000 hours = 42 days. Of course, every user doesn't have to do what I did. They just have to download and untar a couple of packages, so it's more like 5 minutes per person, a max "waste" of 14 days, if you want to call it that. 14 days != 1 year, let alone multiple years.

torpor said:
You're thinking inside your own sphere. I'm thinking about how its going to be to manage a team of programmers for devices like Pandora. And I'm also thinking about what its going to take to get other programmers onboard the Pandora bus - certainly if the Pandora itself is all you need to start writing nice apps, then thats a huge bonus over all the setup hassle you are advocating as 'being easy'. It may be easy for you, but please don't assume that all skilled programmers want to have to deal with that. Compiler-onboard is the *Best* solution to the problem.
No, you are thinking inside your own sphere. I have never once argued against an onboard compiler. If you read everything I've said from the beginning, I've been in favour of an onboard compiler from the start. I am also in favour of a cross compiling environment for those that want it, have argued reasons why some might want it, and have struggled to find out from you just why you are so opposed to the idea so I can improve upon it, but your arguments seem to be running in circles of "onboard is better, so don't bother with cross compiling". It is needlessly frustrating!

torpor said:
Earlier posts suggested you didn't want to use a cross compiler because you didn't know what cross compiler to use, or how to get the libraries.
Actually there are multiple cross compilers for ARM out there, and not all of them are going to be great to use on the Pandora. And anyway, why should 1000's of programmers have to make this decision themselves? The absolutely best choice for the compiler only needs to be made once, and then installed as part of the PandoraOS itself .. I'm talking about ARM versions, NEON optimizations, VFP versus non-VFP, etc. Maybe you're content with writing a few SDL games here and there, and certainly there is nothing wrong with that - but for audio applications, for example, its going to be a whole different kettle of fish when you use compiler A versus compiler B. Again, this decision would have to be made every time someone goes about setting up a cross-compiler, and they can get it wrong actually, quite easily. Better to just have it come from a canonical source (the guys building PandoraOS) and then nobody has to hassle about it again: the compiler onboard will be configured for the very specifics of the Pandora hardware, and thats about all there is to it.

Just add source.
Why is it a different kettle of fish for audio? Just get the exact same audio library that you would want to use on the Pandora and use it in your cross compiler. If the library isn't already on the Pandora, you'd have to download it and install it anyway. If it is on the Pandora, then you either copy it off, or you already have as part of some automatic cross-compiler setup script.

torpor said:
Just curious, does your compiler have VFP and NEON extensions?
Couldn't tell you, haven't looked. Does the one on the Pandora have them? If so, I'll just take the source for that compiler and recompile it for x86. The executables that they output will then be the exact same in every way.
 
Last edited by a moderator:
Ah, the good ol' "reply to each part of your opponent's post and make a huge M-M-M-MULTI QUOTE PYRAMID".
This is how you can tell a flamewar is really getting rolling.

*cracks a beer, sits back*
 
Python is the new BASIC. IDLE is ideal for newbees. Sorted.

I like the idea of TOTALLY developing something on the Pandora. Graphics, music, sound and code. Assuming I can draw a Combat style tank with Gimp.

Python for me, for now. (unless it is too slow)

Next step... "Hello World++" in C++.

Again, for the 10-15 lines of C code I type I think a local compiler will suffice.

We'll I won't be setting up a cross compiler yet anyway as it is too theoretical without a box to transfer it to.
Later I will.

There, everyone wins! Now, only if that other thread was still open I could do my peace-keeping duties there too.
 
I think it will be nice to have a programming environment on the Pandora, but I don't really see it as someone's main production environment for anything of significant size. I think one of your limiting factor is going to be the keyboard. Typing words is going to be fine on the Pandora, but hitting all of the punctuation marks required for programming ()[]{};:-&|^%!#?.\/<>+=-*, etc is going to take some finger gymnastics that won't be fun. I ran across this on my N810; it is possible, but not pleasant. Nor is the 800x480 screen size going to be very roomy for an IDE or text editor. So to do any significant development, you will probably need an external keyboard and mouse, and by that point you will more than likely be ready to switch to a notebook or desktop machine for your development comfort.

For teaching programming on a Pandora, I'd stick to less punctuation heavy languages like Python, and avoid Java/C/C++ or, heavens forbid, Lisp. Also if you go with the punctuation-lite scripting languages, the issue of having a compiler and all of its headers and dev libraries becomes moot.

So by all means, we need to develop both on-board and offline compiling solutions and they both need to be easy to set up. You may even want to have your editor and IDE on your notebook/desktop, ssh into the Pandora from your main machine, and compile on the Pandora itself (assuming you can put up with the slower compile times.)

Again, both solutions are necessary, both need to be easy to set up.

Cheers,
Michael
 
mduffor said:
I think it will be nice to have a programming environment on the Pandora, but I don't really see it as someone's main production environment for anything of significant size. I think one of your limiting factor is going to be the keyboard. Typing words is going to be fine on the Pandora, but hitting all of the punctuation marks required for programming ()[]{};:-&|^%!#?.\/<>+=-*, etc is going to take some finger gymnastics that won't be fun. I ran across this on my N810; it is possible, but not pleasant. Nor is the 800x480 screen size going to be very roomy for an IDE or text editor. So to do any significant development, you will probably need an external keyboard and mouse, and by that point you will more than likely be ready to switch to a notebook or desktop machine for your development comfort.

For teaching programming on a Pandora, I'd stick to less punctuation heavy languages like Python, and avoid Java/C/C++ or, heavens forbid, Lisp. Also if you go with the punctuation-lite scripting languages, the issue of having a compiler and all of its headers and dev libraries becomes moot.

So by all means, we need to develop both on-board and offline compiling solutions and they both need to be easy to set up. You may even want to have your editor and IDE on your notebook/desktop, ssh into the Pandora from your main machine, and compile on the Pandora itself (assuming you can put up with the slower compile times.)

Again, both solutions are necessary, both need to be easy to set up.

Cheers,
Michael
Imagine having all those symbols "()[]{};:-&|^%!#?.\/<>+=-*" setup on the touch screen set off all the way to the left or right in a list going down the screen. So you have you're development environment all set up set down you're Pandora and start typing and whenever you need to use one of those symbols you simply take the stylus or you're finger and press it on the screen :)
 
Last edited by a moderator:
TylerAW said:
Imagine having all those symbols "()[]{};:-&|^%!#?./<>+=-*" setup on the touch screen set off all the way to the left or right in a list going down the screen. So you have you're development environment all set up set down you're Pandora and start typing and whenever you need to use one of those symbols you simply take the stylus or you're finger and press it on the screen :)
Oh, now you're gravedigging threads? Score!

[edit]I'm somewhat teasing you
 
Last edited by a moderator:
I'll be using my Pandora as a build server, ssh'ing into it to fire up builds .. or automating it through my local repo, so that any syncs to a repo from other machines result in the Pandora itself getting the new code and doing an automatic build. This will save me a lot of hassle, as I've built my programs to be multi-platform and tight as possible, with all platform-specific stuff segregated from the main app logic/flow .. so I'll be building for Zii Egg, iPhone, Pandora/Touchbook/Beagle all at once, with the Pandora simply working as a buildserver. This way, I won't really care too much about the physical limitations of using the Pandora for development - I can use my main Linux workstation as the coding environment, then push to my repo, and watch as all my build servers pull the latest code and build ..
 
This is one of the things I really want to do with my Pandora once I get it.
Also, I think it'll be a viable platform for Scratch.
http://www.gp32x.de/board/index.php?/topic/53068-scratch/
 
Last edited by a moderator:
Well some of the chat on these 7 pages goes over my head, but I too really like the idea of some basic tutorial for n00bs to learn the basics and make some little code snippets, or even a basic game, that would be awesome!

And now I need to read that link about html5 and JS canvas... Looks like it can produce some nice results - looking at that Defender game clone

I do very little entry level code work, but it's more editing of existing code rather than writing from scratch, and so I would be looking for tutorials aimed at beginners. I also think developing on the pandora would be great as can quickly pull it out the pocket and do some in the lunch break, waiting at the train station, sat in park, anywhere! Because of this, I'd probably find myself devoting a lot of time to learning
 
The bash scripting language is very powerful stuff, and can get quite a bit of work done. Better still, it's a high level language similar to basic, so it's not hard to get. Since Evildragon is using Zenity for many of the setup scripts, Zenity will be included in the default install - thus very simple GUI stuff could be made very easily by even the n00bish of n00bs. You won't be making arcade games with bash and Zenity, but you can make small utilities or extremely simple GUI games - think number guessing games or hangman.

Intro to bash
Zenity manual

Python + Pygame will be more than enough for the beginning enthusiast to get an introduction to arcade-like game programming.

The really nice thing about programming is that general concepts are transferable. The basic constructs if, for loops, etc pretty much works the same no matter what language you're in. Learn the fundamentals of one language, and you've pretty much got the fundamentals of all of them. The syntax may change a bit from one to another, but the overall concepts always stay the same. Never be afraid of picking "The wrong language" because they are all good, and if you master one, transferring skills to another becomes exponentially easier.
 
Yep, that pretty much is what I thought, I hadn't ever heard of python until I heard it on these boards, and few days ago I was looking at some intro to python site, then ended up on YouTube looking at some tutorials and the bloke was stressing at the beginning that before even watching his video lessons, to go and get a book and get to understand the fundermentals of programming, then come back... the YouTube vids wernt python though, was c++ I think
these tutorials
http://www.youtube.com/watch?v=zAgpsks29W4

but I heed his word, he seemed to know his stuff, so I thought I would do that first, get to understand the fundamentals and as you say, will serve me good for learning any language

Python and/or pygame sounds good, to make some proper games, but nice one for the heads up on that Zenity - another one iv never heard of but if it's bundled with pandora I will no doubt try my hand at it, start with the simples, no point drowning myself in the deep end

I think for n00bs like me though, as been sugested here and on other tuts I seen, learning fundamentals is key to successful learning
 
torpor said:
I know, for the lone programmer who has everything under their control and is highly skilled and competent, this shouldn't be an issue. Well, I think there are more potential-programmers out there who will be turned off by the whole cross-compiling investment, and thats what I want to avoid. We should make it as *easy as possible* to write code for the Pandora : forcing people to have to use a cross-compiler just because thats what the elite programmers do, is not going to work. Far better to have a simpler environment that will get someone productive rather than have a hurdle to even the getting-started stages.

Programming straight on the Pandora sounds much more "elite" to me than using a cross-compiler.
Considering:
- The lack of proper IDE
- The fact that typing code will be unavoidably much less convenient on Pandora
- The fact that reading online documentation while programming will be unavoidably much less convenient on Pandora as well
I am afraid that programming on Pandora will be restricted to coding gurus who can type directly proper, bug-free code without requiring to make any kind of trial and error.

Well, I wish I could be wrong because programming straight on Pandora would clearly look really cool.

I think the easiest option is to get the proper setup to generate both executables for PC and Pandora at each compilation. Then you can make and play to your game on PC and upload it to your Pandora whenever you want. I had that on gp2x.

With Python, you have that for free. In C, you just need the proper Makefile, which could be easy with proper tutorials / examples.

EIDT: OK, I did not see it was the topic of a major flame war in this thread... Should have read that before, sorry.
 
Last edited by a moderator:
mindlord said:
The bash scripting language is very powerful stuff, and can get quite a bit of work done. Better still, it's a high level language similar to basic, so it's not hard to get.

hmm. Bashscript is powerful I'll give you that. Easy to get some simple scripts up and running. I don't see it being similar to Basic though. The syntax is quite nasty and inconsistent. And trying to get your head around a task which would be relatively easy in Basic can be a nightmare in Bash. Though the code can end up a lot smaller if you know what you're doing (and if you don't, as was the case in my assignment, it can end up being an awful lot larger!)
 
Last edited by a moderator:
hal9000 said:
Programming straight on the Pandora sounds much more "elite" to me than using a cross-compiler.
Considering:
- The lack of proper IDE
- The fact that typing code will be unavoidably much less convenient on Pandora
- The fact that reading online documentation while programming will be unavoidably much less convenient on Pandora as well
I am afraid that programming on Pandora will be restricted to coding gurus who can type directly proper, bug-free code without requiring to make any kind of trial and error.

Well, I wish I could be wrong because programming straight on Pandora would clearly look really cool.
Umm, you don't have to program on the Pandora to be able to compile on it?
 
Last edited by a moderator:
hal9000 said:
I am afraid that programming on Pandora will be restricted to coding gurus who can type directly proper, bug-free code without requiring to make any kind of trial and error.

I disagree, sure it might be slightly limiting, but compared to writing programs on a micro computer it can be made much more user friendly. And as many here can testify 'a ten year old can do it'.

I would like gcc on the pandora. Its good point the python is probably the main beginner tutorial ground, but i like the idea of having gcc on board too. One of the (many) reasons i liked my acorn electron's basic so much is that you could do inline 6502 assembler. I sort of see it as a similar way. Sure - python is great language, but its not as sexy as c/c++. and if gcc is installed so will the assembler, so a little bit of arm assembler might be a fun tutorial too, if people want to understand the hardware a bit better.

Personally i will be cross compiling from my pc most of the time, but i can't put my pc in my pocket... it would be nice to be able to do bits and pieces when out and about. It doesn't need many libraries and things.

So yes cross compiling is great, and for some stuff (e.g. porting large programs) probably the only sensible way to go, but i think putting gcc on the pandora is a great idea too.
 
Last edited by a moderator:
Back
Top