Try Lua

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Try Lua

Bertrand Mansion
I am working on an interactive demo of Lua based on what was done for
Ruby here: http://tryruby.hobix.com/

I still have to write a little step-by-step "tutorial" that
demonstrates what Lua is good at and introduces the Lua syntax. Do you
have any links to an existing short tutorial and/or ideas about  cool
one-liners in Lua ?

Thanks,
--
Bertrand Mansion
Mamasam
Reply | Threaded
Open this post in threaded view
|

Re: Try Lua

David Welch-3
Bertrand Mansion wrote:

> I am working on an interactive demo of Lua based on what was done for
> Ruby here: http://tryruby.hobix.com/
>
> I still have to write a little step-by-step "tutorial" that
> demonstrates what Lua is good at and introduces the Lua syntax. Do you
> have any links to an existing short tutorial and/or ideas about  cool
> one-liners in Lua ?
>
> Thanks,
>  
I've just had a quick run through the Ruby one but got stuck
when I typed in the wrong thing and it moved to the next step.
Can you make the Back browser button move to the previous step?
Reply | Threaded
Open this post in threaded view
|

Re: Try Lua

Bertrand Mansion
On Mon, Apr 6, 2009 at 11:33 AM, David <[hidden email]> wrote:

> Bertrand Mansion wrote:
>>
>> I am working on an interactive demo of Lua based on what was done for
>> Ruby here: http://tryruby.hobix.com/
>>
>> I still have to write a little step-by-step "tutorial" that
>> demonstrates what Lua is good at and introduces the Lua syntax. Do you
>> have any links to an existing short tutorial and/or ideas about  cool
>> one-liners in Lua ?
>>
>> Thanks,
>>
>
> I've just had a quick run through the Ruby one but got stuck
> when I typed in the wrong thing and it moved to the next step.

It uses a regular expression against the result you get from Ruby, so
maybe the regular expression was too loose, that's why you were taken
to the next step.

> Can you make the Back browser button move to the previous step?

This is a good idea. It has incidence on the way user sessions are
managed, I wil see if I can do that.

--
Bertrand Mansion
Mamasam
Reply | Threaded
Open this post in threaded view
|

Re: Try Lua

Philippe Lhoste
In reply to this post by Bertrand Mansion
On 05/04/2009 19:06, Bertrand Mansion wrote:
> I am working on an interactive demo of Lua based on what was done for
> Ruby here: http://tryruby.hobix.com/
>
> I still have to write a little step-by-step "tutorial" that
> demonstrates what Lua is good at and introduces the Lua syntax. Do you
> have any links to an existing short tutorial and/or ideas about  cool
> one-liners in Lua ?

I haven't looked at the site (no interest for Ruby, I must confess), but your description
reminds me of a site I just discovered yesterday: JavaBat <http://www.javabat.com/>

It asks to solve some simple problems (sometime too simple, I solved some "recursive"
puzzles with a simple String.replace()...) with a bit of Java code, compiles it, runs it
and checks against a set of input/output pairs.

Maybe some of these puzzles can be adapted to your needs.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

Reply | Threaded
Open this post in threaded view
|

Lua Quiz

Matthew M. Burke

With Bertrand's recent mention of the Try Lua project he is working on,
I thought I would mention something I've got in the works.  I've been
planning a site, Lua Quiz (http://luaquiz.com), which shamelessly
"mimics" Ruby Quiz (http://rubyquiz.com).

I intend for the site to be a place to find interesting programming
challenges, and their Lua solutions.  It will be at least until after I
finish grading final exams (1st week of May) before I'll have
significant time to devote to the project, but I appreciate any and all
suggestions, criticisms, problem submissions, etc.

Matt

Reply | Threaded
Open this post in threaded view
|

Re: Lua Quiz

Roberto Ierusalimschy
> I intend for the site to be a place to find interesting programming  
> challenges, and their Lua solutions.  It will be at least until after I  
> finish grading final exams (1st week of May) before I'll have  
> significant time to devote to the project, but I appreciate any and all  
> suggestions, criticisms, problem submissions, etc.

How challenging should be the challenges?

-- Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Lua Quiz

Petite Abeille-2-2

On Apr 8, 2009, at 6:45 PM, Roberto Ierusalimschy wrote:

> How challenging should be the challenges?

Looking at  Ruby Quiz's archive, anything from English Numerals [1] to  
NDiff [2].

So... not too challenging... at least not in the academic sense of the  
term... no need to turn this into a spinoff of the Millennium Prize  
Problems... :D

[1] http://rubyquiz.com/quiz25.html
[2] http://rubyquiz.com/quiz46.html
Reply | Threaded
Open this post in threaded view
|

Re: Lua Quiz

Vaughan McAlley
In reply to this post by Matthew M. Burke
The second problem on the Ruby site was the Secret Santa problem.
Having used Lua to secretly Santa-ize my wife’s whole family this last
Christmas, I like the idea.

Vaughan

2009/4/9 Matthew M. Burke <[hidden email]>:

>
> With Bertrand's recent mention of the Try Lua project he is working on, I
> thought I would mention something I've got in the works.  I've been planning
> a site, Lua Quiz (http://luaquiz.com), which shamelessly "mimics" Ruby Quiz
> (http://rubyquiz.com).
>
> I intend for the site to be a place to find interesting programming
> challenges, and their Lua solutions.  It will be at least until after I
> finish grading final exams (1st week of May) before I'll have significant
> time to devote to the project, but I appreciate any and all suggestions,
> criticisms, problem submissions, etc.
>
> Matt
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Lua Quiz

Matthew M. Burke
In reply to this post by Roberto Ierusalimschy
Roberto Ierusalimschy wrote:
> How challenging should be the challenges?
>
>  
I would like to see a range of difficulties so that everybody from
newbies to experts (and implementors :) will want to participate at
least some of the time.  From my perspective, an ideal problem would not
necessarily be a difficult one, but one where anyone could brute force a
solution, but an elegant solution would require taking advantage of
Lua's features and "style."

Matt

Reply | Threaded
Open this post in threaded view
|

Re: Lua Quiz

Wesley Smith
A good source for ideas on this front would be roberto's article in  
the lua gems book where he talks in excellent detail about how  
precisely understand the structureof the language motivateds  
particular coding decisions.

wes

On Apr 10, 2009, at 11:02 AM, "Matthew M. Burke"  
<[hidden email]> wrote:

> Roberto Ierusalimschy wrote:
>> How challenging should be the challenges?
>>
>>
> I would like to see a range of difficulties so that everybody from  
> newbies to experts (and implementors :) will want to participate at  
> least some of the time.  From my perspective, an ideal problem would  
> not necessarily be a difficult one, but one where anyone could brute  
> force a solution, but an elegant solution would require taking  
> advantage of Lua's features and "style."
>
> Matt
>
Reply | Threaded
Open this post in threaded view
|

Re: Try Lua

Olivier Hamel
In reply to this post by Bertrand Mansion
Bertrand Mansion wrote:

> I am working on an interactive demo of Lua based on what was done for
> Ruby here: http://tryruby.hobix.com/
>
> I still have to write a little step-by-step "tutorial" that
> demonstrates what Lua is good at and introduces the Lua syntax. Do you
> have any links to an existing short tutorial and/or ideas about  cool
> one-liners in Lua ?
>
> Thanks,
>  

Sorry for massive delay, but I was tied up for a bit and forgot :(

local moving_forward = GameCntrls:KeyPressed(ENUM_KEY_W) and 15 or
(GameCntrls:KeyPressed(ENUM_KEY_S) and -15 or 0)
That sort of thing has always been a wonderful feature of Lua for me.
Too lazy to write a full if-then-elseif-else-end statement.