I guess there's infinite recursion in Array's printing method too...
An Array containing itself? Obviously that's a rare structure the
system has never dealt with.
Do you think there'll be any other traversing methods that might be affected?
On Mon, Feb 3, 2014 at 7:48 AM, <commits(a)source.squeak.org> wrote:
> A new version of Collections was added to project The Inbox:
> http://source.squeak.org/inbox/Collections-ul.564.mcz
>
> ==================== Summary ====================
>
> Name: Collections-ul.564
> Author: ul
> Time: 3 February 2014, 2:35:36.802 pm
> UUID: 4b9a37ef-df86-40a0-a0dd-8e8b2c04d4ed
> Ancestors: Collections-ul.563
>
> Make sure that Array >> #isLiteral won't get into an infinite recursion, even if the receiver has an recursive structure.
>
> =============== Diff against Collections-ul.563 ===============
>
> Item was changed:
> ----- Method: Array>>isLiteral (in category 'testing') -----
> isLiteral
> +
> + ^self class == Array and: [
> + self isLiteralIfContainedBy: IdentitySet new ]!
> - ^self class == Array and: [self allSatisfy: [:each | each isLiteral]]!
>
> Item was added:
> + ----- Method: Array>>isLiteralIfContainedBy: (in category 'testing') -----
> + isLiteralIfContainedBy: parents
> + " Answer whether the receiver has a literal text form recognized by the compiler. Precondition: the receiver is an instance of Array. "
> +
> + (parents includes: self) ifTrue: [ ^false ].
> + parents add: self.
> + 1 to: self size do: [ :index |
> + | element |
> + element := self at: index.
> + (element class == Array
> + ifTrue: [ element isLiteralIfContainedBy: parents ]
> + ifFalse: [ element isLiteral ]) ifFalse: [ ^false ] ].
> + parents remove: self.
> + ^true!
>
>
Hi All,
As a reminder the Squeak Oversight Election starts on Monday. If you
received a ballot last year you are already set. If you would like to vote
please send an email to voters(a)sueak.org
If you are not sure about an email please let me know. You have until
Monday to ensure you are ready to vote.
Voting is one of the more important contributions you can make to your
community. Please VOTE!
All the best,
Ron Teitelbaum
I’m having all sorts of fun making some weather station and environmental sensors with assorted Pi and ESP8266 boards and I need a nice way to make the sensor nodes report back to base. Since the ESP8266 modules don’t run squeak (shame!) I’m using Arduino-c++ (blech) on them, and since the weather sensor code already existed in python (double-blech) I’m using that on the weather-pi board. I’ve been recommended to look at MQTT as a way to bind them all together and from what little sense I can make of the assorted stuff that googling had lead me to (good grief, so much acronym laden gibberish) it looks like it might do the job.
Googling for a squeak mqtt package has revealed nothing thus far so I’m now appealing to the list for any news.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Useful Latin Phrases:- O! Plus! Perge! Aio! Hui! Hem! = Oh! More! Go on! Yes! Ooh! Ummm!
Dear Squeakers,
I have always had a hard time learning anything until I had a project to
do it around. Well that time has come.
I need to write an app. that will let me run one application inside
another. I would like to have a cad type app. running in a window and
then be able to over lay that cad app. with another app. that lets me
put hot spots on the cad app. These hot spots will have the ability to
show a colored outline around their perimeter. That outline we would
like to be able to turn on and off or make blink. The purpose of the
hot spot is to train people how to use the cad app. by showing them
where to pick menu items and enter data etc.
So the whole things runs like this, we start the cad app. and the tutor
app. The tutor app. step by step shows the student where and what
bottoms to pic and where and what data to enter. As they enter etc. the
app. actually functions and they are able to create in the cad app.
Kind of a training wheel effect.
Can any one tell whether or not I could do this in Squeak and kind of
help me do it. I do have a nephew who is a good programmer but has
never used Squeak of small Talk and I would like to get him help me do
this app. start using Squeak.
Can any one point in the right direction? I would like to do the same
thing for learning Squeak. Once we learn how to do it for the cad app.
I will do it for the Squeak community and make it free.
Sincerely,
Chuck Smith
On 11/25/15, Frank Shearar <frank.shearar(a)gmail.com> wrote:
> On 24 November 2015 at 21:09, H. Hirzel <hannes.hirzel(a)gmail.com> wrote:
>> On 11/21/15, Chris Muller <asqueaker(a)gmail.com> wrote:
>>> On Fri, Nov 20, 2015 at 12:40 PM, tim Rowledge <tim(a)rowledge.org> wrote:
>>>> I suggest we should Universes.
>>> +1. +1. +1 and, +1.
..
>
> I was under the impression that Universes _was removed_, like, back in
> 4.4 or the beginning of the 4.5 cycle, when I was up to my eyeballs in
> hairy dependencies... Certainly the build processes think so -
> https://github.com/squeak-smalltalk/squeak-ci/blob/master/package-load-scri…
> is the _load script_ for Universes (implying its _unloaded by default_
> state).
>
> frank
>
>> I think this has been discussed before the release of 4.6 and people
>> agreed but at that time it was to late to do it.
>>
>> --Hannes
>>
>
>
Hi Frank
Indeed I do not see a Universe browser in the app menu of Squeak 5.0.
However there seem to be some classes left in the system, see screen shot.
So there was removal but it seems it was not done completely.
Hello
The recipe: How to list all global variables [1]
has the code snippet
Smalltalk keys
select:
[:k | ((Smalltalk at: k) isKindOf: Class) not]
thenCollect:
[:k | k -> (Smalltalk at: k) class]
to give a list of global variables.
When executing this code the recommendation is to use
Smalltalk globals
instead of
Smalltalk keys
A rewrite because of Environments not having #select:thenCollect: (I
do not think that is necessary) then is
(Smalltalk globals select: [:k | ((Smalltalk at: k) isKindOf: Class) not])
collect: [:k | k -> (Smalltalk at: k) class]
Then I get 'key not found: ExtendedNumberParser'.
I wonder what is going on here ...
Regards
Hannes
[1] http://wiki.squeak.org/squeak/1824
/Smalltalk/Squeak64/Squeak5.1-16549-64bit.2.image
Squeak5.1
latest update: #16549
Current Change Set: WorkSpace
Image format 68021 (64 bit)
I have no experience with saving projects, but I thought I would try it and
see how it works.
The image I am using has four projects:
1. The root project that opens in a fresh image
2. A Morphic project
3.1 Another Morphic project and,
3.2 An MVC project in the 3.1 Morphic project.
When trying to save 2, I get an error message.
Note: I also tried this on a fresh image with the same results.
a. Open new (as downloaded) image.
b. Create Morphic project, make no changes, just open it.
c. Try to save it >> error
It looks like it is trying to process
"(TheWorldMainDockingBar>>#toggleFullScreenOn: "a CompiledMethod(2777225)")"
jrm
In Object method category *Morphic-Kernel, we currently have three methods:
Object>>currentEvent
"Answer the current Morphic event. This method never returns nil."
Object>>currentHand
"Return a usable HandMorph -- the one associated with the object's current environment."
Object>>currentWorld
"Answer a morphic world that is the current UI focus."
I want to suggest adding one more method:
Object>>currentProjectWorld
"Answer a morphic world for the current project."
^Project current world
Rationale: In the course of removing direct references to the global variable
World, there are now numerous repetitions of the "Project current world" idiom.
If these are replaced by "self currentProjectWorld", the code is a bit more
readable, and the references to Project current world are easier to find. This
should also make the distinction between #currentWorld and #currentProjectWorld
easier to understand.
Is it OK if I add this method, and replace the current "Project current world"
usage with "self currentProjectWorld" throughout?
Dave
… and another thing - take a look at StandardFileStream class>>#newFileNamed:. Note that it carefully checks to see if a file of the requested name already exists? Sounds very sensible, even though the message is not the best name I could imagein for the job.
Unfortunately, if you take a look at how it is implemented you’ll notice FileDirectory>fileExists: which again sounds very reasonable. I’d argue that it is not appropriate for an instance method on a particular directory to be worrying about other directories (this is one place where #asFileName is not ridiculous) but never mind - the important part here is that it carefully makes sure to check we only check files and not directories. Which is of course sensible because we are checking if a *file* exists.
But going back up the stack we notice that this means our test for a pre-existing use of the requested file name will not detect a *directory* of that name. How many filing systems can support a directory containing a file and another directory of the same name? Obviously this can’t in practice be a huge issue since I’ve never seen any mention of it causing a problem but it is a stupid hole in the semantics. Just another one to add to the list...
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Oyster (n.), a person who sprinkles his conversation with Yiddishisms.