Nilesh Trivedi
12/29/2022, 12:59 PMb
and height h
. It's common to think of these as "independent" variables and define quantities like the following as "dependent":
• perimeter(b, h) => 2*(b+h)
• area(b, h) => b*h
• diagonal(b, h) => sqrt(b^2+h^2)
But if I were to ask, what are the base and height of a rectangle whose area is a
and diagonal is d
, our programming languages have no tooling to do this (except the symbolic manipulation libraries for computer algebra). All the required information is there but we have privileged b
and h
over area
and diagonal
and thus, we now need to figure out the formula for side lengths and program it as the function sides(a, d)
I should be able to describe a structure, and auto-generate all possibilities functions (including for currying and partial applications, and while we are at it, all the partial derivatives with respect to each other) so that i can just declare what is known and what I want to calculate. A rectangle can then be represented with any set of variables that make everything else determinable. I should get access to all possible constructors like new Rectangle(area: a, diagonal: d)
.
And I want to see this be available for all programming tasks, not just algebra/math. For creating a graph, is the constructor new Graph(Node[], Edges[])
really the privileged one? Why not build languages in a way that I automatically get new Graph(AdjacencyMatrix)
and graph.getNodes()
and graph.getEdges()
.Leonard Pauli
12/29/2022, 1:19 PMrange{start.inclusive, end.exclusive, domain is int{0..30}, end=start+length, midpoint?, length?}
; By using constraints to define relations, and invertable/full on algebraic operations; an expression could be automatically reworked to isolate different set of variables; and provide ability to change them. Eg, here, changing the length will lead to an ambiguous case (>1 free variable), but with a structural editor, it may show all possible interpretations for you to select (eg. keep end or start fixed, or scale track around certain point, or add custom interpretation logic (eg. using non-linear scaling)). Integrating this system deeply with the UI would allow pretty much auto-generation of it just from the expression/range concept, auto supporting all interaction (drag track, endpoints, scale around scalepoint, etc), which would otherwise have been pages of code in eg. current web development...Jimmy Miller
12/29/2022, 3:19 PMDenny Vrandečić
12/29/2022, 4:44 PMAndrew F
12/29/2022, 6:03 PMguitarvydas
12/29/2022, 7:27 PMKonrad Hinsen
12/29/2022, 7:31 PMwtaysom
01/01/2023, 4:49 AMEvent
with a start_date
and an end_date
. Naturally, we should have start_date ≤ end_date
in the end, but for a UI, it can be nice to choose them in either order or to have an InconsistentEvent
that then gets fixed by the time you use it. But some operations over regular events still sense for inconsistent events.
Now ITom Hutchinson
01/03/2023, 5:13 AMNilesh Trivedi
01/03/2023, 10:57 AMRiley Stewart
01/19/2023, 1:24 AM