Graal Forums  

Go Back   Graal Forums > Search Forums
FAQ Members List Calendar Today's Posts

Showing results 176 to 200 of 499
Search took 0.01 seconds; generated 57 minute(s) ago.
Search: Posts Made By: Tolnaftate2004
Forum: NPC Scripting 04-09-2008, 01:06 AM
Replies: 37
Views: 6,862
Posted By Tolnaftate2004
This doesn't work.

This doesn't work.
Forum: Code Gallery 04-03-2008, 03:24 AM
Replies: 24
Views: 7,234
Posted By Tolnaftate2004
Just released a new version, one is for debug...

Just released a new version, one is for debug ("unstable"), and the other just has the functions to do the work. This release can catch all variables prefixes excluding temp.-. I fixed some problems...
Forum: New Scripting Engine (GS2) 04-02-2008, 04:41 AM
Replies: 12
Views: 2,165
Posted By Tolnaftate2004
There are no classes in C. One down!

There are no classes in C.
One down!
Forum: Future Improvements 04-01-2008, 01:30 AM
Replies: 23
Views: 3,232
Posted By Tolnaftate2004
Good guess, it actually makes a pointer to a...

Good guess, it actually makes a pointer to a variable, i.e., linking two variables to the same address.
Forum: Code Gallery 03-30-2008, 02:42 AM
Replies: 32
Views: 7,097
Posted By Tolnaftate2004
This is preferred. All if statements are...

This is preferred. All if statements are evaluating the condition and then comparing it to 0, so bool == true/false is in fact doing twice as many checks: (bool == true/false) != false.
Forum: Code Gallery 03-28-2008, 09:39 PM
Replies: 6
Views: 2,213
Posted By Tolnaftate2004
I would also like to point out that you're using...

I would also like to point out that you're using temp.log before you define it (data.transactions.add(log); and some lines down it's defined).
Forum: Code Gallery 03-28-2008, 08:26 PM
Replies: 6
Views: 2,213
Posted By Tolnaftate2004
obj.substring(0,1) is more succinctly put as...

obj.substring(0,1) is more succinctly put as obj.charat(0).
Forum: NPC Scripting 03-28-2008, 08:20 PM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Give us pseudocode, then.

Give us pseudocode, then.
Forum: NPC Scripting 03-27-2008, 11:21 PM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Now that's just uncalled for. :cry:

Now that's just uncalled for. :cry:
Forum: NPC Scripting 03-27-2008, 09:44 PM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Yes, this is why I did not bother calculating the...

Yes, this is why I did not bother calculating the loops in your script. :p

e: Just made the realization that obj.substring() also contains a hidden for loop. Which makes all big-O calculations I...
Forum: NPC Scripting 03-27-2008, 07:47 AM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
The hard-coded for-loop is some multiple constant...

The hard-coded for-loop is some multiple constant faster than the graal script for-loop. This does not change the big-O.

If I pass a large enough string, an O(n^2) algorithm will always be faster...
Forum: NPC Scripting 03-27-2008, 05:34 AM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Do you want me to rank them or tell you how...

Do you want me to rank them or tell you how efficient I think they are? x-x



The theory behind big-O notation is that it should be an accurate measure of code efficiency regardless of language...
Forum: NPC Scripting 03-27-2008, 02:04 AM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
This has always been the point of the Programming...

This has always been the point of the Programming Exercises. Perhaps you need to think differently to solve this problem by better methods, rather than the obvious...

@Chris, you started your...
Forum: Code Gallery 03-26-2008, 10:35 PM
Replies: 23
Views: 6,460
Posted By Tolnaftate2004
{ 35, 23, "+", 93, 23, "*", "+" } while...

{ 35, 23, "+", 93, 23, "*", "+" }


while true
find subarray in array like {v1,v2,op} or break
replace {v1,v2,op} with v1 op v2
end
Forum: NPC Scripting 03-26-2008, 09:49 PM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
This is big O notation, it is how we measure the...

This is big O notation, it is how we measure the efficiency of algorithms, without being hardware-specific. The O stands for order, which can take 2 meanings:
In mathematics, O(f) is for all terms...
Forum: Code Gallery 03-26-2008, 07:38 PM
Replies: 23
Views: 6,460
Posted By Tolnaftate2004
Post-fixed is also called RPN or Reverse Polish...

Post-fixed is also called RPN or Reverse Polish Notation. ;)
HP graphing calculators use this notation.
Forum: NPC Scripting 03-26-2008, 07:26 PM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Yours is still O(n³). e: The new standard...

Yours is still O(n³).

e: The new standard set by DrakilorP2P, O(n²)
@Ziro: Will keep that in mind. ;)
Forum: NPC Scripting 03-26-2008, 12:11 PM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
A solid color does not a pattern make.

A solid color does not a pattern make.
Forum: Code Gallery 03-26-2008, 09:49 AM
Replies: 23
Views: 6,460
Posted By Tolnaftate2004
Post-fixed actually looks like "5,3,+" for...

Post-fixed actually looks like "5,3,+" for in-fixed "5+3," so it will work fine with larger numbers.
Forum: NPC Scripting 03-26-2008, 09:13 AM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
I have updated the guidelines slightly.

I have updated the guidelines slightly.
Forum: NPC Scripting 03-26-2008, 07:34 AM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Nooooooot quite. This is closer (:)),...

Nooooooot quite.



This is closer (:)), but no doubt we can do better. ~O(n³)
Forum: NPC Scripting 03-26-2008, 02:44 AM
Replies: 55
Views: 83,106
Posted By Tolnaftate2004
Programming Exercise #3

In a string of N characters, calculate the frequencies of repeated patterns, e.g., given "AUGCCCGTAUACGTA", one would get CGTA:2, CGT:2, GTA:2, CG:2, GT:2, TA:2, AU:2, CC:2. You do not need to...
Forum: Code Gallery 03-26-2008, 01:32 AM
Replies: 23
Views: 6,460
Posted By Tolnaftate2004
Yes, noticed that, by fluke, 3+-2 worked fine. ;)

Yes, noticed that, by fluke, 3+-2 worked fine. ;)
Forum: Code Gallery 03-25-2008, 11:38 PM
Replies: 23
Views: 6,460
Posted By Tolnaftate2004
this.evl("(3*(1+2))*2"); Should be 18. Gives...

this.evl("(3*(1+2))*2");
Should be 18.
Gives 10 ((3*1+2)*2).
this.evl("3--2");
Should be 5.
Gives 1.
this.evl("3-(-2.2)");
Should be 5.2.
Gives -0.8.
Forum: Code Gallery 03-24-2008, 11:52 PM
Replies: 24
Views: 7,234
Posted By Tolnaftate2004
I have updated the script, it now supports...

I have updated the script, it now supports strings. Next I hope to tackle arrays, then variables should follow, should be quite the challenge. :)
@Zero: Stop being lazy. :p
Showing results 176 to 200 of 499

 
Forum Jump

All times are GMT +2. The time now is 08:35 PM.


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