x2sh - booster script: correction, please USE THIS!

George Makrydakis gmakmail at gmail.com
Sun Feb 19 17:20:42 PST 2006


Dear George B,

I fixed some errors in the previous script (mostly counter variables), and 
rearranged both genXML + x2sh script. I am using _ALL_ the chapters, even the 
ones that do not contain <userinput> </userinput> tags, mainly because of error 
testing (I am also NOT limiting this to extracting bash commands, but 
documentation too...). Execution time is not the issue until EVERYTHING is bug - 
free, then I optimize cutting down the chapter list for example. For 
demonstration purposes the scripts are posted as ideas so that you may judge / 
point towards the unseen to me direction! The idea here is that you create an 
XML file out of the entirety of the book into an array and then feed that to the 
x2sh parser which seems to be "slower" but is completely "uninformed" and can 
process profiles, entity files, dtd, xsl, ecc. Combining say a profile file into 
x2sh and then use variables out of it to do genXML - like parsing, well you get 
the idea!

The fact that this "booster" script cuts down parsing time by a _factor_ of 60 
(read my previous post on this) is done mainly because it locates itself in 
extracting the <userinput> significant part... So when the resulting file is fed 
to x2sh the processing time is sliced by _60_ times( what took 40 min and nearly 
40000 array entries for the plain x2sh, with the booster script takes 40 - 50 
sec, and a LOT less array entries, so algos work faster)!

Anyway i have spent the time revising the entire structure of the scripts so 
far. Yes inline parsing is coming, you guessed right. Right now i am trying to 
figure out a way on how to fuse everything together minimizing the impact on 
bash variable dereferencing, and also minimize the number of array entries 
"dynamically" - every operation that takes place alters topography in the arrays 
so that they become smaller once things that have been processed get eliminated 
from them - this way I limit O(n) - like phenomena.

The current work is also focused on finishing up XPointer/XPath support by 
fusing genXML + x2sh with stack like structures aiding in dereferencing 
necessary entries fast. As you understand, since bash gives some rope to hang, 
instead of posting buggy scripts, I prefered to take a couple of days and see 
where this goes. Since I need time to make XPointer/Xpath fully working and bug 
free (for the time being it skips some lines... have to figure out why).

What you are going to be seeing very soon is the genXML booster debugged and 
fully working (and yes it is NOT limited to userinput anymore, it can process 
everything and even lousy syntax!) fused with the debugged x2sh version. 
Processing times are not increasing but decreasing! :)

In a few words, it is getting closer by the minute, and to think that a week 
ago, I thought too that bash could not be up to this ;)

Tomorrow is posting day (most likely), better look after 18:00 GMT

Thanks again

George Makrydakis

gmak


PS: how do you get rid of spam from the mailing list?




More information about the alfs-discuss mailing list