AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

code validation on code-sections in Forum

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Tuncay



Joined: 07 Nov 2006
Posts: 383
Location: Berlin

PostPosted: Fri Mar 21, 2008 9:04 pm    Post subject: code validation on code-sections in Forum Reply with quote

Here is a wish to the forum, not to AutoHotkey itself.

I think, it would make sense to validate the script code in code sections with JavaScript. It does not need to be conform with latest Ahk release, just simple checks.

Sure, it is not that easy to write such a JavaScript-Script.

At least checking simply the syntax is enough for most cases. If a code seems to be not correct, there could be a red advice that the code may actually not valid.
Back to top
View user's profile Send private message Send e-mail
Oberon



Joined: 18 Feb 2008
Posts: 458

PostPosted: Fri Mar 21, 2008 9:32 pm    Post subject: Re: code validation on code-sections in Forum Reply with quote

Tuncay wrote:
it would make sense to validate the script code in code sections with JavaScript
Why?
Back to top
View user's profile Send private message
Tuncay



Joined: 07 Nov 2006
Posts: 383
Location: Berlin

PostPosted: Fri Mar 21, 2008 10:12 pm    Post subject: Reply with quote

That would catch some errors early and help us finding simple errors. If someone provide us code in forum, just to show how it is work or a script, then we have at least code that is minimal validating.
Back to top
View user's profile Send private message Send e-mail
Oberon



Joined: 18 Feb 2008
Posts: 458

PostPosted: Fri Mar 21, 2008 10:34 pm    Post subject: Reply with quote

It's better if people test the code before posting it. AutoHotkey has the most comprehensive .ahk script validation available.
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 487
Location: MN, USA

PostPosted: Sat Mar 22, 2008 6:06 am    Post subject: Reply with quote

Oberon wrote:
It's better if people test the code before posting it.
It's also better if people eat a healthy diet, get regular exercise, and obey all traffic laws; but that doesn't prevent obesity and road rage. Laughing

Oberon wrote:
AutoHotkey has the most comprehensive .ahk script validation available.
Sounds like an excellent reason to port it to the forum. Wink


P.S. Normally I don't write replies with sarcastic undertones such as this, but it's been a bad day for the Help forum: lots of spam, laziness, and people looking for handouts. The noble ethos of "Trust in the User" has taken a beating lately. Neutral

P.P.S. Since I don't often write the word "obesity," I checked it on my thesaurus (WordWeb) which has only 1 definition: "More than average fatness." For some reason, I find that extremely funny, and I'm truly laughing out loud as I type this! Laughing Razz
_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
Oberon



Joined: 18 Feb 2008
Posts: 458

PostPosted: Sat Mar 22, 2008 11:10 am    Post subject: Reply with quote

jaco0646 wrote:
Sounds like an excellent reason to port it to the forum.
Do you understand the implications? How many hours of R&D it would take a person competent in javascript to fully analyse the ahk syntax and write a complete cross-browser compatible validator. On some threads there are numerous (>10) codeblocks so parsing them all would consume large amounts of memory, crash browsers on slower computers and add seconds to the loading time on newer pcs. My firefox already consumes 200mb on average on my p4 3.2ghz 3gb ddr2 system. I predict a script of this nature will use another 20-50mb per page; on a usual session that would sum up to 100-150mb if caching/snapbacks are enabled. Don't forget codeblocks are also used for other languages and less often ascii art, so visitors would be welcome with unexpected error messages when they least expect it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group