smalltalk Questions

4

Solved

Like in Java, C# etc. How would I define something like enum Direction { input, output } in Smalltalk?
Clisthenes asked 23/3, 2018 at 13:37

3

I've got an embarrassingly simple question here. I'm a smalltalk newbie (I attempt to dabble with it every 5 years or so), and I've got Pharo 6.1 running. How do I go about finding the official sta...
Monmouthshire asked 2/3, 2018 at 0:21

5

Solved

I have been programming in Smalltalk for some time, but I never really needed interfaces to implement anything. Then why can't languages such as Java get rid of interfaces? Is it only Smalltalk or ...
Osvaldooswal asked 1/11, 2011 at 20:55

1

Solved

I have been following the example of making a class in Pharo from the following link: https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/Pharo...
Kinkajou asked 30/12, 2017 at 14:48

3

In many languages you can do something like the following: while true: handle events like keyboard input update game world draw screen (optional: delay execution) while this is far from opti...
Delaunay asked 11/5, 2017 at 16:29

2

Solved

I want to match [ in a regular expression in Pharo 6. This works fine: | matcher | matcher := RxMatcher forString: '\['. matcher matches: '['. "produces true" However, I can't see how to do thi...
Sulfonate asked 22/8, 2017 at 17:49

2

In GNU Smalltalk 80 it is possible to write smalltalk code in your own plain text editor of personal choice. Therefore, it is very important to debug the code. First you save the file as txt File...
Maynard asked 26/8, 2015 at 15:49

2

Solved

I'm new to GNU Smalltalk. I know that in most programming languages, there's an import/#include/require command that gives one source file access to the contents of another. My question is, how do ...
Boeke asked 6/10, 2016 at 16:42

4

I installed Pharo 1.4 and tried to read "Pharo by example". Unfortunately, the book and the Pharo image were totally out of synch with each other: menus were different; classes used as exam...
Libel asked 19/1, 2013 at 7:50

1

Solved

I'm trying to make an array with random numbers (just 0 or 1), but when I run it, it just prints this: End of statement list encountered -> This is my code: GenList | lista | lista := Array new...
Criminate asked 4/7, 2017 at 18:5

1

Solved

In the book "Programming Ruby" it says that ruby has file-based source code. Take a true object-oriented language, such as Smalltalk. Drop the unfamiliar syntax and move to more conventional, f...
Precondition asked 8/4, 2017 at 23:33

1

Solved

Is there an equivalent in Pharo for ThreadLocals of Java, or a way to achieve similar behavior? For example, in Hibernate ThreadLocals are used to provide a thread (current request/context) "scoped...
Contrabass asked 27/2, 2017 at 15:17

2

Basically I can use variables just by assigning something to them, for example: x := something It works fine. But in classes, if I define a new method, but I don't declare the variable, I get a...
Enneastyle asked 25/2, 2017 at 17:58

2

Besides the size. For example: |arr|. arr := Array new: 10 and #(element1,element2, ...)
Kimble asked 10/2, 2017 at 13:32

4

Solved

I like programming in the Python language to solve daily problems in system administration contexts, and I am happy with that. I am learning Pharo Smalltalk and am fascinated by the differen...

2

Solved

Writing a bit of documentation for beginners and I've come against a problem. Knowing what binary messages do, doesn't mean you know what they're called! Some obvious ones, and their respect...
Haematocryal asked 19/1, 2017 at 18:45

3

What is the difference between = and == in Pharo Smalltalk? What are they named, one isEqual and the other? = ~= equality / inequality (deep) == ~~ equality / inequality (shallow)
Esther asked 16/1, 2017 at 21:5

3

Solved

I'm writing an FFI interface for an existing library (written in C). The library uses a good number of opaque structures, so I defined a few ExternalStructures (with no fields) to use as void*. N...
Crepuscule asked 19/12, 2016 at 1:12

3

Solved

After search in the nautilus shortcut description: I searched in the forums to find something about this, but doesn't work in Pharo v3. I still looking for a shortcut that I can use to easily ...
Catadromous asked 26/7, 2013 at 16:5

2

Solved

How do I copy a stacktrace out of the debugger in Pharo? I know there's the Debug.log file somewhere near the image, but I'm far too lazy to navigate out of Pharo, to the file system, find the fol...
Pyroxene asked 26/10, 2010 at 10:15

2

Solved

A few years ago the same question came up, has Apple updated the submission rules to allow JITters in submitted applications yet? The opensmalltalk-vm is about ten times faster than the non-JITting...
Waterrepellent asked 27/8, 2016 at 15:13

7

I know of GNU Smalltalk's Syntax that puts the method body surounded by square-brackets after the selector like so: add: anObject [ self tally add: anObject. ] Are there other file based approac...
Pharos asked 1/11, 2010 at 16:22

2

Solved

I have about 1800 lines of GNU Smalltalk code I'd like to pull into Pharo. I've started doing it class by class, selector by selector, but it is very time consuming and tedious. Is there a way to ...
Chaos asked 7/6, 2016 at 23:21

2

Solved

From what I can gather from the Pharo documentation on regex, I can define a regular expression object such as: re := '(foo|re)bar' asRegex And I can replace the matched regex with a string via ...
Stig asked 24/5, 2016 at 1:40

2

Solved

I want to implement a small class in Pharo so I have done this: Object subclass: #Person instanceVariableNames: 'name age' classVariableNames: '' category: 'Test' and I want to simulate a con...
Gesticulative asked 27/4, 2016 at 1:36

© 2022 - 2024 — McMap. All rights reserved.