--- Begin Message ---
Hello,
Nice to see that someone who ask another question on my question but do
i get a answer on my question too.
So if the naming is better now.
Roelof
Op 6-1-2020 om 02:18 schreef xap:
"but all objects respond to value..."; thx, Santiago -- that makes more
sense, th
That's also what my first thought was: .Isn't 2020 the 40th BIrthday of
Smalltalk? Not sure anyone who wasn't there at Xerox can judge this. I
guess the ignition for many of the concepts our favourite environment
are built upon dat eback into the 60ies...
I personally celebrate Smalltalk every
You're welcome, xap!
One of the "thought exercises" that Stef likes to have Pharo students engage
in is to come up with your own design for implementing something like 'or:'
in Pharo code.
And then, afterwards, to examine how the Boolean class and its two
subclasses, True and False, are impleme
many thx, tbrunz! i (and anybody who follows) much appreciate the thoughtful
elucidation -- i did indeed assume that ifTrue: would return its argument
as-is. Now that i go spellunking through source I see:
ifTrue: alternativeBlock
"If the receiver is false (i.e., the condition is false),
>> It is always a good idea to describe in detail what behaviour you did
observe. "get an error" is the same as "it didn't work".
you're correct, and I should know better!
>> You are *evaluating* one of the two blocks in the #ifTrue:ifFalse:
>> expression
this is clutch; thx for the insight!
"but all objects respond to value..."; thx, Santiago -- that makes more
sense, that or: cares only about its receiver/argument evaluable as a
Boolean, no matter they started as blocks, expressions, or something else
(makes me wonder if a bare-value is a degenerate case of a block ... but
don't mind
Even better, to somehow port Pharo to the BEAM, like Ruby/Elixir.
-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
ponyatov
Sent: Monday, 6 January 2020 1:39 AM
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] How can we celebrate th
It's better (conceptually and in performance) to use the inner block, but
is not always necessary. The #or: message sends the `value` message to it's
collaborator if the bolean is false. Blocks responds to value executing
theirs code, but all objects respond to value since it's defined in the
Objec
thx Rixhard. looks like or: takes an 'alternativeBlock', i.e. a block.
however substituting a parenthesized expression (or what i assume is one) as
I did before, in place of the inner block, w/ no other changes has the
method continue to work as expected, hence my question. *shrug* i need to
rtfm :
On Sun, Jan 5, 2020, 15:51 xap wrote:
> hi, I'm just starting out w/ pharo and have a question re your code;
> specifically, in
>
> reject:
> [ :word | (word sameAs: aWord) or: [ word asLowercase asBag ~=
> charBag ] ]
>
> is that inner block needed? would it be less smalltalk-esque
hi, I'm just starting out w/ pharo and have a question re your code;
specifically, in
reject:
[ :word | (word sameAs: aWord) or: [ word asLowercase asBag ~=
charBag ] ]
is that inner block needed? would it be less smalltalk-esque to write, say:
reject:
[ :w | (w = aWor
--- Begin Message ---
Hello,
Im a little bit further on my first project but now I fail to see how I
can use the ListComponent to display all the paintings that are in the
paintings collection on the Paintings class.
Anyone who can give me hints on this ?
Roelof
--- End Message ---
Hi Richard,
Just fyi, the aim of Exercism is not to teach programming. Its aim is for
experienced programmers to fast-start in new languages.
It just happens to that new programmers also use Exercism and there is some
catering in the exercise text for this.
The grains exercise provides a nice ve
Did Smalltalk start with Smalltalk-72 or Smalltalk-80? (Or 1969, when work
on it began..??)
ST-72 was an internal release; ST-80 was its first public release, in 1980.
I've always thought that 1980 was the birthday, so this year it turns 40...
Am I wrong?
What's the consensus? Is it customary
Your problem has to do with understanding how the 'ifTrue:ifFalse:' message
is evaluated.
This expression
1 < 2
ifTrue: [100]
ifFalse: [42].
evaluates to '100'; it does not evaluate to "a block that will return 100
when evaluated".
The blocks that make up the arguments to 'ifTr
On Sun, Jan 5, 2020 at 8:08 AM xap wrote:
> hi, I'm starting out w/ pharo (as my first smalltalk-ish language). am on
> Windows 7 professional; downloaded 64-bit, pharo 8 64-bit development; then
> downgraded to pharo 7, 32-bit stable.
> I went through Prof Stef, and find 1 place of unexpected be
Hi,
I haven't run your code, but I guess that the validation of the number of
arguments of the block is failing.
The block [ 42 ] is a block with zero arguments, but when you do a value:
20, you are calling it with one argument. So it fails.
Happy Coding!
Santiago Dandois
El dom., 5 ene. 2020
hi, I'm starting out w/ pharo (as my first smalltalk-ish language). am on
Windows 7 professional; downloaded 64-bit, pharo 8 64-bit development; then
downgraded to pharo 7, 32-bit stable.
I went through Prof Stef, and find 1 place of unexpected behavior:
Prof Stef/Conditionals:
"no surprises, pri
> On Jan 5, 2020, at 7:39 AM, ponyatov wrote:
>
> The best tribute to 50th anniversary will be the implementation of
> distributed multi-user VM.
How would that be different from GemStone?
The best tribute to 50th anniversary will be the implementation of
distributed multi-user VM.
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
> On 5 Jan 2020, at 15:06, Roelof Wobben via Pharo-users
> wrote:
>
>
> From: Roelof Wobben
> Subject: is this better regarding naming thigs
> Date: 5 January 2020 at 15:06:18 GMT+1
> To: Any question about pharo is welcome
>
>
> Hello
>
> In a earlier question I get a remark to think b
> On 5 Jan 2020, at 14:46, Roelof Wobben via Pharo-users
> wrote:
>
>
> From: Roelof Wobben
> Subject: Re: [Pharo-users] why is my css not found in a seaside project
> Date: 5 January 2020 at 14:46:24 GMT+1
> To: pharo-users@lists.pharo.org
>
>
> I think I found the answer myself
>
> whe
Hi there,
Maybe people is thinking about a great celebration idea :)
Cheers,
Hernán
El dom., 5 ene. 2020 a las 1:07, horrido ()
escribió:
> horrido wrote
> >
> https://medium.com/@richardeng/how-can-we-celebrate-the-50th-anniversary-of-smalltalk-e6b35dbc09a9
>
> Amazingly, no one has any sugges
--- Begin Message ---
Hello
In a earlier question I get a remark to think better about naming things.
Now I did a challene where I have to find anagrams of a given word in a
collection,
So I did this :
findAnagramsCandidates: aCollection subject: aWord
| charBag |
charBag := aWord as
--- Begin Message ---
I think I found the answer myself
when I put this in the RootComponent
updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot stylesheet url: (PaintingLibrary urlOf: #mainCss)
and this on the class side of the RootComponent
initialize
| app |
ap
--- Begin Message ---
There you are right but the hint we get was thinking about recursion
but your lessons showed me other ways to do it which I think are more
the way smalltalk works,
Thanks for that.
Roelof
Op 5-1-2020 om 14:24 schreef Richard O'Keefe:
I did not ask why you were valida
I did not ask why you were validating input.
I asked about why you *repeatedly* validated input.
Think of it this way:
publicMethod: arg1 also: arg2
... check arg1 ...
... check arg2 ...
^self privateMethod: arg1 also: arg2
privateMethod: arg1 also: arg2
... trust th
--- Begin Message ---
Hello Ricard.
You mean when I calcualate the total of a board.
That is because on when I had to calculate the number of a particular
field there were tests where the number was lower then zero or higher
then 64 which makes no sense.
But im open for a solution where on a
Time microsecondsToRun: [
|n|
n := (2 raisedToInteger: 8 * 8) - 1.
Transcript
nextPutAll: 'The number of grains on an 8x8 chessboard is ';
print: n; cr; endEntry].
On my laptop, this reports 194 microseconds.
Why would you use recursion, anyway?
Time microsecondsToRun: [
--- Begin Message ---
Op 5-1-2020 om 11:36 schreef Roelof Wobben via Pharo-users:
hmm,
It looks like I had to do it like this :
https://github.com/RoelofWobben/paintings
for registering the project but I see then that the rootcomponent is not
changed and that still the css is not found or used
--- Begin Message ---
Oke
if I understand that article I have to put this :
initialize
(WAAdmin register: self asApplicationAt: 'reddit')
preferenceAt: #sessionClass put: RedditSession;
addLibrary: RedditFileLibrary
in the class side of the library
--- Begin Message ---
Thanks.
I know that im at that stage and like I said I have the feeling that Im
at the stage for more then a half year.
I think I know a lot of pieces but need some help to see how the pieces
could help me to solve the more complex problems.
But maybe I want to fast a
32 matches
Mail list logo