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
2
votes
1 answer

SqueakSource add a resource file

I'm new to squeak/squeak source and i am writing a small game as a learning exercise. I have a few graphics that i am using for some of my sprites (mostly pngs) but i cannot figure out how to add them to my squeak source repository. Is there a way…
luke
  • 14,518
  • 4
  • 46
  • 57
2
votes
1 answer

With Traits, should I use a T prefix and if yes put it before or after any other prefix?

When creating Traits in Pharo+Squeak, is it proper to use a T prefix like TMyTrait and if yes, should the T go before any other prefix like TMPMyTrait (where "MP" is the other prefix), or after, like MPTMyTrait
nic
  • 21
  • 1
2
votes
0 answers

How to construct a multipart form request and POST it using the Squeak/Smalltalk WebClient

I am trying to upload an image to the Twitter-API, which requires a multipart/form-data oAuth-signed POST request. However there seems to be some kind of mistake in my code, as I'm getting 503 Errors everytime I try to call the function. Which…
2
votes
1 answer

How to tell if a class uses a Trait

If I have a Trait that some classes use but not others, how can I test an object to see if it is an instance of a class that uses that Trait? What I want is something like isMemberOf: or isKindOf: but for Traits.
eugen
  • 23
  • 3
2
votes
2 answers

how to use Multi threading in squeak smalltalk?

i would like to know how to work with Threads in squeak smalltlak b1 := Ball new. b2 := Ball new. this 2 next objects should run in different Threads together(Multi threading). how can i do it ? "Thread 1" b1 start:210 at:210. "start is the…
2Big2BeSmall
  • 1,348
  • 3
  • 20
  • 40
2
votes
1 answer

Replacing the World in Cuis/Squeak Smalltalk

How does one replace the PasteUpMorph that is the 'world' in Cuis/Squeak Smalltalk with a new instance of PasteupMorph?
2
votes
2 answers

trying to retrieve element from an OrderedCollection

I am using pharo. I have a Car class which has a speed variable and the class side method withSpeed: aSpeed which sets speed := aSpeed. I am trying the following test in the playground. car := Car withSpeed: 20. cars := OrderedCollection new. cars…
danishjo
  • 159
  • 1
  • 1
  • 8
2
votes
1 answer

testing for instance of a class

I have a question in squeak, I'm completely new to it so I'm asking about the basics. I created a class Object subclass: #Course instanceVariableNames: 'id name day time isTwoHoursLong' classVariableNames: '' poolDictionaries: '' category:…
littlerunaway
  • 443
  • 2
  • 8
  • 18
2
votes
2 answers

Create New Pseudo Variables in Squeak

Large part of squeak is implemented using squeak itself. I am curious to know if pseudo variables such as self or true are also implemented using squeak. If the answer is yes, where the implementation located? Specifically, assume that I want to add…
Artium
  • 5,147
  • 8
  • 39
  • 60
2
votes
3 answers

getting an instance of a CompiledMethod class

As far as I understand CompiledMethod is a class holding the compiled form of a method. An instance of this class is created each time a method is compiled. This instance is saved in the class to which the method belongs. My question is if I have a…
Ohad
  • 1,563
  • 2
  • 20
  • 44
2
votes
1 answer

how can I write string inside a string in Squeak?

My method receives a String argument. That String represents source code, which can contain another string. The problem is that now I want to have a quoted string inside a quoted string, and the compiler doesn't accept it. obj mymethod: …
Ohad
  • 1,563
  • 2
  • 20
  • 44
2
votes
4 answers

Could SqueakNOS or PharoNOS made to run an iPhone or iPad to Form a DynaBook?

Not considering legal issues I would be very interested if it would be possible to run one of those on the bare metal of the iPad/Phone ARM-Architecture.
Richard Durr
  • 3,081
  • 3
  • 20
  • 26
2
votes
1 answer

Smalltalk - read input from the keyboard

How do I read input from the user in Smalltalk squeak? Just want to make new variable and initialize it with a number got from the keyboard.
Yuval Levy
  • 2,397
  • 10
  • 44
  • 73
2
votes
1 answer

Working with Seaside continuations

How do I get a BlockClosure in Squeak (I want to use BlockClosure>>callCC)? When I write [#foo] that is a BlockContext, what's the deal? Update: I have worked out that BlockClosure is a thing mainly of new compiler. Instead how do I work with…
Marcin
  • 48,559
  • 18
  • 128
  • 201
2
votes
1 answer

How to automate unit testing in Squeak

I am checking Squeak homework assignments submitted by my students. I have written an SUnit test case with a bunch of tests and now I want to run these on all submissions. I would like to somehow automate - whether from inside Squeak or with shell…
Oak
  • 26,231
  • 8
  • 93
  • 152