On 5 Dec 2014 at 1:13, Bert Freudenberg wrote:
On 05.12.2014, at 00:49, Dan dnorton@mindspring.com wrote:
On 4 Dec 2014 at 23:22, Bert Freudenberg wrote:
On 04.12.2014, at 23:14, Dan dnorton@mindspring.com wrote:
Howdy,
A class is instantiated and produces output in a data
structure
(array, collection, dictionary,
...). Upon each later (maybe months later) instantiation, the
previous output is needed as
input. What is the best way to do this for modest (not huge)
output? Some possibilities:
Externally - file out and file in Within the class - compile class methods containing the
output;
save with Montecello
I'm interested in how to dynamically compile a class method.
Can
Browser be invoked
dynamically? In studying Browser and friends, it looks
complicated. Am I missing something
or attempting something foolish or ...?
Why wouldn't you just keep the "output" in the image and save
it?
When you restart it months later, it will be there.
- Bert -
That surely is simpler than trying to compile a method.
Not that compiling a method is hard.
That is encouraging. Is it something similar to "Dynamic Message Calling" described in the Terse Guide to Squeak?
I might put something like this in a package.
I'm not sure what you mean by that.
I mean a package on SqueakMap where one can download it and try it out. I see there are over 700 packages out there for the choosing. A great variety. It's unfortunate that not all run on the current release of Squeak but maybe with a little work... ;)
Would users find saving the image as... to be the expected way of
doing things?
- Dan
Depends on who your users are. If you were the user ... you're saving your image all the time, right?
Um, not exactly. But more often than in the past. I feel most comfortable saving with Montecello.
Maybe you should be more specific in what data you want to store, how you want to distribute it, and who is going to use it.
I have in mind a list of names which are matched randomly in pairs then filtered according to a set of rules. The output is a dictionary and the rules specify that no pair can be the same as previous (up to 3) instances. There are other rules and often hundreds of iterations take place before all pairs obey all the rules.
It might be used, as it is in our family, to draw names for Christmas. The person who runs the program distributes the results to those on the list.
- Dan