Comments (6)
As u understood, we used this bad habit (refering to protocol names) a lot.
I recommand we start changing on a 'simple' example' and that would be the use of protocol name to fetch the probes methods.
Perhaps u could show us how to code this right and then we can use the same syntax for other cases.
The code to change is in the probes method of CormasModel and of Cormas Entity.
for the moment it is like this.
probes
^(self organization listAtCategoryNamed: #probes) asSortedCollection
Can u show us how to swith to using pragmas on this example.
Thanks
from cormas.
Load Cormas-Model-ECEC-SergeStinckwich.15 and Cormas-Core-SergeStinckwich.118, to have one example of using Pragma for probes.
from cormas.
cool. easy indeed.
i've done the same for local probes (meaning, probes on the instances of an
entity class). there is one in ECEC, it is on the energy of the foragers.
The code works
http://ws.stfx.eu/GZI5UVJQH0W6
but when i plot it, i get weird results
[image: Images intégrées 1]
2015-06-03 10:19 GMT+02:00 Serge Stinckwich [email protected]:
Load Cormas-Model-ECEC-SergeStinckwich.15 and
Cormas-Core-SergeStinckwich.118, to have one example of using Pragma for
probes.—
Reply to this email directly or view it on GitHub
#10 (comment).
from cormas.
I can't see the image. Images can't be used on github issues.
Sent from my iPhone
On 3 juin 2015, at 12:12, nbecu [email protected] wrote:
cool. easy indeed.
i've done the same for local probes (meaning, probes on the instances of an
entity class). there is one in ECEC, it is on the energy of the foragers.
The code works
http://ws.stfx.eu/GZI5UVJQH0W6
but when i plot it, i get weird results[image: Images intégrées 1]
2015-06-03 10:19 GMT+02:00 Serge Stinckwich [email protected]:
Load Cormas-Model-ECEC-SergeStinckwich.15 and
Cormas-Core-SergeStinckwich.118, to have one example of using Pragma for
probes.—
Reply to this email directly or view it on GitHub
#10 (comment).—
Reply to this email directly or view it on GitHub.
from cormas.
Copy from a email exchange between Peter, Serge and Nicolas
While prefixing the protocol name with "+" or "-" may not be common, using "public" or "private" prefix is actually rather common.
Yes, rather uncommon in the Smalltalk world.
I don't remember Nicolas, what was the meaning of + and * ?
'+' is used for public methods which we want modelers ta have access to easily when browsing classes
'* ' is the same as +, but more specifically dedicated to model users. I explain this a bit more. In Cormas, we provide tools for model users (none developers) to interact with the simulation. That is for example, clicking on an entity in the sapceInterface, and then having a list of methods that the model user can send to that entity.s SO those * methods are methods that appear in those interactive menus.
So you know understand that in Cormas we make a distinction between model developers, and model users. The last category is not supposed to code or to see code. Following this logic, we have a packaging tool in cormas. You can either create a cormas modeler package (which gives access to the browser and all vw tools), or model user package (which gives access to only one model and no access to the browser or other vw tools)
It makes more sense to express this kind of information at protocol level, because then the user can quickly filter out which methods one can use. If it was in pragma then you would have to go through the methods one by one or write custom tool to filter the methods.
And since some classes are rather large (CormasModel has 349 methods in Pharo), having a way to meaningfully separate them is essential.
Of course other approaches can be used... for example Spec (Pharo's UI builder) uses prefix "api" ("api", "api-building", "api-events", ...) to show which protocols are public; the rest is either in "private" or in unprefixed protocols.
from cormas.
Related to #329
from cormas.
Related Issues (20)
- Remove useless things from CMCell HOT 1
- Rename theCSE to arguments and theESE to theCells
- Remove OrderedNeighbourhood and keep only neighbourhood
- Remove flag instance variable from CMEntity
- Remove outline instance variable from CMSpatialEntity
- Store model metadata directly in AbstractModel and not in ProjectFramework
- The saved model can not be loaded
- CMApplicationProject should not inherit from PFProjectApplication
- CMProjectManager should not inherit from PFProjectManager
- Saving does not work because of CMApplication
- Rewrite the implementation of CMClassAttributeValueDataSource class >> inheritedInstVarNamesForClass:
- Cormas Space View is blinking
- Pluralization: Common issue when pluralizing specific words HOT 1
- Remove asGetterForEntityClass
- CMSpaceModel should not inherit from Model
- neighbourE, neighbourN, etc. don't work properly on edges
- Allow to use different shapes for agents
- TCMLocated should not implement cormasModel as explicit requirement
- Replace CMR3ShapesBuilders with ShapeBuilders to build individual shapes
- Feature request : use `.dot` file to create skeleton of a model
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cormas.