I just had a thought. Is anyone aware of any work...
# thinking-together
g
I just had a thought. Is anyone aware of any work on a non-programmer-friendly UI for editing pattern matching? Semantically, I’m looking for Datalog. So I guess a Datalog query UI, although I could imagine a pattern matching UI being developed outside of a use with Datalog.
j
I have been thinking about creating one with https://levlo.com, but not sure who would use it and for what reason.. Did you have an use-case in mind?
i
I've recently come across Query by Example (QBE), which seems related to what you're asking? https://en.m.wikipedia.org/wiki/Query_by_Example
g
I am unaware of such UIs, but, I have fooled around with slapping little DSLs together that combine Prolog and JS together in a markdown-inspired syntax using a bash script. An example of live code that I used:
Copy code
# connection
## parameters
  Parent
  Edge
  Sender
  Receiver
## imports
  shapes
  names
  connection
## query
  das_fact(kind,Edge,edge)
  sourceof(Edge,Sender)
  targetof(Edge,Receiver)
  das_fact(direct_contains,Parent,Edge)
## display
das_fact(connection, ${Parent}, ${Edge}).
das_fact(sender, ${Edge}, sender{component:"${Sender.component}",port:"${Sender.port}"}).
das_fact(receiver, ${Edge}, receiver{component:"${Receiver.component}",port:"${Receiver.port}"}).
Why markdown? Because emacs then lets me collapse each section and imagine that these are layers. [I would be glad to explain further, if this is of interest]
🍰 1
g
I very much have a use case in mind: https://frest.substack.com/p/what-is-frest Also, it just occurred to me that dataflow graph without loops is a really nice sort of construction. It would be a great way to present say a non-recursive Datalog query, or many other sorts of logic, in a manner that is friendly to non-programmers. Even without the graphical presentation, a friendly presentation of the non-recursive part of Datalog would be cool. But then, you can make it recursive, and present that in a stepwise fashion. Stepping between the same, or other, sets of pattern matches and conditions.
m
image.png