<feed xmlns='http://www.w3.org/2005/Atom'>
<title>7Units/src/main/java/sevenUnits, branch v1.0.0b2</title>
<subtitle>A unit converter made in Java, inspired by GNU Units
</subtitle>
<id>https://git.ahopkins.ca/7units.git/atom?h=v1.0.0b2</id>
<link rel='self' href='https://git.ahopkins.ca/7units.git/atom?h=v1.0.0b2'/>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/'/>
<updated>2025-05-31T01:31:09Z</updated>
<entry>
<title>Bump version to 1.0.0b2</title>
<updated>2025-05-31T01:31:09Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-31T01:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=7eb1ce7787c6306321a4db378b1cbd37ce721583'/>
<id>urn:sha1:7eb1ce7787c6306321a4db378b1cbd37ce721583</id>
<content type='text'>
All that's left before 1.0.0 is released is the documentation fixes.
Unless I find any major issues, 7Units 1.0.0 releases June 8.
</content>
</entry>
<entry>
<title>Ensure LinearUnit&amp;Prefix ==/hash obey contracts</title>
<updated>2025-05-31T01:30:44Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-31T01:10:09Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=7db19d307970b73559239ec343c92c7876510c2a'/>
<id>urn:sha1:7db19d307970b73559239ec343c92c7876510c2a</id>
<content type='text'>
Previously, these classes' equals() and hashCode() methods did not obey
the contracts:

For equals(), I considered two values equal even if there was a very
small deviation, in order to avoid floating-point error.  This equals
relation is not transitive (i.e. it is possible that a = b &amp;&amp; b = c but
a ≠ c), violating the contract of equals.

This also makes it impossible to properly implement hashCode, as if two
values are equal, they must have the same hash code.  The solution I had
provided is an ineffective hack, which could mess with hash maps and
sets.

I have changed the implementation to demand exact equality.  I have also
provided equalsApproximately() methods to both classes that use the old
behaviour.  Hash codes are only really used for hash maps, and the old
implementation doesn't even achieve its purpose, so I did not add a
method to return the old hash behaviour.
</content>
</entry>
<entry>
<title>Remove Unitlike/MultiUnit</title>
<updated>2025-05-31T00:54:19Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-31T00:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=e86fb71e1665cb9e8511bafd54df0fb8cbca5adc'/>
<id>urn:sha1:e86fb71e1665cb9e8511bafd54df0fb8cbca5adc</id>
<content type='text'>
I ended up never using this code - it was simpler to just use lists of
units and values.  Making a whole new object for lists of units, and an
abstract class for things that convert things other than doubles, is
needlessly complicated, and doesn't solve any major issues.  For
example, I still need to store each Unitlike type in a different
collection, because it will have a different type.
</content>
</entry>
<entry>
<title>Throw error on expressions with too many operators</title>
<updated>2025-05-31T00:54:18Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-21T23:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=8df414ced2018e685f034424c3d8c7813d18805c'/>
<id>urn:sha1:8df414ced2018e685f034424c3d8c7813d18805c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ExpressionParser: use correct operand order</title>
<updated>2025-05-31T00:54:17Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-21T23:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=4cb7e4eb4a9213304ee5b83c9aaa0427e9a8fe31'/>
<id>urn:sha1:4cb7e4eb4a9213304ee5b83c9aaa0427e9a8fe31</id>
<content type='text'>
Most of the internal problems with the expression parser happened
because I was accepting the arguments for binary operators in the wrong
order.  For example, '2 - 1' became '1 2 -', not '2 1 -'.

The likely cause of this error is the following sequence of events:
- In commit 6dbd32cd, I created the code for interpreting RPN.  I
  accepted two arguments from the stack (o1 and o2), then performed o1
  &lt;op&gt; o2.  However, because stacks are in LIFO order, I should have
  actually done o2 &lt;op&gt; o1.
- Later, in commit 94349688, I created the code for converting an infix
  expression to RPN.  Creating the expressions in the correct order did
  not work, because my interpreter used the incorrect order.  To 'fix'
  this problem, I created the expressions in the incorrect order.  I did
  not notice any discrepancy, probably because I was not testing the
  individual methods, only the two-step whole (which found no errors).
</content>
</entry>
<entry>
<title>Setup automated javadoc</title>
<updated>2025-05-18T04:03:29Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-05-18T04:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=fc5045c4da18b6fd811c6748aa7b5184a80f6769'/>
<id>urn:sha1:fc5045c4da18b6fd811c6748aa7b5184a80f6769</id>
<content type='text'>
./gradlew javadoc
</content>
</entry>
<entry>
<title>Add more UnitDatabase tests</title>
<updated>2025-04-30T21:42:01Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-04-30T21:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=4910b914392753986526bc28102ddef42e275e6c'/>
<id>urn:sha1:4910b914392753986526bc28102ddef42e275e6c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve Metric base units SuppressWarnings message</title>
<updated>2025-04-20T23:23:31Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-04-20T23:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=d1335dd378a7e302e4853c2695f2931c244b8863'/>
<id>urn:sha1:d1335dd378a7e302e4853c2695f2931c244b8863</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add tests for NameSymbol</title>
<updated>2025-03-21T20:26:01Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-03-21T20:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=99ef729b27377b440b15757b789101c7ed87aec1'/>
<id>urn:sha1:99ef729b27377b440b15757b789101c7ed87aec1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>convertToMulti: Compare unit bases to this.base</title>
<updated>2025-03-07T16:48:10Z</updated>
<author>
<name>Adrien Hopkins</name>
<email>adrien.p.hopkins@gmail.com</email>
</author>
<published>2025-03-07T16:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ahopkins.ca/7units.git/commit/?id=7257fbd189c779105c9393458a2e0cdf06e285f7'/>
<id>urn:sha1:7257fbd189c779105c9393458a2e0cdf06e285f7</id>
<content type='text'>
This is a necessary precondition for the conversion methods used later
on in convertToMutliple, and it is simpler than the existing method.
I can also be sure it works, due to the tests I just wrote.
</content>
</entry>
</feed>
