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

Jecel Assumpcao Jr jecel at merlintec.com
Thu Apr 21 02:39:26 UTC 2005


Lex Spoon wrote on Wed, 20 Apr 2005 16:37:26 -0400
> In general, one place that is worth starting from scratch, if you are up
> for it, is certainly HTML layout in general.  That's a huge project, but
> it's one where the best solution may well look nothing like what is
> currently there.

My own preference would be to have some kind of Layout object, and to
then translate HTML to that. In general we don't really need to keep
track of the original, right? The exception I can think of is some
JavaScript walking/changing the document.

> On the other hand, it's a huge project, with the obvious drawback of,
> well, being huge.

Exactly what I want to avoid in this particular case. But done properly
it would make writing a great text processor and a spreadsheet simple
examples we might even whip up on the fly during a Squeak demo.

And here I want to go on a tangent and I don't know if the people
qualified for commenting on this are reading (it might be a good idea to
ask this in a separate thread with a proper subject):

The two layout systems I am most familiar with are TeX and MetaFont. The
latter depends very much on a simplified constraint system but is hardly
performance critical. TeX is more limited, but even that was considered
too slow so John Maloney eliminated most of the complications with the
columnMorph/rowMorph and shrinkWrapped/spaceFilling scheme.

Now Alan always point to Sketchpad in his talks as "an improvement on
its successors" (not a quote) and I am aware of several constraint
systems that were implemented in Smalltalk and Self. Certainly the old
block based layout in MVC was slightly related in spirit.

The question is this: can a simple constraint based layout system be
built for Squeak on top of which we could create all the stuff we need
such that it wouldn't make us long for the "blazing fast days of
Morphic"?

> 	HTMLTokenizer turns String's into HtmlToken's
> 
> 	HTMLParser turns those into an HTMLDocument (with a DOM-like tree of
> entities)

That is a real hack, but it does get the job done in the face of bad
HTML. Not like the old Netscape which would show you a blank page for
the lack of a </table>.

> 	HtmlFormatter is used to encode those

Like I mentioned above, this would have to flatten things a little less
for JavaScript to work.

> [Text with TextAttribute]

It is interesting how far this can go.

> If there's a segfault, then it is irrelevant to Karl's code.  You are
> right that the VM should not let that happen.  If you can come up with a
> repeatable example of that, then it's definitely a VM problem.

Ok, better do a new test. Squeak 3.8-6548, Solaris Sparc 3.4-1, Scamper
Installer 1, Array2D 1 and HTMLTableMorph r1.

I was able to see several pages, though for example
http://www.squeak.org/ was rendered far too wide to actually see any
text or pictures. But when I tried http://www.squeakland.org/ I got a
"Bus Error". I tried it two more times with the same result.

> Yeah....  Imagine computing with Squeak as your platform....

That is the point - can such an obvious improvement over a plain Linux
system be made that normal users would be interested in it?

> Yeah, that's all true.  If you make use of external code, however, it
> gives you a lot of intermediate steps for moving towards a Squeak
> laptop.  You don't have a useless machine for years while you wait for a
> fully general web browser.

The Media Lab has published a rather optimistic schedule, so any
solution that would take too long must be discarded right away. That
doesn't mean the software can't be improved even after the users get
their machines since I don't imagine that it would be stored in ROM.

> Also, I am not sure that it becomes more Squeaky if you remove Linux
> but then write a massive "virtual machine" which is essentially its own
> operating system.  If you want to boot into Squeak, then a great way to
> do that is use Linux as the platform and then run Squeak from the
> init scripts.  You can dump X windows and just use Linux for device drivers
> and a file system.

But what if that massive "virtual machine" is written in Squeak and you
can see it and change it while running Squeak? That is partly the case
for option 3 (SqueakNOS style on ARM or other processor) and most
certainly what I imagine for option 4 (a Squeak processor).

-- Jecel



More information about the Squeak-dev mailing list