You are viewing archived messages.
Go here to search the history.

Jason Morris 2022-09-07 23:22:14

Is anyone aware of examples of people generating code from the results of an answer set programming query? I'm trying to figure out if this experiment I'm planning is sufficiently novel to propose a paper.

Jason Morris 2022-09-07 23:24:11

Also interested if anyone has an up-to-date view of whether ASP has ever been used to power expert systems. Same reason, different paper.

Tony Worm 2022-09-07 23:50:41

I'm working on generating code from a series of prompts posed to a developer like this: twitter.com/verdverm/status/1566252517062807552

Is this the kind of thing you mean in your first question?

🐦 Tony Worm: Create anything with @cue_lang and @hofstadter_io

https://youtube.com/shorts/TfaEV37C6IE

Coding on Twitch to make it work with any git repository

Jason Morris 2022-09-08 05:25:11

No, I mean answer set programming in the sense of stable-model semantics logic programming.

Tony Worm 2022-09-08 16:22:14

Is that something from languages like Prolog?

Jason Morris 2022-09-08 20:10:07

Yeah, it is a subtype of logic programming, I would say.

Ricardo Medina 2022-09-09 14:49:01

I'm sure this has been discussed here (appreciate if someone can redirect me), but... What use cases do you see people have for creating their own applications? Do you think people are willing to pay for it?

Nick Smith 2022-09-10 06:22:12

In my worldview, the distinction between creating an app and using an app is artificial.

  • When someone uses an Excel spreadsheet, they create programs (formulas) that will be invoked whenever new data is added.
  • When someone uses a note-taking app, they create a hierarchy (or a web) of pages which allows them to later navigate between pieces of knowledge. The links between these pages amount to a program: a link is an instruction that says "when someone clicks me, navigate to this page".
  • When someone uses a calendar app to send reminders, they are programming the computer to provide them with customized notifications about upcoming events.

Under this lens, everybody wants to be able to create their own programs. The problem with today's world is that we silo programming into two realms: the "end user" realm, where programs are small and easy to create (but are extremely limited), and the "elite coder" realm, where programs are large and are very challenging to make (but are very versatile).

Nick Smith 2022-09-10 06:23:36

The route to the Future of Coding requires us to stop believing that this dichotomy is "good" or "natural".

Paul Tarvydas 2022-09-10 10:39:29

Most people don’t /think/ that they want to create their own applications. Yet, a select few went for Hypercard and spreadsheets. Dentist office software began happening only when spreadsheets became available. Spreadsheets were invented for Accountants, but innovators with domain expertise in Dentist Officery picked up on the new paradigm.

This makes me think of Franz, Inc.’s business model (free, but % royalty on all apps).

Ricardo Medina 2022-09-10 14:16:39

Nick Smith that's a cool worldview. So, if I understand correctly, you see "end-users" extending apps instead creating them from scratch? *at least, most of them

Ricardo Medina 2022-09-10 14:19:05

Paul Tarvydas in that example, were the dentists themselves creating the apps, or was it "programmers" along with dentists and their domain knowledge creating them? if the latter, is the end-user programming effort just lowering the barrier for developers to create apps?

Paul Tarvydas 2022-09-10 16:12:04

At first, it was the dentists - the domain experts - who began to see that they could make computer software without having to “learn how to program”. The “experts” - programmers - came later to make the apps more robust and scalable. Programmers only have domain expertise in programming, not in running medical offices, nor accountancies, nor ... I use(d) a book-writing tool called “Scrivener”. One of its selling points is that it was not created by programmers. Having experience with software, I see all sorts of warts in Scrivener, but, I wouldn’t have been able to invent Scrivener. Spreadsheets, Hypercard, VB, etc., etc. are like gateway drugs. Non-programmers used these tools to express automated versions of their processes. Later, expert programmers cleaned up the ad-hoc messes. This effect can even be seen in programming itself. The “experts” tell everyone to use FP, recursion, monads, etc., etc., but the majority of “real programmers” prefer HTML, JS, Python, Perl, etc. There /should/ be a huge market for enabling invention, but, it must not appear to be complicated, nor expensive.

Borland targeted developers and disappeared. VisiCalc did not target developers and its ideas morphed into Excel, etc. Did the VisiCalc company have an exit strategy or was it simply overtaken by newer versions of the ideas? (idk).

The inventions came from so-called non-programmers.

Henry Ford (?): “If I had asked people what they wanted, they would have said faster horses.”

Nick Smith 2022-09-11 02:27:06

@Ricardo Medina I would phrase it as: end users are likely to make simpler programs (like the examples I mentioned), purely because they don't have the time or expertise to make more complex ones.

I wouldn't think about the Future of Coding in terms of "apps". An app is a hard boundary that discourages interoperability and thus inhibits creativity/flexibility in programming. This is by design: companies want to lock you into using and paying for the programs they write and the services they provide. There's no commercial incentive to break down the artificial boundaries.

Apps aren't natural. CPUs don't execute apps — they execute instructions. Apps are a result of companies trying to adapt the notion of a product— something you can put into a box and sell to a customer—into the digital realm. In fact, until the late 2000s, most apps were literally sold in physical boxes with a price tag attached.

The Future of Coding is not about encouraging companies (in vain) to allow their users to make modifications to the apps they sell. At least, not if I have anything to say about it. Software should feel like a continuous fluid, not a collection of impenetrable boxes that have small holes for a user's data to trickle in and out.

Jason Morris 2022-09-10 19:21:20

We have all seen UI for building complex data structures based on a schema with references. Jason is a person, bob is a person, bob is a friend of Jason, etc. I am designing something similar, but I want it to give the user the ability to also make partially ground and unground statements, and to specify that fully ground, partially ground, or unground statements have an open/closed world assumption applied to them. Has anyone seen a user interface for that?

Jason Morris 2022-09-10 19:28:54

The sorts of things it should let you say include:

Jason is a Person

Bob is a Person

Jason is Bob's Friend

Plus partially ground statements:

Everything is Bob's Friend

Bob is Everything's Friend

Plus unground statements:

Everything is a Person

Everything is Everything's Friend

Plus the ability to make any of those statements replacing "is" with "might be".

I am aware of "statement builder" interfaces. I'm looking for something more visual, less linguistic, like nested trees, or graphs.

Nick Smith 2022-09-11 02:36:17

I doubt someone has made a user interface specifically for the semantics you are describing — it sounds like you're doing something very niche. I'd encourage you to come up with your own design 🙂.

Jason Morris 2022-09-11 03:08:17

I don't think it's "niche", so much as "novel", but I take your point. Just don't want to duplicate any effort.

Nick Smith 2022-09-11 03:12:47

Yes, sorry, perhaps I should have used the term novel/unique instead.

Jason Morris 2022-09-11 05:30:58

Most user interfaces let you say what is true, and then what you didn't say is presumed false. The entire relational database world is based on that idea. The statements are about a single, closed world with boolean truth values. But that's not how humans actually know things. The user can't say "Definitely X, maybe Y, not Z" even if that's exactly what they know. I just now realized that the language I'm using knows how to deal with multiple worlds, and five different truth values are possible in each, but no one has ever built a user interface for collecting structured data that way! Here I am trying to mimic the capabilities of less sophisticated tools, when I should have been building the thing that collects knowledge those systems can't even represent.

Tony Worm 2022-09-11 07:49:01

One part of what I'm working on is to capture the implementation of "Definitely X, maybe Y, not Z" That is, the code which implements a user application from those facts and constraints.

While we focus on enabling the mapping from user inputs to the code needed for implementation, I've often pondered other ways users might "encode" those facts and constraints. Today, our users write CUE, with plans for web/ui based interfaces. Maybe your language could act as a frontend to our tool: docs.hofstadter.io

What do you think? If your language tools can output a structured format like JSON, I think it could work

Paul Tarvydas 2022-09-11 10:13:37

I wonder if the field of “fuzzy logic” is somehow related to these concepts. Googling “GUI fuzzy logic” results in hits.

George Campbell 2022-09-11 13:59:36

Another concept that fuzzy logic can capture is multimodal probabilities. For example 53% Laurel, 0% maybe, 47% Yanny.

George Campbell 2022-09-11 14:06:47

The reason it's not common is because it's slow so only problems that really need it build from scratch.

George Campbell 2022-09-11 14:12:53

Another example is Kalman filters where values (like position) are Gaussian distributions and through the combination of different sensors can you constrain the possibilities

Jason Morris 2022-09-11 15:30:00

It's funny you should mention fuzzy logic. The guys who invented s(CASP) point specifically to systems that used probabilistic logic, and say that if you reduce the options to 25%, 50%, 75%, and 100%, encodings in those systems loose none of their predictive power. They note that if you reduce the options to yes, no, and maybe, that's analogous to 0%, 50%, and 100%, and they predict it will also lose no predictive power, because it is how people think, and it will simplify generating rules and facts. Obviously, doesn't apply to things that are inherently probabilistic, but they were talking about expert systems for recommending antibiotics, e.g.

Jason Morris 2022-09-11 15:30:54

Paul Tarvydas I will look that up, thanks.

Jason Morris 2022-09-11 15:34:17

@Tony Worm The interface is entirely for the purpose of generating JSON. I'll share it here, and if it's useful to you, streal it. But be warned you will probably want to tweak the design, and completely replace the code. 😉

Jan Ruzicka 2022-09-11 17:35:38

You can also look into topos theory for a different view at multiple truth values ;)

Arvind Thyagarajan 2022-09-11 19:28:25

What are some examples of X, Y, Z here? I'm intrigued by the idea of more humanistic thinking being represented in computational interfaces -- but can't quite wrap my head around why this is a gap in current user interfaces.

Is it, for example, a pesto recipe -- definitely basil and garlic, maybe pinenuts, maybe walnuts, maybe parmesan, not ginger? Is every other option that's not definitely and not definitely-not a possible maybe ? Or is maybe in fact a suggested-maybe and not an unknown-maybe ? i.e. parmesan is a valuable maybe in pesto and worth calling out, while anchovies are not... but they're not a definitely-not !