Hey guys It's me again

by Dysolis

Back to Mechanic's Corner.

Dysolis2010-07-30 22:41:17
I am wondering what programming language should I start off at to make reflexes? That would be the end reward is that once I know how to do programming I could then turn around and make some really good triggers. I would like to hear everyone opinion about this. I heard that Lua is a very fast language and works well on mush but does everything transfer over from say C or C++ or is Lua a totally separate programming language?
Lehki2010-07-30 22:47:30
I wouldn't call it totally seperate, Lua has a lot of syntax shortcuts meant to mimic OO languages like C++. And Lua was written in C, if I recall correctly.

But uh, I've never used Mush so correct me if I'm wrong, but I thought you didn't really have a choice in the language you used for it? Or were you asking about, just learning a programming language and practicing with it completely separate form Lusternia?
Unknown2010-07-30 23:01:46
QUOTE (Lehki @ Jul 30 2010, 06:47 PM) <{POST_SNAPBACK}>
I wouldn't call it totally seperate, Lua has a lot of syntax shortcuts meant to mimic OO languages like C++. And Lua was written in C, if I recall correctly.

But uh, I've never used Mush so correct me if I'm wrong, but I thought you didn't really have a choice in the language you used for it? Or were you asking about, just learning a programming language and practicing with it completely separate form Lusternia?



I was under the impression MUSH support VBscript also, but I may be misremembering.

Scripting in lua is different than coding in C++, C, or really anything else. All programming languages share some things in common (well, at least until you get into functional programming, that's a different mindshift) and lua can certainly be a good way to begin thinking like a programmer. But knowing lua won't make it so you can code in any other language, any more than knowing windows batch scripting will.


Well, ok, maybe a bit more.
Everiine2010-07-30 23:11:13
MUSH does indeed support VBscript. Zarquan's Treant is built on Lua, and Ethelon's Avant-Garde is built on VBscript.
Anisu2010-07-30 23:56:45
QUOTE (Everiine @ Jul 31 2010, 01:11 AM) <{POST_SNAPBACK}>
MUSH does indeed support VBscript. Zarquan's Treant is built on Lua, and Ethelon's Avant-Garde is built on VBscript.

Ethelon's up to date but beta system is also in lua tongue.gif

mushclient supports lua, vbs, ruby, phpscript, python, perlscript, tcl and Jscript
Dysolis2010-07-31 00:05:09
yeah you can select what language to pick like Lua or Vbscript under the scripting tab. I wasn't sure if I could take knowledge from C to say lua or vbscript. Sense I'm just starting out I wanted to know what the easier route I should start with but if it doesn't work that way then maybe I could just forgo learning C altogether.
Anisu2010-07-31 00:14:43
QUOTE (Dysolis @ Jul 31 2010, 02:05 AM) <{POST_SNAPBACK}>
yeah you can select what language to pick like Lua or Vbscript under the scripting tab. I wasn't sure if I could take knowledge from C to say lua or vbscript. Sense I'm just starting out I wanted to know what the easier route I should start with but if it doesn't work that way then maybe I could just forgo learning C altogether.

Neither will really teach you C except for the very general concepts. Lua seems to be the better language for mush though, VBS seems a lot slower.
Acrune2010-07-31 00:25:05
C++ is my strongest programming language, and I have no trouble with lua. Whether that is because of the C++, another language, or my total awesomeness, its hard to say. tongue.gif There isn't really any syntax overlap between C++ and lua, but I've found its not hard to take something I know in C++ (such as arrays, or a specific kind of loop), and google the equivalent in lua. I haven't really fiddled with the more advanced lua because there isn't a lot of need for it when making a system.

Edit: If you don't know C, I wouldn't bother learning C just to learn lua, or anything else really. If you want to learn a programming language, just learn the one you need.
Dysolis2010-07-31 00:46:46
Ok great! thanks.
Unknown2010-07-31 00:50:38
Learning just about any programming language will help you in learning others. The syntaxes are often similar and the general concepts such as control statements, looping constructs, variables, functions, etc are very common. There are languages that are more terse and more difficult, such as Tcl or Perl, and languages that are more verbose and easier, such as Lua or J*vaScript.

I highly recommend Lua as a good starter language. It's not only fast and useful, but it's also pretty easy to learn and very practical for re-using code.

Find yourself a good tutorial, start hacking together bits of code for testing, and ask lots of questions.
Unknown2010-07-31 01:08:57
QUOTE (Zarquan @ Jul 30 2010, 08:50 PM) <{POST_SNAPBACK}>
Learning just about any programming language will help you in learning others. The syntaxes are often similar and the general concepts such as control statements, looping constructs, variables, functions, etc are very common. There are languages that are more terse and more difficult, such as Tcl or Perl, and languages that are more verbose and easier, such as Lua or J*vaScript.

I highly recommend Lua as a good starter language. It's not only fast and useful, but it's also pretty easy to learn and very practical for re-using code.

Find yourself a good tutorial, start hacking together bits of code for testing, and ask lots of questions.



Which we'll probably even answer.

If you want to use Lusternia as an excuse/carrot for learning how to code, then I would recommend Lua, whether you go with MUSH or Mudlet. It's an easy language with quite readable code, and there are -tons- of examples floating around the forums.
Dysolis2010-07-31 03:20:17
Okay and can you use any language and make a system out of it, like C or C++ or are there some languages you can't make reflexes for?
Acrune2010-07-31 04:05:52
Each client has its own set of languages that it can use. Mudlet uses lua, zmud and cmud use its own language, mushclient can use the ones others have listed above, and so on. You won't find a client that uses C or C++ because C and C++ have to be compiled into machine code, while languages like lua are scripting languages and don't need to be compiled in the same way. If you want to use C or C++, you'll have to write your own client and hardcode the system, and every change you want to make to the system would need a recompile of the whole thing. I actually did a little bit of that just for fun a while back, using C++ and qt, but I lost interest. If you really, really wanted to use C++, I believe mudlet is open source and done in C++ and qt, might be able to modify it to act based on a C++ system, but I wouldn't advise it unless you're more interested in the task than the result.
Dysolis2010-07-31 04:53:20
Well I think for me to get into programming I have to be somewhat into doing the tasks at hand because I was so clueless the last time I attempted C. I knew how to copy and past and see if that worked but as far as learning what parts of the code meant I had no idea to grasp the concept. I think I need to grab a book and stick to one language based on the recommendations you guys gave and I think I was told that Java or C was the easiest to start out with? If that's the case then maybe I should stick the C route anyway because I have two friends in real life that are trying to learn C anyway and hopefully I could master it to a point that id be able to make a decent system with C++ and compile it each time as needed. I was told that the newest language was C-sharp which is suppoused to be an improvement over the other two but im not sure if it's any harder or not. I think it's a toss up between java or C , C will let me make a system in the long run but java will not. Then again java is usefull with windows and I use windows a lot even though I really like mac but mac's are expensive hence i'm with windows. I'll probably give a few days to think about and i'll talk with my friends about it too, you guys have been a great help thanks so much.
Unknown2010-07-31 06:43:59
QUOTE (Dysolis @ Jul 31 2010, 12:53 AM) <{POST_SNAPBACK}>
Well I think for me to get into programming I have to be somewhat into doing the tasks at hand because I was so clueless the last time I attempted C. I knew how to copy and past and see if that worked but as far as learning what parts of the code meant I had no idea to grasp the concept. I think I need to grab a book and stick to one language based on the recommendations you guys gave and I think I was told that Java or C was the easiest to start out with? If that's the case then maybe I should stick the C route anyway because I have two friends in real life that are trying to learn C anyway and hopefully I could master it to a point that id be able to make a decent system with C++ and compile it each time as needed. I was told that the newest language was C-sharp which is suppoused to be an improvement over the other two but im not sure if it's any harder or not. I think it's a toss up between java or C , C will let me make a system in the long run but java will not. Then again java is usefull with windows and I use windows a lot even though I really like mac but mac's are expensive hence i'm with windows. I'll probably give a few days to think about and i'll talk with my friends about it too, you guys have been a great help thanks so much.


ANSI C and Java are not going to be the easiest. They may have more corporate/employment possibilities, but definitely not the easiest by any stretch. Also, C++ is not the same as C, and moving from one to the other will require some learning.
Xavius2010-07-31 06:44:59
C is a bad first language. If Python is offered, take that. If it's not, take Java. If that's not, take VB. Do note that Java and J-a-v-a-s-c-r-i-p-t are not related languages. Python and VBScript (which is still not VB, but is a related language) are supported by MUSH.
Unknown2010-07-31 11:06:51
You cannot just pick any arbitrary programming language and "write a combat system" with it. It's not as though you could write a combat system in C, compile just that, and us it in a MUD client of your choosing. You either have to write a library that imports into a scripting language used by your client or write your own entirely separate client that incorporates your combat system. Both of these are enormous tasks, especially when you're just learning how to code.

Choose either Mudlet or MUSHclient and stick to Lua. Trust me. (As a software engineer with a 4-year degree and over 13 years experience, I think I know about that of which I speak.)
Unknown2010-07-31 16:18:34
QUOTE (Dysolis @ Jul 30 2010, 11:53 PM) <{POST_SNAPBACK}>
Well I think for me to get into programming I have to be somewhat into doing the tasks at hand because I was so clueless the last time I attempted C. I knew how to copy and past and see if that worked but as far as learning what parts of the code meant I had no idea to grasp the concept. I think I need to grab a book and stick to one language based on the recommendations you guys gave and I think I was told that Java or C was the easiest to start out with? If that's the case then maybe I should stick the C route anyway because I have two friends in real life that are trying to learn C anyway and hopefully I could master it to a point that id be able to make a decent system with C++ and compile it each time as needed. I was told that the newest language was C-sharp which is suppoused to be an improvement over the other two but im not sure if it's any harder or not. I think it's a toss up between java or C , C will let me make a system in the long run but java will not. Then again java is usefull with windows and I use windows a lot even though I really like mac but mac's are expensive hence i'm with windows. I'll probably give a few days to think about and i'll talk with my friends about it too, you guys have been a great help thanks so much.


C and C++ are not easy, and if you're just wanting to learn to code reflexes, I can't think of any reason why learning either of those would help you. If you're wanting to learn how to program in general, there would be more value, but once again, they are difficult languages, and there are others that would be better choices for a first programming language.

Lots of good suggestions already in this thread. The only twist I'm going to add is that more scripting-oriented languages and the patterns you use to write those can be significantly different from more object-oriented languages. It's not so much the syntax as the way of planning and writing your program.

So, Java, C#, VB.NET, C++ - all of those are kind of in the object oriented "family," whereas Python, Lua, VBScript, Java$cript are more in the scripting family. The two families share some syntax and concepts, but you'll find that, if you learn a language in one family, it's easier to learn other languages in that same family.

So, people who are good in Java usually have little trouble with C#, but they can be totally helpless in Java$cript.
Dysolis2010-07-31 20:12:45
I'm not really seeing python listed under software engineer but it's just the certificate program. I do see Colbol and Sql, C# is there too. I was thinking of starting out at C++ sense i'm new at programming. I Know it might take a long time to learn all of C++ but once i'm done with that I might move on to Lua.
Unknown2010-07-31 21:09:39
QUOTE (Dysolis @ Jul 31 2010, 03:12 PM) <{POST_SNAPBACK}>
I'm not really seeing python listed under software engineer but it's just the certificate program. I do see Colbol and Sql, C# is there too. I was thinking of starting out at C++ sense i'm new at programming. I Know it might take a long time to learn all of C++ but once i'm done with that I might move on to Lua.


Ok, just so you know, C++ is a very hard language and the marketability is somewhat narrow in comparison to other languages.

I'm a programmer by trade. It's not a good starter language. Personally, I'd recommend C#. You can get a free IDE, there are tons of free learning resources, you can get a certification, you can learn good object-oriented programming skills, and it's a very marketable language right now.