From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mdj Newsgroups: gmane.emacs.help Subject: Re: What's the spec for emacs lisp virtual machine ? Date: Thu, 29 Jul 2010 22:28:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <90d69edf-4e56-4642-ae45-5b987934cf0b@q16g2000prf.googlegroups.com> <80cc90dc-d66b-4d93-9ff9-dccacec01770@c10g2000yqi.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291852269 14624 80.91.229.12 (8 Dec 2010 23:51:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 23:51:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 00:51:05 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQTmq-0005OX-G6 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 00:51:04 +0100 Original-Received: from localhost ([127.0.0.1]:47508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQTmp-0005Lr-LT for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 18:51:03 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!s17g2000prh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Original-Lines: 59 Original-NNTP-Posting-Host: 165.228.177.83 Original-X-Trace: posting.google.com 1280467733 5539 127.0.0.1 (30 Jul 2010 05:28:53 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 30 Jul 2010 05:28:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s17g2000prh.googlegroups.com; posting-host=165.228.177.83; posting-account=gKwMEAoAAACgdZoRArZlfcCSOA8KWMxg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100726 CentOS/3.6-3.el5.centos Firefox/3.6.7,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:180216 comp.lang.lisp:290650 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76244 Archived-At: On Jul 30, 3:01=A0pm, Fren Zeee wrote: > On Jul 29, 8:51=A0pm, mdj wrote: > > > On Jul 23, 4:12=A0pm, Fren Zeee wrote: > > > > Why is a VM needed when there is compiled C code running machine > > > code ? > > > The are two essential reasons. Firstly, the bytecode is more compact > > in memory than either the machine code or the READ lisp code. > > Secondly, it loads a good deal faster from disk, allowing emacs to > > start (relatively) quickly. > > an example > > preferably from an emacs file from savannah link so one could get an > idea of the animal. Any emacs lisp source file will serve as an example. > theoretical reasons for speed ? bytecode is simpler to parse, and more compact in its representation than s-expressions represented as cons cells. > > Thirdly, it is relatively straightforward to implement a portable > > bytecode interpreter in C that will then compile on any architecture > > for which one has a C compiler. This is a great deal less work than > > developing a 'to-machine-code' compiler for every architecture out > > there. > > Why is it less than porting the C compiler ? How would it be written ? > assembler ? Are you suggesting the emacs lisp compiler could target C instead of bytecode? > > Keep in mind that the early releases of GNU Emacs were in the mid > > 1980's when personal computers powerful enough to run Emacs had > > typically perhaps 1mb of RAM. Keeping the in-memory footprint of Emacs > > small was more important than raw speed which would need more RAM, and > > necessitate customizer the code generator for every conceivable > > architecture. > > In 1989 there were a LOT of 32bit microprocessor architectures out > > there, and many still survive to this day. > > To answer the rest of your questions, I'd recommend enrolling in a > > good computer science degree. > > I am sure someone can point to a tutorial paper or book, > > no one need you to give that obvious advice ... so obvious that i > consider rude Okay, but your relatively poor command of english is making you appear very rude as well. Perhaps consider using more words to describe what you mean. The odd gratuity like 'please' and 'thanks' would do wonders for your style.