User talk:PanSola

 Welcome to the talk page of a devout follower of Lyssa!

= This user is an Admin = If you require the attention of an administrator, you can leave a message on the Admin noticeboard, which I watch. If you want to definitely make sure I be involved in the issue, leave a note here pointing to the discussion on the Admin Noticeboard.

= Archives =
 * Past mistakes are moved into the /MistakeArchive
 * Other closed issues are moved to /Archive/, /Archive2/, /Archive3/, /Archive4/, /Archive5/, /Archive6/, /Archive7/, /Archive8/, /Archive9/

= Messages =

Sortable QR
that is by far the coolest thing i have seen all week. --Honorable Sarah 00:54, 12 April 2007 (CDT)


 * And I'm surprised nobody has done it on GuildWiki yet, considering we got the Javascript to do it ages ago (before I came back). There's a minor issue with the current version of the script though, making the spacing around the sort button ugly )-:  -PanSola 00:56, 12 April 2007 (CDT)


 * The whole thing also looks better in Chinese, because characters naturally go in the vertical direction. http://guildwars.wikia.com/wiki/MesmerSkillDescriptionChart  Sadly, most of the data is out of date there, as I don't have the energy to keep it updated. -PanSola 00:58, 12 April 2007 (CDT)

Is there anyway we could get a stable sorting algorithm? With such an algo, it would be possible to do multiple level sorts by just doing them one after the other (for example: sorting by attribute and name -> sort by name, then attribute). From the tests I did, this seems to not work right now, which would mean that it is using an unstable sorting algorithm. I couldn't find the piece of javascript implementation we use, but if you can point me to it, I could modify it into a stable sort. --Theeth (talk)   12:55, 14 April 2007 (CDT)
 * Yes it's possible, it's on my to-do list, but it's much slower so I'm thinking of making it an "advanced" option that is not enabled by default. The javascript I am using right now (which isn't the one you guys see) is User:PanSola/sortable_mod.js.  -PanSola 16:06, 14 April 2007 (CDT)

Try this instead of shaker sort. It's a swapless stable quicksort with non-random pivot. That should fix the speed issue of the sorting. (no guaranty on the errorlessness of the code, it's adapted from some C code I have lying around, my JS skills might be a bit rusty). --Theeth (talk)   16:43, 14 April 2007 (CDT)

static void qsort_data(list, comp_func, head, tail) { pivot = list[head]; ihead = head; itail = tail;

while (head < tail) {		while (comp_func(list[tail], pivot) >= 0 && head < tail) tail--;

if (head != tail) {			list[head] = list[tail] head++; }

while (comp_func(list[head], pivot) <= 0 && head < tail) head++;

if (head != tail) {			list[tail] = list[head] tail--; }	}

list[head] = pivot; if (ihead < head) { qsort_data(t, ihead, head-1); }	if (itail > head) { qsort_data(t, head+1, itail); } }

function qsort(list, comp_func) { qsort_data(list, comp_func, 0, list.length - 1); }


 * I thought quicksort with non-random pivot, by definition, has terrible worse-case performances. O(n^2). -PanSola 17:48, 14 April 2007 (CDT)
 * With presorted list, yes, it's O(n^2) operations and O(n) storage (recursion) whereas shaker sort's worst case is O(n^2) operations and O(1) storage, but average cases are much better with quicksort than shaker. Moreover, the non-random pivot is rather easy to fix, I just didn't want to hunt around for JS randomize functions. --Theeth (talk)   18:33, 14 April 2007 (CDT)

I've been working with some sortable tables in my User space when I came across the work you've been doing. One thing I have been trying unsuccessfully to implement is marking specific columns as non-sortable. I saw that you have a template/function call { {weapon qr top}} that implements this but I can not for the life of me find the article to look at the implementation. All attempts to find weapon qr top return no results. Where can I find this article? I also read in one of the posts that you have a work-around for the current javascript stripping out template/function calls from header rows (my second problem). Would you also let me know where to find information on that fix as well? Thanks! --  Glamtre  (Talk) 13:55, 16 April 2007 (CDT)


 * Template:weapon qr top sets certain header cells to be class="unsortable", which then gets processed by the javascript MediaWiki:sortable_mod.js. It's not exactly documented, but hopefully the code isn't too hard to understand.  Let me know if you have specific questions.  As for the tag-stripping, it's a very tiny modification used in sortable_mod.js also.  The original behavior is in, but my sortable_mod.js completely overrides it. -PanSola 02:07, 17 April 2007 (CDT)


 * Thanks for the info. I totally forgot about the Template namespace and I REALLY hate wiki search!  Are there any plans for your updated code to replace the installed class="sortable" code?  I am happy to implement your code in my namespace for testing, but if it works one way for me and other for someone else I consider that a bad situation. --  Glamtre  [[Image:Axe-icon-right.png]] (Talk) 12:41, 20 April 2007 (CDT)


 * I've been working on it. But IE compatibility seems to be a very weird issue. -User:PanSola (talk to the [[Image:follower of Lyssa.png]]) 18:45, 20 April 2007 (CDT)

Forgive my ignorance
but what's up with the /Characters/Characters thingie? -->Suicidal Tendencie 23:18, 16 January 2009 (UTC)
 * I don't quite remember myself. Something that has to do with template naming/calling probably.  -User:PanSola (talk to the [[Image:follower of Lyssa.png]]) 23:44, 16 January 2009 (UTC)