Post #8,548
9/12/01 10:27:07 AM
|
Got Smalltalk code to publish, but how?
I wrote a Smalltalk implementation of a game that I fopund very addictive back in Russia: aggs rolling down on 4 ramps, and you try to catch them all with a basket (it was released as a pocket LCD with 4 buttons).
The question is, how can I turn my classes into something that is reasonable to publish? The image size is 11 Meg. My own stuff is tiny. It's all done in Visual Works 5i.
|
Post #8,609
9/12/01 12:58:04 PM
|
Re: Got Smalltalk code to publish, but how?
Are you using Parcels?
If you code is in a parcel or parcels, just use the Parcel Browser and sleect the parclel and pick either the "Save" or "File Out As" options. Both produce a text file of the Smalltalk code that can be easily imported into another Smalltalk image
If you are not using Parcels, you can still use the "File Out As" option in the System Browser to export a Category, a Class, or even just a Method as text that can be published
Jay O'Connor
"Going places unmapped to do things unplanned to people unsuspecting"
|
Post #8,682
9/12/01 4:37:26 PM
|
Re: Got Smalltalk code to publish, but how?
My code is not in a parcel. How do I make one?
I did File Out As, but for the life of mine I can't find how to file it back in.
|
Post #8,690
9/12/01 5:03:45 PM
|
Re: Got Smalltalk code to publish, but how?
My code is not in a parcel. How do I make one?
Go to "Browse->Parcels" and on the parcel browser that opens, you just select "Parcel->New" in the menu bar or "New" in the popup menu on the parcel list on the left. Then find your classes and add then to the Parcel. Note: The Parcel browser and manipulating parcels and classes can be farily confusing
I did File Out As, but for the life of mine I can't find how to file it back in.
Open a File browser, select the file you want in the middle pane (should have a .st extension...) and right click and select "File In"
Note: VisualWorks defaults to using XML for its import/export format. Using the "Settings" you can switch to the older style chunked Smalltalk code format which is actually quasi-executed on import. (The file contains Smalltalk code instructing the compiler how to build the classes and add the methods)
Jay O'Connor
"Going places unmapped to do things unplanned to people unsuspecting"
|
Post #9,154
9/14/01 3:36:41 PM
|
Confusing was too gentle a word...
|
Post #9,162
9/14/01 3:55:27 PM
|
AS in "I don't like it...
...and it's error prone"
It was the first step, I believe, toward STORE, which was there attempt to have another option other than Envy (being that Envy is no owned by their main competition). I haven't used STORE, but I believe it uses a database (like Oracle) for code repository.
Jay O'Connor
"Going places unmapped to do things unplanned to people unsuspecting"
|
Post #8,703
9/12/01 5:39:49 PM
|
This is one of Smalltalk's great failings IMO
Failure to standardize source code interchange formats.
|
Post #8,714
9/12/01 6:27:31 PM
|
Not really
Source Code interchange bwtweeen Smalltalk versions makes little sense as the clas libraries don't match. Exporting code from Squeak to import into VisualAge isn't possible because the classes are so different; why bother with source code format
Jay O'Connor
"Going places unmapped to do things unplanned to people unsuspecting"
|
Post #8,740
9/12/01 9:07:48 PM
|
Re: Not really
Ah, so you can't Open Source smalltalk?
That no man should scruple, or hesitate a moment to use arms in defense of so valuable a blessing [as freedom], on which all the good and evil of life depends, is clearly my opinion; yet arms ... should be the last resource. - George Washington
|
Post #8,775
9/12/01 10:45:29 PM
|
Wrong
You can (and people have) Open Source Smalltalk, just that your code is targetted for a particular version of Smalltalk. You can open source your VisualWorks code and anyone can use it in VisualWorks applications, but it probably won't work in Dolphin without modification
Squeak itself is Open Source, but I believe it's the only IDE/compiler in that status
Jay O'Connor
"Going places unmapped to do things unplanned to people unsuspecting"
|
Post #8,929
9/13/01 3:09:33 PM
|
Thats one of the other ones
the class libraries don't match.
Its kept the community fragmented and unable to gain critical mass. I'm not saying all Smalltalks should be identical, but there ought to be base equivalencies at some level - for instance collections and stuff.
Just like you have portable C and then platform specific C, there ought to be similar facilities in Smalltalk. It would allow some libraries to be developed once and shared among all Smalltalk users regardless of implementation.
|
Post #8,931
9/13/01 3:23:57 PM
|
Actually..
Most of the Collections and Streams are compatible and a lot of base stuff
The real divergence is in anything dealing with the underlying OS; both GUI and File IO. Since each Smalltalk was written to fit a different sort of problem from a different philisophical direction, they have differen tways of implementing the relationship with their environment.
Which is actually a good thing. Dolphin and Visualworks have different goals they try to attain, so they have different ways of meeting those goals. So the developer can choose the approach that makes more sense for their own particular problem
Jay O'Connor
"Going places unmapped to do things unplanned to people unsuspecting"
|
Post #9,333
9/15/01 11:02:08 PM
|
Many incompatible but perfectly finely-tuned answers...
will lose in the end to a worse answer that works in many situations.
This is the basic message of Worse is Better. There are many features which are better per developer or per project, but are worse per community. Creating ideal environments at the cost of fragmentation has been a classic issue for languages like Lisp. By contrast languages like C and Perl, clearly much worse in many ways, do a better job with that and benefit on the whole from it.
The fact that Smalltalk provides the custom answer you really want on your project is not at all inconsistent with the failure of Smalltalk to realize the potential that its supporters believe possible.
Cheers, Ben
|