| Interests | Science, poetry, humour |
| pronouns | he/him |
| Interests | Science, poetry, humour |
| pronouns | he/him |
@float13 are you familiar with Design For Disassembly?
Designing for Disassembly ensures that all elements of a product can be disassembled for repair and for end of life.
This allows for and encourages repairs, with the result that a product's life cycle is prolonged; and it allows for a product to be taken apart at the end of its life so that each component can be reclaimed.
#forth is my classic example of a bounded programming language, by the way. The behavior of #forth devotees makes this clear. There is not a large body of material written about the language. There is not a large body of source code to study. But the language is not dead. Anyone who is interested in the language and has an itch to do more with it is drawn... dare I say cursed?... to implement it, reimplement it, and tinker at length. Because there is just no other way to get deeper into it, other than making your own path. More than any other language, it is a folk language that has been reimplemented hundreds of times to satisfy some kind of deep primal curiosity.
Despite this independence, most of these Forths and Forthlikes have strong structural similarities and force similar programming patterns on their user. A whole lot of behavior inevitably falls out of a short set of rules. That's the cool bit.
J combines 2 verbs (either built-in or user-defined) using hooks, and these work differently when called with either 1 or 2 arguments. For example, to convert a list of numbers to proportions of the sum, we can define the hook
prop =: % +/
+/ sums the array to the right (/ inserts the verb to its left (+) between the numbers in the array) and % (divide) takes the list of numbers and divides each of them by the sum.
prop 3 1 10 7 9
0.1 0.0333333 0.333333 0.233333 0.3
#jlang #jtoots
J uses 1 and 0 for true and false values. This allows using summation to count how many true things, and product to see if all items are true. For example, to see if two arrays are equal:
equals =: [: */ <. = >.
a =: b =: 4 5 6 7 7
c =: 4 5 6 6 7
a equals b
1
a equals c
0
<. and >. give the greater and lesser values of each item of the two arrays
= tests for equality, producing 1 when equal
*/ takes the product of the resulting array elements: 1 if all items are identical
#jlang #jtoots