|
|
|
|
|
August 12th, 2004, 11:19 PM
|
|
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: SE4 Templatizer Ready for Download!
New Version of the (text-based) Templatizer ready - now with caching, so it's much faster!
Hmm, when will I ever get back to work on that graphical modding tool?
__________________
The Ed draws near! What dost thou deaux?
|
August 31st, 2004, 01:18 AM
|
|
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE4 Templatizer Ready for Download!
What's happening with the graphical shell?
|
October 18th, 2004, 01:23 PM
|
|
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Oops, sorry, must have lost track of your post, Ruatha... I haven't done anything on a graphical shell yet, but what I am doing is completely rewriting the program to make it faster and more powerful. See, right now, it's horribly inefficient at parsing the text, because basically if you have 5 + (2 * 3), it searches for the outermost operation (the plus), and splits it up into two expressions, 5 and 2 * 3. Then it takes the 5 and says "oh, that's a number", and stores it away. The 2 * 3 then gets parsed AGAIN (even though it was already searched through to find the plus) and split into the 2 and 3. Then, those numbers are multiplied to get 6, and then 5 is added to get 11. This may not seem to inefficient, but imagine a long expression with many subexpressions, such as sin(pi * (2 + atan(6) * e) - 1?
So what I WANT to do is do all the parsing at once, only once, and THEN do the evaluation. This will involve something I've come up with called "functional notation" where every operation, constant, or variable is represented as a function, so for instance 5 + 2 would be represented as +(5,2), and sin(pi / 3) would be represented as sin(/(pi(),3)). Actually functional notation has probably been invented already, but I thought of it independently, so there
Which leads me into the main reason for this post: I noticed that using functional notation, there could only be one function or operator with the same name and "arity" (which is the number of operands). This reminds me a LOT of a programming language called Erlang, because there was the same restriction on Erlang's functions, seeing as Erlang was a weakly-typed language. SO... what I'm thinking of doing is, while I'm already rewriting everything, adding a *scripting language* to my expression evaluator, so that you can define your own functions without having to compile any C# code. Basically, I'd have only the most rudimentary functions and operators predefined, and the rest would be called through script. I know, you say scripting Languages are slow, but C# has this nifty feature which lets you compile and execute code "on the fly", so I could compile the scripts whenever the program is run (don't worry, C# code compiles fast ), and then execute them as compiled code in memory!
SO... what my question is, is what would be the preferred language of the Users of this program to base the scripting language on? The most natural choice for me would be C#, because that's what I use, but VB would work as well, since the on-the-fly compiler can work with either language. But since I'll probably have to write my own language parser (to allow only harmless instructions like "return x+y" and "if p then loop until q" and nothing like "delete c:\windows\*.*" ), I could just as well base it on some other language, like Python or Erlang... problem is, I don't know much ABOUT Python or Erlang...
So, anyone have a preference?
__________________
The Ed draws near! What dost thou deaux?
|
October 18th, 2004, 02:39 PM
|
|
Major
|
|
Join Date: Jan 2004
Location: Taganrog, Russia
Posts: 1,087
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE4 Templatizer Ready for Download!
I'd prefere native c syntax. It'll make your work much easier. Just don't forget to rewrite documentation
|
October 18th, 2004, 02:47 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SE4 Templatizer Ready for Download!
VB is not an option... Stick to real Languages. Python would be a very good choice. Python has similar syntax to C/C++.
|
October 18th, 2004, 03:03 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Quote:
Imperator Fyron said:
VB is not an option... Stick to real Languages. Python would be a very good choice. Python has similar syntax to C/C++.
|
Really? VB not an option for a scripting language? Of a game that is Windows restricted? You would rather have scripters in C syntax instead of basic?
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
October 18th, 2004, 04:20 PM
|
|
Major
|
|
Join Date: Jan 2004
Location: Taganrog, Russia
Posts: 1,087
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: SE4 Templatizer Ready for Download!
The best scripting language is the language you know best of all. It really doesn't matter VBS, JScript, python or perl or pseudoC script.
Probably VBS or JScript are more convenient than others, because of WSH.
Personaly, I don't like VBS and VB (in general) too - many inherent flaws and bad design. So my next vote will go to JScript.
|
October 18th, 2004, 04:25 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Quote:
Gandalf Parker said:
Quote:
Imperator Fyron said:
VB is not an option... Stick to real Languages. Python would be a very good choice. Python has similar syntax to C/C++.
|
Really? VB not an option for a scripting language? Of a game that is Windows restricted? You would rather have scripters in C syntax instead of basic?
|
You can easily install other scripting language interpreters on Windows, including other "basic" type Languages... it is just a few clicks away. VB is no good.
|
October 18th, 2004, 06:35 PM
|
|
General
|
|
Join Date: Apr 2001
Location: Cincinnati, Ohio, USA
Posts: 4,547
Thanks: 1
Thanked 7 Times in 5 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Hmm... a divided opinion... well, I could always have functions loaded as modules, and let the user choose between VB and C#, and screw the security considerations - if you're dumb enough to run a malicious program when the source is sitting right in front of you, it's your fault!
__________________
The Ed draws near! What dost thou deaux?
|
October 18th, 2004, 08:22 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: SE4 Templatizer Ready for Download!
Quote:
Imperator Fyron said:You can easily install other scripting language interpreters on Windows, including other "basic" type Languages... it is just a few clicks away. VB is no good.
|
That wasnt what I meant. Not that Im big on "run this, but of course you will have to go get this first" type of programs. I was just totally disagreeing with a blanket sheep statement like "VB is no good". Everything has its pros and cons. VB doesnt have many but as a beginners scripting language in fairly english usage that would seem to be what its for.
But dont mind me, I wouldnt prefer VB either. I prefer to do all my coding on linux then run it in windows
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|