ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i'm generally a newbie to programming; my whole experience is turbo pascal and javascript some time ago.
i'd like to start writing programs for linux and i want to learn a new language, only i don't know which one.
i need it to be able to do two things:
1. handling keyboard interruptions;
2. relatively easy creating graphical applications.
Java . Very portable, easier then C/C++ and has an inbuilt graphical interface, very well documented and supported by Sun Microsystems. Found in everything too, in Web-browsers with the form of applets to Nokia cell phones games. Very easy to handle keyboard and mouse inputs, which makes it suitable for games as well (not joypad inputs, at least not with Java 1.4.x).
I'm reading a book now called Developing games with Java and it rocks (not for the beginner though).
On the top of it, you have plenty of Books, Tutorials and IDE's freely available on the net and support of big ones as IBM and Sun.
That's of course, just my opinion. Still, every Linux hacker should know some scripting language as perl or python too
oh dear. i'd crossed out java on the list 'cause i was pretty sure it's much too difficult.
i've just realised i made a mistake in the post. i should've written "intercepting", not "handling" keyboard interruptions.
i need a program to change "/a" to "a with a little stroke over it" and the like in openoffice.
i understand java can do it?
I'm not quite sure what intercepting means in this case.. sorry for my ignorance :\. I'd give Java a go if I was you. Read this tutorial and see how it feels actually:
see how both the "Hello World Application" and the "Hello World Applet" feels like. If you think it's way difficult, python is nice. I've just did a spaceship game with Python and Pygame, it's clearly much easier then Java and very powerful too.
I'm just interested in one thing when it comes down to Programming: Games. It's difficult for me to decide which language is "cooler" to program games with . I'm not sure what you would like to develop though . If it's just for learning purposes, then any language will do. Now, if you have an application/game in mind, then you've to think carefully. If you need speed, you certainly won't find it with Java... for example...
the screenshot looks very nice is it ready for download yet, i mean the game?
yes, i know speed is not what java's designed for...
there's just one app that i currently have in mind.
i'm studying linguistics and i need loads of very strange signs very often. let's take the german "o umlat" (with two dots over it) for an easy example. that sort of stuff, just much more complicated and much more often, and certainly not limited to just one language or just one font.
so, i need an app which would sit down there in the memory, a daemon, i think it's called, and would read all the keys i press on the keyboard and once it would spot a combination of say, ":"+"o", it'd automatically change it to "o umlaut".
is it doable with java? with python? c/c++?
":"+"o" means colon-o without a space, but it got changed to an emoticon
Hey mate thanks . Well, the game needs to have the code a little cleaner before I put it to download. Although, I enjoyed a lot programming with Pygame (in fact, it's the first time I understood what I was doing, thanks for python being so clear), a lot of peoples have been facing a lot of dependencies issues to get it to run in Windows.
I've tried to build an exe with py2exe, but did not work. Asked a few peoples on IRC, still no go. That's why I'm dumping pygame for my future projects and going java, since I need network support for online gaming and not speed.
That game in pygame I'm doing is called The Final Frontier and it's a heavily modified version of a tutorial from Linux journal. I might release it soon, but again, I'm not going to code with pygame for a while. I'm trying to focus on Java for the moment .
I understand now what you mean about the keys. I never did it myself, but I know Java handles keyboard inputs in 3 different ways:
- keyPressed()
- keyReleased()
- keyTyped()
I think if you make a function for keyTyped, you could create combos, as emacs does. Still, keyTyped is pretty much useless for games so I won't be able to help you out much...
This is just a guess, as I've no experienced with the keyTyped() event, but I think it's pretty much what you are looking for
Originally posted by caminoix i'm generally a newbie to programming; my whole experience is turbo pascal and javascript some time ago.
i'd like to start writing programs for linux and i want to learn a new language, only i don't know which one.
Since you already know Turbo Pascal, why don't you try FreePascal + Lazarus???
Lazarus is a very powerful Delphi-like RAD environment. Using FreePascal and Lazarus you can build multiplatform programs and compile for Linux, Windows and MacOS.
That's the one. Awesome book. If you go to the author's homepage, you can test a game that we(by we, I mean, the readers, ghehe) are slowing developing along the book, besides all the source included within the book:
Nope, only fullscreen games with Java Standard Edition. Not even Applets or Windowed games are covered here. For cell-phones, take a look into Micro Java Development, by David Fox. I haven't read it myself, but the author of Developing games with Java recommended him and by the quality of his book, I think he knows what he is saying ^_^
Either way, you will love that book. I have only known Java and games for applets, but creating stuff in Fullscreen and getting reasonable speeds really changed my thoughts about Java...
thanks for help, guys
as a matter of fact, since almost everyone was saying "take java" or "take c" or "take python" or "take c++", i got to the conclusion that it doesn't really matter what i begin with, and whatever i pick, there will always be those hip-hip-hurraying and those turning their noses up.
i eliminated c as a no-point-doing-that-if-i-can-get-to-c++; i eliminated java as too slow (?); i eliminated python as perhaps not getting low enough. i was left with c++ and that's what i've started doing yesterday and it looks pretty ok so far. we'll see. i guess once i'm done with a little more than just the basics, i'll take a look at python. i don't want to learn two languages at once 'cause i'm sure i'd mix them both up completely.
Actually, you've taken a good decision ^_^. The concept of programming is always the same, regardless the language. A variable is a variable, a function is a function and it will be used in the very same way in any language.
What you've to consider when deploying an application is: Type of application, time to develop, audience and speed, among other factors. Java is much faster then you think if used effectively and if necessary, java code can be compiled into binaries instead of byte code and python is very powerful and no near as high as you believe either... even pointers can be used with Python. But it's better to let you find those things by your own =)
Good luck with programming. Check LinuxQuestions reviews for some tips about books, you will need plenty of them ^_^
Last edited by Mega Man X; 06-27-2005 at 01:54 PM.
perhaps you're the most right: it looks like all these languages are in fact pretty much the same and i think i guess it doesn't really matter which one i begin with. what counts is that i actually began
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.