| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| Now that 204 final is out..... https://mail.black-squirrel.com/viewtopic.php?f=15&t=18483 |
Page 1 of 1 |
| Author: | Maniac [ Wed Jan 24, 2007 2:44 am ] |
| Post subject: | |
Probably will result in a flame war but what the hell.... What would you like to see in 2.04+? What can you contribute to the community, beta testers need not apply. (j/k) all This is an open source project now anyone can grab the source and twiddle with things that they would like to see implemented or see how bad a programmer Elder^H^H^H or Xide^H^H^H really is. Not really .... but if you have any understanding of how programs work or how scripts work your input will be valued. IMHO one of the things that could be improved/added is I/O Delphi is slow on I/O and Elder has provided a major speedup with the old ReadToArray subroutine my only problem with that is that no other previously compiled scripts will be able to take advantage of the new commands unless recompiled and updated. I had a I would call it a beta solution that did close to the same thing but suffered from a slight(imho) possibility that what the script was trying to read could be changed. No disrespect to elder for his superb work on twx but what I was looking for was to say that from what I saw older scripts would read a file into an array using a loop. (because the old way was the only way to do it.) Now from a never a professional programmer the way the language forced you to do it was open file.... read line $loop close file .... then read line $loop and....read line $loop+1 and so forth so you can see it was opening and closing the file say for a 20K universe about 20K times. Elders solution was to open the file once, read all data then close file which he then transfered into an array so the speedup is obvious. Only problem with Elders solution was that old scripts would not know about newer commands and could not partake of this improvement. I proposed and had a alpha+/beta version that would on first call open file set a flag variable that said hey I already have the data so no need to read or in old case re-read the data therefore allowing old scripts to enjoy the benefits of the improvements that elder implemented while not having to be re-written and or recompiled. Unfortunately Elder pointed out that my "hack" had a nasty habit of if file was changed it still would use stale data so it was not implemented in final, but stay tuned there is a possibility of it being in a future version. |
|
| Author: | Parrothead [ Wed Jan 24, 2007 3:37 am ] |
| Post subject: | |
And why are older scripts an issue? What old scripts do you value that cant be replicated fresh using newer faster commands? Why use a file if it can be avioded? Can you be more specific ? |
|
| Author: | ElderProphet [ Wed Jan 24, 2007 3:42 am ] |
| Post subject: | |
Let me point out that ye ole Studly Maniac held my hand the first few times I opened and compiled the TWX Proxy 2.03 source. Many thanks for that bro. I'd love to see the read command enhanced. I probably understand Delphi and TWX well enough to do this without too much of a hassle. Give me a shout in a couple weeks (I'm going to take a few weeks off <g> and let's see what we can come up with. I did upload the source to Grimy as promised, so go have a peak at how bad I stink as a Delphi programmer +EP+ |
|
| Author: | ElderProphet [ Wed Jan 24, 2007 3:49 am ] |
| Post subject: | |
Parrothead, it's more of a logic problem that he and I worked on many months ago, never really finding an ideal solution. I'm sure there is one, it simply eluded us. When I script, I always read files to an array, so readToArray was not only my answer to the speed issue, but it saved me a few steps. And did I mention it was faster I can readToArray a 20k line file in .032 secs... roughly. See what happens when you try to read a 20k line file to an array using read. My solution would probably be to alter the read command to populate an internal string list, a variable to hold the path and file name, and a variable to hold the file's TimeStamp when it was read. A subsequent read would check the path and timestamp, and if they are the same, pull from the previously created and populated string list. +EP+ |
|
| Author: | RexxCrow [ Wed Jan 24, 2007 5:47 am ] |
| Post subject: | |
Heck yea, file rewriting and ANSI code triggers are my top two suggestions; I have a theoretical idea for a new type of BOT that will raise the standards of all scripts like never before imagined! ...muhahahahahaauauahahaa, muahaahauaaamauaahaha, muaahahahamuaauaaaaaahaa, ahaahaaaahahaa, ahahahahahahahahahahaaaaa, one hundred million dollars, hahahahaaa, hahaaha, ahahaha, haaha, haha, haa, aha uaha, yea, well alright then. |
|
| Author: | LoneStar [ Wed Jan 24, 2007 9:36 am ] |
| Post subject: | |
ElderProphet wrote: ... I did upload the source to Grimy as promised, so go have a peak at how bad I stink as a Delphi programmer +EP+ Thanks EP. Reading source code, to me, is like reading a good novel. For real. If I had a compiler and the time, I'd write a cts disassembler.. hehe.. fortunately -or unfortunately- I'm just too busy making scripts. Thanks again for all your hard work! Lone |
|
| Author: | Singularity [ Wed Jan 24, 2007 2:22 pm ] |
| Post subject: | |
Yea, EP. If all you need to prevent is opening/closing the file 10 bajillion times just timestamp your last read and write attempt. If the last read attempt was too long ago, force a re-open/re-read. Also check if you've written since then, if so, do same. |
|
| Author: | Big D [ Wed Jan 24, 2007 2:37 pm ] |
| Post subject: | |
Singularity wrote: Yea, EP. If all you need to prevent is opening/closing the file 10 bajillion times just timestamp your last read and write attempt. If the last read attempt was too long ago, force a re-open/re-read. Also check if you've written since then, if so, do same. I'm not saying this is not the way to go, but you really have to watch how you handle arrays as when they aren't implemented right, they an cause memory leaks and then system crashes. Xide ran into that in a couple of versions. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|