NS2: School of LUA

ItalianmagicItalianmagic Join Date: 2008-12-13 Member: 65755Members
I am curious to see if anyone is willing to meet online (via Adobe Connect or something similar) to learn and develop one's skill with LUA. I was thinking something along the lines of a bi-weekly meet up for about an half-an-hour to a hour and see how it goes from there.

Is anyone interested? :O!
end;
«13

Comments

  • PrivatePrivate Join Date: 2007-06-10 Member: 61204Members, Constellation
    Learning Lua is not hard if you already know other programming languages. If Lua is your first programming language, you are in for a longer haul. Not because Lua is hard, but because on top of learning Lua, you are also learning programming in general.

    Here's another (old) thread on the subject: <a href='index.php?showtopic=106572'>Learning LUA in anticipation for NS2</a>

    Learning another programming language is always worth doing. Learning your first even more so.

    I was going into a long rant about scheduling meetings here, but I'll leave it at 'I might pop in once in a while'. I think actually having a scheduled meeting and people to talk to will make it harder to quit.

    That being said, I think it's inherently non-internet-esque to organize into actual classes. I think a Lua subforum (to the much anticipated NS2 Creation subforum) will be more likely to work in the long run. A couple of good 'getting started' tutorials, a friendly attitude, and constructive criticism goes a long way?
  • SirotSirot Join Date: 2006-12-03 Member: 58851Members
    Once the game is out, I think there will be a lot of tutorials out and ready for the community to use, made by the community.

    I would recommend taking tutorials to learn Python as a starter while you wait. It is a very forgiving language and does not have all the weird eccentricities that make programming really unintuitive for a lot of people. I learned to program starting from Java and ActionScript, so I can't personally comment on its effectiveness; but I know a good number of people who did start with Python. They did fairly well.
  • ItalianmagicItalianmagic Join Date: 2008-12-13 Member: 65755Members
    no LUA isn't my first language. lol but i was directing this to the community who wants to get efficient with it.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    Lua isn't dependent on NS2, therefore you can always learn Lua while you wait and don't have to learn how to program with a different language.

    <a href="http://www.lua.org/download.html" target="_blank">http://www.lua.org/download.html</a>

    Try <b>Lua for Windows</b> if you want an installable solution on Windows.
    Lua has two methods of input, Direct and from a File.

    To type things into the Lua interpreter directly, just start <b>lua.exe</b>. In my case, its lua5.1.exe, but you may have downloaded a different version. Some distributions of lua don't have the version number in the exe, some do. Whats important is that you don't try to run lua<b>c</b>.exe as its a bytecode compiler for Lua scripts and doesn't do anything with the scripts aside from compiling them.
    NOTE: If you didn't install a Lua version for Windows (i.e. has DLLs), you'll probably need to run lua.exe directly from the command console.

    When Lua starts, you can type something in and hit enter. What you type will be directly interpreted and executed, and everything you write will remain in effect until the end of your sessions (until you close Lua.exe).

    To print "HELLO WORLD" onto the screen, you simply type print("HELLO WORLD").

    The second method of input, through a File, is a lot more flexible. You simply write your script in a file, save it, and pass the filepath and filename to the Lua interpreter (lua.exe) when you execute it.
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->lua.exe "C:\Projects\MyLua.lua"<!--c2--></div><!--ec2-->
    This is extremely useful if the text editor you use supports the command line, where you can bind a key to execute an executable (such as Lua)

    Aside from that, there is a list of <a href="http://lua-users.org/wiki/TutorialDirectory" target="_blank">tutorials by the Lua-Users</a> which seemed good as well as the <a href="http://www.lua.org/manual/5.1/" target="_blank">reference guide</a> from the Lua website.
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    edited February 2010
    If anyone's interested in learning Lua, there are plenty of good tutorials online. That plus practice is the best way.

    If you already know a programming language, though, it's unlikely you'll need to spend much time "learning" Lua. In fact, unless you just want to learn Lua for the sake of learning, you'd be better off waiting until NS2 releases its documentation to start learning anything. Lua itself isn't really what you need to learn for NS2 purposes; the specifics of whatever interface Lua has with the Spark Engine are more important.

    Don't get me wrong: if you don't know anything about programming and you're interested in modding for NS2, by all means, get a head start. But if you already know a programming language, you're probably jumping the gun a bit if you're only interested in Lua for NS2's sake. Wait for some documentation or you'll be wasting time.
  • Katana-Katana- Join Date: 2008-11-25 Member: 65575Members
    Italianmagic....

    fyi, Lua is not an acronym, but a word in Portuguese, I think it means "moon." I say this, because it sort of a pet peeve in the Lua community to refer to it as "LUA" because that sort of implies that it stands for something, plus it looks kind of silly.
  • SirotSirot Join Date: 2006-12-03 Member: 58851Members
    <!--quoteo(post=1751747:date=Feb 7 2010, 05:10 PM:name=Dalin Seivewright)--><div class='quotetop'>QUOTE (Dalin Seivewright @ Feb 7 2010, 05:10 PM) <a href="index.php?act=findpost&pid=1751747"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Lua isn't dependent on NS2, therefore you can always learn Lua while you wait and don't have to learn how to program with a different language.

    <a href="http://www.lua.org/download.html" target="_blank">http://www.lua.org/download.html</a>

    Try <b>Lua for Windows</b> if you want an installable solution on Windows.
    Lua has two methods of input, Direct and from a File.

    To type things into the Lua interpreter directly, just start <b>lua.exe</b>. In my case, its lua5.1.exe, but you may have downloaded a different version. Some distributions of lua don't have the version number in the exe, some do. Whats important is that you don't try to run lua<b>c</b>.exe as its a bytecode compiler for Lua scripts and doesn't do anything with the scripts aside from compiling them.
    NOTE: If you didn't install a Lua version for Windows (i.e. has DLLs), you'll probably need to run lua.exe directly from the command console.

    When Lua starts, you can type something in and hit enter. What you type will be directly interpreted and executed, and everything you write will remain in effect until the end of your sessions (until you close Lua.exe).

    To print "HELLO WORLD" onto the screen, you simply type print("HELLO WORLD").

    The second method of input, through a File, is a lot more flexible. You simply write your script in a file, save it, and pass the filepath and filename to the Lua interpreter (lua.exe) when you execute it.
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->lua.exe "C:\Projects\MyLua.lua"<!--c2--></div><!--ec2-->
    This is extremely useful if the text editor you use supports the command line, where you can bind a key to execute an executable (such as Lua)

    Aside from that, there is a list of <a href="http://lua-users.org/wiki/TutorialDirectory" target="_blank">tutorials by the Lua-Users</a> which seemed good as well as the <a href="http://www.lua.org/manual/5.1/" target="_blank">reference guide</a> from the Lua website.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Quoting this post because it has quality information.
  • ItalianmagicItalianmagic Join Date: 2008-12-13 Member: 65755Members
    lol, motion denied.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    edited February 2010
    Haha.
    Sorry Italianmagic - I got caught up with "Someone is wrong on the internet" and forgot to actually answer your question...

    In actual response to the original post, then Yes, I would like to meet up online with fellow developers and what not, but it depends on the format. I haven't used Adobe Connect or anything, and I'm not sure what sort of format would even work. I think a format where one person broadcasts their desktop might work (like the Microsoft demonstration videos from talks) but that would require a schedule of who's demonstrating what and what are they talking about, which might not work out so well. I think a place to meet-up and discuss in real time Lua techniques, projects, etc. would be a great idea, starting with the NSTR2 sub-forum being unlocked (<b>AHEM</b>) and IRC is a bit impractical I think, as it would require somethlng like Pastebin to communicate effectively, which can be a bit annoying.

    I think the problem with forums for this sort of thing is the Elitest and sometimes just annoyed responses that go along the lines of "This has been answered 9001 times before. Do a damn search." When sometimes, doing a search isn't very practical, especially if the person looking for answers is new to programming and doesn't know exactly what he should be searching for in the first place. And it doesn't help when the Search functionality isn't very... impressive?
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    edited February 2010
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function LearnToCode(User,Language)
              
               //Protects against zombies
               if !User:Alive() then return print("No zombies allowed.") end
              
               //What to do if user wants to learn Lua
               if User:Wants(Learn(Language)) == "Lua" then
              
                  //Let's direct user to a helpful site
                  local Site = "http://www.lua.org/"
                  User:Visit(Site)
              
               end
              
       end<!--c2--></div><!--ec2-->

    The bare basics of Lua can probably be explained in a couple of sentences, but I'm not really sure if there's any site that offers any such digest. I'm hoping the NS2 team will somehow cover it before going into detail on the specific functions and so on.
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    <!--quoteo(post=1751858:date=Feb 8 2010, 09:02 AM:name=Draco_2k)--><div class='quotetop'>QUOTE (Draco_2k @ Feb 8 2010, 09:02 AM) <a href="index.php?act=findpost&pid=1751858"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function LearnToCode(User,Language)
              
               //Protects against zombies
               if !User:Alive() then return print("No zombies allowed.") end
              
               //What to do if user wants to learn Lua
               if User:Wants(Learn(Language)) == "Lua" then
              
                  //Let's direct user to a helpful site
                  local Site = "http://www.lua.org/"
                  User:Visit(Site)
              
               end
              
       end<!--c2--></div><!--ec2-->

    The bare basics of Lua can probably be explained in a couple of sentences, but I'm not really sure if there's any site that offers any such digest. I'm hoping the NS2 team will somehow cover it before going into detail on the specific functions and so on.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Try the lua user's wiki from the official site. It goes into plenty of detail on basics.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    edited February 2010
    <!--quoteo(post=1751863:date=Feb 8 2010, 06:38 PM:name=cmc5788)--><div class='quotetop'>QUOTE (cmc5788 @ Feb 8 2010, 06:38 PM) <a href="index.php?act=findpost&pid=1751863"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Try the lua user's wiki from the official site. It goes into plenty of detail on basics.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Maybe I'm missing something, but I wouldn't call what's in there "basics". I was thinking more in terms of "How do you make a basic function and what for." At least that's what perplexed me the most when I started out.
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Maybe someone could make an IRC channel for NS2 Lua developers?
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    <!--quoteo(post=1751865:date=Feb 8 2010, 09:43 AM:name=Draco_2k)--><div class='quotetop'>QUOTE (Draco_2k @ Feb 8 2010, 09:43 AM) <a href="index.php?act=findpost&pid=1751865"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Maybe I'm missing something, but I wouldn't call what's in there "basics". I was thinking more in terms of "How do you make a basic function and what for." At least that's what perplexed me the most when I started out.<!--QuoteEnd--></div><!--QuoteEEnd-->

    <a href="http://lua-users.org/wiki/FunctionsTutorial" target="_blank">http://lua-users.org/wiki/FunctionsTutorial</a>

    Correct me if I'm wrong, but this pretty much is definitively "How to make a basic function." If you don't know what a function is used for, that's a general programming tutorial you need, not Lua-specific.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    <!--quoteo(post=1751885:date=Feb 8 2010, 09:07 PM:name=cmc5788)--><div class='quotetop'>QUOTE (cmc5788 @ Feb 8 2010, 09:07 PM) <a href="index.php?act=findpost&pid=1751885"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><a href="http://lua-users.org/wiki/FunctionsTutorial" target="_blank">http://lua-users.org/wiki/FunctionsTutorial</a>

    Correct me if I'm wrong, but this pretty much is definitively "How to make a basic function." If you don't know what a function is used for, that's a general programming tutorial you need, not Lua-specific.<!--QuoteEnd--></div><!--QuoteEEnd-->
    That... Is very mid-way between friendly and completely baffling.

    Well, yes, general programming would do. The thing is, it's all fine and dandy if you have a lick of understanding of what's going, but there's no guarantee that a new-comer will even be able to connect the dots, nevermind NS2-specific implementations. Like I said, the general structure can probably be described in few sentences, and that would probably be the first stepping stone on the road to mod-friendliness.
  • AezayAezay Join Date: 2003-04-19 Member: 15660Members
    I'm rather curious at how the game is going to be controlled through Lua. Has there been any information released on what the NS2 specific functions will be?

    I learned to code in Lua from making some addons back when I played WoW. Now I find Lua to be one of the easiest to read languages because of its simple syntax. Its tables also makes it very easy to work with, at least when you understand them.

    If anyone has some more specific questions about Lua, that you have trouble understanding through the manual, feel free to ask me.
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    <!--quoteo(post=1751896:date=Feb 8 2010, 01:37 PM:name=Aezay)--><div class='quotetop'>QUOTE (Aezay @ Feb 8 2010, 01:37 PM) <a href="index.php?act=findpost&pid=1751896"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm rather curious at how the game is going to be controlled through Lua. Has there been any information released on what the NS2 specific functions will be?<!--QuoteEnd--></div><!--QuoteEEnd-->

    No documentation or word on specific functions yet. However, they have stated that the Engine written in C++ only handles low-level rendering techniques which can be made into any sort of "game" for modification purposes. Nothing NS2 specific is in the low-level engine code. This means that the Lua interface will, at its lowest levels, be an abstraction on top of calls for drawing, lighting, texture mapping, etc.

    The NS2-specific functions will have been built into a Lua library of sorts abstracted to such a high level that you won't have to deal with any of that, of course. And there's no word on any of the specifics yet. I'm sure some first-draft documentation will come out with the alpha (at least I hope).
  • DadayaDadaya Join Date: 2005-02-02 Member: 39540Members, Constellation
    This is a very interesting topic reminiscent of the starts of many great modding communities. Seeing as how we already know the NS community is very big on modding, all we really need now is time and a place(*hint hint*). I'm fairly positive once the NS2 specifics are out there will be many community members taking on the task of documenting and breaking it down into simple easily digestible chunks. Until then, the lua website, as named several times in this thread, are the very best bet.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    edited February 2010
    I now propose that we make a site not unlike the <a href="http://www.unrealwiki.com/" target="_blank">http://www.unrealwiki.com/</a> (Or at least the old version of it, I never liked the new version), where we can document the entire Lua API for NS2 as well as have a place to share our projects as well as share our code. We already have an NS2 wiki, but 'ionno.
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    <!--quoteo(post=1752186:date=Feb 9 2010, 09:19 PM:name=Dalin Seivewright)--><div class='quotetop'>QUOTE (Dalin Seivewright @ Feb 9 2010, 09:19 PM) <a href="index.php?act=findpost&pid=1752186"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I now propose that we make a site not unlike the <a href="http://www.unrealwiki.com/" target="_blank">http://www.unrealwiki.com/</a> (Or at least the old version of it, I never liked the new version), where we can document the entire Lua API for NS2 as well as have a place to share our projects as well as share our code. We already have an NS2 wiki, but 'ionno.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I'm fairly sure that once the alpha is released, UWE will provide docs just like any good API. A tutorial wiki of sorts would be a useful long-term resource to have, though.
  • MidoMido Join Date: 2004-04-05 Member: 27742Members
    I'll never get over Lua's syntax :(

    Python for life

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->def LearnLanguage(user,language):
        if (user.Alive() == False):
            print("No Zombies!")
        if (language == "Lua"):
            print("Get out!")
        if (language == "Python"):
            site = "http://www.python.org"
            user.visit(site)<!--c2--></div><!--ec2-->

    But alas, embedding/extending python into an application is a pain in the ass compared to Lua.

    When we get more official information/an alpha, I'll be more than willing to start writing Lua tutorials/explanations on the language, though.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    edited February 2010
    <!--quoteo(post=1752294:date=Feb 10 2010, 12:17 PM:name=Mido)--><div class='quotetop'>QUOTE (Mido @ Feb 10 2010, 12:17 PM) <a href="index.php?act=findpost&pid=1752294"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec--><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    if (language == "Python"):
            site = "http://www.python.org"
            user.visit(site)<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->

    I hope Python handles this like most modern languages do!
    (CRAAAASH! - or at least if user.visit does anything with that string...)
    Edit: Oh wait... Python is all about that indentation... so the user.visit line -is- in that if statement? Silly Python -_-
  • DixieWolfDixieWolf Join Date: 2010-02-10 Member: 70508Members
    <!--quoteo(post=1752294:date=Feb 10 2010, 01:17 PM:name=Mido)--><div class='quotetop'>QUOTE (Mido @ Feb 10 2010, 01:17 PM) <a href="index.php?act=findpost&pid=1752294"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'll never get over Lua's syntax :(

    Python for life

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->def LearnLanguage(user,language):
        if (user.Alive() == False):
            print("No Zombies!")
        if (language == "Lua"):
            print("Get out!")
        if (language == "Python"):
            site = "http://www.python.org"
            user.visit(site)<!--c2--></div><!--ec2-->

    But alas, embedding/extending python into an application is a pain in the ass compared to Lua.

    When we get more official information/an alpha, I'll be more than willing to start writing Lua tutorials/explanations on the language, though.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Personally I love Lua. I haven't gotten seriously in depth with the language, but at least starting out, I find it really awesome. Especially coming from C++ & php. It seems to me that most of the people I know who knew python before lua are fairly 'meh' about it. Me on the other hand, I started on C++ and from there have only seriously worked with web scripting like PHP and a little perl, so Lua is like a dream come true compared to the violent torture that C++ is sometimes. I'd be willing to either aid in writing Lua tutorials once we get some official info about the specific NS2 Lua, or even work on getting such a ns2-lua site up and running

    (also... first post. glad to finally join the forum i've been lurking around for the past few months
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    Yeah, Python, I just <i>love</i> languages with significant whitespace.
  • FocusedWolfFocusedWolf Join Date: 2005-01-09 Member: 34258Members
    I think it'd be a great idea to setup some schooling for LUA... you can learn much faster from someone that:

    1. knows the topic.
    2. experienced all the headaches.
    3. wants to teach you.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    edited February 2010
    Yeah ,and about the Documentation we'll likely get for the API. Documentation can only go so far and I doubt the documentation we'll get will detail indepth of everything that would be useful to know. But if users were able to add to the documentation in a wiki-like format, then documentation would become something more. Documenting all of the existing classes would also be helpful as some functionality may not be entirely obvious, and there are a variety of ways to accomplish the same task.

    And please stop all-capping Lua.
  • MidoMido Join Date: 2004-04-05 Member: 27742Members
    edited February 2010
    <!--quoteo(post=1752305:date=Feb 10 2010, 02:41 PM:name=tim.channell@gmail.com)--><div class='quotetop'>QUOTE (tim.channell@gmail.com @ Feb 10 2010, 02:41 PM) <a href="index.php?act=findpost&pid=1752305"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Personally I love Lua. I haven't gotten seriously in depth with the language, but at least starting out, I find it really awesome. Especially coming from C++ & php. It seems to me that most of the people I know who knew python before lua are fairly 'meh' about it. Me on the other hand, I started on C++ and from there have only seriously worked with web scripting like PHP and a little perl, so Lua is like a dream come true compared to the violent torture that C++ is sometimes. I'd be willing to either aid in writing Lua tutorials once we get some official info about the specific NS2 Lua, or even work on getting such a ns2-lua site up and running

    (also... first post. glad to finally join the forum i've been lurking around for the past few months<!--QuoteEnd--></div><!--QuoteEEnd-->

    Guess what? I did C++ programming for 5 years and I did Lua for 1.2~ years with Gmod 10, I also played with php a lot, I've used ruby and perl (for linux shell scripting)! I hated Lua more than I hated Python at first. Then I had a friend convince me to use Python for a few things I was needing to do (small utilities, I had to make a few scripts for things that used Python), and slowly learned to REALLY LOVE how the syntax works.

    Pretty much the only two things against Python are that it's
    + Hard to embed
    + It has a "different" syntax than the normal white-space insensitive programming languages we're all used to (C/++/Lua/Php etc)

    But once you start to use it it's quickly apparent why Python is as huge as it is. You don't have to think about the syntax, at all. There are like 3 basic rules to follow with using the Python syntax, and after that you'll never be making weird subtle syntax errors (Something I still do after years of C++, just really tiny things), and the way objects work in the environment is really intuitive (duck typing makes everything nice and magical). It's also efficient for what it is, and with the advent of Python variants such as StacklessIO and Stackless it'self, it's quite the powerhouse.

    It's such a pure and clean way of programming once you really dig into it, I don't think I'll enjoy another scripting language ever again :(

    I honestly don't HATE Lua, I just dont enjoy the syntax or using it, after lots of experience (even before I realized Python was decent). I'm not a big enough baby to not use a language because of the syntax so it's not like I'm rejecting Lua in this context, the developers have every need and reason to use Lua, I just secretly wish Python were just like Lua as far as how easy it is to embed into things. I'll end up using Lua either way for NS2 and probably helping people by making tutorials.

    <!--quoteo(post=1752322:date=Feb 10 2010, 04:40 PM:name=cmc5788)--><div class='quotetop'>QUOTE (cmc5788 @ Feb 10 2010, 04:40 PM) <a href="index.php?act=findpost&pid=1752322"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Yeah, Python, I just <i>love</i> languages with significant whitespace.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Hahahahaha look at you hahaha
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    edited February 2010
    <!--quoteo(post=1752400:date=Feb 11 2010, 12:54 AM:name=Mido)--><div class='quotetop'>QUOTE (Mido @ Feb 11 2010, 12:54 AM) <a href="index.php?act=findpost&pid=1752400"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Hahahahaha look at you hahaha<!--QuoteEnd--></div><!--QuoteEEnd-->

    I've also done quite a few things with Python, spent a few years getting into the intricacies of it along with a few other scripting languages including Lua. That said, I've never seen a really coherent justification of the whitespace sensitivity. The closest thing to a good explanation is that it makes code somewhat more standardized, so when you're reading other peoples' code you don't have to spend time adjusting to their indentation style or what have you.

    On the other hand, I'm the sort of person who really needs to be able to format things in a way that's readable for me. Once I get past a few hundred lines of code, Python-whitespace just starts to make my eyes bleed. It's bad enough that I put in comment markers as faux-braces just to maintain sanity.

    So yeah. ###### Python's whitespace conventions.

    Edit: Oh, yeah, and also its difficulty of embedding. I think it's because the Python developers fancy it as a "high-level language" and feel that the term "scripting language" is derogatory in light of Python's awesomeness. Shooting themselves in the foot.

    Edit #2: Then again, I haven't really looked into Boost.Python. That might be a good solution.
  • FocusedWolfFocusedWolf Join Date: 2005-01-09 Member: 34258Members
    edited February 2010
    LUA reminds me of Vhdl a little bit... they share the same way to comment stuff -- :P

    Not to get offtopic too much but Vhdl has always be one of those languages that impressed the hell out of me for how elegantly it permits parallel asynchronous design, although it really is just good for making hardware so... still cool though :P

    So ya... C# ftw... i've programmed tons of useful applications in it... runs fast like C++ (or so the advertisements say), with java syntax, love it... xaml is sexy too.

    If Ns2 had embedded C#... well it'd probably be a memory hog (compared to LUA) but the syntax would be so much more powerful IMHO... And it can even stay multi-platform (although it'd be better if it used straight up .net framework imho lol) <a href="http://www.mono-project.com/Embedding_Mono" target="_blank">http://www.mono-project.com/Embedding_Mono</a>

    I'd be funny if we had the head coding developer do a "School of LUA" to teach all of us lol.
  • cmc5788cmc5788 Join Date: 2009-10-06 Member: 68959Members
    edited February 2010
    <!--quoteo(post=1752576:date=Feb 11 2010, 11:52 PM:name=FocusedWolf)--><div class='quotetop'>QUOTE (FocusedWolf @ Feb 11 2010, 11:52 PM) <a href="index.php?act=findpost&pid=1752576"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->So ya... C# ftw... i've programmed tons of useful applications in it... runs fast like C++ (or so the advertisements say), with java syntax, love it... xaml is sexy too.

    If Ns2 had embedded C#... well it'd probably be a memory hog (compared to LUA) but the syntax would be so much more powerful IMHO... And it can even stay multi-platform (although it'd be better if it used straight up .net framework imho lol) <a href="http://www.mono-project.com/Embedding_Mono" target="_blank">http://www.mono-project.com/Embedding_Mono</a>

    I'd be funny if we had the head coding developer do a "School of LUA" to teach all of us lol.<!--QuoteEnd--></div><!--QuoteEEnd-->

    C# can't be as fast as C/C++. It's not designed to be and it doesn't try to be.

    "Embedded C#" in the sense that Lua or Python are embedded in a game doesn't make a lot of sense; it's not designed to be a scripting language.
Sign In or Register to comment.