Lua.

1 view
Skip to first unread message

Alastair Lynn

unread,
Nov 16, 2008, 3:19:04 PM11/16/08
to xser...@googlegroups.com
Hi folks-

Title says it all really. Python was proving to be a major pain and
broke lots of stuff. So: I changed to Lua instead. It's a much smaller
codebase, and I've already got basic bindings between it and the
engine written.

It's in the git repository now.

-Alastair

Adam

unread,
Nov 16, 2008, 6:51:22 PM11/16/08
to xser...@googlegroups.com
Sounds good. I'll upload it and check it out in a little bit.

Adam

tycho

unread,
Nov 23, 2008, 9:23:50 PM11/23/08
to Xsera Development
hi guys.
have you considered ruby? it is more like python, with the added
simplicity of lua. i believe it would be worth the extra effort to
swap over.

nice comparison:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/234812

language home:
http://ruby-lang.org/

embedding into c++:
http://metaeditor.sourceforge.net/embed/

Adam

unread,
Nov 23, 2008, 10:05:30 PM11/23/08
to xser...@googlegroups.com
Hey Tycho,

I'll check out Ruby, but I'm at the point where I'm very reluctant to switch over again because I just learned Lua, and I'm doing pretty good at it, actually.

How similar is Ruby in syntax to, say, C? I think one of the things that's helping with Lua is that the syntax is very similar.

Thanks for checking our project out!

Adam

Alastair Lynn

unread,
Nov 24, 2008, 8:53:29 AM11/24/08
to xser...@googlegroups.com
My reply to that is very simple: absolutely not.

Ruby is slow, and ruby is extremely difficult to embed.

Not worth the effort.

Alastair

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Xsera Development" group.
> To post to this group, send email to xser...@googlegroups.com
> To unsubscribe from this group, send email to xsera-dev+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/xsera-dev?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

tycho

unread,
Nov 24, 2008, 6:53:19 PM11/24/08
to Xsera Development
lol typical response. welcome to the stereotype zone.
if lua is like c, then ruby is like objective c.
this makes it appear slower because it can do a hell of a lot more
than what lua can.

anyway, good luck guys... i think

On Nov 24, 11:53 pm, Alastair Lynn <arpl...@gmail.com> wrote:
> My reply to that is very simple: absolutely not.
>
> Ruby is slow, and ruby is extremely difficult to embed.
>
> Not worth the effort.
>
> Alastair
>
> On 24 Nov 2008, at 02:23, tycho wrote:
>
>
>
> > hi guys.
> > have you considered ruby? it is more like python, with the added
> > simplicity of lua. i believe it would be worth the extra effort to
> > swap over.
>
> > nice comparison:
> >http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/234812
>
> > language home:
> >http://ruby-lang.org/
>
> > embedding into c++:
> >http://metaeditor.sourceforge.net/embed/
>
> > >
>
>
>  smime.p7s
> 5KViewDownload

Adam

unread,
Nov 24, 2008, 7:10:57 PM11/24/08
to xser...@googlegroups.com
...and C++ > all.

Anyways, why are you looking to start up your own adventure? Why not
join ours?

Is.. is it something I said?

Adam

Alastair Lynn

unread,
Nov 25, 2008, 12:06:02 PM11/25/08
to xser...@googlegroups.com
Hi-

Please don't assume I'm making a sweeping generalisation.

I'm speaking from experience with Ruby, because I struggled for *six
months* to get it integrated with one of my past games at the advice
of someone in whose opinions I have a great deal of trust. Ruby is
really not designed for embedding: the API is awkward, and there is no
namespacing used at all, which meant I had to re-name a great many
internal functions to shoehorn Ruby in there. That was just the start
of my trouble: when things went wrong in Ruby it would crash the
entire game.

Objective-C is not much slower than C: its message passing systems
actually doesn't add a great deal of overhead and the main body of
functions are compiled in machine-code just as C is. Ruby, however, is
benchmarkably slower than Lua by an order of magnitude for some types
of code, particularly with the Lua/LLVM integration I plan to add at a
later date which will allow Lua to emit to native machine code at
runtime. Most of this extra functionality is functionality that we
don't need - Lua is light, extensible, adds little to the compile time
or size of the executable, and provides everything that we need.

I am not biased, I am just concerned with making the game as good as
possible, and for me that means not spending the majority of the time
trying to keep the very weak bridge between Ruby and C++ in one piece
- I'd rather go with Lua, which I know to work, and work quickly.

Alastair

Nick Farley

unread,
Nov 25, 2008, 12:19:51 PM11/25/08
to xser...@googlegroups.com
On Tue, Nov 25, 2008 at 12:06 PM, Alastair Lynn <arp...@gmail.com> wrote:
> I'm speaking from experience with Ruby, because I struggled for *six months*
> to get it integrated with one of my past games at the advice of someone in
> whose opinions I have a great deal of trust.

It was me wasn't it?

> I am not biased, I am just concerned with making the game as good as
> possible, and for me that means not spending the majority of the time trying
> to keep the very weak bridge between Ruby and C++ in one piece - I'd rather
> go with Lua, which I know to work, and work quickly.
>
> Alastair

Seconded. The product needs to be the best we can make it. If that
means using Lua, then so be it. But I can't think of many (if any)
modern OS X apps that use Ruby extensively. While I like Ruby (and
Ruby on Rails), the language is not mature enough for usage outside a
very limited area.

Alastair Lynn

unread,
Nov 25, 2008, 12:22:55 PM11/25/08
to xser...@googlegroups.com
Hi Nick-

It was Evan Seeds, and the product was MBS, if you remember back that
far. It was meant to be developed after Xenos and before... your
product, if you know what I mean.

Alastair

tycho

unread,
Nov 25, 2008, 7:57:02 PM11/25/08
to Xsera Development
this is a good article:
http://theocacao.com/document.page/428/

it's not exactly what we are talking about, but i found it while
searching for examples for you, so it looks as though it is. i'd post
quotes, but it really has to be read in context. ie the perl and c, c
and assembly comparisons. same old arguments, different time,
different languages, same end result.

also, 'c++>all'? wtf have you been smoking, adam?

oh well, enough already! this is not productive.

On Nov 26, 3:22 am, Alastair Lynn <arpl...@gmail.com> wrote:
> Hi Nick-
>
> It was Evan Seeds, and the product was MBS, if you remember back that  
> far. It was meant to be developed after Xenos and before... your  
> product, if you know what I mean.
>
> Alastair
>
> On 25 Nov 2008, at 17:19, Nick Farley wrote:
>
>
>
> > On Tue, Nov 25, 2008 at 12:06 PM, Alastair Lynn <arpl...@gmail.com>  
> > wrote:
> >> I'm speaking from experience with Ruby, because I struggled for  
> >> *six months*
> >> to get it integrated with one of my past games at the advice of  
> >> someone in
> >> whose opinions I have a great deal of trust.
>
> > It was me wasn't it?
>
> >> I am not biased, I am just concerned with making the game as good as
> >> possible, and for me that means not spending the majority of the  
> >> time trying
> >> to keep the very weak bridge between Ruby and C++ in one piece -  
> >> I'd rather
> >> go with Lua, which I know to work, and work quickly.
>
> >> Alastair
>
> > Seconded. The product needs to be the best we can make it. If that
> > means using Lua, then so be it. But I can't think of many (if any)
> > modern OS X apps that use Ruby extensively. While I like Ruby (and
> > Ruby on Rails), the language is not mature enough for usage outside a
> > very limited area.
>
> > >
>  smime.p7s
> 5KViewDownload

Adam

unread,
Nov 25, 2008, 8:23:37 PM11/25/08
to xser...@googlegroups.com
If you don't understand that was a jest... oh well, it's already gone
over your head.

Adam

On Nov 25, 2008, at 4:57 PM, tycho wrote:

> also, 'c++>all'? wtf have you been smoking, adam?
>

adam_0

unread,
Jan 11, 2009, 3:35:13 PM1/11/09
to Xsera Development
On Nov 25 2008, 9:19 am, "Nick Farley" <farl...@gmail.com> wrote:
> But I can't think of many (if any)
> modern OS X apps that use Ruby extensively. While I like Ruby (and
> Ruby on Rails), the language is not mature enough for usage outside a
> very limited area.

Expanding on this, I've recently learned that Aquaria uses Lua for
their addons. It's very straightforward, and I don't know why we
wouldn't use it.

Ok, 'nuff said.

Adam
Reply all
Reply to author
Forward
0 new messages