edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  Short Timers
@ 2015-04-11  3:48 Karl Dahlke
  2015-04-11 14:11 ` Adam Thompson
  0 siblings, 1 reply; 9+ messages in thread
From: Karl Dahlke @ 2015-04-11  3:48 UTC (permalink / raw)
  To: Edbrowse-dev

I was trying to compose my thoughts, trying to figure out how
to express myself, but Chris explained it much better than I could.

> ...
> So our ultimate task will be trying to smoosh the asynchronous paradigm
> into the teletype paradigm, also known as forcing a square peg to fit a
> round hole.

I agree, and feel strongly about this.
Let me give a more concrete example.
A website is connected to the ticker,
and gives the price of a stock in real time.
It automatically and asynchronously updates the screen several times a minute.
The sighted user looks at that panel when he wants to,
and looks away when he is working on something else,
another window on the computer perhaps, or his cup of coffee.
He asks for the current stock price by moving his eyes.
He just "looks" at the real time display of the price.
Even if edbrowse could support this model by constantly updating
some buffer somewhere,
we have to ask for the stock price by a synchronous action,
refresh the buffer or cause the speech adapter to read the line in question.
It is at our command.
Or - do we want our adapter to be in league with edbrowse and read the stock
price every time it changes, and perhaps interrupt whatever else we were reading?
Personally, I don't want that.

If edbrowse is so good that it supports all the websites
out there, and all they're asynchronous behaviors, then edbrowse becomes worthless.
I could just use chrome or firefox or whatever.
The power of edbrowse is at least in part that it is not asynchronous,
that it is different, that it is command line,
and I would like to keep it teletype as much as possible,
even if there are some websites that it cannot browse,
or upon which it does not behave in the standard or expected manner.
I'm ok with that.

Continuing the stock example, the traditionally asynchronous ajax
code that gets the latest stock price does not run,
unless I tell it to, because I want to read the current price,
and then it runs at my command, and the buffer updates, and I read it,
and hear the current price, because I want to know it at that time.
Then I might move my attention somewhere else, another buffer, another console,
my cup of coffee, and I might come back to this site and push
the ajax button an hour later.
I think this is the model we should aim for.
Obviously if a chunk of code is suppose to run in 5 milliseconds then it should just run,
that's what started this very interesting and pivotal thread,
but if the delay is ten seconds, it is probably doing something
that we want synchronous control over,
because we can't just watch that window and several others in parallel,
as our sighted friends do.
We are blind and that is inescapably different.
edbrowse is a unique browser, partly for its synchronicity.

Karl Dahlke

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Edbrowse-dev]   Short Timers
@ 2015-04-11 14:44 Karl Dahlke
  2015-04-11 15:23 ` Adam Thompson
  0 siblings, 1 reply; 9+ messages in thread
From: Karl Dahlke @ 2015-04-11 14:44 UTC (permalink / raw)
  To: Edbrowse-dev

There is another problem with my quick&dirty approach,
running the short timers now and then returning control to the user.
A timer that fires in 5 milliseconds,
that I decide to run now, may well queue up another timer that fires in 5 ms.
Well my software might figure: it's just 5 ms away, run it now.
It queues up another timer in 5 ms, which I run, and so on,
and suddenly I'm in an infinite loop and the user is locked out.
Of course in any other browser this does something 100 times a second,
in the background, without churning the cpu, and without locking
out the user.
So whatever we decide, it has to be a bit smarter than just:
run the shor ttimers now and put the long timers under user synchronous control.
Perhaps Adam's background model or some other model.
Anyways I'm not going to mess with these for a while,
until we can all give it a bit more thought.

Karl Dahlke

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [Edbrowse-dev] Short Timers
@ 2015-04-08 13:19 Karl Dahlke
  2015-04-10 11:28 ` Adam Thompson
  0 siblings, 1 reply; 9+ messages in thread
From: Karl Dahlke @ 2015-04-08 13:19 UTC (permalink / raw)
  To: Edbrowse-dev

If you call up www.eventbrite.com you'll notice 10 javascript timers
at the top of the page, all active in 4 milliseconds.
It occurs to me that if javascript is suppose to run in 4 ms,
it should probably just run.
Now if js is scheduled to run in 10 seconds, then it should wait on your command,
wait for you to read the page, because we read a new website slower than
our sighted friends, so long timers are under our control,
but perhaps any timer under one second, or whatever threshold we choose,
should just run.
Queue them up in order of time and run them.
Even if they do nothing other than visual effects,
at least those first ten annoying lines about js timers
would be off of the web page.
What do you think?

Karl Dahlke

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-11 15:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-11  3:48 [Edbrowse-dev] Short Timers Karl Dahlke
2015-04-11 14:11 ` Adam Thompson
2015-04-11 14:46   ` Chris Brannon
2015-04-11 15:18     ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2015-04-11 14:44 Karl Dahlke
2015-04-11 15:23 ` Adam Thompson
2015-04-08 13:19 Karl Dahlke
2015-04-10 11:28 ` Adam Thompson
2015-04-11  1:39   ` Chris Brannon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).