<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] Re: Bruce Sterling on Virtual Community goals --> <!--X-From-R13: Quevf Uenl <ptNnzv-pt.UenlEntr.Sqzbagba.OP.QO> --> <!--X-Date: Tue, 20 Oct 1998 22:14:56 -0700 --> <!--X-Message-Id: 199810210508.XAA00409@ami-cg.GraySage.Edmonton.AB.CA --> <!--X-Content-Type: text/plain --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, [MUD-Dev] Re: Bruce Sterling on Virtual Community goals</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00289.html">Previous</a> | <a href="msg00291.html">Next</a> ] Thread: [ <a href="msg00267.html">Previous</a> | <a href="msg00332.html">Next</a> ] Index: [ <A HREF="author.html#00290">Author</A> | <A HREF="#00290">Date</A> | <A HREF="thread.html#00290">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: [MUD-Dev] Re: Bruce Sterling on Virtual Community goals</LI> <LI><em>From</em>: Chris Gray <<A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A>></LI> <LI><em>Date</em>: Tue, 20 Oct 1998 23:08:42 -0600</LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> [Jon A. Lambert:] >I don't see why an interpreter would not look vitually identical to a >VM that processes bytecode. An interpreter would normally use >lazy evaluation and so could the bytecode generator. That is code >generation or execution would occur at the same points in the >execution of the interpreter/code generator. Possibly just a >flag could control what output is desired. State information saved >for interpretation (labels) would just as easily be used in >generating bytecode. Not sure what you are getting at with "lazy evaluation". Not compiling to bytecode until the function/module is called? Labels? What for you need labels? >Secondly a standard bytecode gives you a common target for >any desired language compiler. C. Gray's horrendous case/esac >(hehe) structures or my lovely if/endif repeat/until proclivities. >;) Fwap! (ala Gulliver's Travels) >Details: Are these of the HLL or the bytecode? Things like control structures and looping structures aren't needed in the byte code if you just have PC relative branches like Java bytecode does. No labels are needed unless you plan on having an assembler, which I think is a bad idea. Going straight from parse trees to byte-code isn't that bad. My stuff is under 1200 lines for that, and it includes several special cases for optimization. Also, at the level of byte-code, symbols shouldn't be needed. If you have to look things up in tables at runtime, then you are again discarding much of the speed of bytecode. Locals and parameters can be just offsets from a frame pointer for a stack machine. You can keep the symbols for them around if you want to have symbolic disassemblies, but stripping them out works fine too. Symbols are needed when resolving newly loaded stuff, as you have discussed. >Primitive data types to be represented. >Complex data types (object). >Control structures. >Looping structures. >Subroutines/procedures/functions. >Label generation. >Symbolic storage. >Variable storage. >Type conversions/promotions. >Native routines call and return format/native symbol table. >Sub progam/module call and return protocol. >Exception handling/trapping >Arithmetic processor. >Booleans/conditionals. >Operator precedence. >Aye. A linked list or array of pointers sounds good. Would this >imply no argument type-checking, or is this something better left to >the language compiler to enforce? I think that needs to be a fairly early decision. If you are doing a strongly-typed language (you would need escapes in a system like this of course), then the byte-codes emitted by the compiler contain all of the needed type information. Thus, a function call knows nothing explicit, at run-time, about parameter types. It is a dynamic linkage issue that types match up. This is the way Java does it, I believe. What I do is this: a byte-code function, when stored in the database, is just a sequence of bytes that the system knows how to put back together into higher-level structures. Those structures include the result type and the count and types of the parameters. Thus, the whole thing is pretty much independent. The only extra stuff is the references from the byte-code to other functions/modules. If referenced functions/modules had specified types at compile time, then the dynamic linking to newly loaded (or newly compiled) code should check those things and fail the linkage if they don't match. If a reference from existing byte-code to something new is an untyped call, then the reference must contain the types of the actual parameters, and the expected type of the result. When the actual call is made (as opposed to when the code is loaded/linked), the checks must be made. You can do those calls earlier as well, unless you allow for functions being first-class objects, and specifically don't include the type info in the type of the "function pointer". That's what I do, and that is my escape from the strongly typed system. Alternatively, if the system isn't strongly typed, then there is a whole range of "weakly typed" designs that can be considered. Does the bytecode have opcodes for, say, integer arithmetic? Or does it just have an opcode for addition that will examine the types of its arguments and do any needed conversions, etc.? What I'm rambling about here is that I think this kind of decision needs to be made fairly early on, for a given set of language/bytecode. There is no reason the system can't have multiple choices of the above at the same time, but then you have to carefully craft glue stuff to make them talk to each other, and that requires intimate knowledge of how they both do things, violating any information hiding principles. >A needless complication at this point, perhaps? Jon was replying to something else, but it applies equally to what I've just been saying! -- Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <ul compact><li><strong>Follow-Ups</strong>: <ul> <li><strong><A NAME="00332" HREF="msg00332.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong> <ul compact><li><em>From:</em> "Jon A. Lambert" <jlsysinc#ix,netcom.com></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00289.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00291.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00267.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00332.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00290"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00290"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</STRONG>, <EM>(continued)</EM> <ul compact> <ul compact> <LI><strong><A NAME="00269" HREF="msg00269.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Jon Leonard <a href="mailto:jleonard#divcom,slimy.com">jleonard#divcom,slimy.com</a>, Tue 20 Oct 1998, 06:19 GMT </LI> </ul> <LI><strong><A NAME="00266" HREF="msg00266.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 20 Oct 1998, 05:08 GMT <UL> <LI><strong><A NAME="00286" HREF="msg00286.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Wed 21 Oct 1998, 03:52 GMT </LI> </UL> </LI> <LI><strong><A NAME="00267" HREF="msg00267.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 20 Oct 1998, 05:17 GMT </LI> <LI><strong><A NAME="00290" HREF="msg00290.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 21 Oct 1998, 05:14 GMT <UL> <LI><strong><A NAME="00332" HREF="msg00332.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Thu 22 Oct 1998, 01:50 GMT </LI> </UL> </LI> <LI><strong><A NAME="00291" HREF="msg00291.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 21 Oct 1998, 05:29 GMT </LI> <LI><strong><A NAME="00292" HREF="msg00292.html">[MUD-Dev] Re: Bruce Sterling on Virtual Community goals</A></strong>, Bruce Mitchener, Jr. <a href="mailto:bruce#puremagic,com">bruce#puremagic,com</a>, Wed 21 Oct 1998, 06:04 GMT <UL> <LI><strong><A NAME="00297" HREF="msg00297.html">[MUD-Dev] Recursive look</A></strong>, Ling <a href="mailto:K.L.Lo-94#student,lboro.ac.uk">K.L.Lo-94#student,lboro.ac.uk</a>, Wed 21 Oct 1998, 14:41 GMT </LI> </UL> </LI> </ul> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>