pharo Questions
2
Solved
Like in other programming language, is there a way of running linux shell command in Pharo smalltalk or a simple script ? I would like to have my Pharo image running a script that should be able to...
2
Solved
I am trying to extend Pharo with promises/futures. I came across this website http://onsmalltalk.com/smalltalk-concurrency-playing-with-futures. It implements futures in Smalltalk. However, when I ...
2
Solved
I stumbled upon Smalltalk and further downloaded Pharo, because it was recommended. My first impression is very positive. I wanted to port some simple programs I have written in C++ (my main langua...
Pelagic asked 5/12, 2018 at 18:35
2
I just started learning Smalltalk at uni.
I would like to know the difference between the messages & and and: (just like | and or:)
1
Solved
I have a string an I would like to be able to take a substring from the middle of it. For example for the string 'abcdefg' I want to get 'cde' (but the exact start and stop could be arbitrary). I h...
1
Solved
I am learning Pharo and I want to understand if classes/objects like nil which belongs to UndifnedObject class have only 1 instance and act like a singleton, or is a new instance made every time we...
4
Solved
The implementation of Integer>>#factorial in Pharo is:
factorial
"Answer the factorial of the receiver."
self = 0 ifTrue: [^ 1].
self > 0 ifTrue: [^ self * (self - 1) factorial].
sel...
Genuine asked 7/5, 2016 at 14:33
3
I was just wondering if there is a way to work with multiple screens in Pharo or Squeak. I am just switching from VisualWorks to Pharo and am really missing this feature. I am used to having my wor...
Unhand asked 20/12, 2012 at 23:12
2
Solved
I've looked online for a meaning of the @ operator in Pharo, but couldn't find anything.
What's the meaning of the Pharo @ operator? For instance, why does 25@50 get evaluated as: "(25@50)"?
Hohenlinden asked 23/4, 2020 at 17:23
5
I just started to learn Smalltalk, went through its syntax, but hasn't done any real coding with it. While reading some introductory articles and some SO questions like:
What gives Smalltalk the ...
3
Solved
I want to extend the String class with a method to create a url slug out of a string. I found a link here that shows how you can move extensions to their own package:
Smalltalk Daily 07/13/10: Ext...
1
Solved
What exacly is the usage of . in Smalltalk? Based on my understanding, it is the separator of different statements, but can be omitted if statement is at the end. Is that correct?
3
Solved
I'd like to know about the things that make Morphic special.
Frost asked 1/11, 2010 at 15:44
2
I would like to use Smalltalk (Pharo) to better refactor my image processing and computer vision code/algorithms, written in other languages. I have not found a lot of examples online where Smallta...
Sheerlegs asked 23/4, 2016 at 0:6
2
Solved
Since Twitter changed their website design, I cannot get a set of tweets from any account by using built-in Zinc classes. It throws an error that says: ConnectionClosed: Connection closed while wai...
4
Solved
Just wondering if you can mark a method as pending to implement in pharo, like you can do in java using "todo"
I'ts really hard for me to keep track of what's complete on pharo without something l...
4
Solved
In Pharo 7, I am trying to get the first number of characters of a string, or just the whole string (if the requested number of characters exceeds the length of the string).
However, the following...
2
Solved
When you start a code sending not implemented message, Pharo launches debugger.
As far as I understand it works through Object >> doesNotUnderstand, which trigger exception, and this leads t...
2
Solved
I am currently reading a file like this:
dir := FileSystem disk workingDirectory.
stream := (dir / 'test.txt' ) readStream.
line := stream nextLine.
This works when the file is utf-8 encoded but...
1
Solved
I'm confused about why this code seems to work fine in isolation, but I get an error when I put it all together.
The following snippet prints 'Hello World!' when printed:
| blah |
blah := 'Hello ...
6
Solved
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 back...
1
Solved
In the Nautilus System Browser (Pharo 6) there's a right-click command to Add package... as well as Add class... and even Add protocol..., but I can't find anywhere a way to Add method....
Where ...
Allegorize asked 19/11, 2018 at 12:33
2
Solved
It seems Smalltalk implementations misses an algorithm which return all the indices of a substring in a String. The most similar ones returns only one index of an element, for example : firstIndexe...
Kylstra asked 4/7, 2018 at 17:43
2
Solved
I've downloaded Pharo today, and I noticed most keybindings don't work within the language environment.
Is there any possible way to get standard Mac / Linux keybindings to work?
I could find no ...
Niemann asked 5/8, 2016 at 11:45
0
I have a Pharo extension that adds promises to Pharo Smalltalk. I then use the promise extension to do a bank transfer with the following bank application.An account contacts the bank in order to t...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.