Page 1 of 1

I need a new language

Posted: 2009.02.02 (09:22)
by //Zander
I am currently using Macs, so I want to learn a new, free, powerful, and hopefully crossplatform language.
I am sick of this flash bullcrap. I just started getting good at AS2 and AS3 came out, the sintax was screwed to high heaven, I would have had to learn it all over again...
any suggestions?

Re: I need a new language

Posted: 2009.02.02 (10:07)
by scythe
Lua or Python. PyGame is a great quick-and-dirty game development framework, as I recall, and Lua was used for World of Warcraft and even Crysis.

Re: I need a new language

Posted: 2009.02.02 (10:12)
by LittleViking
I think Python is all the rage these days. It's a very quick language to write in. Any time I need a little automated task done - parsing XML, scraping a web page for data, running some calculations, whatever it be - I can open up Python, write ten lines of code and be done. If you want more, Python has a boatload of built-in and third-party packages to look at. Tkinter and wxPython for writing GUI applications, Django or others for websites, Twisted for various network protocols (IRC, AIM, HTTP, many more), pySerial to interface with peripherals, just to name a very few.

Ruby has a similar syntax to Python and has the popular Ruby on Rails framework for web apps. I haven't used Ruby much, so I don't know what other pros and cons it has.

As far as web goes, though, I find PHP easier to pick up for that. If you have any interest in web work, PHP/CSS/(X)HTML/MySQL is the combo I'd recommend. I actually taught myself PHP as I was making the Real N comic page, and in a matter of hours, I went from zero experience to having a fully functional webpage. So it's easy to learn and quick to debug.

Or you could learn Actionscript 3. If you're looking forward to a web design career, Actionscript is only getting more popular as time goes on. Clients love Flash.

Edit: I'm looking at a bit of Lua code. It has the bizarre but pretty cool feature of allowing arrays to double as objects when they're prepared right.

Re: I need a new language

Posted: 2009.02.02 (10:21)
by //Zander
Nah, I want to make some gutsy programs.
like I want to remake N-artismic, but in something better than flash.
I have a book on python/pygame. just I have had tons of problems getting it to run on my computer. I think lua would be kinda cool. they use that in garry's mod for hl2 but I've never used gmod, so dont ask me about it. I'll have a look at them both.

EDIT in flash all arrays were objects... was lua made to run on mac, or just ported?

Re: I need a new language

Posted: 2009.02.02 (10:42)
by LittleViking
Sounds like Flash and Lua are reversed then. In Actionscript, I think everything was an object, so arrays were naturally objects. In Lua, _nothing_ is an object. You make an "object" by making an array and setting its values to the values and methods an object would have.

Also, every language mentioned here is multi-platform by nature. In most cases, they were written in C and had native versions compiled on each OS. So they'll all run just as well on Mac, PC or Linux. (I've even run into a few Python packages that will run on Linux/OSX but not Windows.)

Re: I need a new language

Posted: 2009.02.02 (19:30)
by Exüberance
Edit: I'm looking at a bit of Lua code. It has the bizarre but pretty cool feature of allowing arrays to double as objects when they're prepared right.
So does Actionscript 2. You can use non-numerical indexes and access them the same way you do objects (using either obj["x"] or obj.x). Being able to use the ["<variable name>"] is nice for objects since you can create and acess variables with dynamically-created names. It's not something you'd use all the time, but at times can be very usefull. They also both behave the same way in terms of memory pointers. But I belive most array functions stop working when you use non-numeric indexes, and I would assume that changes the memory model to an object, but allows you to pretend it's still an array.

EDIT: oh, I missed your previous post by a few mins. Nevermind thenl

Also, I've messed around with some LUA while modding WoW addons. It has some strange syntax stuff (like using % before parents or #s in strings (why?), but using / before another / in strings. Not sure what that's about.) Of course, I only know what I've picked up from other people's code while modding it; I haven't made anything myself from scratch in LUA, so I don't know much about it. It seems like a pretty powerfull language though.

Re: I need a new language

Posted: 2009.02.02 (22:49)
by t̷s͢uk̕a͡t͜ư
I'll give an emphatic second to LV's suggestion of Python. If it doesn't work on your system, it's worth finding out why and fixing it because Python is worth far more than that inconvenience.

Re: I need a new language

Posted: 2009.02.02 (23:04)
by scythe
//Zander wrote:Nah, I want to make some gutsy programs.
like I want to remake N-artismic, but in something better than flash.
I have a book on python/pygame. just I have had tons of problems getting it to run on my computer. I think lua would be kinda cool. they use that in garry's mod for hl2 but I've never used gmod, so dont ask me about it. I'll have a look at them both.

EDIT in flash all arrays were objects... was lua made to run on mac, or just ported?
Lua is more of a functional programming language (think Lisp). I'm betting ActionScript is more object-oriented, like Smalltalk.
However, you have a book on Python, and you're not currently working at Blizzard, so I'm thirding the Tsukatu/LV python recommendation. It's an awesome language.

Edit: Oh, also, not Ruby, and especially not Ruby on Rails.

Re: I need a new language

Posted: 2009.02.03 (08:55)
by mattk210
I started python recently and I can also strongly recommend it for easy and logical programming. It almost feels like cheating not having to type variables (although I imagine there's a speed cost)

However I think flash and AS3 is second to none for ease of graphics programming. The new AS3 syntax is mostly stricter AS2 with a few more intuitive features, I really think it's much better. I don't know what is N-artismic but it sounds graphical. Also flash has the advantage of being well supported online, which is much more convenient than downloading a program.

The big stuff like C in my experience should only be touched if you need to squeeze high levels of optimization for some CPU intensive calculations -- it can be time-consuming to program in.

Re: I need a new language

Posted: 2009.02.03 (22:19)
by Exüberance
Does Python have it's own garbage collection or do you handle memory manually as you would in C?

Re: I need a new language

Posted: 2009.02.03 (23:57)
by LittleViking
Exüberance wrote:Does Python have it's own garbage collection or do you handle memory manually as you would in C?
Python does its own garbage collecting, you don't have to deal with it manually.

Re: I need a new language

Posted: 2009.02.04 (08:54)
by t̷s͢uk̕a͡t͜ư
Exüberance wrote:Does Python have it's own garbage collection or do you handle memory manually as you would in C?
Python will wipe your ass for you, and pick up your kids from school.