squeak

Implementation Strategies for Object Orientation

非 Y 不嫁゛ 提交于 2019-12-05 02:51:53
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 me think: Smalltalk is a class-based implementation of an object-oriented language. Short sentence but very interesting. In OO all terms like class, object, instance seem to be well-defined and seem to point to the one and only true meaning and you're likely to come across generic sentences like "objects are instances of a class". But you hear

Microframeworks for Squeak/Pharo web service

北城余情 提交于 2019-12-05 00:09:46
问题 Lots of languages have microframeworks for writing very tiny websites or web services, such as Flask for Python, or Sinatra for Ruby. On Squeak, there doesn't seem to be any equivalent; Iliad, Seaside, and AIDA are all very heavy for just having a little service. What's the preferred way to accomplish this? Directly injecting a hanlder into Comanche or Swazoo? 回答1: I would like to share what I think is more up-to-date information (as of end of 2012). Zinc Components Currently in Pharo 1.4/2.0

Squeak SMTPs on Linux

不问归期 提交于 2019-12-04 15:50:12
I am using the Squeak 5 class SecureSMTPClient to send e-Mails over SSL/TLS. It works fine on my Windows machine (thanks to the answer to that question ). However, on Linux i get: Error: primitiveSSLCreate failed And it prints in a console (but only the first time the image attempts to send the mail): # ioLoadModule(/home/squeak5vm/SqueakSSL): /home/squeak5vm/SqueakSSL: undefined symbol: clock_gettime Squeak "primitives" are functions that talk to the platform and libraries. My guess is, that this Linux does not provide some version of some SSL/TLS library that Squeak expects. But what exactly

Create from scratch, or build up on Scratch?

泪湿孤枕 提交于 2019-12-04 11:03:53
I'm considering building a visual programming language , akin to Scratch , for use by children (a.k.a. poor typists) in programming micro-controllers or robots. There is, for example, a project to build a graphical programming environment for the Arduino . I really like Scratch, and would like the graphical coding to be similar. Scratches source is available under its own free license. It is written in Squeak (based on Smalltalk), and I don't know the language. It occurs to me there might be other projects to build off of. When I looked through Wikipedia's list of graphical languages, I didn't

What is the difference between self and yourself in Smalltalk?

爷,独闯天下 提交于 2019-12-04 10:07:48
问题 In Smalltalk, there are two terms often found within a method body: self and yourself . What is the difference between them? 回答1: The reserved word self is a pseudo variable (you cannot assign to it) that refers to the current receiver of the method where it is used. On the other side yourself is a message you can send to any object to get that very same object. The implementation of yourself is yourself ^self meaning that the message yourself will behave as I just explained. The reason why

How to load VMMaker in Squeak?

混江龙づ霸主 提交于 2019-12-04 09:04:24
I am using Squeak 4.4 update 12327, and VM version 4.1.1. I tried to load VMMaker with ConfigurationOf scripts but always fails with exceptions mainly in the Freetype package. Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfVMMaker'; load. ((Smalltalk at: #ConfigurationOfVMMaker) project version: '1.4') load or Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfVMMaker'; load. (Smalltalk at:#ConfigurationOfVMMaker) project lastVersion load. or Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfVMMaker'; load.

Using Squeak from a shell

女生的网名这么多〃 提交于 2019-12-03 17:57:59
问题 Can I launch Squeak as a REPL (no GUI), where I can enter and evaluate Smalltalk expressions? I know the default image don't allow this. Is there any documentation on how to build a minimum image that can be accessed from a command-line shell? 回答1: Here is a (hackish) solution: First, you need OSProcess, so run this in a Workspace: Gofer new squeaksource:'OSProcess'; package:'OSProcess';load. Next, put this in the file repl.st: OSProcess thisOSProcess stdOut nextPutAll: 'Welcome to the simple

Microframeworks for Squeak/Pharo web service

妖精的绣舞 提交于 2019-12-03 16:00:35
Lots of languages have microframeworks for writing very tiny websites or web services, such as Flask for Python, or Sinatra for Ruby. On Squeak, there doesn't seem to be any equivalent; Iliad, Seaside, and AIDA are all very heavy for just having a little service. What's the preferred way to accomplish this? Directly injecting a hanlder into Comanche or Swazoo? Sebastian N. I would like to share what I think is more up-to-date information (as of end of 2012). Zinc Components Currently in Pharo 1.4/2.0 the de-facto standard for HTTP client/server seems to be the Zinc HTTP Components . And the

How can I easily change to native fonts in Smalltalk Squeak/Pharo

怎甘沉沦 提交于 2019-11-30 13:50:49
问题 With every new Squeak/Pharo image, I immediately change the fonts to some native version. It is a lot of mouseclicks and I want to script the process. 回答1: The above answer might be outdated by now, at least it doesn't work with my 3.10 image. so, I use this: defaultFont := LogicalFont familyName: 'Geneva' pointSize: 10 emphasis:0 . codeFont := LogicalFont familyName: 'Monaco' pointSize: 10 emphasis:0. Preferences setCodeFontTo: codeFont. Preferences setWindowTitleFontTo: defaultFont.

Variable types in smalltalk

扶醉桌前 提交于 2019-11-30 09:21:37
问题 I need help understanding the usage and the difference of variables in Smalltalk. What is the difference and the usage of each variable in the given code below? Object subclass: #MyClass instanceVariableNames: 'x' classVariableNames: 'Yy' poolDictionaries: '' category: 'helpMe' MyClass class instanceVariableNames: 'zzz' 回答1: An instance variable ( x ) is a variable that is local to an instance. Neither the class nor any other instance can access that variable. A class variable ( Yy ) is local