Hi all !
This is SGML, HTML, XML, the Windows Registry and LDAP. It's old
hierarchical databases? At least related?
Could the algebra proposed help us handle them?
Cheers,
Erling Hellenäs
Den 2017-12-20 kl. 18:52, skrev 'Bo Jacoby' via Programming:
I am impressed by the J programming language and by the array concept. However,
boxed arrays and sparse arrays and empty arrays illustrate shortcomings in the
array concept of J.
I suggest using ordinal fractions for structuring, storing and handling data.
Then there is no need for boxing, nor for differentiating between sparse arrays
and other arrays. However I have not constructed a programming language like J
to manipulate such data.
The concept is introduced in the old article behind this link. (Sadly the
e-mail software tend to disrupt my links. I hope this link survives).
https://www.academia.edu/10031088/ORDINAL_FRACTIONS_-_the_algebra_of_data
Here are some differences between arrays and Ordinal Fractions (OFs):
- Arrays have different shapes. OFs have the same shape: (_$9)
- J-arrays have zero-origin indexing. OFs have one-origin indexing.
- Arrays may have elements. OFs have no elements.
- Array elements contain data. OFs may contain data.
- Arrays may contain subarrays. OFs always contain subordinate OFs.
- An array may have a name. An OF may contain a name.
- In J a scalar differs from a shape 1 array. Not so in OFs.
Here are some differences between nonnegative integers and (OFs):
- Any sequence of digits (0 1 . . . 9) represents a base-ten integer, or a base-nine OF.
- Integers may be padded with zeroes to the left, OFs to the right.
- Digit 0 in an integer indicate that a term is omitted. Digit 0 in an OF
indicate that a condition is omitted.
- The integer 0 means "nothing". The OF 0 means "everything".
I think that ordinal fractions is a unified way of structuring data: scalars,
arrays, trees, databases.alike.
Thanks
Bo.
Den 13:32 onsdag den 20. december 2017 skrev Raul Miller
<[email protected]>:
Actually, J does support arrays of nothing. That's what i.0 is, after
all. And, if you want a scalar containing an array of nothing, then a:
matches that specification.
And we have an algebra here - though if (as in your previous message)
you do multiplication and call it addition, this becomes very
difficult to talk about.
That said, remember that we can add an arbitrary number of leading 1
dimensions to any array without changing the number of elements in
that array.
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm