A light no more

A lighthouse shines afar atop a cliff.
Raschelle inside awaits the coming rain.
Inside the castle, though the walls are weak,
She sits, sure that together they'll sustain.

Clouds gather, heavy torrents, gusts of wind,
Bombard the wooden roof, and seep below.
In Rachel's fear, courage intervened,
Preparing for what weather may bestow.

And miles away, where showers came and went,
But never caused destruction in their way,
I saw the waining light and did lament:
"Raschelle, wherefore did run you hence, away?

"Why did you leave behind our sunny town,
Out for the abyss where two oceans meet,
Where, day or night, you could astray and drown,
And perish there amongst the fiery heat."

I cried this out, and saw the light no more,
The hurricane so strong, the lantern bent
And plummeted unto the rocky floor.
And all the structure in it's shadow went.

And you, Raschelle, there lie disdainly tossed,
From one sea to another 'till one take
The body of a life untimely lost
And bury it far down beneath the wake.

Soon will ascend the heavenly canoe
Yet no other light will shine so true,
Than yours, which flew away to raging seas
And there, amongst the waters, came to peace.

Interact.py and Worksheet.py

Following the release of SAGE 3.1, I have began to work on published worksheets. The first thing I wanted to add was a "delete" button, but upon reading the code found no logical place to put the code for it - the HTML code in notebook.py is undocumented and very disorganized. So, to learn my way around I decided to first reogranize a bit.

Here is the header for a worksheet that I published.

Here is the same header on my development branch.

I'm not sure if anyone else will like this new header, but at least there is a logical place for the delete button, both in the UI and in the code.

Summerland

Four more panoramas that I forgot about. These are from near Summerland campground on Mt. Rainier And one from past Glacier Basin trail North of Emmons Glacier. More pictures here.

Sliders and Selectors - HTML vs Javascript

In my earlier enhancement of sliders, I created a Javascript list of values for each slider, which would update while the slider is being manipulated. It worked very well at first, but then resulted in a problem: SAGE truncated the array when it was too big which resulted in a Javascript error and nothing worked. In this I responded to 2 patches: pruning the array of values and removing truncation, since other people were complaining about it as well.

Since removing the truncation, I was able to create selectors with a lot of values, say, 10000.

def _(a=[1..10000]):
But they loaded very slowly because the SAGE server was rendering 10000 lines of
<option value='n' >n</option>
What if the server instead returned more Javascript? Then the code would look like this:
var values=[1, 2, ..., 10000];
for(var i in values)
    //code to generate a select option
Which means a lot less text being generated by the server. Of course, the optimal return is
for(var i=1; i<=10000; i+=1)
    //code to generate a select option
But this involves detecting the range which may or may not be possible depending on the underlying structure.