Programming On Pandora


'Loonie' said:
'hlide' said:
oh my, you`re quite sarcastic.
No, I am not quite sarcastic, I am extremely sarcastic. I'll thank you to next time grade my snarkiness accordingly.


because you sure think c and c++ are " (low-level + high-level) / 2 == middle-level " languages ? Was that snarky enough for you ?
 
Last edited by a moderator:
Oh my, there's really some discussion on the low-levelness of C++ here...

Guys, just look at the definitions (Wikipedia might be wrong, but still):
Low-level and high-level programming language.
(If you can't click on links, just get my Greasemonkey script, which fixes all links)

By definition, anything that can be read by the CPU without modification (or only instruction-to-instruction mapping) is low-level. This includes Machine code, ASM, and other binary code formats.
C++ provides memory abstraction and natural-language elements, and thus is high-level.
There's nothing that's called "middle-level", and a language can't be more "low-level" than another. That's like saying that someone is more dead than another person, or that something is more existant. It's not something that can be measured by amount; either a laguage is low-level or it isn't.

Hope I contributed to anything here :p
 
Last edited by a moderator:
You forgot about Zombies.

They are the mid-level
smiley_ninja.gif


Im probably not the best person to comment on this but for me C/C++ is/are excellent. As low level as you want to get and as high level as you will ever need. Its very easy to write horrible code but if you comment as you go, have sensible variable names and formatting you will be able to re-read your own code and it will make sense.

Dont worry about other people. If they have to ask how it works they are idiots anyway :D
 
Last edited by a moderator:
'Unfathomable Depths' said:
You forgot about Zombies.

They are the mid-level
smiley_ninja.gif
And vampires. What about vampires?

'hlide' said:
because you sure think c and c++ are " (low-level + high-level) / 2 == middle-level " languages ? Was that snarky enough for you ?
No, that was feeble.
 
Last edited by a moderator:
'Pleng' said:
GL Basic looks interesting. Has there been any confirmation that a version for Pandora will be made available? I wouldn't like to start coding something only to find out that it can't ever make its way onto Pandy.
Last November this question was asked on the GLBasic forums,The administrator gave this answer,

Wiz _when_ you can buy it.
Pandora _if_ you can buy it.
 
Last edited by a moderator:
'Awakening' said:
'PoisonedV' said:
'Awakening' said:
'PoisonedV' said:
I like accelerated C++. I think buying a book is worth it for that
While I do like books, I can download and read web content on the Pandora and not having to carry a big book around. I also want to get started on game programming and SDL. Coding a puzzle game would be a nice way to learn C++. Money is also a short supply at the moment.

they have an ebook. i feel that while alot of the creators of the online websites certainly have the online, collaborative and indie experience, its still helpful to get something a bit more professional when you need the concepts down. the language itself isnt the hard part, but (in my opinion) the concepts are.


I took a look at the book on Amazon and in that book they write stuff like "std::cout" instead of adding "using namespace std" at the top. Seems like a lot of unnecessary work to add "std::" all the time.

i think its basically to instill good practices- or at least thats what someone on the forums told me a while ago
 
Last edited by a moderator:
'Wild_Duck' said:
'Pleng' said:
GL Basic looks interesting. Has there been any confirmation that a version for Pandora will be made available? I wouldn't like to start coding something only to find out that it can't ever make its way onto Pandy.
Last November this question was asked on the GLBasic forums,The administrator gave this answer,

Wiz _when_ you can buy it.
Pandora _if_ you can buy it.


that's my one big hope of coding for Pandora, if GLBasic doesn't make it to Pandora then I really cannot see myself learning C, so would have to start making Amiga games again and play under emulation.
 
Last edited by a moderator:
There's still a vague hope that Blitz might be persuaded to create an ARM compiler for BlitzMAX, since they already have Windows/Mac/Linux support.
 
Last edited by a moderator:
Awakening said:
I took a look at the book on Amazon and in that book they write stuff like "std::cout" instead of adding "using namespace std" at the top. Seems like a lot of unnecessary work to add "std::" all the time.
It might seem like a lot of extra work, but when you start dealing with multiple namespaces, you'll find it much better to be in this habit rather than "using namespace"
 
Last edited by a moderator:
'Samurai_Crow' said:
We're still making progress though. To save time we're using LLVM as our optimizer and code generator and will be using the same engine as sdlBasic (once we get Mattathias to accept language extensions) to save even more time.

Also, we've dropped the idea of making an sdlBasic compatible parser since it is a dynamic language like Python and would be difficult to implement properly using only LLVM.
Glad to hear progress is being made! Is there any form of ETA?

I wonder how many games with AMOS source are available, waiting to be naively compiled for the Pandora!
 
Last edited by a moderator:
'WizardStan' said:
'Awakening' said:
I took a look at the book on Amazon and in that book they write stuff like "std::cout" instead of adding "using namespace std" at the top. Seems like a lot of unnecessary work to add "std::" all the time.
It might seem like a lot of extra work, but when you start dealing with multiple namespaces, you'll find it much better to be in this habit rather than "using namespace"
Ah, but I'm such a lazy coder... In the best of days I do comment my code quite well :blink:
 
Last edited by a moderator:
'WizardStan' said:
'Awakening' said:
I took a look at the book on Amazon and in that book they write stuff like "std::cout" instead of adding "using namespace std" at the top. Seems like a lot of unnecessary work to add "std::" all the time.
It might seem like a lot of extra work, but when you start dealing with multiple namespaces, you'll find it much better to be in this habit rather than "using namespace"

Pretty much. It's always preferable to do this instead of dumping the entire namespace into the global namespace.
 
Last edited by a moderator:
'yaKC' said:
'Wild_Duck' said:
'Pleng' said:
GL Basic looks interesting. Has there been any confirmation that a version for Pandora will be made available? I wouldn't like to start coding something only to find out that it can't ever make its way onto Pandy.
Last November this question was asked on the GLBasic forums,The administrator gave this answer,

Wiz _when_ you can buy it.
Pandora _if_ you can buy it.


that's my one big hope of coding for Pandora, if GLBasic doesn't make it to Pandora then I really cannot see myself learning C, so would have to start making Amiga games again and play under emulation.

C isn't hard! if you already code in any other language, you can get into C coding in a matter of a couple of days, and then you are good to go and make your games :)
 
Last edited by a moderator:
'Pleng' said:
Glad to hear progress is being made! Is there any form of ETA?

I wonder how many games with AMOS source are available, waiting to be naively compiled for the Pandora!
As with all quality Amiga developments the ETA is "When It's Done"™. :D

There aren't many Amos source codes available. That's the sad part of it. :(
 
Last edited by a moderator:
C isn`t hard, no, it`s rather like using Glaswegian english to write code with when you where brought up in Oxford, that`s the problem (sorry...no car analogy :p ) , I CAN code in C, I just prefer not to, TBH I actually got on MUCH better coding in machine code/assembler on the ZX81,Spectrum and C64, but PC`s have weird memory habits and other odditys, plus I should think writing a 3D game in asm would most likely take years and make your head explode or something :)
 
Last edited by a moderator:
'dflemstr' said:
Anyways, I would stay away from scripting languages. Not because I have anything against scripting languages for prototyping or anything like that, but for these 3 reasons:

1. They aren't scalable. If you start some huge project and late realize that your language "is too slow", you have to learn a new one from the ground up or do some serious optimization.
this is expecially not true with python, since you can later substitute C modules for performance critical python ones

'dflemstr' said:
3. They don't have a basic syntax. To manipulate lists, for example, in python, the team did not introduce a new library for that purpose but instead extended the syntax. So, to do some things in scripting languages, you have to get used to new syntax all of a sudden, instead of just learning a new library.
this doesn't really makes sense: lists are part of the basic features of python, so it is natural that there is a specific syntax to manipulate them, and it's also quite an intuitive one.

with your reasoning one could say that C doesn't have a basic syntax, since you don't have a new library to manipulate pointers, but they extended the syntax (and surely not in a way that is intuitive).
 
Last edited by a moderator:
Well, to be honest python does get more keywords added than the average language. A good example is the "with"-statement (http://www.python.org/dev/peps/pep-0343/). However I still think pythons syntax is very powerful, and all the keyword additions have been carefully thought out.

Actually, you see the same trend in C++0x, where they're adding lambda functions, initializer lists, unicode string literals and many other features by extending the syntax.
 
Last edited by a moderator:
valhalla said:
this is expecially not true with python, since you can later substitute C modules for performance critical python ones


Compare that to compiled languages, where EVERYTHING you do gets accelerated. And having C modules in Python-code makes it unportable (which is why I prefer JVM-based languages, as they are kinda-portable and still compiled).
But I never said that everything about python was bad, I just mentioned some general problems with scripting languages in general.

valhalla said:
this doesn't really makes sense: lists are part of the basic features of python, so it is natural that there is a specific syntax to manipulate them, and it's also quite an intuitive one.

with your reasoning one could say that C doesn't have a basic syntax, since you don't have a new library to manipulate pointers, but they extended the syntax (and surely not in a way that is intuitive).


Why does a language have to have alot of syntax around something just because it's part of the core? (And I don't say that C is well-structured when it comes to syntax; I don't particularily like the language at all)

Well, ok, this is maybe only my preference, but I like it if a language's core is as small as possible and handles as little as possible. This is why I really like the Scala language (I've metioned it a few times before; it has become my prime example of how a language should be built up), because it only has a few concepts that it builds on, and does so in an uniform way: The Object, Inheritance, the Function, and pattern matching (almost everything else is expressed in libraries).
Every object can inherit from every other, every function is an object and every object is a function... (Yes, you can inherit from functions)

Compare that to Python, where there are lists and maps and hybrids between them, such as slices, etc, that everything builds on. Many of these types are atomic in Python (even if they can be split up, they can still only be handled as an unit, you can't implement your own fully working List class, which makes the core have to handle the List implementation etc).
Then we can cover syntax uniformness. What is the []-Operator? When does it apply to what, and what does it do? What is the value of what it contains (for example "2:3")? Can you make your own classes with this operator?
And method signatures, and static typing... I won't even go there.

And Python is still good compared to other scripting languages. For example, in vb script:
CODE
for i as integer = 0 to 5
end for

What is the value of "0 to 5"? What is the result of the operation "i as integer"? What is the "end"-syntax element? A function? It just doesn't make any sense.

Oh well, enough ranting on this subject; I might introduce my opinions in another thread instead of this one ;)


EDIT: Example on a scalable language with very basic syntax (Scala):
(Warning: very deep programming language analyzation ahead :p )
CODE
object MyApp {
def main(args: Array[String]) = args.foreach(println)
}

"object MyApp" defines a new singleton object. The "object" keyword is a keyword here because of performance; it could be a scala function aswell if we really wanted it to (that takes an "identifier" and a "List of statements" as its paramters)
"{ ... }" is a paramter list of statements for the object keyword. They contain the object definition.
"def main" declares a new method/function. "def" could also be a scala function if we really wanted it to, but we don't.
"(args: Array[String])" is of type "single-element paramter list". The "def"-keyword awaits an identifier and one or more parameter lists as its arguments. Here, this paramter list contains one element of type "array of strings" with the identifier "args".
"= args.foreach(println)" assigns a list of statements to the method. This list of statements is only one element and therefore doesn't need the "{}". The Array class has a method with the name "foreach" that takes "a function accepting one [String] argument that returns Unit" (String is ttype-paramterized in this case) as its argument and applies every member of the array on that function (Unit is similar to "void"). "println" is a method accepting one string parameter and returning Unit, a member of the "scala.Predef" singleton object. IT prints its parameter to the standard output stream.

This I call a well-structured language :D
 
Last edited by a moderator:
@dflemstr: So you like to keep your languages simple. I can respect that. Most of the features you mentioned are more like macros for often used stuff. They just make the code easier to read, and separate common patterns from the program specific functionality. It's easier to see how a program works, when control structures and generic data structure initializations look different from function calls.

Yes, python and many languages like it have more complex syntaxes than some more traditional languages. However they often also are a lot clearer, easier to read and more powerful.
 
Last edited by a moderator:
Back
Top