forked from mtaborda/aconcagua
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `ArithmeticObject` is now a subclass of Magnitude - Introduce `ArithmeticFormula` as an abstract class for formulas modeling calculations and two new sub classes: `Summation` and `SequenceProduct` - Introduce `IntegerAsSuperscriptFormatter` - Introduce `DiscreteInterval` to model an interval that can work with any arithmetic object as its boundaries and step - Improve quantitative analysis and align the project with the ISO 80000 standard: - Add support for physical dimensions and units defined in the standard system of units - Add support for information units (bit related) and angle units also - Add support for common units in the US Customary Units system - Improve documentation - Add localization messages in English and Spanish for error texts and standard unit names - Add Pharo 12 to the build matrix ## Breaking changes - Remove `Measure` in favor of `Quantity` - Remove `MeasureBag` and friends - The `UnitBehavior` hierarchy changed its implementation; now is no longer required to create new sub classes for the quantitative analysis, `UnitOfAccount` is usable with other object as its reference. - Remove `Evaluation` and friends in favor of `ArithmeticFormula` - Remove several exceptions in favor of `ArithmeticError` - Remove `CircularReadStream` - Remove `InfinityClass` and friends, and infinity intervals because they cannot be enumerated so the only method non failing for these cases was `includes:` - Remove Pharo 8 support
- Loading branch information
Showing
176 changed files
with
8,053 additions
and
14,756 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
'srcDirectory' : 'source' | ||
'srcDirectory' : 'source', | ||
'tags': [ 'Buenos Aires Smalltalk' ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# How to load Aconcagua in a Pharo image | ||
|
||
## Using Metacello | ||
|
||
1. Download a [Pharo VM and image](https://pharo.org/download) | ||
2. Open your Pharo image | ||
3. Open a Playground | ||
4. Evaluate: | ||
|
||
```smalltalk | ||
Metacello new | ||
baseline: 'Aconcagua'; | ||
repository: 'github://ba-st/Aconcagua:release-candidate'; | ||
load: 'Development'. | ||
``` | ||
> Change `release-candidate` to some released version if you want a pinned version | ||
## Using Iceberg | ||
1. Download [pharo VM and image](https://pharo.org/download) | ||
2. Open your Pharo image | ||
3. Open Iceberg | ||
4. Click the *Add* repository button | ||
5. Select *Clone from github.com* and enter `ba-st` as owner name and `Aconcagua` | ||
as project name | ||
6. Click *Ok* | ||
7. Select the repository in the main Iceberg window | ||
8. Open the contextual menu and select | ||
*Metacello → Install baseline of Aconcagua ...* | ||
9. Type `Development` and click *Ok* | ||
> After Iceberg cloned a repository, it will be checked-out at the default | ||
> branch (in this case `release-candidate`). If you want to work on a different | ||
> branch or commit, perform the checkout before the baseline installation step. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# How to use Aconcagua as dependency in a Pharo product | ||
|
||
In order to include **Aconcagua** as part of your project, you should reference | ||
the package in your product baseline: | ||
|
||
1. Define the Aconcagua repository and version to be used, and the [baseline groups](../reference/Baseline-groups.md) | ||
you want to depend on (usually it will be `Deployment`). | ||
|
||
If you're unsure on what to depend use the *Dependency Analyzer* | ||
tool to choose an appropriate group including the packages you need. | ||
|
||
2. Create a method like this one in the baseline class of your product: | ||
|
||
```smalltalk | ||
setUpDependencies: spec | ||
spec | ||
baseline: 'Aconcagua' | ||
with: [ spec repository: 'github://github://ba-st/Aconcagua:v{XX}' ]; | ||
project: 'Aconcagua-Deployment' | ||
copyFrom: 'Aconcagua' with: [ spec loads: 'Deployment' ] | ||
``` | ||
This will create `Aconcagua-Deployment` as a valid target that can be used | ||
as requirement in your own packages. | ||
> Replace `{XX}` with the version you want to depend on | ||
3. Use the new loading target as a requirement on your packages. For example: | ||
```smalltalk | ||
baseline: spec | ||
<baseline> | ||
spec | ||
for: #pharo | ||
do: [ | ||
self setUpDependencies: spec. | ||
spec | ||
package: 'My-Package' | ||
with: [ spec requires: #('Aconcagua-Deployment') ] ] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Arithmetic | ||
|
||
## Arithmetic Object | ||
|
||
An `ArithmeticObject` is an abstract class declaring the common behavior for | ||
arithmetic objects: | ||
|
||
- Fundamental math operations: addition, subtraction, multiplication and division | ||
- Exponentiation | ||
|
||
## Arithmetic Formula | ||
|
||
An `ArithmeticFormula` is a mathematical expression that involves arithmetic | ||
operations like addition, subtraction, multiplication, and division. | ||
|
||
It typically describes a relationship between numbers, variables, or both, and | ||
is used to perform calculations. | ||
|
||
Concrete subclasses provide specific calculations. | ||
|
||
## Summation | ||
|
||
A `Summation` is the addition of a finite sequence of numbers or arithmetic objects, | ||
called addends or summands; the result is their sum or total. | ||
|
||
Besides numbers, other types of values can be summed as well: functions, vectors, | ||
matrices, polynomials and, in general, elements of any type of mathematical objects | ||
on which an operation denoted "`+`" is defined. | ||
|
||
For example: | ||
|
||
```smalltalk | ||
(Summation of: [:i | i squared] from: 1 to: 4) = (1 + 4 + 9 + 16) | ||
``` | ||
|
||
```smalltalk | ||
(Summation ofAll: #(1 2 3 4)) = (1 + 2 + 3 + 4) | ||
``` | ||
|
||
```smalltalk | ||
(Summation ofAll: #(1 2 3 4) applying: #squared) = (1 + 4 + 9 + 16) | ||
``` | ||
|
||
## Sequence Product | ||
|
||
A `SequenceProduct` (or finite product) is the multiplication of a finite sequence | ||
of numbers or arithmetic objects, called factors; the result is their product. | ||
|
||
Besides numbers, other types of values can be multiplied as well: functions, | ||
vectors, matrices, polynomials and, in general, | ||
elements of any type of mathematical objects on | ||
which an operation denoted "`×`" is defined. | ||
|
||
For example: | ||
|
||
```smalltalk | ||
(SequenceProduct of: [:i | i ] from: 1 to: 4) = 4 factorial | ||
``` | ||
|
||
```smalltalk | ||
(SequenceProduct ofAll: #(1 2 3 4)) = 4 factorial | ||
``` | ||
|
||
```smalltalk | ||
(SequenceProduct ofAll: #(1 2 3 4) applying: #squared) = (4 * 9 * 16) | ||
``` | ||
|
||
## Discrete Interval | ||
|
||
A discrete interval is a finite set of discrete values that lie within certain bounds, | ||
usually taken from the set of integers or some other countable set. | ||
|
||
This implementation can be used with any arithmetic objects as the values, not | ||
only numbers. | ||
|
||
## Superscript formatting | ||
|
||
An `IntegerAsSuperscriptFormatter` is a formatter that can convert | ||
any integer to its superscript form. Useful when printing exponents. | ||
|
||
For example: | ||
|
||
```smalltalk | ||
( IntegerAsSuperscriptFormatter new format: -10 ) >>> '⁻¹⁰' | ||
``` | ||
|
||
```smalltalk | ||
( IntegerAsSuperscriptFormatter new format: 1234 ) >>> '¹²³⁴' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Baseline Groups & GS 64 Components | ||
|
||
## Pharo Baseline Groups | ||
|
||
Aconcagua includes the following groups in its Baseline that can be used as | ||
loading targets: | ||
|
||
- `Deployment` will load all the packages needed in a deployed application | ||
- `Tests` will load the test cases | ||
- `Tools` will load tooling extensions | ||
- `Dependent-SUnit-Extensions` will load extensions to SUnit | ||
- `CI` is the group loaded in the continuous integration setup, in this | ||
particular case it is the same as `Tests` | ||
- `Development` will load all the needed packages to develop and contribute to | ||
the project | ||
|
||
## GS64 Components | ||
|
||
Aconcagua includes the following components in its Rowan configuration that can be | ||
used as loading targets: | ||
|
||
- `Deployment` will load all the packages needed in a deployed application | ||
- `Tests` will load the test cases |
Oops, something went wrong.