From: Thomas Lord <lord@emf.net>
To: alinsoar@voila.fr
Cc: Thien-Thi Nguyen <ttn@gnuvola.org>,
"Emacs Dev \[emacs-devel\]" <emacs-devel@gnu.org>
Subject: Re: Embedding Html in Lisp
Date: Mon, 23 Jun 2008 09:56:06 -0700 [thread overview]
Message-ID: <485FD5A6.6090200@emf.net> (raw)
In-Reply-To: <10403029.8884311214227267799.JavaMail.www@wwinf4622>
[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]
A Soare wrote:
>> Html is lisp.
>>
>> You dignify html a lot more than it deserves!
>>
>
> With the classical definition of HTML , yes.
>
> With the new definition, they can be compared.
>
>
Are there any "structured data" languages that you know
of that can *not* be transformed to lisp in a similar way?
In other words, is HTML really special this way? Or
is this a specific instance of a generalized phenomenon?
Code is data and data is code.
An interesting point of history: one of the very first
lisp programs *ever* did symbolic differentiation.
It would take input like:
(exp x 2) # x squared
and produce output like:
(* x 2)
That program manipulated the math expressions just as
data. On the other hand, there is no reason you couldn't
have passed one of the expressions to EVAL, e.g., to get
a numeric value from it.
It would have been inconvenient, though, to try to write
the differentiation program by defining the function EXP
as a function that interpreted its arguments as sub-expressions
and returned the derivative of the overall expression.
(Of course, now some Schemer will be tempted to show
some Scheme macros that do symbolic differentiation but,
that's not the point.)
By analogy, for some uses it might be handy to interpret
HTML elements as procedure calls. For other uses, it is handy
to interpret them as lists. For still other uses, it is handy to
interpret them as tree objects (e.g., the DOM data structure).
As for a browser in Emacs: in spite of recent cracks (funny!) bout
"yet another Emacs in Javascript" -- Emacs in a browser might be
a lot easier than a browser in Emacs, judging by how Mozilla
works. E.g., Mozilla parses HTML and build a tree. That tree
acts a lot like an Emacs buffer in the sense that extension programs
can edit the tree abstractly and the display of that tree is automatically
updated. The standards for proper display of a web page are defined
in terms of these trees. By the time Emacs gained enough functionality
to handle such standards, it would resemble a small superset of the
functionality that already exists in Mozilla. Conversely, it is
probably a much smaller job to modify some of the key components
of Mozilla so that they provide all of the functionality of Emacs
buffers and display.
For the task you describe, though -- a desire not to make a full
browser but to be able to access a few simple web pages from Emacs --
of course Emacs can handily do that (and it sounds like you are getting
some stuff to start working, so congratulations!).
-t
[-- Attachment #2: Type: text/html, Size: 3226 bytes --]
next prev parent reply other threads:[~2008-06-23 16:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 13:21 Embedding Html in Lisp A Soare
2008-06-23 13:51 ` tomas
2008-06-23 16:56 ` Thomas Lord [this message]
2008-06-23 17:04 ` Thien-Thi Nguyen
2008-06-23 20:07 ` Stephen J. Turnbull
-- strict thread matches above, loose matches on Subject: below --
2008-07-01 19:05 A Soare
2008-06-24 3:09 A Soare
2008-06-24 10:19 ` Thien-Thi Nguyen
2008-06-24 0:32 A Soare
2008-06-24 0:51 ` Stefan Monnier
2008-06-24 1:34 ` Thomas Lord
2008-06-23 21:38 A Soare
2008-06-23 14:08 A Soare
2008-06-24 13:36 ` T. V. Raman
2008-06-24 14:41 ` joakim
2008-06-23 12:23 A Soare
2008-06-23 11:49 A Soare
2008-06-22 22:27 A Soare
2008-06-22 20:56 A Soare
2008-06-22 21:29 ` Drew Adams
2008-06-23 8:33 ` Thien-Thi Nguyen
2008-06-22 20:53 Embedding HTML " A Soare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=485FD5A6.6090200@emf.net \
--to=lord@emf.net \
--cc=alinsoar@voila.fr \
--cc=emacs-devel@gnu.org \
--cc=ttn@gnuvola.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.