From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fren Zeee Newsgroups: gmane.emacs.help Subject: Re: What's the spec for emacs lisp virtual machine ? Date: Thu, 29 Jul 2010 22:41:28 -0700 (PDT) Organization: http://groups.google.com Message-ID: <38786492-391f-4de8-a7d1-fa56b163a7f7@f6g2000yqa.googlegroups.com> 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 1291860431 12926 80.91.229.12 (9 Dec 2010 02:07:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 02:07:11 +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 03:07:04 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 1PQVuR-0001ym-Ki for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 03:07:03 +0100 Original-Received: from localhost ([127.0.0.1]:33565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQVuR-0006eJ-1b for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 21:07:03 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!f6g2000yqa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Original-Lines: 77 Original-NNTP-Posting-Host: 75.31.76.168 Original-X-Trace: posting.google.com 1280468488 12124 127.0.0.1 (30 Jul 2010 05:41:28 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 30 Jul 2010 05:41:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f6g2000yqa.googlegroups.com; posting-host=75.31.76.168; posting-account=Xy1x0QoAAAC1_8XWVbTILoO5VL5JMCDm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; {83B3ACED-AC9F-2058-FD69-DBCDCD722B97}; (R1 1.5)),gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:180218 comp.lang.lisp:290652 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:76444 Archived-At: On Jul 29, 10:28=A0pm, mdj wrote: > 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 Emac= s > > > small was more important than raw speed which would need more RAM, an= d > > > 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.- Hide quoted text - If you had given a concrete example, it would have come out automatically. There are two pre-requisites for giving such a useful clear reply. One is technical competence, and another is generosity. Its obvious that you lack one or the other so I wont get into an argument with you.