Questions tagged [squeak]

Squeak is a modern, open-source implementation of the Smalltalk language, with a history of being very easy to port across platforms. See https://squeak.org/.

Squeak started in 1996 as a project of Alan Kay and friends at Apple. They wanted an open source Smalltalk with a view to building Smalltalk's replacement.

Among its features:

  • The Virtual Machine is written in (a subset of) Smalltalk.
  • Runs bit-identically across all its platforms.
  • Very easy to port: it runs on Linux, Macs (both old and new), Windows, iPhones, iPads, and even bare metal.
412 questions
11
votes
1 answer

Iterate a collection backwards in Pharo Smalltalk

I'm new using Pharo and I'm trying to iterate over an OrderedCollection, but starting from the end. For example: | c | c := OrderedCollection new. c add: (1). c add: (2). c add: (3). c do: [ :each | Transcript show: each ; cr ] The result is 1 2 3…
Carlos Rivero
  • 342
  • 2
  • 17
11
votes
3 answers

Magma, GOODS, GLORP, or something else?

So I've been using Smalltalk for about 6 months now (Squeak and Pharo), mostly doing data analytics, and I'm about to start my first Seaside app. So my question to all you Smalltalkers out there is, what is your favorite persistence solution? I've…
Alex
  • 4,316
  • 2
  • 24
  • 28
10
votes
3 answers

Squeak workflow

I'm new to Squeak and Smalltalk but not programming in general(i've some Python experience). I understand the various tools present in the Squeak environment like the Workspace, System Browser and also the Smalltalk language constructs. I understand…
Jatajuuf
  • 301
  • 3
  • 11
10
votes
2 answers

Are Traits good or bad?

This is an open-ended question, but I would like to solicit some opinions from the SO community on Traits; do you think Traits in Squeak/Pharo are a good thing, or should you stay away from them and use composition and delegation instead? I ask…
giuseppe
  • 101
  • 3
10
votes
4 answers

How do you use Squeak?

I downloaded Squeak, the Image file, and the Sources file, but I can't figure out how to write Smalltalk code. Is there something obvious I'm missing? Is Squeak even the right IDE for serious Smalltalk development?
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
10
votes
6 answers

Invoking shell commands from Squeak or Pharo

How can you invoke shell commands from Squeak and Pharo? Do these environments have anything in them like the system() function in certain unix languages to run external shell commands, or the backticks (can't make them here do to the editor, but…
squeaknewb
10
votes
5 answers

Why does add: return the object added in Smalltalk collections?

Background Something that catches every Smalltalk newbie is that add: does not return "self" but the object being added. For example, with this code: myCollection := OrderedCollection new add: 'Peter'; add: 'John'; add:…
Sebastian N.
  • 1,962
  • 15
  • 26
10
votes
2 answers

How to copy a Monticello package to another repository under a different name with Gofer

The context is this one: A package had several branches developped in several repositories squeaksource source.squeak.org/trunk Development stopped in source.squeak.org, and the goal is to transfer the branch back to squeaksource in order to have…
aka.nice
  • 9,100
  • 1
  • 28
  • 40
9
votes
3 answers

What's the difference of Squeak/Pharo/Newspeak Smalltalk VMs?

I saw 3 different VMs while learning about Smalltalk. They are Squeak/Pharo/Newspeak. What's the difference between them?
eonil
  • 83,476
  • 81
  • 317
  • 516
9
votes
5 answers

Browsing VisualWorks code in Squeak/Pharo

Is there any Smalltalk parser in Squeak/Pharo which allows me to browse VisualWorks code in Squeak/Pharo ? I'm interested in reading code exported in the chunk format (not in XML). Clarification: I do not need to file in the code. Thanks
Ray Doyle
  • 829
  • 1
  • 6
  • 8
9
votes
2 answers

Event propagation in a Morphic GUI

I have an image for a Squeak Morphic GUI that contains some transparent parts and thus should not accept any mouseevents etc. but just be visible, but it needs to be visible in front of other morphs. That's why i thought it would be useful to…
hanneswurstes
  • 273
  • 3
  • 9
9
votes
3 answers

Inconsistencies in smalltalk

I'm a new comer to Smalltalk, and learned it in Squeak. But I find many things confusing in Smalltalk. In Squeak, MetaClass and MetaClass class are each other's class mutually. If I want to create the object MetaClass I should send a message new…
spockwang
  • 897
  • 1
  • 6
  • 15
9
votes
6 answers

Smalltalk - Compare two strings for equality

I am trying to compare two strings in Smalltalk, but I seem to be doing something wrong. I keep getting this error: Unhandled Exception: Non-boolean receiver. Proceed for truth. stringOne := 'hello'. stringTwo := 'hello'. myNumber := 10. [stringOne…
user69514
  • 26,935
  • 59
  • 154
  • 188
9
votes
2 answers

Smalltalk Array Types

When looking at Smalltalk syntax definitions I noticed a few different notations for arrays: #[] "ByteArray" #() "Literal Array" {} "Array" Why are there different array types? In other programming languages I know there's only one kind of array…
f4lco
  • 3,728
  • 5
  • 28
  • 53
9
votes
2 answers

Implementation Strategies for Object Orientation

I'm currently learning Smalltalk in the Squeak environment and I'm reading "Squeak - A Quick Trip To ObjectLand". I enter the object-oriented paradigm with some prior knowledge from Python and Java and this sentence from the book on page 36 has made…
f4lco
  • 3,728
  • 5
  • 28
  • 53
1
2
3
27 28