web browsers (was: squeak laptop for the rest of us)

Jecel Assumpcao Jr jecel at merlintec.com
Tue Apr 19 00:10:44 UTC 2005


Lex Spoon wrote on Sat, 16 Apr 2005 15:05:50 -0400
> That is just a small part of Scamper, and indeed one that is likely to
> be a part of any more complex layout engine.  Do you know anything about
> Scamper before saying it is a "hack" that should be thrown out and
> rewritten completely?

Just a vague impression from browsing the code many years ago. Sorry - I
really should have done a serious evaluation before writing that.

> Do you think, for example, that the HTML tokenizer should be tossed?  
> How about the parser?  The formatting code in class HtmlFormatter?

Are these the same as optionally used in Celeste? I have been single
stepping through this stuff a bit, but that is no way to get the big
picture of course. Again, I will have to spend some time with that code
before I can make any intelligent comment.

> What
> about Squeak's built in text-flowing code, which is what Scamper mainly
> relies on for layout? 

That is definitively something I have to look into. I only have a faint
idea about the Paragraph code, the Morphic stuff adapated from Self, the
old "back to the future" demo and the "wondering letters" demo. I
suppose Scamper is related to the third one? Perhaps two or more of
these are actually the same thing and I am confused about this.

> How about the model code for HTML forms?  Do
> you think MIMEDocument should go, as well?  The URL hierarchy?

These seem like a reasonable start.

> I agree that there is a lot to be done, and that new layout
> infrastructure is well worth thinking about.  However,  that's all the
> more reason to take advantage of the couple of man-months of coding that
> is already in there.  If you want to quickly get to an open-source
> Squeak-based web browser, then extending Scamper is a very good
> approach.

Right. I already have a "throw everything out and start again" project
and the objective of the current proposal is exactly to use as much
existing code as possible in contrast to that, in the spirit of your
"old code" post. The reason I didn't list my main project as one of the
options for the "Squeak laptop" is because that approach takes a long
time. I have already made the mistake of starting a smaller, simpler
project to get something done quickly only to have it grow into
essentially the same thing as the long term one. It would be silly to
repeat that here.

> In short, if you want results quickly, then it is best to leverage what is there.
> I am happy to help anyone who wants to extend Scamper and is finding
> it tough going.  I've long suggested that people start by pitching in on the
> TableMorph effort that has already begun.  That alone will give us a
> dramatic increase in the number of pages that are displayable in Squeak.
>  Likewise, if TableMorph is already too difficult for people to make much
> progress on, then we should certainly be afraid of trying to do anything
> even more ambitious.

Karl posted about that. I tried that package back in the 3.2 days and it
caused Squeak to seg-fault on most pages I looked at. This was on a
Sparc Solaris machine which might be a more fragile platform than normal
- I didn't even know that Smalltalk-only code could crash Squeak like
that.

> All this said, it might be a poor strategy to make a complete
> web browser.  There's just too much to do, because we have reached a
> state where "the web" is defined by what Mozilla does. 

What IE does, you mean. There are quite a few pages where I can't read
the text in Mozilla because it flows under some picture. This is a case
of the browser being right and the site wrong, no doubt, but it does
make things more complicated for the user. Normally I just go on to
another page, but if it is important then I'll select all the text and
copy it to another window. With a proper Squeak browser I would expect
to be able to call up the halo on the offending item and force it to be
readable.

Speaking of Mozilla, some update of Fedora Core 2's official stream
broke things so that if I run Mozilla as anything but root it will crash
on all but the most trivial pages. Some silly file permission thing,
most likely, and if I had any time to waste on this I could probably fix
it. But my point is: why should it crash on any input? IE has shown me
the "this applications has executed an illegal instruction..." dialog
more times than I care to remember. Do users actually find this kind of
thing acceptable? I have never tried Opera and so can't comment on it,
and the only times I have crashed Safari is when visiting special test
pages designed demonstrate its bugs (which is nasty enough, in my
opinion).

> Instead, what
> does make sense, and what the VW browser I have seen provides, is to
> make a crutch that lets you barely manage to read a web page.  I suspect
> Scamper could get there for most web sites quite quickly; TableMorph
> alone should pick up many of them.  

Scamper is already better than some others I use (Dave Ungar's quick
hack in Self, lynx...). Even though less and less sites use them, the
lack of frame support in Scamper can be limiting. It is possible that
this could be solved with nearly the same code as tables.

> Even given something as nice as the VW browser, though, you'd still
> prefer to use Mozilla whenever you had the choice.  Mozilla will get it
> right in practically all cases, and it tends to look a lot better.  
> When I use BottomFeeder, a VW application, I always use its feature for
> shelling out to Mozilla instead of using the built-in browser.  Happily,
> Squeak can do exactly the same thing via the ExternalWebBrowsing package
> on SqueakMap.

Yes, but then we are talking about Squeak-on-a-Linux-latop instead of a
Squeak-laptop. Which might be the best solution after all. This is what
I am trying to figure out. It certainly would be the least disruptive
for the MIT guys.

> By the way, there have been efforts to implement an X server in Squeak,
> and there have been efforts to hook up an existing X server to Squeak
> via screen scraping.  If you are really into this sort of thing, you may
> want to google around and try to get involved in existing efforts.

There is also the solution in OpenCroquet. I haven't actually tried the
X server package, but it might be a good idea to run Squeak on the
framebuffer in my server and use something like this for when I need
some other application.

-- Jecel



More information about the Squeak-dev mailing list