>> Things I don't like:
>>
>> * the javascript is really hackish overall, but two things really
>> caught my attention:
>
> I'm a self-taught javascript hacker -- I learned how to hack javascript long 
> before browsers started adhering to standards, and it shows.  If William 
> writes hackish javascript, it's probably because he was going by my example.
>
> Also -- I've been supporting Opera 8.  jQuery doesn't work there, because 
> it's buggy and just behaves strangely -- many of the hacks you see can be 
> blamed on Opera 8.  Now that Opera 9 is out and jQuery supports it, I am 
> fully behind a complete transition to jQuery.


You did an amazing work. I didn't realize it was already in 2005. It
must have been terrible to make sure it works everywhere.

Fortunately, today there seems to be good javascript libraries for
everything and they seem to work pretty well almost everywhere.

>
>>  a) the keyboard handling is horrific, why not to use some standard
>> library for that, that works across all browsers
>
> As noted, I did this before jQuery existed -- I searched hard and long before 
> deciding to write my own keyboard handler, and every "clean" approach I took 
> failed in a browser or two -- the "horrific" result works in every platform 
> I've tried, so long as one stays away from the alt key in Safari, IIRC.
>
> Now that Opera is no longer an obstruction, there's only one reason not to 
> use a standard library: it's been written, and it works.  Rewrite it!  I love 
> seeing my javascript get rewritten!

I am thinking of using pyjamas, if it works for this, *that* be
awesome. Having everything in Python.

>
>>  b) it uses some custom format for transfering data (which has bugs,
>> like 
>> http://groups.google.com/group/sage-devel/browse_thread/thread/5ecd104b0aa85439),
>> why not to use JSON?
>
> Again... it worked after we wrote it.  It became too much work to replace, so 
> we kept cobbling more on.

Right. By no means it was meant to criticize your work. :) I was just
saying that we can do better today with all those nice js libraries.

>
>> * it doesn't run on the google appengine (William mentioned in the
>> past, that he doesn't see any benefit to do that, or that it would be
>> slow)
>>
>> Well, talk is cheap, so here is the code (a sample Firefox screenshot
>> is also attached in case it didn't work in your browser):
>>
>> http://pythonnb.appspot.com/
>
> Might have to take back what I said earlier...  Shift-enter causes an extra 
> newline to be placed in the cell below the current one in Opera 9.

This newline is a bick hackish still ---- basically the textarea
really sucks, it doesn't have a function for getting a cursor position
and it cannot resize automatically. Everything has to be written
indirectly.

>
>>
>> it uses jQuery all over, it uses a keyboard plugin for jQuery, it uses
>> JSON and it runs on the google appengine (and anywhere else too, it's
>> just a standard django app). I tested in Firefox and IE8. The keyboard
>> works, there are just some subtle bugs on IE8, see here:
>>
>> http://github.com/certik/notebook/blob/375a2026ee7ea721904d05068724b3a7663d018e/todo
>>
>> but none of it seems major to me, the keyboard seems to be working
>> just fine (or is IE8 not the most problematic? I'll try to test in
>> other browsers like Opera and Safari too). Here is the index.html with
>> all the javascript that I wrote:
>>
>> http://github.com/certik/notebook/blob/375a2026ee7ea721904d05068724b3a7663d018e/templates/index.html
>>
>> It handles most of the keyboard interaction. It doesn't have TAB
>> completion and inspection yet.
>
> Initial reaction: NICE!!!  But... I only see about 20% of the functionality 
> we really need, and the last 10% typically takes as long as the first 90%.

That's right.

>
> Criticism: when one presses the up arrow accidentally at the top of a cell, 
> it is obnoxious for the cursor to jump to the top of the next cell up.

Yes, in fact this is the first thing in my the TODO file:

http://github.com/certik/notebook/blob/375a2026ee7ea721904d05068724b3a7663d018e/todo

>
> Suggestion: the introspection interface, as written, is utter shit.  It's 
> literally the first thing that I got to work, and it's never been reworked.  
> I've been wanting to move the introspect "window" to a floating div that can 
> be torn out of the window -- but I have little skill when it comes to using 
> the new-fangled javascript libraries, so I haven't done this.  At the very 
> least, I think it should appear on the right-hand side of the window so one 
> can both read the documentation, and the text at the top of their long cell.


Yes, I think this is the second thing that I want to write. Maybe
after pyjamas --- now, when I understand how to debug all those AJAX
requests, I am eager to look into that.

I really tried to avoid javascript and all this AJAX thing, but I must
say it's really exciting! :)

I think I will try to write GUI for our FEM stuff in the browser.
Browser is the best thing.

>
>>
>> Well, let me say that I really like to run things on the appengine,
>> rather than to constantly maintain our own servers. I see no reason
>> why the notebook cannot run on the appengine, only the AJAX would talk
>> to our own server with Sage to actually evaluate the cells (and for
>> many people, I think appengine itself could actually be enough). I
>> have to think though what the best way to transfer data to the
>> database with worksheets is though.
>>
>> I wanted to ask --- which parts of the Sage notebook are BSD licensed?
>> I used a bit of the CSS styles and and maybe one javascript function,
>> everything else was written by me. If possible, I'd like to use the
>> BSD license for the notebook (if I find time to work on it further),
>> so that ipython can use it by default.
>
> Every single line I have written for the notebook is BSD licensed.  However, 
> William, Alex Clemesha, Jason Grout, and Robert Bradshaw have all contributed 
> javascript code, so I'd like to hear from them from making a blanket 
> statement about the file.  I believe that Dorian Raymer and Mike Hansen may 
> have contributed, too.  Am I missing anybody?  Robert Miller?
>
>> Also, question to all, do you like the In [3] and Out[3] lines? I
>> don't have an opinion on it yet myself, so I implemented them, to see
>> how it looks like. Also, please let me know if it works in your
>> browser.
>
> NO!  I think they're terrible.  The more space a cell can occupy, the better. 
>  I dislike how much border & space the current Sage notebook has.

That was another thing --- I really want the notebook to be
configurable, so that it's easy to rebrand it (e.g. change Sage to
something else), easy to change look & feel, like the thing above.
Ideally just by changing the cell html prototype and CSS styles.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to