Little Smalltalk

Total Page:16

File Type:pdf, Size:1020Kb

Little Smalltalk Dave’s Smalltalk FAQ Copyright (c) 1995 and 1996 by David N. Smith. All Rights Reserved. Email: [email protected] Last-modified: 28 July 1995 Certain questions get asked time and again. In order to save the repeated answering of these questions, and to provide the best answers, collections of these ’frequently asked questions’, and their answers, of course, are made and distributed to interested parties. Called FAQs, these documents often become the basic documentation on a topic and should be checked before posting a question to a related newsgroup. This file is a set of frequently asked questions for the Smalltalk language. There are several such Smalltalk FAQs; this one is by David N. Smith. Thanks to all those on comp.lang.smalltalk who asked questions, answered questions, and provided an inspirational environment in which the seeds of this FAQ grew and propsered. Format and Availability A table of contents to this FAQ is distributed periodically on the newsgroup comp.lang.smalltalk. It consists of a text version of part one of the FAQ. The FAQ itself is available in several formats including Postscript™ and Adobe™ Acrobat™ formats. It is available online at: URL: http://st-www.cs.uiuc.edu/users/dnsmith/SmallFaq.html and URL: http://www.dnsmith.com/SmallFAQ/SmallFaq.html There is no text-only version; not providing one is somewhat unusual, but so is having a typeset FAQ. The fonts used are the ever-present Times and Courier, selected because every postscript printer known to man has them builtin. It is thus Copyright (c) 1996 by David N. Smith. All Rights Reserved. DRAFT 1 not necessary to distribute copies of the fonts in the postscript and Acrobat files.At the moment there is no HTML version; one will appear when suitable and satisfactory methods of translating Adobe FrameMaker files to HTML are available. If you have not already read the overall Usenet introductory material posted to "news.announce.newusers", please do. It is also available by ftp in: URL: ftp://garbo.uwasa.fi/pc/doc-net/usenews.zip Status This is a draft document. It surely contain errors in its statements and bugs in its code. Some obvious questions are not present. Many questions are asked but left unanswered. The obvious questions will be asked and the unanswered questions will be answered in the fullness of time. Chapters nearer the front of the document are more complete than chapters nearer the back. There are many notes from the author to the author: These are usually right aligned and flagged with a triangle.n Craig Latta’s Smalltalk FAQ Another Smalltalk FAQ is by Craig Latta and is available in text format at: URL: ftp://XCF.Berkeley.EDU/pub/misc/smalltalk/FAQ/FAQ.txt or: URL: ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/lang/smalltalk/ and in HTML format at: URL: http://XCF.Berkeley.EDU/pub/misc/smalltalk/FAQ. Vikas Malik’s Smalltalk FAQ Yet another Smalltalk FAQ is by Vikas Malik and is available in HTML format at: URL: http://www.infi.net/~vmalik/ The Object People’s IBM Smalltalk FAQ The Object People maintain a FAQ on IBM Smalltalk at: URL: http://www.objectpeople.on.ca/~wayne/faq/visualage/ 2 DRAFT Copyright (c) 1996 by David N. Smith. All Rights Reserved. IBM’s Smalltalk FAQ IBM maintains a FAQ on IBM Smalltalk at: URL: http://www.torolab.ibm.com/software/ad/vishints.html Trademarks Many trademarks are used in this FAQ. These trademarks are the property of their respective owners. When known to the author, trademarks are indicated by an uppercase leading letter, or a word entirely in uppercase letters as appropriate. Quoted material without other attribution is from an obvious (and referenced) URL. Updates and Corrections Comments from readers are not only welcome but are invited. • Are the questions the right ones? • Are the answers suitable and at the right level? • What topics need to be covered? • What questions should be added? The author does not have access to all existing Smalltalk system (nor the time to be an expert in all the ones he does have). If you have information on specific implementations that should go into any question, please forward it to the author. If you have corrections or suggestions for this FAQ, send them to David N. Smith at [email protected] or [email protected]. Please include: your name, your email address; and your telephone number or snail- mail address. Submission of an update, correction, or additional topic grants permission to use the information in the FAQ and derivitive works if any, unless otherwise stated. Acknowledgement of sources will be limited to the submitters name and email address, unless requested otherwise, and subject to the editors judgement. Thank you. Copyright (c) 1996 by David N. Smith. All Rights Reserved. DRAFT 3 Short Table of Contents General Questions Learning the Smalltalk Language ......................................................................................................2 Conferences......................................................................................................................................11 Smalltalk Places on the Net..............................................................................................................13 Smalltalk Implementations ANSI Smalltalk ................................................................................................................................22 Digitalk Visual Smalltalk.................................................................................................................23 Dolphin Smalltalk ............................................................................................................................24 Enfin Smalltalk.................................................................................................................................24 GemStone Smalltalk.........................................................................................................................25 GNU Smalltalk.................................................................................................................................25 IBM Smalltalk and VisualAge .........................................................................................................26 Little Smalltalk.................................................................................................................................27 Object Connect’s MT Smalltalk.......................................................................................................28 Object Technology International......................................................................................................29 ParcPlace VisualWorks Smalltalk....................................................................................................30 ParcPlace-Digitalk Smalltalk ...........................................................................................................31 QKS SmalltalkAgents ......................................................................................................................32 SELF Smalltalk ................................................................................................................................33 Smalltalk-X ......................................................................................................................................34 VMARK Enfin Smalltalk.................................................................................................................35 Definitions of Terms Definitions of Terms: Objects ..........................................................................................................37 Definitions of Terms: Messages.......................................................................................................40 Definitions of Terms: Classes ..........................................................................................................41 The Smalltalk Language Literals..............................................................................................................................................43 Variables and Names........................................................................................................................50 Global Variables...............................................................................................................................57 Class Variables and Class Instance Variables..................................................................................58 Pool Dictionaries..............................................................................................................................60 Classes..............................................................................................................................................64 What Variables Hold........................................................................................................................68 Blocks...............................................................................................................................................71 Methods............................................................................................................................................78 4 DRAFT Copyright (c) 1996 by David N. Smith. All Rights Reserved. Inheritance, Self and Super ..............................................................................................................81 Objects Object Identity..................................................................................................................................87
Recommended publications
  • 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]
  • Software Extensibility and the System Object Model (SOM)
    Software Extensibility and the System Object Model (SOM) WWDC Release May 1996 © Apple Computer, Inc. 1992–1996 Apple Computer, Inc. Balloon Help, Chicago, Finder, Some states do not allow the exclusion © 1992–1996 Apple Computer, Inc. Geneva, Mac, and QuickDraw are or limitation of implied warranties or All rights reserved. trademarks of Apple Computer, Inc. liability for incidental or consequential damages, so the above limitation or No part of this publication may be IBM is a registered trademark of exclusion may not apply to you. This reproduced, stored in a retrieval International Business Machines warranty gives you specific legal rights, system, or transmitted, in any form Corporation. and you may also have other rights or by any means, mechanical, MacPaint and MacWrite are which vary from state to state.. electronic, photocopying, recording, registered trademarks, and or otherwise, without prior written Clarisworks is a trademark, of Claris permission of Apple Computer, Inc., Corporation. except to make a backup copy of NuBus is a trademark of Texas any documentation provided on Instruments. CD-ROM. PowerPC is a trademark of The Apple logo is a trademark of International Business Machines Apple Computer, Inc. Corporation, used under license Use of the “keyboard” Apple logo therefrom. (Option-Shift-K) for commercial UNIX is a registered trademark of purposes without the prior written Novell, Inc. in the United States and consent of Apple may constitute other countries, licensed exclusively trademark infringement and unfair through X/Open Company, Ltd. competition in violation of federal and state laws. Simultaneously published in the No licenses, express or implied, are United States and Canada.
    [Show full text]
  • Proceedings of the Rexx Symposium for Developers and Users
    SLAC-R-95-464 CONF-9505198-- PROCEEDINGS OF THE REXX SYMPOSIUM FOR DEVELOPERS AND USERS May 1-3,1995 Stanford, California Convened by STANFORD LINEAR ACCELERATOR CENTER STANFORD UNIVERSITY, STANFORD, CALIFORNIA 94309 Program Committee Cathie Dager of SLAC, Convener Forrest Garnett of IBM Pam Taylor of The Workstation Group James Weissman Prepared for the Department of Energy under Contract number DE-AC03-76SF00515 Printed in the United States of America. Available from the National Technical Information Service, U.S. Department of Commerce, 5285 Port Royal Road, Springfield, Virginia 22161. DISTRIBUTION OF THIS DOCUMENT IS UNLIMITED ;--. i*-„r> ->&• DISCLAIMER This report was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor any agency thereof, nor any of their employees, make any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof. DISCLAIMER Portions
    [Show full text]
  • Hopscotch: Towards User Interface Composition Vassili Bykov Cadence Design Systems, 2655 Seely Ave, San Jose, CA 95134
    Hopscotch: Towards User Interface Composition Vassili Bykov Cadence Design Systems, 2655 Seely Ave, San Jose, CA 95134 Abstract Hopscotch is the application framework and development environment of Newspeak, a new programming language and platform inspired by Smalltalk, Self and Beta. Hopscotch avoids a number of design limitations and shortcomings of traditional UIs and UI frameworks by favoring an interaction model and implementing a framework architecture that enable composition of interfaces. This paper discusses the deficiencies of the traditional approach, provides an overview of the Hopscotch alternative and analyses how it improves upon the status quo. 1. Introduction Hopscotch are attributable to its revised interaction and navigation model as much as to the underlying Newspeak [1] is a programming language and framework architecture. For this reason, this paper platform being developed by a team led by Gilad pays equal attention to the compositional frame- Bracha at Cadence Design Systems, Inc. The sys- work architecture and to the changes in the inter- tem is currently hosted inside Squeak [2], a descen- action model of Hopscotch compared to more tradi- dent of Smalltalk-80 [3]. Smalltalk, along with Self tional development environments. [4] and Beta [5], is also among the most important influences on the design of the Newspeak language. 2. Traditional Interface Construction This paper focuses on Hopscotch, the applica- tion framework of Newspeak and the Newspeak The art of devising forms to be filled in depends IDE implemented concurrently with the frame- on three elements: obscurity, lack of space, and work. The framework and the IDE allow easy nav- the heaviest penalties for failure.
    [Show full text]
  • Smalltalk Tutorial for Java Programmers!
    SmallTalk Tutorial for Java Programmers! SmallTalk Tutorial for Java Programmers! Giovanni Giorgi <[email protected]> Jan 2002 A small paper to teach yourself the incredible Smalltalk language! It's so easy, it's so fun! 1. Introduction ● 1.1 Revision history ● 1.2 Conventions used in this paper ● 1.3 Distribution Policy ● 1.4 Why Smalltalk? ● 1.5 Background Required 2. Why Smalltalk is so strange? (or a brief history of Smalltalk) ● 2.1 Download Right Now! ● 2.2 Hello world in Smalltalk ● 2.3 Big Numbers ● 2.4 Code Blocks ● 2.5 The while loop 3. Main Differences between Java and Smalltalk http://daitanmarks.sourceforge.net/or/squeak/squeak_tutorial.html (1 of 2) [1/7/2002 20:44:13] SmallTalk Tutorial for Java Programmers! ● 3.1 Java Versus Smalltalk ● 3.2 Types? No thank you!! ● 3.3 The Squeak base library compared with Java ● 3.4 The Smalltalk Code database ● 3.5 Multiple-Inheritance 4. Ending Words ● 4.1 Going on ● 4.2 Commercial and free products list ● 4.3 References http://daitanmarks.sourceforge.net/or/squeak/squeak_tutorial.html (2 of 2) [1/7/2002 20:44:13] SmallTalk Tutorial for Java Programmers!: Introduction 1. Introduction This paper will teach you the basics of Smalltalk80 language. This tutorial suites the needs of C and Java programmers. But the tutorial can be understanded by everyone knowing a bit of C and/or OOP concepts, as we'll see. Because I will refer a lot to other books and use a lot of technical terms, I'll try to enjoy you while reading.
    [Show full text]
  • Filename Extensions
    Filename Extensions Generated 22 February 1999 from Filex database with 3240 items. ! # $ & ) 0 1 2 3 4 6 7 8 9 @ S Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z ~ • ! .!!! Usually README file # .### Compressed volume file (DoubleSpace) .### Temp file (QTIC) .#24 Printer data file for 24 pin matrix printer (LocoScript) .#gf Font file (MetaFont) .#ib Printer data file (LocoScript) .#sc Printer data file (LocoScript) .#st Standard mode printer definitions (LocoScript) $ .$$$ Temporary file .$$f Database (OS/2) .$$p Notes (OS/2) .$$s Spreadsheet (OS/2) .$00 Pipe file (DOS) .$1 ZX Spectrum file in HOBETA format .$d$ Data (OS/2 Planner) .$db Temporary file (dBASE IV) .$ed Editor temporary file (MS C) .$ln TLink response file (Borland C++) .$o1 Pipe file (DOS) .$vm Virtual manager temporary file (Windows 3.x) & .&&& Temporary file ) .)2( LHA archiver temporary file (LHA) 0 .0 Compressed harddisk data (DoubleSpace) .000 Common filename extension (GEOS) .000 Compressed harddisk data (DoubleSpace) .001 Fax (Hayes JT FAX) (many) .075 75x75 dpi display font (Ventura Publisher) .085 85x85 dpi display font (Ventura Publisher) .091 91x91 dpi display font (Ventura Publisher) .096 96x96 dpi display font (Ventura Publisher) .0b Printer font with lineDraw extended character set (PageMaker) 1 .1 Unformatted manual page (Roff/nroff/troff/groff) .10x Bitmap graphics (Gemini 10x printer graphics file) .123 Data (Lotus123 97) .12m Smartmaster file (Lotus123 97) .15u Printer font with PI font set (PageMaker) .1st Usually README.1ST text 2 .24b Bitmap
    [Show full text]
  • A Survey of Technologies for Building Collaborative Virtual Environments
    The International Journal of Virtual Reality, 2009, 8(1):53-66 53 A Survey of Technologies for Building Collaborative Virtual Environments Timothy E. Wright and Greg Madey Department of Computer Science & Engineering, University of Notre Dame, United States Whereas desktop virtual reality (desktop-VR) typically uses Abstract—What viable technologies exist to enable the nothing more than a keyboard, mouse, and monitor, a Cave development of so-called desktop virtual reality (desktop-VR) Automated Virtual Environment (CAVE) might include several applications? Specifically, which of these are active and capable display walls, video projectors, a haptic input device (e.g., a of helping us to engineer a collaborative, virtual environment “wand” to provide touch capabilities), and multidimensional (CVE)? A review of the literature and numerous project websites indicates an array of both overlapping and disparate approaches sound. The computing platforms to drive these systems also to this problem. In this paper, we review and perform a risk differ: desktop-VR requires a workstation-class computer, assessment of 16 prominent desktop-VR technologies (some mainstream OS, and VR libraries, while a CAVE often runs on building-blocks, some entire platforms) in an effort to determine a multi-node cluster of servers with specialized VR libraries the most efficacious tool or tools for constructing a CVE. and drivers. At first, this may seem reasonable: different levels of immersion require different hardware and software. Index Terms—Collaborative Virtual Environment, Desktop However, the same problems are being solved by both the Virtual Reality, VRML, X3D. desktop-VR and CAVE systems, with specific issues including the management and display of a three dimensional I.
    [Show full text]
  • This Is the Author's Version of a Work Accepted for Publication by Elsevier
    NOTICE: This is the author’s version of a work accepted for publication by Elsevier. Changes resulting from the publishing process, including peer review, editing, corrections, structural formatting and other quality control mechanisms, may not be reflected in this document. A definitive version was subsequently published in the Journal of Systems and Software, Volume 86, Issue 2, pp. 278-301, February 2013. Efficient Support of Dynamic Inheritance for Class- and Prototype-based Languages Jose Manuel Redondo, Francisco Ortin University of Oviedo, Computer Science Department, Calvo Sotelo s/n, 33007, Oviedo, Spain Abstract Dynamically typed languages are becoming increasingly popular for different software devel- opment scenarios where runtime adaptability is important. Therefore, existing class-based plat- forms such as Java and .NET have been gradually incorporating dynamic features to support the execution of these languages. The implementations of dynamic languages on these platforms com- monly generate an extra layer of software over the virtual machine, which reproduces the reflective prototype-based object model provided by most dynamic languages. Simulating this model fre- quently involves a runtime performance penalty, and makes the interoperation between class- and prototype-based languages difficult. Instead of simulating the reflective model of dynamic languages, our approach has been to extend the object-model of an efficient class-based virtual machine with prototype-based seman- tics, so that it can directly support both kinds of languages. Consequently, we obtain the runtime performance improvement of using the virtual machine JIT compiler, while a direct interoperation between languages compiled to our platform is also possible. In this paper, we formalize dynamic inheritance for both class- and prototype-based languages, and implement it as an extension of an efficient virtual machine that performs JIT compilation.
    [Show full text]
  • Enabling White-Box Reuse in a Pure Composition Language
    Enabling White-Box Reuse in a Pure Composition Language Diplomarbeit der Philosophisch-naturwissenschaftlichen Fakultat¨ der Universitat¨ Bern vorgelegt von Andreas Schlapbach Dezember 2002 Leiter der Arbeit: Prof. Dr. O. Nierstrasz Nathanael Scharli¨ Institut fur¨ Informatik und angewandte Mathematik i Abstract Inheritance is a key concept of object-oriented programming languages, features such as conceptual modeling and reusability are largely accredited to it. While many useful com- ponents have been, and will be, developed in this paradigm, the form of white-box reuse offered by inheritance has a fundamental flaw: reusing components by inheritance requires an understanding of the internals of the components. We can not treat components of object-oriented languages as black-box entities, inheritance breaks encapsulation and in- troduces subtle dependencies between base and extending classes. Component-oriented programming addresses this problem by shifting away from program- ming towards software composition. We build applications by scripting components. In- stead of overriding the internals of a component, we focus on composing its interfaces only. This form of black-box reuse leads to a flexible and extendible architecture with reusable components. In this master's thesis we propose a migration strategy from class inheritance { a white- box form of reuse { to component composition as a black-box form of reuse. We present a language extension that gives us the power of inheritance combined with the ease of scripting. It enables us to reuse Java components using inheritance in JPiccola { a small, pure and general composition language implemented on the Java platform { at a high level of abstraction. Using the services provided by the language extension we can seamlessly generate interfaces and subclasses from JPiccola.
    [Show full text]
  • Lumi`Ere: a Novel Framework for Rendering 3D Graphics in Smalltalk
    banner above paper title Lumiere` : a Novel Framework for Rendering 3D graphics in Smalltalk Fernando Olivero, Michele Lanza, Romain Robbes REVEAL@ Faculty of Informatics - University of Lugano, Switzerland ffernando.olivero,michele.lanza,[email protected] Abstract One of the cornerstones of Lumiere` is to hinge on the metaphor To render 3D graphics there is a number of different frameworks of a stage. We believe this helps to make the framework and its written in Smalltalk. While most of them provide powerful facil- usage more intuitive, as metaphors are powerful tools to assist ities, many of them are outdated, abandoned, undocumented or the usage of abstract concepts: If a framework is built around an heavyweight. intuitive metaphor which maps abstracts concepts to real-world In this paper we present Lumiere` , a novel lightweight frame- objects, programmers can obtain an immediate mental model of work for rendering 3D graphics using OpenGL based on a stage the framework’s domain model, thus easing the understanding and metaphor. Lumiere` is implemented using the Pharo IDE. In its cur- usage of the framework. rent state it supports basic and composite shapes to populate 3D To apply this concept to 3D graphics, Lumiere` ’s stage metaphor scenes, features a camera, and a lighting model. implies that all graphics are produced by cameras taking pictures We illustrate the usage of Lumiere` with Gaucho, an environ- of 3D shapes lit by the lights of the stage. A stage provides the ment for visual programming we are currently building. setting for taking pictures of a composition of visual objects we call micro-worlds.
    [Show full text]
  • Smalltalk Volume 2 Issue 7
    The International Newsletter for Smalltalk Programmers May 1993 Volume 2 Number 7 ecognizing Smalltalk’s increasing importance as a mainstream pro- TOWARD A gramming language and acting as a large user of the language, IBM D recently proposed the formation of a standards effort within ANSI to define a Smalltalk language standard and offered a “common SMALLTALK base” strawman to start such an effort. At this time the proposal has beenQaccepted by the ANSI SPARC committee, and the formation of an ANSI STANDARD: Smalltalk committee has begun. This article focuses on technical issues regarding the common base. We have written a companion article that will appear in OBJECT MAGAZINE,which outlines TECHNICAL ASPECTS the history of the development of the common base. WHAT IS THE COMMON BASE? OF THE COMMON BASE As part of the proposal for an ANSI Smalltalk standards effort, we have con- tributed a “strawman” as the starting point for standardization. That strawman is contained in the IBM document entitled Smalhalk Portability A Common Base By R.J. DeNatale and comprises chapters 3–5 and appendices A and B from that document. * & Y.P. Shari This proposal is not our work entirely. It is the result of an 18-month-long col- laboration among five companies: IBM, Digitalk, KSC, OTI, and ParcPlace. Contenti: A purely syntactic description of Smalltalk results in a language specification that is incomplete when compared to those for languages such as C, COBOL, Features/Articles and FORTRAN. When studying the specification for a language one expects to 1 The Smalltalk standard: Technical learn things, such as how to do arithmetic, how to code conditional logic, and so aepects of the common base forth.
    [Show full text]
  • XL C/C++ Compiler and Runtime Migration Guide for the Application Programmer
    z/OS Version 2 Release 3 XL C/C++ Compiler and Runtime Migration Guide for the Application Programmer IBM GC14-7306-30 Note Before using this information and the product it supports, read the information in “Notices” on page 129. This edition applies to Version 2 Release 3 of z/OS (5650-ZOS) and to all subsequent releases and modifications until otherwise indicated in new editions. Last updated: 2019-02-15 © Copyright International Business Machines Corporation 1996, 2017. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this document.............................................................................................xi z/OS XL C/C++ on the World Wide Web.................................................................................................... xix Where to find more information...........................................................................................................xix Technical support...................................................................................................................................... xix How to send your comments to IBM.........................................................................................................xix If you have a technical problem........................................................................................................... xx Part 1. Introduction..............................................................................................
    [Show full text]