comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm-host.bauhaus@maps.futureapps.de>
Subject: Re: Web browser in Ada
Date: Sun, 25 Apr 2010 12:41:52 +0200
Date: 2010-04-25T12:41:53+02:00	[thread overview]
Message-ID: <4bd41c70$0$6882$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <4bd23c72$0$2399$4d3efbfe@news.sover.net>

On 4/24/10 2:38 AM, Peter C. Chapin wrote:

> Any browser that could be realistically used would need to support JavaScript.
> While an Ada JavaScript implementation might (or might not) be more secure
> than a C implementation, it seems to me that any vulnerability related to the
> JavaScript language itself would still be a risk.

A major flaw in Javascript is how its type system was built,
I think.  (The vulnerabilities being listed in the Top 25
vulnerabilities of 2010.) Being less prejudiced against Ada
(or even Pascal) could have helped with giving Javascript
a robust foundation:

1 - they obviously used (the dark side of) duct tape programming
when wrapping the fundamental types of C, lazily. Perhaps in order
to ship something quickly.
For the C types, chose those available on a given platform...! (IINM)
Looking at the "flexible" phrasing in the Javascript ECMA standard still
makes me sad. BTW, Ruby has the very same problems with its base types.
This problem---it seems to have spread across "scripting"
languages---does not seem to be easy to correct after the fact.

2 - The higher level Javascript stuff looks like it is borrowed
from CLOS.
What does Ada have to offer here? Can it improve a poor man's CLOS
implementation so it becomes better than one built atop a C
implementation?


> In any case, the real benefit of such a project would be more in the
> development of associated libraries and supporting code (imagine processing,
> HTML parsing and rendering, CSS handling, etc, etc)... and in the visibility
> a successful project would give to Ada. I suspect Ada was first standardized
> before many current web developers were born; it might be fun to see what
> sort of reception an Ada web browser project would get in that community.

I think image processing or movie handling could profit. The reason
is that Ada programmers, by stereotype or nature, will think about sizes
and boundary cases.  Speed is near C's as is once again demonstrated
by the Mandelbrot entry in the Shootout.  However, Ada's run-time
systems are not (yet?) supporting multicores that well.  If it
matters.

> Anyway a good first step might be the implementation of an HTML 5 parser in
> Ada.

What is an HTML 5 parser supposed to be?

If it is to parse the SGML text defined by the HTML 5 grammar
then you would, in effect, have to copy browsers' near natural language
processing capabilities, since having only an SGML parser with little
more than moderate error correction capabilities is by far not enough
for HTML.

Some browsers have a parser switch, IIRC. Switch to best effort
mode for the important, but junk, HTML code that is out there,
inevitably, new or old. Or be more optimistic and
make an attempt at treating input text as if is was well formed
XML text.

If it is to be a cooperative component of an HTML 5 system,
it needs to play well with Javascript, CSS, and all sorts of
media and HTML 5 type storage capabilities.  (Load data from
local storage, have Javascript add some remote XML, merge that,
apply CSS, etc...)



  parent reply	other threads:[~2010-04-25 10:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23  8:03 Web browser in Ada Gautier write-only
2010-04-23 13:56 ` Maciej Sobczak
2010-04-23 14:37   ` Georg Bauhaus
2010-04-27 11:41     ` Martin Krischik
2010-04-27 12:22       ` Georg Bauhaus
2010-04-27 14:00         ` AdaMagica
2010-04-27 15:30           ` Integer overflow is int overflow (Re: Web browser in Ada) Georg Bauhaus
2010-04-27 16:13             ` Dmitry A. Kazakov
2010-04-27 17:09               ` Georg Bauhaus
2010-04-27 17:56                 ` Dmitry A. Kazakov
2010-04-23 21:33   ` Web browser in Ada Gautier write-only
2010-04-24  0:38     ` Peter C. Chapin
2010-04-25  5:38       ` Gautier write-only
2010-04-25 16:24         ` Peter C. Chapin
2010-04-25 10:41       ` Georg Bauhaus [this message]
2010-04-25 16:29         ` Peter C. Chapin
2010-04-26 15:37       ` Warren
2010-04-24  9:51 ` leonid
2010-04-25  5:04   ` Gautier write-only
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox