Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

variable

macrumors newbie
Original poster
Dec 14, 2006
10
0
So the guys at a company called Ansca just release a pre-beta of a product called Corona which uses Lua to let you write iPhone apps. Its free in pre-beta and is super easy to use. Lots of documentation and code samples. for instance:

local text = display.newText("foo!", 0,0) --displays text "foo" at 0,0 on screen
text:setTextColor(255,255,255,255) --R,G,B,A

or

local rect = display.newRect( 0, 0, 100, 100) --creates a rectangle at 0,0 with size of 100x100
rect:setFillColor(255,0,0,255) -- makes it red

Doesn't get much easier than that!

Check it out: http://www.anscamobile.com

There's a link on that site to the dev site which is where you get the SDK from.
 

variable

macrumors newbie
Original poster
Dec 14, 2006
10
0
Sorry, but that doesn't really look any easier than Objective-C to me.

Ok, maybe just the text was a bad example, but take for example a fade out:

local text = display.newText("foo!", 0,0) --displays text "foo" at 0,0 on screen
text:setTextColor(255,255,255,255) --R,G,B,A
transition.to(text,{alpha=0, time=1000}) --fades out said text over 1000ms (1second)

Check out the sample code on the web site, it'll give you a good idea of why this is so powerful.
 

MadGoat

macrumors 65816
Jul 30, 2007
1,178
128
Canada
So basically we'll being seeing a bunch of crap apps all running on the same engine?

There will be so many limits to what LUA can do, that you'll never see anything really breath taking come out of it.

Stop being lazy, learn to code
 

deannnnn

macrumors 68020
Jun 4, 2007
2,090
625
New York City & South Florida
So basically we'll being seeing a bunch of crap apps all running on the same engine?

There will be so many limits to what LUA can do, that you'll never see anything really breath taking come out of it.

Stop being lazy, learn to code

Yikes.
Some people want to make apps as a hobby and don't have time to learn to code. It's not like learning how to ride a bike... It's like learning French.
 

MadGoat

macrumors 65816
Jul 30, 2007
1,178
128
Canada
Yikes.
Some people want to make apps as a hobby and don't have time to learn to code. It's not like learning how to ride a bike... It's like learning French.

More like driving a car without learning the basics... it's a disaster. You have to take the time and learn how to do it right.

See unfortunately that's the problem with the app store, they let every tom, dick and harry post their junk for 99 cents and with something like corona, you're going to see even more crap flow into the app store.

The app store needs to be fixed so that people who "code" as a hobby for a learning experience can have their own app store(give it a cutsie name like the app corner), where the farting apps and the likes can reside.

If you don't want to learn the code, you shouldn't participate. If you want to write script that an interpreter will then write the code for you, then you should in no way be allowed in the app store... Bah I'm ranting far too much on this subject.

Lazy coders get on my nerves.
 

ericvmazzone

macrumors regular
Dec 9, 2008
208
0
Kalamazoo, MI
Yikes.
Some people want to make apps as a hobby and don't have time to learn to code. It's not like learning how to ride a bike... It's like learning French.

No, it's not like learning a non english language, computer coding is based on english. I learned German in 9 months of 8 hour days 5 days a week and can speak it fluently. I learned Objective C in the same amount of time, on my free time, aka an hour or so a day just playing around. If it's a hobby for someone but they don't want to learn the language, they need to find a different hobby. These kits will cause problems in the long run.

Again back to the French analogy. Where I studied German, they teach French in 6 months. But using these kits is the equivalent of going to Paris and expecting to have a conversation using an English to French phrase book. Not going to be effective.
 

MadGoat

macrumors 65816
Jul 30, 2007
1,178
128
Canada
No, it's not like learning a non english language, computer coding is based on english. I learned German in 9 months of 8 hour days 5 days a week and can speak it fluently. I learned Objective C in the same amount of time, on my free time, aka an hour or so a day just playing around. If it's a hobby for someone but they don't want to learn the language, they need to find a different hobby. These kits will cause problems in the long run.

Again back to the French analogy. Where I studied German, they teach French in 6 months. But using these kits is the equivalent of going to Paris and expecting to have a conversation using an English to French phrase book. Not going to be effective.

Wow learning german in 9 months as a full time job, wow, that's tough. I wish I could speak it.

I like your English to French phrase book comparison. I think you hit it right on the head. Sure you can go to Paris and use the book, but you will totally massacre the language and usually it will not get you the results you seek. So if you want to keep a conversation going, you're going to have to class, spend time learning the language and practice a hell of a lot.
 

coolwater

macrumors 6502a
Jun 8, 2009
722
1
What's the best way to learn Objective-C from scratch--no programming background at all--to write a very professional, smooth, and beautiful looking app?

Is Objective-C easier than C? C++? (I don't know what I'm talking about. :p)
 

dccorona

macrumors 68020
Jun 12, 2008
2,033
1
What's the best way to learn Objective-C from scratch--no programming background at all--to write a very professional, smooth, and beautiful looking app?

Is Objective-C easier than C? C++? (I don't know what I'm talking about. :p)

i believe its a tad easier, but not much
making a beautiful looking app isnt just code, but interface design...keep that in mind

but a good place to start is a book on objective c
not an iPhone specific one, as all these assume a basic knowledge of C

then, check this site out
http://www.stanford.edu/class/cs193p/cgi-bin/index.php
to learn iPhone specifics
 

hefeglass

macrumors 6502a
Apr 21, 2009
760
423
the appstore is already chock full of shoddy apps...this will only make it easier for people to make them.

hopefully apple will soon organize the app store to differentiate between the higher quality apps from bigger/more well known developers and the cheaper apps from hobbyists and fartmakers..
 

FunkyTang

macrumors 65816
Sep 16, 2008
1,021
812
What does the code look like for a sixteen button fart app with an AdMob frame? That's where the real money is...
 

jpyc7

macrumors 6502
Mar 8, 2009
276
0
Denver, CO
I'd like to see a cross-platform SDK, so that you can write an app for Android, WebOS, iPhone OS, and Windows Mobile. According to their website, they aren't doing that.
 

variable

macrumors newbie
Original poster
Dec 14, 2006
10
0
I don't really see why learning Objective-C has to be a starting point, or rather what defines it as learning the basics. Its like telling a non-english speaking person that they have to learn German before they can learn English so they'll understand the roots.

Objective-C is a pain in butt to learn as a starting point. Doing the hardest thing first is a good way to deter people from doing it in the first place. You don't go to the gymn and start with the heaviest weights. But don't let that statement undervalue Lua as a language. Keep in mind too that Corona is in Pre-Beta and a lot of functionality is still on its way.

Don't knock it before you try it.
 

Moles

macrumors newbie
Jul 9, 2009
20
0
Olathe
Learn to code first, then learn a language

Best way to learn a language is read a book. Best way to learn to actually write software is not via a language book, its through software engineering books (not language specific) and through experience. I taught myself VB and pascal in grade school/high school by a language book. I learned how to code correctly in college and on the job via software engineering classes and experiences. Developing software isn't just writing code. Syntax is a very small part of writing effective code. Data structures, storage and allocations, abstraction of classes, UI design are so much more important than just syntax.


i believe its a tad easier, but not much
making a beautiful looking app isnt just code, but interface design...keep that in mind

but a good place to start is a book on objective c
not an iPhone specific one, as all these assume a basic knowledge of C

then, check this site out
http://www.stanford.edu/class/cs193p/cgi-bin/index.php
to learn iPhone specifics
 

Jeremy1026

macrumors 68020
Nov 3, 2007
2,215
1,029
I don't really see why learning Objective-C has to be a starting point, or rather what defines it as learning the basics. Its like telling a non-english speaking person that they have to learn German before they can learn English so they'll understand the roots.

Not at all. Learning Objective-C is the starting point and the end point. That is what iPhone apps are written in. Your analogy makes no sense in this situation. For it to be viable, you'd have to start on C then move to Objective-C.

Objective-C is a pain in butt to learn as a starting point. Doing the hardest thing first is a good way to deter people from doing it in the first place. You don't go to the gymn and start with the heaviest weights. But don't let that statement undervalue Lua as a language. Keep in mind too that Corona is in Pre-Beta and a lot of functionality is still on its way.

Don't knock it before you try it.

Then learn a lesser language on a different platform. Write some simple applications for your computer to learn how to program, then move to Objective-C for the iPhone.
 

variable

macrumors newbie
Original poster
Dec 14, 2006
10
0
Not at all. Learning Objective-C is the starting point and the end point. That is what iPhone apps are written in. Your analogy makes no sense in this situation. For it to be viable, you'd have to start on C then move to Objective-C.

Then learn a lesser language on a different platform. Write some simple applications for your computer to learn how to program, then move to Objective-C for the iPhone.

To the most part I agree with you, my analogy was really meant for madgoat who seems to think that corona/lua is an inferior and useless language. If I was going to learn how to 'program' in general, I would probably start with C and branch out from there, but if my objective was to write iphone apps, then this is a great way to go. True, iphone apps were up till now written in objective-c, but now you don't need to know it. I suspect this is an argument with no real winner, more just opinions, so I think harping on it isn't going to get anywhere especially helpful.

Someone mentioned earlier that this will allow more crap applications to make it to the app store... maybe, but apple still has to approve everything. Just because more crap gets created, doesn't mean it'll get approved. Exceptional C programmers can produce crap too.
 

variable

macrumors newbie
Original poster
Dec 14, 2006
10
0
Just to let you know, they now have device builds working from within the simulator and a likely pricing guide in the forums.
 

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
Ok, maybe just the text was a bad example, but take for example a fade out:

local text = display.newText("foo!", 0,0) --displays text "foo" at 0,0 on screen
text:setTextColor(255,255,255,255) --R,G,B,A
transition.to(text,{alpha=0, time=1000}) --fades out said text over 1000ms (1second)

Check out the sample code on the web site, it'll give you a good idea of why this is so powerful.

humm...

Code:
- (void)whateverFade:(UIView *)theView
	{
	[UIView beginAnimations:@"whateverFade" context:NULL];
	[UIView setAnimationDuration:kDuration];
	[theView setAlpha:0.0];
	[UIView commitAnimations];
	}

is this new program/language object oriented? procedural scripts can get pretty heavy.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.