Why I Still Program in Smalltalk Outline Summary

Total Page:16

File Type:pdf, Size:1020Kb

Why I Still Program in Smalltalk Outline Summary Why I still program Outline in Smalltalk •Introduction, Background •What do Programmers Need? Musings on Software Development •Some History •What Is Smalltalk? Stephen Travis Pope • Language, Libraries, Tools, Methodology [email protected] Relationship to Other Languages, IDEs, etc. UCSB MAT Colloquium • January 14, 2012 •Why I Still Use Smalltalk http://HeavenEverywhere.com/WISPiST.pdf •A Call to Revolutionary Action 1 2 Summary (spoiler alert) NeXT ad from 1992 3 4 My Background What I Develop (& biases) Complex projects (music, AI, high-level tools) Training: EE, CS, Music • • Media-rich (A/V) •HW Development Projects • • Analog Synths, Eventide •DB-rich (large volumes, complex queries) • Vienna, Salzburg jobs •Wide-area distributed Programming • Cross-platform • Low-level, lots of tool-building, then LISP • • Visits to MIT and SAIL in 1976/77 •Performance-critical (compute-bound) • UNIX & C starting in 1976 •Back-end servers and front-end GUIs Graphics starting in 1979 • • C/C++, Python, MATLAB, SuperCollider, SQL • IRCAM, [email protected] 5 6 MODE, 1990-92 Context: 1983 Culture “Girls just want to have fun” “Puttin’ on the Ritz” 7 8 Context: 1983 Context Computing STP & CB in 1984 (photos by CR) 9 10 What do Programmers Need? What do Programmers Need? •Software Development Processes • Edit code • Compile, link •Software development tools! • Run, debug • Test • Document • Share, manage multi-programmer teams • Package, deliver • Maintain, upgrade 11 12 What do Programmers Need? Requirements Analysis •Great Overviews of the 1980s • Why Pascal is Not My Favorite Programming Language (BWK, 1981) ‣ Requirements for an Experimental Programming Environment (LPD, 1982) • The Organization of Expert Systems (1982) • An OO Approach to Multimedia Databases (1986) • Programmer as Reader (AG, 1986) • Requirements for an Experimentation Environment for Composers (STP, 1988) 13 14 Req_Exp_Prog_Env (lang) * Req_Exp_ * * * Prog_Env * * * * * * * * 15 16 Req_Exp_Prog_Env (L2) Req_Exp_Prog_Env (Tools) * * * * * * * * * 17 18 Req_Exp_Prog_Env (Libs) Req_Exp_Prog_Env * * * * * * 19 20 Programmer as Reader •Rules of Reuse: 1: If you can’t find it, you can’t reuse it •Insight: Software engineers spend more time 2: If you don’t trust it, you won’t reuse it reading than writing; therefore code reading •Ease of learning via high-level concepts tools are really important. • As in real life •Later insight: Code rewriting, refactoring, ... •Encourage good design & coding style by use •“Reading and writing are partners” of templates • Should use same/similar tools •Design of Smalltalk Browsers • E.g., not emacs and google • Find, test, reuse 21 22 Summary On-going Debates Language Issues Smart people have thought long and hard • • Uniform vs hybrid OO (is everything an object?) about how to improve programmer ‣ • Kinds of sharing of state and behavior productivity and code quality • Classes vs prototypes • Language issues • Single/multiple inheritance (composition, traits) • Library issues • Interfaces, protocols, abstract classes Development tool issues • Type declarations (vs type inferencing) • Performance/reusability/LoE trade-offs Operating system and environment • • Preferred syntax (many variants) Support for OOP & rapid prototyping and ‣ • ‣ Coding style and enforcement incremental refinement (refactoring, agileP) •Library/Tool/Environment issues? 23 24 Programming Languages A Brief History •Maximal (complex, •Minimal (simple, multi-paradigm, single paradigm) kitchen sink) •Scheme LISP •ALGOL •PASCAL •CS landmarks leading up to 1983 •PL/1 •Smalltalk •CommonLISP •Lua •ADA •MathLangs •C++ •APL, FP, Prolog, ... •Scripting (?) 25 26 1970s SMALLTALK-72 INSTRUCTION MANUAL ADELE GOLDBERG AND ALAN KAY, EDITORS History 1968: Englebart’s “Mother of all Demos” • DynaBook 1972: Kay’s “A Personal Computer for • \ Children of All Ages” \ \ •1976: Kay & Goldberg’s “Personal Dynamic Media” \ •1970s Xerox/MIT Hardware Development • Xerox Alto, MIT LISP Machines •Unix OS (open-source, licensed) 27 28 Interim Dynabook 29 30 OOP History IDE History •1960s •Smalltalk • Simula-67 (Augment/NLS, Sketchpad, ...) •LISP •1970s (uniform languages) • MIT Smalltalk-72, -76, -80 (i.e., V3) • • Xerox • FlavorsLISP • InterLISP-D & LOOPS •Others • Actor • Mesa/Cedar (PARC) •1980s (hybrid languages) • Maestro (PET) 1975 • Objective-C, C++ (1983) • UCSD Pascal, 1978 • ObjectPascal (1985) • TurboPascal (Borland), 1981 • Eiffel, ADA •Barstow, Shrobe & Sandewall, 1984 31 32 UCSD So, like, what is Smalltalk? Pascal •“The Smalltalk Programming System” •Language •(Class) Libraries •(Integrated) Development Environment •Delivery Mechanism •Methodology •Book series •Operating system? •Look-and-feel? PARC Learning Research Group 33 34 Smalltalk History NoteTaker 35 36 Early 1981 Smalltalk PR Smalltalk’s Design Principles 1977 •(See Byte, 8/81) •Reuse of Personal Mastery (OO Models) •Language • Available to developer and user alike • Model of Communicating (Concurrent) Objects • Objects, Storage Mgmnt, Messages/Methods • Organization • Modularity, Classification • Polymorphism, Factoring, Leverage (reuse) 37 38 Smalltalk’s Design Principles Smalltalk-as-OS •User Interface •Operating system: “A collection of the objects • “Language in which most of the communication is that didn’t fit into the language, i.e., there visual” shouldn’t be one” (Dan I) • Reactive Principle (all objects have GUIs) •OS components in the library • All windows, tools and apps are objects • Storage mgmnt, File system, Networking, Threads, • Any text can be executed (no shell) Scheduler, Display handling, User I/O •System • ST can run without/instead of an OS “When Smalltalk was little, she thought she • Everything is open (lots of rope, but there are nets • -- code DB and crash recovery) was an operating system.” 39 40 Smalltalk Language •Truly minimal syntax • One best way to write any given expression • Keyword syntax (rather than algebraic syntax) • Very few reserved words, no adjectives •Everything is an object •Objects only interact by message-passing •Instance and class messages •Control structures are messages (extensible) •Objects and classes are reflective • isKindOf:, understands:, allInstances Complete BNF of Smalltalk - Learning, coding, compiling 41 42 Everything is an object? Is this really so important? •Really? •Java argument (types vs classes) •Yes! •No stand-alone functions •Class creation (msg to superclass[es]) •No passive data structures •Control structures (aBool ifTrue: []) •“Evolutionary rather than revolutionary” •Low-level arithmetic (3 + 4) •Promotes Exception-handling ([] on: anExc handle: []) • Learning, finding • Reuse Debugging print (Transcript show: aValue) • • • Extensibility •Files, Sockets, Threads, Error conditions • Code management •Compiler, Browser, ... •Example: aList := aString asPath: sepChar 43 44 Keyword Syntax Control Structures •(As opposed to algebraic syntax) •Blocks, Booleans and Intervals are objects •To get an item out of an array Smalltalk: cl := [ :x :y | x + y ]. ‣ item := anArray at: 1 C++ 0x: auto cl = [&] (int x, int y) { return x + y; }; •To assign into an array •If/then/else ‣ anArray at: 1 put: anObject z > 0 ifTrue: [ “do this block” ] To construct a new Rectangle ifFalse: [ “otherwise, do this block” ] • For loops ‣ aRectangle := Rectangle left: 0 right: 4 top: 0 bottom: 4 • ‣ aRectangle := Rectangle left: 0 top: 0 width: 4 height: 4 1 to: 5 do: [ :num | • Always alternate keyword/argument Transcript show: (num * num) printString; cr] Also: do/while, switch, catch/throw, ... • Never have a list of arguments without keyword • • No operator precedence rules - 3 + 4 * 2 = 14 ! • Extensible control structures (!) 45 46 Smalltalk Libraries Smalltalk Libraries •Single root class (Object) •Protocol of Object •All classes can be extended (!) • Messages understood by all objects •Heavy use of polymorphism •Important high-level abstractions Mostly single inheritance • Magnitudes (number, point, date, character) • Collections (array, string, set, dictionary) Use composition and forwarding by default • • • Streams (file, socket, producer, server) Other sharing mechanisms (species, MI, generic • • Model, View, Controller classes behaviors, traits, interfaces, passing blocks, etc.) • Graphics classes • “Core” = ~1000 classes; VW 7.9 = ~3300 classes • Event classes 47 48 Class Hierarchies Special Features •Infinite-precision math •Metanumerics •Many graphical models •Several flavors of schedulers •ChangeSets, Namespaces, Packages •OO design patterns • Adaptor, Visitor, Singleton, Observer, Factory, Prototype, Composite, Decorator, Facade, Proxy, ... 49 50 Events Magnitudes & and Sequenceable Collections Views 51 52 The Smalltalk Pluggable GUI Look and Feel •Graphics rendering •BitBLT, SPIM, OpenGL •Window Manager •Was the OS •Can use host OS windows •MVC Classes •Widgets, wrappers, Look&Feel •Multi-screen, multi-desktop, multi-user GUIs •Standard tools (B-I-E) 53 54 Smalltalk IDE Code Browsers •Browsers •Uniform access to all system source code in • Browse collections of objects (e.g., classes) a hypertext browser with full-text search • Organization of set •Unit of change (compilation) is a method • Operations on inner nodes & leaf nodes •Many kinds •Inspectors • Package, Namespace, Hierarchy, Refactoring • Low-level access to an object’s properties • Cross-referencing (reflection & code DB) • May violate encapsulation •Code editing aids •Editors • Formatter, spelling, auto-complete, explainer • Customized inspector • Templates for classes, methods, documentation
Recommended publications
  • Traits: Experience with a Language Feature
    7UDLWV([SHULHQFHZLWKD/DQJXDJH)HDWXUH (PHUVRQ50XUSK\+LOO $QGUHZ3%ODFN 7KH(YHUJUHHQ6WDWH&ROOHJH 2*,6FKRRORI6FLHQFH1(QJLQHHULQJ$ (YHUJUHHQ3DUNZD\1: 2UHJRQ+HDOWKDQG6FLHQFH8QLYHUVLW\ 2O\PSLD$:$ 1::DONHU5G PXUHPH#HYHUJUHHQHGX %HDYHUWRQ$25 EODFN#FVHRJLHGX ABSTRACT the desired semantics of that method changes, or if a bug is This paper reports our experiences using traits, collections of found, the programmer must track down and fix every copy. By pure methods designed to promote reuse and understandability reusing a method, behavior can be defined and maintained in in object-oriented programs. Traits had previously been used to one place. refactor the Smalltalk collection hierarchy, but only by the crea- tors of traits themselves. This experience report represents the In object-oriented programming, inheritance is the normal way first independent test of these language features. Murphy-Hill of reusing methods—classes inherit methods from other classes. implemented a substantial multi-class data structure called ropes Single inheritance is the most basic and most widespread type of that makes significant use of traits. We found that traits im- inheritance. It allows methods to be shared among classes in an proved understandability and reduced the number of methods elegant and efficient way, but does not always allow for maxi- that needed to be written by 46%. mum reuse. Consider a small example. In Squeak [7], a dialect of Smalltalk, Categories and Subject Descriptors the class &ROOHFWLRQ is the superclass of all the classes that $UUD\ +HDS D.2.3 [Programming Languages]: Coding Tools and Tech- implement collection data structures, including , , 6HW niques - object-oriented programming and . The property of being empty is common to many ob- jects—it simply requires that the object have a size method, and D.3.3 [Programming Languages]: Language Constructs and that the method returns zero.
    [Show full text]
  • Liste Von Programmiersprachen
    www.sf-ag.com Liste von Programmiersprachen A (1) A (21) AMOS BASIC (2) A# (22) AMPL (3) A+ (23) Angel Script (4) ABAP (24) ANSYS Parametric Design Language (5) Action (25) APL (6) Action Script (26) App Inventor (7) Action Oberon (27) Applied Type System (8) ACUCOBOL (28) Apple Script (9) Ada (29) Arden-Syntax (10) ADbasic (30) ARLA (11) Adenine (31) ASIC (12) Agilent VEE (32) Atlas Transformatikon Language (13) AIMMS (33) Autocoder (14) Aldor (34) Auto Hotkey (15) Alef (35) Autolt (16) Aleph (36) AutoLISP (17) ALGOL (ALGOL 60, ALGOL W, ALGOL 68) (37) Automatically Programmed Tools (APT) (18) Alice (38) Avenue (19) AML (39) awk (awk, gawk, mawk, nawk) (20) Amiga BASIC B (1) B (9) Bean Shell (2) B-0 (10) Befunge (3) BANCStar (11) Beta (Programmiersprache) (4) BASIC, siehe auch Liste der BASIC-Dialekte (12) BLISS (Programmiersprache) (5) Basic Calculator (13) Blitz Basic (6) Batch (14) Boo (7) Bash (15) Brainfuck, Branfuck2D (8) Basic Combined Programming Language (BCPL) Stichworte: Hochsprachenliste Letzte Änderung: 27.07.2016 / TS C:\Users\Goose\Downloads\Softwareentwicklung\Hochsprachenliste.doc Seite 1 von 7 www.sf-ag.com C (1) C (20) Cluster (2) C++ (21) Co-array Fortran (3) C-- (22) COBOL (4) C# (23) Cobra (5) C/AL (24) Coffee Script (6) Caml, siehe Objective CAML (25) COMAL (7) Ceylon (26) Cω (8) C for graphics (27) COMIT (9) Chef (28) Common Lisp (10) CHILL (29) Component Pascal (11) Chuck (Programmiersprache) (30) Comskee (12) CL (31) CONZEPT 16 (13) Clarion (32) CPL (14) Clean (33) CURL (15) Clipper (34) Curry (16) CLIPS (35)
    [Show full text]
  • A Metacircular Architecture for Runtime Optimisation Persistence Clément Béra
    Sista: a Metacircular Architecture for Runtime Optimisation Persistence Clément Béra To cite this version: Clément Béra. Sista: a Metacircular Architecture for Runtime Optimisation Persistence. Program- ming Languages [cs.PL]. Université de Lille 1, 2017. English. tel-01634137 HAL Id: tel-01634137 https://hal.inria.fr/tel-01634137 Submitted on 13 Nov 2017 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Universit´edes Sciences et Technologies de Lille { Lille 1 D´epartement de formation doctorale en informatique Ecole´ doctorale SPI Lille UFR IEEA Sista: a Metacircular Architecture for Runtime Optimisation Persistence THESE` pr´esent´eeet soutenue publiquement le 15 Septembre 2017 pour l'obtention du Doctorat de l'Universit´edes Sciences et Technologies de Lille (sp´ecialit´einformatique) par Cl´ement B´era Composition du jury Pr´esident: Theo D'Hondt Rapporteur : Ga¨elThomas, Laurence Tratt Examinateur : Elisa Gonzalez Boix Directeur de th`ese: St´ephaneDucasse Co-Encadreur de th`ese: Marcus Denker Laboratoire d'Informatique Fondamentale de Lille | UMR USTL/CNRS 8022 INRIA Lille - Nord Europe Numero´ d’ordre: XXXXX i Acknowledgments I would like to thank my thesis supervisors Stéphane Ducasse and Marcus Denker for allowing me to do a Ph.D at the RMoD group, as well as helping and supporting me during the three years of my Ph.D.
    [Show full text]
  • The Future: the Story of Squeak, a Practical Smalltalk Written in Itself
    Back to the future: the story of Squeak, a practical Smalltalk written in itself Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay [Also published in OOPSLA ’97: Proc. of the 12th ACM SIGPLAN Conference on Object-oriented Programming, 1997, pp. 318-326.] VPRI Technical Report TR-1997-001 Viewpoints Research Institute, 1209 Grand Central Avenue, Glendale, CA 91201 t: (818) 332-3001 f: (818) 244-9761 Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself by Dan Ingalls Ted Kaehler John Maloney Scott Wallace Alan Kay at Apple Computer while doing this work, now at Walt Disney Imagineering 1401 Flower Street P.O. Box 25020 Glendale, CA 91221 [email protected] Abstract Squeak is an open, highly-portable Smalltalk implementation whose virtual machine is written entirely in Smalltalk, making it easy to debug, analyze, and change. To achieve practical performance, a translator produces an equivalent C program whose performance is comparable to commercial Smalltalks. Other noteworthy aspects of Squeak include: a compact object format that typically requires only a single word of overhead per object; a simple yet efficient incremental garbage collector for 32-bit direct pointers; efficient bulk- mutation of objects; extensions of BitBlt to handle color of any depth and anti-aliased image rotation and scaling; and real-time sound and music synthesis written entirely in Smalltalk. Overview Squeak is a modern implementation of Smalltalk-80 that is available for free via the Internet, at http://www.research.apple.com/research/proj/learning_concepts/squeak/ and other sites. It includes platform-independent support for color, sound, and image processing.
    [Show full text]
  • April 22 -- STEPS NSF 2012 Report
    ! 2012 REPORT ! STEPS Toward Expressive Programming Systems ! “A#Science#Experiment”# ! by# (In#random#order)#Yoshiki#Ohshima,#Dan#Amelang,#Ted#Kaehler,#Bert#Freudenberg,# Aran#Lunzer,#Alan#Kay,#Ian#Piumarta,#Takashi#Yamamiya,#Alan#Borning,#Hesam# Samimi,#Bret#Victor,#Kim#Rose*# VIEWPOINTS#RESEARCH#INSTITUTE# # # *These#are#the#STEPS#researchers#for#the#year#2012.#For#a#complete#listing# of#the#participants#over#the#length#of#the#project#see#the#section#on#the# NSF#site#which#contains#this#report.# TABLE OF CONTENTS — The STEPS Project for the General Public Summary of the STEPS project . Origin . STEPS aims at personal computing . What does STEPS look like? . STEPS is a “science project” . General approach . “T-shirt programming” . Overall map of STEPS . General STEPS results . Making “runnable maths” . Assessing STEPS Summary of STEPS research in 2012 . Inventing & building a language for STEPS “UI and applications”, and rewriting Frank in it . Producing a workable “chain of meaning” that extends from the screen all the way to the CPU . Inventing methods that create automatic visualizers for languages created from metalanguages . Continuing the start of “What vs How” programming via “Cooperating Languages and Solvers” Reflections on the STEPS Project to Date References Outreach Activities for final year of NSF part of the STEPS project Publications for the NSF part of the STEPS project Appendix I: KScript and KSWorld Appendix II: Making Applications in KSWorld ——— ! The$STEPS$Project$For$The$General$Public$ If#computing#is#important—for#daily#life,#learning,#business,#national#defense,#jobs,#and#
    [Show full text]
  • Towards Gradual Typing for Generics
    Towards Gradual Typing for Generics Lintaro Ina and Atsushi Igarashi Graduate School of Informatics, Kyoto University {ina,igarashi}@kuis.kyoto-u.ac.jp Abstract. Gradual typing, proposed by Siek and Taha, is a framework to combine the benefits of static and dynamic typing. Under gradual typing, some parts of the program are type-checked at compile time, and the other parts are type-checked at run time. The main advantage of gradual typing is that a programmer can write a program rapidly without static type annotations in the beginning of development, then add type annotations as the development progresses and end up with a fully statically typed program; and all these development steps are carried out in a single language. This paper reports work in progress on the introduction of gradual typing into class-based object-oriented programming languages with generics. In previous work, we have developed a gradual typing system for Feather- weight Java and proved that statically typed parts do not go wrong. After reviewing the previous work, we discuss issues raised when generics are introduced, and sketch a formalization of our solutions. 1 Introduction Siek and Taha have coined the term “gradual typing” [1] for a linguistic sup- port of the evolution from dynamically typed code, which is suitable for rapid prototyping, to fully statically typed code, which enjoys type safety properties, in a single programming language. The main technical challenge is to ensure some safety property even for partially typed programs, in which some part is statically typed and the rest is dynamically typed. The framework of gradual typing consists of two languages: the surface lan- guage in which programmers write programs and the intermediate language into which the surface language translates.
    [Show full text]
  • The Development of Smalltalk Topic Paper #7
    The Development of Smalltalk Topic Paper #7 Alex Laird Max Earn Peer CS-3210-01 Reviewer On Time/Format 1 2/4/09 Survey of Programming Languages Correct 5 Spring 2009 Clear 2 Computer Science, (319) 360-8771 Concise 2 [email protected] Grading Rubric Grading Total 10 pts ABSTRACT Dynamically typed languages are easier on the compiler because This paper describes the development of the Smalltalk it has to make fewer passes and the brunt of checking is done on programming language. the syntax of the code. Compilation of Smalltalk is just-in-time compilation, also known Keywords as dynamic translation. It means that upon compilation, Smalltalk code is translated into byte code that is interpreted upon usage and Development, Smalltalk, Programming, Language at that point the interpreter converts the code to machine language and the code is executed. Dynamic translations work very well 1. INTRODUCTION with dynamic typing. Smalltalk, yet another programming language originally developed for educational purposes and now having a much 5. IMPLEMENTATIONS broader horizon, first appeared publically in the computing Smalltalk has been implemented in numerous ways and has been industry in 1980 as a dynamically-typed object-oriented language the influence of many future languages such as Java, Python, based largely on message-passing in Simula and Lisp. Object-C, and Ruby, just to name a few. Athena is a Smalltalk scripting engine for Java. Little Smalltalk 2. EARLY HISTORY was the first interpreter of the programming language to be used Development for Smalltalk started in 1969, but the language outside of the Xerox PARC.
    [Show full text]
  • Smalltalk's Influence on Modern Programming
    1 Smalltalk’s Influence on Modern Programming Smalltalk’s Influence on Modern Programming Matt Savona. February 1 st , 2008. In September 1972 at Xerox PARC, Alan Kay, Ted Kaeher and Dan Ingalls were discussing programming languages in the hallway of their office building. Ted and Dan had begun to consider how large a language had to be to have “great power.” Alan took a different approach, and “asserted that you could define the "most powerful language in the world" in "a page of code."” Ted and Dan replied, “Put up or shut up” (Kay). And with that, the bet to develop the most powerful language was on. Alan arrived at PARC every morning at 4am for two weeks, and devoted his time from 4am to 8am to the development of the language. That language was Smalltalk. Kay had “originally made the boast because McCarthy's self-describing LISP interpreter was written in itself. It was about "a page", and as far as power goes, LISP was the whole nine- yards for functional languages.” He was sure that he could “do the same for object-oriented languages” and still have a reasonable syntax. By the eighth morning, Kay had a version of Smalltalk developed where “symbols were byte-coded and the receiving of return-values from a send was symmetric” (Kay). Several days later, Dan Ingalls had coded Kay’s scheme in BASIC, added a “token scanner”, “list maker” and many other features. “Over the next ten years he made at least 80 major releases of various flavors of Smalltalk” (Kay).
    [Show full text]
  • Type Feedback for Bytecode Interpreters Position Paper ICOOOLPS 2007
    Type Feedback for Bytecode Interpreters Position Paper ICOOOLPS 2007 Michael Haupt1, Robert Hirschfeld1, and Marcus Denker2 1 Software Architecture Group Hasso-Plattner-Institut University of Potsdam, Germany 2 Software Composition Group Institute of Computer Science and Applied Mathematics University of Berne, Switzerland michael.haupt,hirschfeld @hpi.uni-potsdam.de, [email protected] { } Abstract. This position paper proposes the exploitation of type feed- back mechanisms, or more precisely, polymorphic inline caches, for purely interpreting implementations of object-oriented programming languages. Using Squeak’s virtual machine as an example, polymorphic inline caches are discussed as an alternative to global caching. An implementation proposal for polymorphic inline caches in the Squeak virtual machine is presented, and possible future applications for online optimization are outlined. 1 Introduction Bytecode interpreters are small in size and comparatively easy to implement, but generally execute programs much less efficiently than just-in-time (JIT) compilers. Techniques like threaded interpretation [9, 11, 2] focus on speeding up bytecode interpretation itself, and caching [4, 5, 1] improves the performance of message sends—the most common operation in object-oriented software [7]. It is interesting to observe that, while threading mechanisms are used natu- rally to a varying degree in bytecode interpreter implementations, such systems usually employ only global caching to speed up dynamic method dispatch. A global cache is clearly beneficial with respect to overall performance. Still, it does not provide optimal support for polymorphic message send sites, and it does not allow for exploiting type information (we provide details on these issues in the following section). In our opinion, the employment of polymorphic inline caches (PICs) [5] instead can provide means for achieving significant speedups in bytecode interpreters while exhibiting only a moderate increase in memory footprint and implementation complexity.
    [Show full text]
  • Graphical Interface
    Appendix: How to program in Croquet Author: S.M. Wolff Project: Cell-Forum Project Table of Contents Table of Contents .............................................................................................................. 2 Graphical Interface ........................................................................................................... 6 Control structures .............................................................................................................. 9 Testing variables ............................................................................................................... 9 If then else ........................................................................................................................ 10 Switch ............................................................................................................................ 10 While .............................................................................................................................. 10 For .................................................................................................................................. 11 Data structures ............................................................................................................ 12 Ordered Collection ...................................................................................................... 12 Classes, Methods and Shared Variables .................................................................... 13 Packages .....................................................................................................................
    [Show full text]
  • A Tour of the Squeak Object Engine
    A Tour of the Squeak Object Engine A Tour of the Squeak Object Engine Tim Rowledge, [email protected] Introduction This chapter is intended to explain some basics of how a Virtual Machine (VM) works, why a VM is useful, what it does for the Squeak programmer and user, and how the Squeak VM might develop in the future. What is a Virtual Machine and why do we need one? A Virtual Machine provides us with a pretense of being a machine other than the actual hardware in use. Using one allows systems that behave differently than the host hardware to run as if on hardware designed for them. The term Object Engine is less commonly used but is a useful concept that includes the lowest system areas of the langauge environment running on the VM. Since there is often some flux in the definition of which components are within the actual VM and which are part of the supported environment, Object Engine is useful as a more inclusive term. The term Virtual Machine is used in several ways. When IBM refer to VM/CMS they are referring to a way of making a mainframe behave as if it is many machines, so that programs can assume they have total control even though they do not. Intel provide a somewhat similar facility in the x86 architecture(?), referred to as Virtual Mode. This sort of VM is a complete hardware simulation, often supported at the lowest level by the hardware. Another sort of VM is the emulator - SoftWindows for the Mac, Acorn's !PC, Linux's WINE are good examples - where another machine and/or OS is simulated to allow a Mac user to run Windows programs, an Acorn RiscPC or a Linux machine to run Windows98 programs and so on.
    [Show full text]
  • Smalltalk Language Mapping Specification
    Smalltalk Language Mapping Specification New Edition: June 1999 Copyright 1995, 1996 BNR Europe Ltd. Copyright 1998, Borland International Copyright 1991, 1992, 1995, 1996 Digital Equipment Corporation Copyright 1995, 1996 Expersoft Corporation Copyright 1996, 1997 FUJITSU LIMITED Copyright 1996 Genesis Development Corporation Copyright 1989, 1990, 1991, 1992, 1995, 1996 Hewlett-Packard Company Copyright 1991, 1992, 1995, 1996 HyperDesk Corporation Copyright 1998 Inprise Corporation Copyright 1996, 1997 International Business Machines Corporation Copyright 1995, 1996 ICL, plc Copyright 1995, 1996 IONA Technologies, Ltd. Copyright 1996, 1997 Micro Focus Limited Copyright 1991, 1992, 1995, 1996 NCR Corporation Copyright 1995, 1996 Novell USG Copyright 1991,1992, 1995, 1996 by Object Design, Inc. Copyright 1991, 1992, 1995, 1996 Object Management Group, Inc. Copyright 1996 Siemens Nixdorf Informationssysteme AG Copyright 1991, 1992, 1995, 1996 Sun Microsystems, Inc. Copyright 1995, 1996 SunSoft, Inc. Copyright 1996 Sybase, Inc. Copyright 1998 Telefónica Investigación y Desarrollo S.A. Unipersonal Copyright 1996 Visual Edge Software, Ltd. The companies listed above have granted to the Object Management Group, Inc. (OMG) a nonexclusive, royalty-free, paid up, worldwide license to copy and distribute this document and to modify this document and distribute copies of the modified ver- sion. Each of the copyright holders listed above has agreed that no person shall be deemed to have infringed the copyright in the included material of any such copyright holder by reason of having used the specification set forth herein or having con- formed any computer software to the specification. PATENT The attention of adopters is directed to the possibility that compliance with or adoption of OMG specifications may require use of an invention covered by patent rights.
    [Show full text]