Remy Goldschmidt
taktoa.bsky.social
Remy Goldschmidt
@taktoa.bsky.social
that's quite a metric signature
January 3, 2025 at 5:46 AM
I think the point is that the C code being called is probably vectorized in your sense
December 17, 2024 at 8:54 AM
In terms of paradigm, this whole thing should be pretty familiar to imperative programmers, who work with maps and sets and iterators like this all the time.

There's value in not forcing the programmer to talk to you in your language (declarative queries) but instead meeting them where they are.
December 5, 2024 at 5:22 PM
The other thing is, we would not aspire to back this whole thing with an actual DB, which is the path ORMs went down. Instead, the relation type would be an in-memory datatype.
December 5, 2024 at 4:59 PM
In particular, a fragment consisting of

- for loops over relations
- while loops with monotone conditions
- x ∪= y etc.

seems likely to be tractable.
December 5, 2024 at 4:59 PM
Much as it is possible to write imperative code that the compiler can analyze to a functional DFG, especially in the absence of aliasing, in this language we'd analyze imperative code and emit RC.
December 5, 2024 at 4:59 PM
Instead, I'm talking more about the idea of an imperative PL that has relations as a basic (known to the compiler) datatype, and where loop nests are compiled to relational calculus.
December 5, 2024 at 4:59 PM
I think we may be talking about different things. When I say "relational", I don't mean that there is ambient non-determinism as in Prolog. I agree that mixing that with imperative programming is a bad idea in most cases.
December 5, 2024 at 4:59 PM
I haven't looked into this deeply enough, but I always felt that the intersection of imperative and relational programming was underexplored.

Imperative languages should have query planner-like loop nest optimizations, opts that know about map/set semantics, data layout opts, incrementalization.
December 5, 2024 at 1:57 AM
For quotient types, you don't quotient a type by another type, but instead by an equivalence relation, so the analogy is broken

Difference types are afaik impossible to have all the properties of the integers (e.g. 1 - 1 = 1 + (-1) = 0, so that would imply a map 1 -> 0)
December 4, 2024 at 7:32 AM
Unless I'm unfamiliar with some history, John Backus's name is Backus, not Bakhaus?
December 4, 2024 at 7:24 AM
My company is using a cool PL abstraction in our compute kernel language: it's imperative, but ordering of effects comes purely from data dependencies.

Side effectful ops have "token" inputs and outputs that reify fragments of the world. A typed version would be similar to separation logic.
November 1, 2024 at 11:27 PM