Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 04-10-2009, 02:30 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
*Simmering*
__________________
Reply With Quote
  #17  
Old 04-10-2009, 03:12 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Great new addition. And while we are talking about great new addition, could you please add Lua as a secondary, optional scripting language to Graal? I know this would be time consuming and lots of work/effort, but it would be so much worth it. Torque Engine Script (or whatever it is called) is a pile of poo compared to Lua. Lua is rated the fasted scripting language availabe.
__________________
Reply With Quote
  #18  
Old 04-10-2009, 03:35 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Crow View Post
Great new addition. And while we are talking about great new addition, could you please add Lua as a secondary, optional scripting language to Graal? I know this would be time consuming and lots of work/effort, but it would be so much worth it. Torque Engine Script (or whatever it is called) is a pile of poo compared to Lua. Lua is rated the fasted scripting language availabe.
Graal's scripting language was made by Stefan, it has nothing to do with Torque (other than the special GUI control syntax), it is merely compliant with some standard that I forget the name of.

Lua would be an improvement because it is a stable and well developed, and compact language. Of course we can't simply use Lua as it is because with Graal, security needs to be considered so Stefan would have to modify Lua to add security measures before he could use it.

It's too much work at this point.

I'm also obligated to say that I think Stackless Python is a better choice than Lua, but would be harder to modify for Graal-level security I think.
__________________
Reply With Quote
  #19  
Old 04-10-2009, 04:58 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Inverness View Post
Graal's scripting language was made by Stefan, it has nothing to do with Torque (other than the special GUI control syntax), it is merely compliant with some standard that I forget the name of.

Lua would be an improvement because it is a stable and well developed, and compact language. Of course we can't simply use Lua as it is because with Graal, security needs to be considered so Stefan would have to modify Lua to add security measures before he could use it.

It's too much work at this point.

I'm also obligated to say that I think Stackless Python is a better choice than Lua, but would be harder to modify for Graal-level security I think.
As far as I know, GScript2 is Torque Engine Script with quite a lot of Graal modifications to it. Correct me if I'm wrong though.
__________________
Reply With Quote
  #20  
Old 04-10-2009, 05:01 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Crow View Post
As far as I know, GScript2 is Torque Engine Script with quite a lot of Graal modifications to it. Correct me if I'm wrong though.
You are wrong, GScript2 is GScript2, its syntax is just made to conform to a standard.
__________________
Reply With Quote
  #21  
Old 04-10-2009, 05:07 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Inverness View Post
You are wrong, GScript2 is GScript2, its syntax is just made to conform to a standard.
Inverness is correct. (http://graal.net/index.php/TorqueScript) GS2 just borrows from its syntax.

And no, SQLite has not been added to Valikorlia... and 2 database backups per day is a bit unnecessary.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #22  
Old 04-10-2009, 06:47 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I see. Good to know, thanks.
__________________
Reply With Quote
  #23  
Old 04-11-2009, 01:48 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by LoneAngelIbesu View Post
And no, SQLite has not been added to Valikorlia... and 2 database backups per day is a bit unnecessary.
Backups as a whole seem to be unnecessary to you, since you haven't made any backups yourself . Though, I think once per day is a good interval.
__________________
Reply With Quote
  #24  
Old 04-11-2009, 05:10 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Inverness View Post
Backups as a whole seem to be unnecessary to you, since you haven't made any backups yourself . Though, I think once per day is a good interval.
No need to get snippy, Inverness. I don't back anything up because downloading files more than 1mb crashes my RC, 9 times out of 10.

In the rest of the scripting world, the number of times you back up data is proportionate to when the most changes occur (if data is updated weekly, there's no need to make daily backups), and sometimes how likely it is that you will need to restore that data (if you're not concerned with frequent server crashes). The only times Valikorlia has ever needed to restore back ups are when a staff member deletes everything in a hissy fit, and when the NPC server crashes. The first one happens more often than the latter, and the latter is only a problem because we're not using SQLite databases.

If you want to back-up all the information twice a day, or once a day, go ahead. I don't see the need for such paranoia, and am fine with weekly backups.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #25  
Old 04-11-2009, 05:39 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by LoneAngelIbesu View Post
No need to get snippy, Inverness. I don't back anything up because downloading files more than 1mb crashes my RC, 9 times out of 10.
Excuses, I sure haven't heard about this problem of yours so I guess you didn't think it important enough to ask about.
Quote:
Originally Posted by LoneAngelIbesu View Post
If you want to back-up all the information twice a day, or once a day, go ahead. I don't see the need for such paranoia, and am fine with weekly backups.
Whether or not you are fine with weekly backups is irrelevant. You are staff and can easily manipulate your inventory, players can't and it's much easier to back up their inventories every day than to traverse logs to find out how their inventory has changed since the last backup in the event of a problem.
__________________
Reply With Quote
  #26  
Old 04-11-2009, 05:47 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by Inverness View Post
Excuses, I sure haven't heard about this problem of yours so I guess you didn't think it important enough to ask about.
What can you do about it?
Quote:
Originally Posted by Inverness View Post
Whether or not you are fine with weekly backups is irrelevant. You are staff and can easily manipulate your inventory, players can't and it's much easier to back up their inventories every day than to traverse logs to find out how their inventory has changed since the last backup in the event of a problem.
The point I made was that the likelihood of that being anything close to common occurrence is little to none. Let me break it down even further: the main reason why the NPC server has crashed is because of errors when using the INI file system.

Like I said, though. If you want back everything up that often, go ahead. I'm sure you could even script something that would do it automatically; some GS2 equivalent to a cron job.

EDIT: Could the new NPC server please be put on Valikorlia, already?
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan

Last edited by LoneAngelIbesu; 04-11-2009 at 06:17 PM..
Reply With Quote
  #27  
Old 04-11-2009, 08:07 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok the new npcserver has been uploaded to all machines, need to be restarted manually though.
Reply With Quote
  #28  
Old 04-11-2009, 08:35 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Stefan View Post
Ok the new npcserver has been uploaded to all machines, need to be restarted manually though.
Ok, first, what folder is the database file in? I would like if the one on Valikorlia could be placed somewhere visible to RC so it can be backed up easily. I don't feel too comfortable using it otherwise considering everything could be deleted with little effort.

Second, if the table has a column named "name" or like some other static variable then the row object has two variables named "name" in it, I was thinking that when setting the variables in the row object, if it conflicts with static variables then append an underscore.
__________________

Last edited by Inverness; 04-11-2009 at 08:48 PM..
Reply With Quote
  #29  
Old 04-11-2009, 09:50 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The database is databases/main.db
Use "as" for renaming columns of the result. You can also access the result as array, like rows[][]
Reply With Quote
  #30  
Old 04-12-2009, 08:20 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Stefan View Post
The database is databases/main.db
Use "as" for renaming columns of the result. You can also access the result as array, like rows[][]
Ah good, thanks.

Could you perhaps make a function for converting arrays into a format suitable for SQL statements? Basically making it into a large string, using single quotes around strings, and escaping the single quotes in the string. I figure that would be better if not done by script.

And, I'd also like a server option for reporting SQLite errors and such on RC.

This is the equivalent script:
PHP Code:
public function sqlarray(array) {
  
temp.out "";
  
temp.sz = array.size();
  
  if (
temp.sz 1)
    return 
"";
  if (
temp.array[0].type() == 0)
    
temp.out @= temp.array[0];
  else
    
temp.out @= this.sqlescape(temp.array[0]);
  for (
temp.1temp.temp.array.size(); temp.++) {
    if (
temp.array[i].type() == 0)
      
temp.out @= "," temp.array[i];
    else
      
temp.out @= "," this.sqlescape(temp.array[i]);
  }
  return 
temp.out;
}
public function 
sqlescape(rstr) {
  
temp.temp.rstr.positions("'");
  if (
temp.p.size() > 0)
    for (
temp.temp.p.size() - 1temp.> -1temp.--)
      
temp.rstr replacesubstring(temp.rstrtemp.p[temp.e], 1"''");
  return 
"'" temp.rstr "'";
}
// replacesubstring from util_string
public function replacesubstring(stringpositionlengthnewstring) {
  if (
temp.position 0) {
    return;
  }
  return 
temp.string.substring(0temp.position) @
         
temp.newstring @
         
temp.string.substring(temp.position temp.length, -1);

__________________

Last edited by Inverness; 04-12-2009 at 09:33 AM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.