Pandora The best programming language for the Pandora?


Then why not QT4 with PyQT4 or PySide? :D


I am still slacking like hell, but also planning to learn some python and play around with QT.


Ofcourse I will end up with a whole bunch of other tools that will fit the job.

In my opinion Qt4 is an extensions of C++: macro's, subset of the language (very C# like, if you follow the troll's style guide), extra pre-processor


Using Qt from another language reduces it to a library, so it's no better then GTK.


***now would be a good time to say we switched recently to an "everything QT4 with Nokia/Trolltech C++ style"-policy at work. And i've been a big advocate to using MingW/Qt Creator + the LGPLed libs. (oh, and the visual studio coders hate me ;) )
 
Im hearing a lot of interesting stuff about C++ and python here, but little else... Is this really all there is available for the OpenPandora???... If so, then amateur programmers like myself, who haven't a clue about anything as daunting as C++, and never come across Python are out of luck...


Im going to assume that since OpenPandora can download stuff like other Linux distributions that there must be other languages available for programming too?... Perhaps something like Java, or maybe even something more colourful like Ruby?...


Since I know little about these other languages, Id love to hear peoples opinions about them too (especially Ruby, as I hear that it is quite intuitive?)...


Oh, and since someone here mentioned ZX Basic (yes, Im a Speccy fan - Ill admit it), Im surprised no one has mentioned SpecBAS... SpecBAS is a part of SpecOS, which is ZX Dunny's pet project at the moment, a project that he has hinted might get ported across to the OpenPandora when he gets one... The forum can be found here:


http://www.zxspectrum4.net/forum/viewforum.php?f=6


SpecBAS (and the SpecOS generally) is an implementation of ZX Basic on modern hardware. It has some backwards compatibility with the original ZX Basic known and loved by ZX Spectrum fans, so will be instantly usable by anyone already familiar with that machine. It extends the language for greater graphical and sound capabilities and when done, will run on a minimal, streamlined OS to allow listings to run quite fast... Seems like a crazy idea, no?... Yet, Dunny has already written the Basic interpretor part of it (up to version 601 last time I looked), to run on Windows or Linux machines... Already included are some basic examples demonstrating mouse controled vector graphics, high resolution graphics and plasma graphical effects and multichannel sound and music playback...


..for a complete beginner like myself, such a project seems a dream come true... It might not be as fancy or sophisticated as programming in C++, but it would at least allow beginners to produce something quickly and simply. Anyone still waiting for their Pandoras can download the Linux/Windows version now and start writing their masterpieces now from:


ftp://zxdunny.dyndns.org/SpecOS/


..hopefully, when Dunny gets his unit, we'll see this ported to Pandora quite quickly...


I for one, think this will perfectly fill a gap once ported, as I don't imagine Im the only one who grew up on Basic who finds the other languages intimidating...
 
Is this really all there is available for the OpenPandora???
There are TONS of other programming languages, but most are rather unsuitable. C, C++ and due to its popularity Python as well are simply best suited.


But honestly, Basic languages are horrible. They might be nice for some small tools but for larger projects I would never consider them.
 
Im going to assume that since OpenPandora can download stuff like other Linux distributions that there must be other languages available for programming too?... Perhaps something like Java, or maybe even something more colourful like Ruby?...
No, you don't need other distros for that.


Angstrom probably has Java and Ruby packages.


And Lua, Lisp, Haskell, Clojure, maybe Go...


I think the only issue with Java was making applets work, because applets are a pain in the ass.


Nobody mentioned java and ruby because we don't like them.
 
Last edited by a moderator:
But honestly, Basic languages are horrible. They might be nice for some small tools but for larger projects I would never consider them.

That's your choice; I'd say you're wrong - and that would be my opinion, but I'd not just say that your choice of language is "horrible". Many of us grew up writing large projects in BASIC (on 8bit CPUs), and it's those people that SpecBAS is aimed at. If you prefer to use a modern language, then that's fine - there's plenty to choose from.


SpecBAS is designed mostly for writing 2D games, and from the feedback so far it's achieving its aim very well indeed :)


D.
 
If you prefer to use a modern language
I prefer plain C. Okay, Basic first appeared in 1964 - 8 years before C. But I still wouldn't call C a modern language :lol:


Anyway, many modern languages are just way too wasteful with their ressources and I really don't like that many seem to prefer to use bytecode nowadays. After 15 years of optimisations Java might have reached a point where it doesn't matter, but the JRE is already reason enough to avoid it.


But Python is actually quite interesting, for a scripting language it runs surprisingly well and you usually have simple C/C++ bindings instead of abstracting frameworks. Doing more time critical things like games is less of a hassle than with other languages that don't produce natively executable blobs.
 
Im hearing a lot of interesting stuff about C++ and python here, but little else... Is this really all there is available for the OpenPandora???... If so, then amateur programmers like myself, who haven't a clue about anything as daunting as C++, and never come across Python are out of luck...


Im going to assume that since OpenPandora can download stuff like other Linux distributions that there must be other languages available for programming too?... Perhaps something like Java, or maybe even something more colourful like Ruby?...
Not just C/C++ and Python. Any language with an ARM compiler can be used, and most interpretive languages should work fine. C++ and Python are just the most popular and arguably easiest. The Pandora also has Perl built in, and I've crafted a PND for Java which works wonderfully (very good and almost ready for mass consumption, but today was the first time in weeks I've had to look at it and I've spent most of the day catching up on forum posts ;) ). You can also install Ruby yourself if that's what you want to use, though no one else will be able to run your programs unless they've installed Ruby as well. Ruby is actually pretty small though (I think) so maybe if you're writing programs in Ruby it would be possible to just include the entire binary in a PND with your program. Lots of possibilities.


Name your language of choice and many people will jump to help you. Many others might also jump to suggest something else that they prefer, but feel free to ignore them ;)
 
there is no right answer, here is my opinion depending on what sort of thing you want to build


Something really simple : bash


applications : python


hardware/os related : C


sophisticated game/ game engine, particularly when working in a group of developers : C++


low level or hard core retro game : C


quick game development : python


*Note there is a huge overlap between C and C++. You can write a C++ program in a C style, or i have even seen some C programs written like C++ (sort of roll-your-own OO)


To be honest I wouldn't get too hung up on it. Just pick something and run with it. You will never learn everything you need, programming is about constantly learning. You find out what you need to get over the next hurdle and you do it. If you are a *complete* beginner a bit of bash scripting is a good place to start. Its not much good for writing games, but it is easiest to get started, and will almost certainly come in useful after you move onto other languages. It tends to be the glue that holds most Linux distro's together.


People are scared they will waste time learning 'the wrong thing'. I started learning BBC basic, which I haven't used in about 20 years. Every day however, I am still using loops and counters, arrays, variables, functions and parameters that I learned then.
 
People are scared they will waste time learning 'the wrong thing'. I started learning BBC basic, which I haven't used in about 20 years. Every day however, I am still using loops and counters, arrays, variables, functions and parameters that I learned then.
After taking a few C++ classes for my minor, I started using Qt, thinking it would be good for making video games. But it was a good experience, and really helped me organize my code when I moved to SDL. Plus, it would be a good library for making any necessary editors.
 
For the longest time I stressed about picking a language. And then when I finally picked one I realized how much I had to learn. I agree with everyone on the python or c/c++ starting points, every language has its drawbacks (though some are loath to admit it) but these languages are among the best places to start, especially for gaming.


We should pin a 'getting started programming' thread for people who want to dev their own games. The c/c++ forum has one, but I think there should be one for all languages and starting points in the general dev area. It is a question which is asked often, and it is hard to know were to start. I don't think that it is hard because of a lack of info, I think it is hard because of the overwhelming amount of things that are available.


It is like looking at a completely disorganized library and knowing that somewhere in all that mess there is a good starting point, but not being familiar with the library you will wonder until you feel like you have found a good starting point. If you are lucky you will find someone who knows their way around, but most likely you will end up lost.
 
Last edited by a moderator:
But honestly, Basic languages are horrible. They might be nice for some small tools but for larger projects I would never consider them.

That's your choice; I'd say you're wrong - and that would be my opinion, but I'd not just say that your choice of language is "horrible". Many of us grew up writing large projects in BASIC (on 8bit CPUs), and it's those people that SpecBAS is aimed at. If you prefer to use a modern language, then that's fine - there's plenty to choose from.


SpecBAS is designed mostly for writing 2D games, and from the feedback so far it's achieving its aim very well indeed :)


D.

Some guy wrote his operating system in Basic, at forums.osdev.org - might've been Combuster. It's turing complete, no reason why he can't (note he had to do some of it in ASM - but that's an operating system, the lowest of low level programs, besides microcode :) . You don't need to write ASM to write a usermode program. But it's good to know it, so do learn it at some point(not early).)


I can recommend C(++). It's not as hard as everyone says it is, it really really isn't!!!


Just please do it in Linux. I thought C/C++ was really hard until I moved to Linux, didn't have to use the crap Visual C++ from M$ (I don't think codeblocks was around, and as you know Windows CMD is crap, making gcc pretty unusable for me back then). Just run one of the lighter *buntus in a VM, but i'm urging you not to do your dev in Windows.


It's best to practise doing text, in _any_ language before you get into graphics. Because you'll need to know how to do more advanced stuff at some point, and you don't want to be making sure you're not just forgetting to draw something, etc. Working with text is much simpler. Learn functions, arrays, pointers, function pointers(actually no, not a good idea unless you really understand stuff), linked lists and memory allocation before you get into graphics. Not totally necessary, there are people who jumped right in, but you won't regret it.


Use SDL, no matter if you're using Python, perl, C, C++, ASM(lol, don't! Guarantees non portability with Pandora/PC), etc. You can even do SDL in Java now(but i'll recommend you _don't_ - just do C, already :p ).
 
I think C and C++ are really great languages for the Pandora, and its clear that you can do quite a lot of interesting things with both technologies. I've been really impressed lately with the GUI from FlipClock and I think this may be a really good idea of what can be done if you want to make impressive GUI's ..
 
For the longest time I stressed about picking a language. And then when I finally picked one I realized how much I had to learn. I agree with everyone on the python or c/c++ starting points, every language has its drawbacks (though some are loath to admit it) but these languages are among the best places to start, especially for gaming.


We should pin a 'getting started programming' thread for people who want to dev their own games. The c/c++ forum has one, but I think there should be one for all languages and starting points in the general dev area. It is a question which is asked often, and it is hard to know were to start. I don't think that it is hard because of a lack of info, I think it is hard because of the overwhelming amount of things that are available.


It is like looking at a completely disorganized library and knowing that somewhere in all that mess there is a good starting point, but not being familiar with the library you will wonder until you feel like you have found a good starting point. If you are lucky you will find someone who knows their way around, but most likely you will end up lost.
I started to write a guide here in an attempt to get the ball rolling, but it just fizzled. I don't know. I want to help people get started, but things never go anywhere. I guess I don't care. I have other things I can work on.
 
Last edited by a moderator:
I learned Python using Guido's tutorial (slightly scary intro page there - I suggest just jumping to the first page) a while back. It was an excellent tutorial then, and I assume it still is now. Python's an excellent language both for beginners and for everything up to enterprise systems. I've not used pygame, but I hear it's pretty good.


C++ is a fine language when you need it, but personally I'm a bit out of practice with it - been using garbage collected languages for far too long to remember to keep tidying up after myself unfortunately. C is the same, but you don't even get locally scoped variables in C IIRC.


Java's actually not too bad a language, and has some pretty decent documentation. But while you can code C++ without an integrated development environment (like Visual C++) and it's almost recommended to code Python without one, I really couldn't code Java without one. Luckily, Eclipse is free and rather good these days, but I really wouldn't try running it on a Pandora. For that reason, I'd rule Java out.


BASIC's a weird one. I've yet to find a language that makes it so easy to get up and running with graphics the way BASIC let us on 8-bit computers, but really the lack of any decent tools for dealing with anything more complicated than string concatenation drives me bonkers these days. I would try to skip it, and probably go straight for Python.


ARM assembler's actually my favourite assembler (of the few I know) and is a good introduction to the only real way to grab a computer by the balls and make it do exactly what you want. Just don't try coding a whole game in it. I wrote half of a sprite manipulation library in it once, but after filling half an pad of paper with tiny scribbles, I gave up. There's a limit to how deep I want to get if no one's paying me to do it.
 
There are TONS of other programming languages, but most are rather unsuitable. C, C++ and due to its popularity Python as well are simply best suited.


But honestly, Basic languages are horrible. They might be nice for some small tools but for larger projects I would never consider them.

Well, if you're speaking about 80's BASICs then yes, you're fully right.


If you're considering one of the latest non-MS Basics, BBC Basic, then programming does become way more structured, and could apply well (it did apply not too bad on the Acorn Archimedes, the computer without which the Pandora would never exist, asi it was the very firs ARM-powered machine...).


However, yes, there are still puzzling elements even in BBC Basic. But it remains, as far as I know, the very only language interpreter with a built-in assembler for speed-critical parts of the program...
 
C++ is a fine language when you need it, but personally I'm a bit out of practice with it - been using garbage collected languages for far too long to remember to keep tidying up after myself unfortunately. C is the same, but you don't even get locally scoped variables in C IIRC.

Well, using the "static" keyword you can have a variable whose scope is the file in which it is declared. When, further on, you declare a variable in a function, its scope is limited to the function. You can even declare a variable local to a block.


But yes, nothing in between. However, you get few syntax elements between : you cannot have local (neither nested, nor inside a block) functions in C.


BTW good algorithms practice is way more efficient programming than whatever else, I exactly mean that bad algorithms make you loose much more perf than bad memory management for example. Which tends to push towards Python as well. Plus, you may end up having to manage a few things by hands in Python (once you see you use too much memory), which makes you concentrate on the most critical elements, a very good practice IMHO.
 
Back
Top