127 Matching Annotations
  1. Feb 2024
    1. The point here is that the human potential manifests itself in individuals.

      Here is a hint that individuals, as the minimal embodiement of potential action, can be collaborating objects too

  2. Jan 2024
    1. Its instance variables are the involved protagonists of the game


      Its internal collaborators are the main protagonists of the game.

    2. We want a meaningful class name.

      Suggest removal

    3. entry


    4. After defining the classes involved in the game design, we now define several states of these classes:

      I'd rather stop using “states” and start talking about ”internal collaborators“. For example:

      After discerning the classes that our game needs, we can now assign them responsibilities and internal collaborators:

    1. Cuis-Smalltalk is a pure object oriented programming (OOP) language. All the entities in the language: integers, floats, rational numbers, strings, collections, blocks of code and so forth – every instance usable as a noun in Smalltalk – is an object.

      ProtoObject new enters an infinite loop in Cuis University 5981. Fixed in Cuis.

    1. These two overriding methods are more efficient as they avoid unnecessary checks and ifTrue/ifFalse branches. Polymorphism is often used to avoid unnecessary checks and code branches.

      The goal is not computing efficiency but flexibility, scalability, simplicity, readability; that is, the goal is human efficiency.

  3. Dec 2023
    1. For Cuis-Smalltalk, we built Morphic 3, the third design iteration of these ideas, after Self’s Morphic 1 and Squeak’s Morphic 2. If you already know Morphic in Self or Squeak, most concepts are similar, although with some improvements: Morphic 3 coordinates are not limited to being integer numbers, the apparent size (zoom level) of elements is not tied to pixel density, and all drawing is done with high quality (subpixel) anti aliasing. These enhancements are enabled by the huge advance in hardware resources since Self and Squeak were designed (in the late 80’s and late 90’s respectively). Additionally, careful design of the framework relieves Morph programmers from much the complexity that was required, especially with regards to geometry.

      Vector Graphics is actually what got the Cuis project started. In 2003, ten years before the Retina display, I (Juan Vuletich) decided that making Morphic zoomeable and independent of pixel resolution would require completely abandoning back compatibility with the existing Morphic in Squeak. I took Squeak 3.7 and started working on what would later be named Cuis Smalltalk.

      —Juan Vuletich, Vector Graphics and Morphic 3

    2. rect

      Why use “rect” as an abbreviation for rectangle? Is confusing since it has another meaning.

    1. Simple things should be simple and complex things should be possible.

      I think I came up with this slogan at Parc during discussions wrt children, end-users, user-interfaces, and programming languages. Chuck Thacker (the genius behind the Parc hardware) also liked it and adopted it as a principle for many of his projects.

      Alan Kay's answer at Quora.

    1. Link to or mention the Cuis Smalltalk terse guide

    2. There are two kinds of message cascades.

      For some reason, before reading this, I misunderstood the “cascade” as a metaphor for composition, were the water fallen from a first cascade might flow as input to a second cascade; but now I see this is clearly wrong and the cascade means exactly the contrary, since the punctuation :: and ; breaks that continuity. It means a jump in the regular flow of evaluation, as a cascade means a jump.

      The double colon syntax is specific to Cuis; at least it is not valid syntax in Squeak.

    3. Include a note about specific Cuis idioms, explain why they exist, and link to discussion and documentation: * backticks for compound literals * double colon as an alternative to parentheses * #[aFloat] for Float64Array * #[anInteger] for ByteArray

      See the thread Language Constructs initiated by Erik Stel in the Cuis-dev mailing list in 2020-05; especially the answers by Juan Vuletich.

      Backtick compound literals

      ... In some cases it can improve performance or reduce memory usage. But the deeper reason is to put all classes in equal footing with those privileged ones that are known by the Compiler.

      More here

    4. Backticks (`) can be used to create compound literals at compile time. All components of a compound literal must be known when the code is compiled.
    1. With specific keyword messages you can compute the Least Common Multiple and Greatest Common Divisor. A keyword message is composed of one or more colons “:” to insert one or more arguments:

      A source of confusion for beginners is why binary messages exist in the first place when they could be implemented instead as keyword messages taking one argument as #lcm: and #gcd:; you could in fact, imagine an alternative syntax with only unary and keyword messages, but it would be cumbersome to read and write. Binary messages improve legibility without introducing too much complexity for the implementors.

    1. the class Transcript

      At this point, where classes have not yet been discussed, maybe it is best to rewrite:

      the object Transcript

    1. This book is an invitation.

      Given that there is no way we could pay back the creators of Smalltalk for their immense gift, Cuis is our attempt to pay it forward. Yes, it is a work of love. — Juan Vuletich, Cuis-dev mailling list 2020-04

    1. the policy

      the tradeoffs

    2.   Not to save the image is just best practice advice for you when your primary goal is to create new code. We already discussed the caveats of saving the image concerning code management (See The Image). But from time to time, you’ll find yourself in the position of an explorer when you open multiple code browsers and workplaces to figure something out. In this case, the state of the system, the open windows and code snippets, holds the value you care about, and saving the image is the right way to preserve the system’s state.27

      This should go in the previous section Daily Workflow.

      I submitted a PR

    1. Cuis-Smalltalk mascot

      Sometimes I see the cuis looking righ, but sometimes a panda looking towards my left and upwards.

    1. If I give you something that you can play with and extend, even a piece of paper with a paragraph and I say it’s not written well, rewrite it, that’s easier than giving you nothing and say make something; you know, giving a blank sheet of paper and starting to write. So the lovely part that has proven true for professional programmers as well as kids is when you start with something, an object that does something, and then you put many objects like those together and have them interact, and then you extend and make them behave a little differently, you can take a very incremental approach to learning how to control a computer system. — Adele Goldberg
    1. (28) https://quoteinvestigator.com/2015/07/23/great-power/

      Do we really need to read a discussion on the origin of this sentence?

    2. Well, this looks familiar. I know what to do here.

      If this is a rethorical device, I'd prefer to replace it.

    1.   The String class has several method category names starting with fileman- for converting pathnames (system names for files and directories) into FileEntry and DirectoryEntry objects. String>>asFileEntry gives examples.

      Moved up to CharacterSequence. The categories are: fileman-converting, fileman-testing, and fileman-accessing.

    2. out of synch

      “synch” is an alternative spelling sanctioned by dictionaries. I wouldn't mind using this expression colloquially but in the context of a book perhaps I can find a better way to rewrite this. Not very important.

    1. This is another area where the actual mechanics are complex, but the basic ideas are simple.

      This is an excellent opportunity to link to an official video showing how to use the debugger.

    1. We think of Morphs and “data objects” as able to present themselves to be inspected, but Smalltalk’s runtime state is also presentable.

      The mention of Morphs is pertinent as an example because they were discussed recently and moreover, because they are blatantly visible and reactive. The mention of “‘data objects’” between double quotes, on the other hand, doesn't bring much to the table and is potentially confusing.

      Proposed alternative

      As Morphs and objects in general, are able to present themselves to be inspected, so is Smalltalk’s runtime state also presentable.

    2. Reactive Principle: Every component accessible to the user should be able to present itself in a meaningful way for observation and manipulation. — Dan Ingalls

      Design Principles Behind Smalltalk. Byte Magazine Volume 06 Number 08, 1981-08

      The fragment follows:

      This criterion is well supported by the model of communicating objects. By definition, each object provides an appropriate message protocol for interaction. This protocol is essentially a microlanguage particular to just that kind of object. At the level of the user interface, the appropriate language for each object on the screen is presented visually (as text, menus, pictures) and sensed through keyboard activity and the use of a pointing device.

      An earlier version of the reactive principle is:

      The salient feature of Smalltalk is that all objects are active, ready to perform in full capacity at any time. Nothing of this liveness should be lost at the interface to the human user of the system. In other words. all components of the system must be able to present themselves to the user in an effective way, and must moreover present a set of simple tools for their neaningful alteration.

      —1976, The Smalltalk-76 Programming System Design and Implementation

    1. self runningWorld doOneCycleNow.

      Again, explain why do we have to send #doOneCycleNow once more.

      As we changed several visual parts, we request one update cycle of the environment

      Is not enough.

    2. self runningWorld doOneCycleNow.

      This is necessary for the changes to actually show. I'd add a footnote explaining why it is necessary.

    3.   In addition to adding a package preload requirement, you can also select a requirement and delete or update it using the buttons at the lower right. Sometimes a package changes which your code depends on and you have to change your code to accord. When this happens, to want to be sure to require the newer, changed version. Selecting a requirement and pressing update will update the requirement to use the latest loaded package version.

      This should go in the previous section The Package.

      I submitted a PR.

    4. list := UISupervisor ui submorphs reject: [:aMorph | aMorph is: #TaskbarMorph]. list do: [:each | each delete].

      Alternative implementation:

      Smalltalk userInterface := UISupervisor ui. taskbar := userInterface taskbar. userInterface submorphs do: [:morph | morph delete] without: taskbar.

    5. Start with a standard, fresh, Cuis image. Never save the image. Set up your preferred version control system to manage your external packages. The recommendation is to use a GitHub repository with a name beginning with ’Cuis-Smalltalk-’, so it will be easy for anybody to find it. But beside this consideration, using any other version control system is fine. Install the necessary packages from the Cuis-Smalltalk Git repositories. Develop. Modify and/or create packages. Save own packages (to your preferred repositories). add / commit / push accordingly to your version control system Fileout changes that are not part of any package. These are automatically captured in numbered changesets, separated from changes to packages. Exit the image. Usually without saving.

      This is the recommended pratice to achieve reproducible and shareable artifacts, unless you want to ship your image like in the Docker meme: Docker meme

      In a discussion in the Cuis mailing list, many people share their different approaches when working alone and in collaboration with others. See the whole thread spanning from July to August, not just the linked mail.

    6. encoded for latin alphabet (ISO 8859-15)

      Why not UTF-8?

    1. Observe how each category – class or method one – of an extension is prefixed with a *.


      Alternative 1

      Observe how each category —regardless of wether it applies to a class or to a method— of an extension is prefixed with a *.

      Alternative 2:

      Observe how class categories and method categories of an extension are prefixed with a *.

      I prefer the alternative 2.

    2. Now we are facing a problem. For the need of the TheBook package we extend the Integer class with a method printStringToc, however this method addition is part of the Cuis-Smalltalk core system and its associated default change set.

      Proposed change along these lines:

      Now we are facing a problem: we extended the Integer class with #printStringToc, however, because we didn't categorize it properly, this method addition is by default part of the Cuis-Smalltalk core system and its associated default change set instead of being part of TheBook

    3. Let’s say that in our clock morph we want to use color named as in the Color-Extra package. So to be able to load our Morphic-Learning package which makes use of this we need to select our new package and click on the add Requirement button at center, right.

      This is an example of adding a requirement to a package but it is difficult to understand

    4. version level

      proposed change to “version number”

    1. This is a drawback when using the image as your sole source code repository. The net result could be loosing your work.

      Then the problem is not keeping backups, and not the fact that we are working with an image.

    2. file system may be unstable

      The underlying file system? If so, why is this pertinent? Unless for example the image file gets corrupted, but if that is the case, say that instead.

    3. the environment may be in a lock down state

      What does this mean?

    1. Change is easy, except for the changed part. — Alan Kay

      Look for the source. I'm pretty sure I've heard it on more than one video recording with a slight difference:

      Change is easy, except for the “change” part.

    1. Basically,

      Again, why basically?

    2. Basically,

      Why basically?

    3. Modern integrated System On a Chip (SOC) hardware has many circuits which are active at the same time. So one kind of event is sensing something happening in the world. Class EventSensor handles keyboard key press and mouse hardware interrupts, translating between hardware signals and software event objects.

      Confusing paragraph. How does the first sentence relate to the second? How does the second relate to the third?

    1. Footnotes (23) In a quartz clock, the hand for the seconds moves every second. (24) In an automatic clock, the hand for the seconds moves every fraction of a second. The smaller the fraction, the more premium the clock is. (25) A Japanese automatic clock will be just fine too.

      All these could be a single footnote.

    1. (17 * 13 > 220) ifTrue: [ 'bigger' ] ifFalse: [ 'smaller' ] ⇒ 'bigger' The class Boolean offers a fascinating insight into how much of the Smalltalk language has been pushed into the class library. Boolean is the abstract superclass of the Singleton classes True and False19. Most of the behaviour of Boolean instances can be understood by considering the method ifTrue:ifFalse:, which takes two blocks as arguments: (4 factorial > 20) ifTrue: [ 'bigger' ] ifFalse: [ 'smaller' ] ⇒ 'bigger'

      I don't see a need for two examples of #ifTrue:ifFalse.

    1. divisors := [:x | (1 to: x) select: [:d | x \\ d = 0] ].

      Smalltalk divisors := [:m | (1 to: m) select: [:n | m isDivisibleBy: n]].

      Yet, there ought to be better algorithms to compute divisors.

    1. A vertical bar separates the parameter declaration(s) from the body of the block

      In many cases it is possible to read the vertical bar “|” the same way it is used in standard mathematic notation, I.e. you can read [ :n | n isEven ] as “n such as n is even”.

    1. just sends the #allClasses method

      just sends the #allClasses message

    2. The evaluation of any expression preceded by a ^ (typed as ^) will cause the method to exit at that point, returning the value of that expression.

      Insert comment about full closures and what they enable compared to non-full closures.

    3. A method that terminates without explicitly returning the value of some expression will always return the current value of self.

      This is the reason why we have an idiom consisting of semicolon separated messages, usually ending in #yourself.

    1. TODO: Build the html from the texinfo sources locally in order to find out why there is an extra empty bullet point at the begining of this itemized list, and verify if this still happens.

    1. SpaceWar! is a two-players game, there will be always two players and two space ships. We use an Array instance to keep reference of each space ship.

      Until now there is no obvious design need to use a two-sized Array. There could just be a needle and a wedge. However it might prove useful to keep them in a collection if we need to perform computations on both bodies.

    2. SpaceWar! is a two-players game,

      Two-player game, singular!

      SpaceWar! is a two-player game,

    1. colors keysDo: [:key | colors at: key put: key asString capitalized]. colors

      with #associationsDo we can dispense with the variable colors and moreover, we don't look the dictionary up for each key: Smalltalk {#red -> Color red. #blue -> Color blue. #green -> Color green} asDictionary associationsDo: [:association | association value: association key asString capitalized]

    2. In the OrderedCollection protocol search for the method add:after:.

      there are also #add:afterIndex and #add:beforeIndex

    3. Set new addAll: 'buenos días'; addAll: 'bonjour'; yourself.

      Smalltalk 'buenos días' union: 'bonjour'

    4. (1 to: 100) select:[:n | n isPrime not and: [n odd]]

      Smalltalk (1 to: 100 by: 2) reject: #isPrime

    5. (1 to: 100) select:[:n | n isDivisibleBy: 7]

      Smalltalk (7 to: 100 by: 7) asArray

    6. ((101 to: 200) select: [:n | n isPrime]) size

      Smalltalk ((101 to: 200) select: #isPrime) size

    7. 'Hello My Friend' allButFirst: 6

      Smalltalk ' ' join: ('Hello My Friend' substrings allButFirst)

      has the problem that it doesn't stop at the first substring, so if you don't know the argumento to #allButFirst beforehand, you have to find it:

      Smalltalk | sentence wordToRemove | sentence := 'Hello My Friend'. wordToRemove := sentence indexOf: Character space. sentence allButFirst: wordToRemove

    8. (1 to: 100) difference: (25 to: 75) ⇒ #(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100)

      And additively: Smalltalk (1 to: 24), (76 to: 100). You don't need to add #asString because #, relies on methods that use #species and an Interval species is Array.

    1. Dictionary. A dictionary is a list of associations between a key and an object. Of course a key is an object, but it must respond to equality tests. Most of the time, symbols are used as keys.

      I don't think that -> was introduced before as a shorthand for associationts, tuples, cons pairs. For example: Smalltalk Association key: #red value: Color red can be rewritten as: ```Smalltalk

      red -> Color red


    2. Observe how pi is the first element of the set:

      Observe how pi which was added last, is shown first, because of how Set >> #add: is implemented.

    3.   How to add ’Orange’ after ’Apple’ in coll1?

      How to add ’Orange’ after ’Apple’ and before 2@1 in coll1?

      or alternatively:

      How to insert ’Orange’ between ’Apple’ and 2@1 in coll1?

    4. An abstract class is useful to establish a set of polymorphic methods which each of its concrete subclasses are expected to specialize. This captures and communicates our intent.

      The Abstract Class Pattern


      Define the interface for a hierarchy of classes while deferring the implementation to subclasses. Abstract Class lets subclasses redefine the implementation of an interface while preserving the polymorphism of those classes.

      —Bobby Woolf, 1996

    1. (1 to: 10) collect: [:k | 1 / k]

      Even more consice: Smalltalk (1 to: 10) collect: #reciprocal

    2.   Decode this famous quotation attributed to Julius Caesar ’DOHDMDFWDHVW’.

      Romans often wrote scriptio continua, that is, without word separators like spaces or dots.

    3. When searching perfect cubic roots, it is useful to know about some cubes:

      Consider removal or rephrasing. Maybe rewiting ”For example, when searching...”, etc.

    4. (1 to: 100) select: [ :n | n isPrime ]

      In this case we may also write in pont-free style Smalltalk (1 to: 100) select: #isPrime

    5. and block of code

      Missing article

      and a block of code

    6. Comparing objects deserves its own section.

      This looks more like a comment by the author.

    1. Therefore, to declare a method variable we just name it at the beginning of the script and surround it by pipe characters “|”.

      Why start with “Therefore”?

    1.   In Cuis-Smalltalk, strings with characters not part of the ASCII table are usually instances of UnicodeString. In the same way, you may get an instance of UnicodeSymbol and not Symbol, or UnicodeCodePoint and not Character. You usually don’t need to care about this. The ASCII and Unicode classes provide the same services.
    2. to two or only one object depending computational history

      Unclear choice of words. Maybe: “to two different or to a single object”.

      “depending computational history” is also unclear.

    1. Exercise 3.2 0 to: Float twoPi by: 1/10 do: [:i | Transcript show: i cos; cr]

      Smalltalk 0 to: Float twoPi by: 1/10 do: [ :alpha | alpha cos print ].

    1.   You have noticed that text typed into the Workspace is colored and highlighted based on what you type. We will discuss this below when we talk about the Smalltalk language, but the idea is to be helpful. If you start to type a word the Cuis Workspace knows about, you can press the tab key and get a set of choices for completion of the word. Try typing Float epsi and pressing tab. You can then press enter and should see Float epsilon. Click elsewhere on the Workspace to make this menu go away.

      Autocompletion is vastly improved by LiveTyping readly available in Cuis University.

    1. Exercise 2.3 From a System Browser, do from the left panel to the right ...Kernel-Text → String → arithmetic... the count of methods in the last right panel is 6: *, +, -, /, // and \\.

      Smalltalk String allMethodsInCategory: #arithmetic

    1. In Smalltalk, we say that each object decides for itself how it responds to a message. This is called polymorphism. The same message selector may be sent to objects of different Classes. The shape (morph) of the computation is different depending on the specific class of the many (poly) possible classes of the object receiving the message.

      My math background made me realize that each object could have several algebras associated with it, and there could be families of these, and that these would be very very useful. The term "polymorphism" was imposed much later (I think by Peter Wegner) and it isn't quite valid, since it really comes from the nomenclature of functions, and I wanted quite a bit more than functions. I made up a term "genericity" for dealing with generic behaviors in a quasi-algebraic form.

      —Alan Kay Clarification of "object-oriented", email reply to Stefan Ram

    2. But just what is an object? At its simplest, an object has two components: Internal state. This is embodied by variables known only to the object. A variable only visible within the object is called a private variable. As a consequence, it is impossible – if the object decides so – to know the internal state of the object from another object. A repertoire of behaviors. These are the messages an object instance responds to. When the object receives a message it understands, it gets its behavior from a method with that name known by its class or superclass.

      Reductionistic vs other definitions

      Is the annotated paragraph describing what is an object or how is an object? This same criticism is also present in Dave West's Object Thinking.

      Other perspectives:

      Smalltalk's design—and existence—is due to the insight that everything we can describe can be represented by the recursive composition of a single kind of behavioral building block that hides its combination of state and process inside itself and can be dealt with only through the exchange of messages. Philosophically, Smalltalk's objects have much in common with the monads of Leibniz and the notions of 20th century physics and biology. Its way of making objects is quite Platonic in that some of them act as idealizations of concepts—Ideas—from which manifestations can be created. That the Ideas are themselves manifestations (of the Idea-Idea) and that the Idea-Idea is a-kind-of Manifestation-Idea—which is a-kind-of itself, so that the system is completely self-describing— would have been appreciated by Plato as an extremely practical joke.

      —Alan Kay Early History of Smalltalk (1972)

      So objects have something resembling agency, see the actor model.

      OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them.

      —Alan Kay Clarification of "object-oriented", email reply to Stefan Ram

      I also like the complementary view that Gerald Sussman teaches on his video lecture 5A that informs chapter 2 and 3 of SICP; objects are a cheap way of modelling the world.

    3. LargePositiveInteger LargeNegativeInteger

      Cuis and Squeak share this same design but other dialects make LargePositiveInteger and LargeNegativeInteger suclassify `LargeInteger.

      Ask Juan?

    4. These are the messages an object instance responds to.

      These are the messages an object knows how to respond to.

    1. Simplicity does not precede complexity, but follows it. — Alan Perlis

      Epigram 31

      Alan J. Perlis. 1982. Special Feature: Epigrams on programming. SIGPLAN Not. 17, 9 (September 1982), 7–13. https://doi.org/10.1145/947955.1083808

      Also transcribed at https://cpsc.yale.edu/epigrams-programming

    1. A language that doesn’t affect the way you think about programming, is not worth knowing. — Alan Perlis

      Epigram 19

      Alan J. Perlis. 1982. Special Feature: Epigrams on programming. SIGPLAN Not. 17, 9 (September 1982), 7–13. https://doi.org/10.1145/947955.1083808

      Also transcribed at https://cpsc.yale.edu/epigrams-programming

    1. Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on the named class:


      Using “that”

      Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on that class:

      using “named”

      Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on the class named so:

    2. Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on the named class:



      Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on that class:

      Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on the class named so:

    3. (13) When considering its parents, the combined method count is more than 300.

      Number selectors size vs Number allSelectors size

    4. Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on the named class:

      Programmatically you can send #browseClassHierarchy to any object

    5. How many methods are there in the arithmetic method category of the CharacterSequence class?

      There are no messages categorized as arithmetic in String but in CharacterSequence, which String subclassifies. Squeak Strings on the other hand, implement arithmetic messages, exactly those mentioned in the solution to the exercise; Note however that String allMethodsInCategory: #arithmetic in both Cuis and Squeak include a seventh method #raisedTo: because #allMethodsInCategory also looks up for inherited methods from superclasses. Yes! you can raise the empty string to the power of n for n ∈ Number and the result is another empty string! WAT :) The fact that we can evaluate '' raisedTo: n without error seems like an unforeseen consequence of #adaptToCollection:andSend: relying on #collect and how the latter works on empty collections.

      See this thread in the Squeak-dev mailing list

    6. the declaration itself is Smalltalk code, indeed the message #subclass:instanceVariableNames:classVariableNames:... was sent to Magnitude to create this class.

      Gilad Bracha's criticism:

      Semi-tangent: source code seems the most obvious thing in the world; but traditional Smalltalk’s have no real syntax above the method level! Classes are defined via the evaluation of reflective expressions, which rely on the reflective API. This is very problematic: the API often varies from one implementation to another. By the way, this is one of the ways Newspeak differs from almost every Smalltalk (the late, great Resilient being the only exception I can recall). Newspeak has a true syntax. Furthermore, because Newspeak module declarations are fully parametric in all their external dependencies, they can be compiled at any time in any order - unlike code in most languages (say Java packages) where there are numerous constraints on compilation order (e.g., imports must be defined).

      See the full blog post An Image Problem.

    1. Like #shuffled, all collections answer to the message #sorted, which answers a sorted collection.

      The original reads kind of funny. Besides that, #shuffled is a message, not a collection. This paragraph could be rewritten as follows:

      Similarly as with #shuffled, all collections know how to answer #sorted with a sorted copy of themselves.

  4. Nov 2023
    1. 1 + (1/2) squared + (1/3) squared + (1/4) squared

      smalltalk (1 to: 4) inject: 0 into: [:sum :n | 1/n squared + sum]

    2. 'Hello' at: 1 put: $B; at: 2 put: $e; at: 3 put: $l; at: 4 put: $l; at: 5 put: $e; yourself

      smalltalk 'Hello' at: 1 put: $B; at: 5 put: $e; yourself

    1. Observe the text here is formatted to ease code understanding. It is possible to write the cascade of messages in one line, but it reduces the readability of the code:

      Use a Cascade to send several messages to the same receiver. Separate the messages with a semicolon. Put each message on its own line and indent one tab. Only use Cascades for messages with zero or one argument.

      —Kent Beck, Smalltalk Best Practice Patterns

    2. In the Spacewar! code snippet below, the parentheses make it more clear that the addition happens first:

      In the Spacewar! code snippet below, the parentheses aren't necessary but clarify that the addition happens first:

    1.   Because you are not using the base image but one used to teach classes, you will likely see a much larger number.

      Proposed change:

      When you are not using the base image...

    2.   Because you are not using the base image but one used to teach classes, you will likely see a much larger number.

      680 classes and 135025 instances on plain Cuis image version 6090. 1356 classes and 518158 instances on my current Cuis Univesity custom image 2023-11-27

    3. ProtoObject

      TODO inquire about ProtoObject. See post by Christoph Tiede entitled [Bug & design issue] Messages understood or not understood by ProtoObject on squeak-dev

      However, the crucial question is: What special messages should an instance of ProtoObject understand? On the one hand, the idea of ProtoObjects is to work as total proxies with a maximum amount of forwarding potential, which implies a minimum number of methods. On the other hand, certain aspects such as accessing instvars or executing messages are really identity-related. Looking forward to your comments :-)

    1. The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. — Alan Kay
    1. Lyle Bickley explains the PDP-1 (and we play the original Spacewar! at Curious Mark YouTube channel

      From the description:

      Lyle Bickley, of the PDP-1 restoration team, gives us a tour of this amazing, early scientific interactive computer at the Computer History Museum. The first machine built by DEC in 1959, it features a superb graphics screen. DEC gave one to MIT, and some very bright students went wild. Gems such as Spacewar!, Snowflake, 4-voice music programs were all developed by moonlighting MIT students, unencumbered by its measly 12kW memory and pokey 100,000 instructions per second. Along with much more serious debugging and programming languages of course. You can come and see the real machine for yourself at the Computer History Museum in Mountain View, California: http://www.computerhistory.org/

      Also, Norbert Landsteiner made this incredible simulation of the PDP-1 that can run the original Spacewar! and Minkytron code in your browser: https://www.masswerk.at/spacewar/ https://www.masswerk.at/minskytron/ He also made a gate exact replica with Verilog code on github: https://www.youtube.com/watch?v=iymD9eysqXo

    1. 1 + (1/2) + (1/3) + (1/4)
      <details> <summary>Spoiler warning</summary> ```javascript (1 to: 4) inject: 0 into: [:sum :n| sum + 1/n] ``` </details>
    1. Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it. — Alan Perlis

      Alan J. Perlis. 1982. Special Feature: Epigrams on programming. SIGPLAN Not. 17, 9 (September 1982), 7–13. https://doi.org/10.1145/947955.1083808

      Also transcribed at https://cpsc.yale.edu/epigrams-programming

  5. Sep 2023
    1. J. Piaget, J. Brunner, O. K. Moore, and S. Papert.

      Unless there is a need to save space, write full names and maybe inlcude hyperlinks.

    2. Sketchpad (1963), the RAND tablet (1964), and Doug Engelbart’s NLS ("oN-Line System") (1968). Later developments include Ted Nelson’s Xanadu

      Why not include hyperlinks?

    3. https://en.wikipedia.org/wiki/As_We_May_Think

      Ask. This doesn't need to be a footnote in HTML; maybe it is this way because of a texinfo limitation regarding conditional compiling, I. e. HTML (which doesn't need this as a footnote) vs PDF (which needs it but only when a producing a document to be printed).

    4. It is said that one understands the world by building it

      Cesare Pavese, Il mestiere di vivere. Diario 1935-1950 quoted in, A Personal Computer for Children of All Ages, Kay 1972

    1. The computer is simply an instrument whose music is ideas. — Alan Kay

      Interview by Lars Kongshem but also says this in many recorded talks

    1. In the seventies, four versions were developed: Smalltalk-71, Smalltalk-72, Smalltalk-76 and Smalltalk-80.

      It is fair to say that the original Xerox team developed Smalltalk continuosly from 1971 to 1980.

      There were also Smalltalk-74 and Smalltalk-78 also known as the NoteTaker Smalltalk, see https://smalltalkzoo.thechm.org/HOPL-St78.html

    1. The code examples in the online version can be directly copied and pasted into Cuis-Smalltalk. This is why the assignment character “←” you see in the developer Cuis-Smalltalk window is printed as “:=” in the online version of the book. The same applies with the return character “↑” printed as “^” in the online version.

      Cuis University differs from Cuis in that it disables the original left arrow assignment ← and return ↑ glyphs by default, preferring the ANSI Smalltalk syntax, namely := and ^. In order to revert and display the arrow glyphs evaluate Smalltalk Preferences name: #showAssignmentAsLeftArrow category: #programming value: true The two keystrokes := will be shown as ←. Note that typing the underscore character will still show a ← regardless of the setting.

  6. Aug 2023
    1. If you've been following along so far, you should be looking at a GettingStarted tiddler in your new wiki.

      This refers to the new blank wiki, not to the downloaded version of Grok TiddlyWiki.

  7. Nov 2022
  8. May 2022
  9. Apr 2022
  10. Sep 2021