Skip to main content
Welcome guest. | Register | Login | Post

what language?

18 replies [Last post]
Offline
Joined: 2005-12-20

Hey,

I want to start to program, but I don't know what language to pick. It has to be powerful, easy to use and be able to make 2d games, any sugestions?

Not BASIC tho please.

a thing's picture
Offline
Joined: 2005-12-20

I know Frozen Bubble was written in Perl with SDL bindings.

tbuitenh's picture
Offline
Joined: 2005-12-21

How about python with pygame?
http://www.pygame.org

libervisco's picture
Offline
Joined: 2006-05-04

I'm definitely not a programmer, but I was trying to learn some python and I think that could be the best bet for you to start with. It is well supported and as mentioned, you have pygame for games. Smiling

Good luck!

supermike's picture
Offline
Joined: 2006-02-17
"libervisco" wrote:

I'm definitely not a programmer, but I was trying to learn some python and I think that could be the best bet for you to start with. It is well supported and as mentioned, you have pygame for games. Smiling

I agree. If you want to do client GUIs on Linux, the thing that seems to have the most momentum right now is Python and PyGTK. If Pygame is another avenue that can jump start you, then so be it. What I do is build my initial GUI in Glade2 and save it as an XML file. Then, I use Python and PyGTK to load that GUI. The way I learned how to do this was to install RH9 and look at how they did more than half of their control panels. Havoc Pennington, the developer name behind most of this, an employee at Red Hat, implemented his stuff that way. His code was a big help to me. However, it was a bit tough at first and I had to try some tutorials on the web. In the end, I wrote a common Python shell script that I reuse now, over and over, to load my Glade2 XML GUI through PyGTK.

Unfortunately RealBasic or Java is the only other low-end, comprehensive option without going the C or C++ route. And if you use Java, that's probably got some heavy install requirements -- not everyone has Java pre-installed. I avoid Java when I can because I think it's slow and some weird-a** code. (Python, unfortunately, is also weird-a** code, but not nearly as weird as Java.)

My preferred language? PHP. However, the phpGTK project is note quite there yet for what you're looking for.

Offline
Joined: 2005-12-20

OK, So, python, PHP and perl seem to do what I want then Smiling

Thanks

Whistler's picture
Offline
Joined: 2006-01-03

I still recommend C or C++ if you want to make some "real" programs. They are actually not very hard if you try to learn Smiling actually C is my second language after Apple II BASIC Smiling

dylunio's picture
Offline
Joined: 2005-12-20
I'll say python since it has

I'll say python since it has things like PyGTK etc.
It also helps you gain a good programming style since it's made to be read clearly - if you don't indent your scripts properly they will not run.
It seems easier than Perl which is very powerful, but not as easy to read/understand by our brains, does this realy make sense:

#!/usr/bin/perl
@lines = `perldoc -u -f atan2`;
foreach (@lines) {
  s/\wc([^>]+)>/\U$1/g;
  print;
}

dylunio

tbuitenh's picture
Offline
Joined: 2005-12-21

Showing a regular expression and then saying perl is hard to understand is not fair. It's the regular expression that is hard to understand. You can do regular expressions in python too.

Still, I would agree python is much easier to learn than perl is, unless you're already fluent in c, awk and sed...

dylunio's picture
Offline
Joined: 2005-12-20
"tbuitenh" wrote:

Showing a regular expression and then saying perl is hard to understand is not fair.

Maybe it wasn't the best example, I was trying to show the style it's written more than what the content was.

Offline
Joined: 2005-12-20

Okey dokey, I think i have whittled it down to python now, probably perl second Smiling

Thanks everyone Smiling

a thing's picture
Offline
Joined: 2005-12-20
"dylunio" wrote:

It also helps you gain a good programming style since it's made to be read clearly - if you don't indent your scripts properly they will not run.

That's why I don't like Python. It forces its way on you. A interperter/compiler should be neutral in the same way the cables that make the Internet should be.

tbuitenh's picture
Offline
Joined: 2005-12-21

Ah, but languages that don't force indentation force you to use { and } and often even the pointless ; .

Indentation for blocks and newlines as line separators all the way! Why complain about having to do something any sane programmer does anyway? Show me someone who doesn't indent, and I'll show you someone who can't read his own code.

If you don't want a language that forces it way on you, learn FORTH. In FORTH you can redefine 1 to mean 2. That's freedom! It does force it's RPN sillyness on you though...

Back to the point, python doesn't force anything on you, it only prevents annoying errors caused by missing {s, }s and ;s.

</flame>

supermike's picture
Offline
Joined: 2006-02-17
"tbuitenh" wrote:

Ah, but languages that don't force indentation force you to use { and } and often even the pointless ; . Indentation for blocks and newlines as line separators all the way!

I'm with you. I wish a fork of Python didn't care if you indented and used some other convenient way to handle this. I also wish a PHP fork could drop the semicolon and use the newline, and that I could use "." instead of the strange "->". It would be great if a community made the forks just 1 day to 1 week late on each update to Python or PHP, using the original source. And then it would be even cooler if they made CVS, apt, RPM, DEB, and tar.gz files out of it so that it could easily be installed on all platforms. They could call it Fython and FHP or something silly like that. (However, the complaint I hear about this conversation is that people would have incompatible code. Therefore, Fython and FHP would have to support regular Python and PHP code if it detected it also.)

I do like the { and } however. It's better than having to type FUNCTION / END FUNCTION all the time like you do in Visual Basic.

Some people have switched to Ruby, and there's this new Ruby on Rails, but I don't know if I'm too excited about it yet.

Offline
Joined: 2005-12-20

I have decided what language I am going to learn, and it is none of the ones listed above strangely, well, is. BASH Smiling

Sounds good, from what I have heard, and I can use it for scripting to make little apps and fixes, then more on to more stuff, it seems I can help with sourcemage, so I thought it would be a silly oppurtunity to pass on Sticking out tongue

dylunio's picture
Offline
Joined: 2005-12-20

BASh is a neat little scripting language, the early (and current working) versions of force-get are written in it.

dylunio

Offline
Joined: 2005-12-20

Yeah, it is the same way with Sourcemage's package management

a thing's picture
Offline
Joined: 2005-12-20

A shell isn't appropriate for a game.

libervisco's picture
Offline
Joined: 2006-05-04
"a thing" wrote:

A shell isn't appropriate for a game.

Yeah, except maybe for some nice text-based adventures or something simple like that.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.