Has anyone ever come across (or thought about) a t...
# thinking-together
n
Has anyone ever come across (or thought about) a tagging system for data where nouns and adjectives play different roles? For example, you might search for a "user", but then refine that search to a "banned user". Note that "banned" and "user" are not necessarily independent tags. Just because someone is a "banned user" and a "father" doesn't mean they're a "banned father" as well. The adjective "banned" could specifically relate to the noun "user". Or a slightly clearer example: someone who is both a "skilled baker" and a "writer" is not necessarily a "skilled writer". I'm now wondering whether an understanding of (basic) linguistics is necessary to develop a good tagging system. After all, our mission is to adapt programming languages to the human mind 🤔. This is part of my search for "an ideal model for information" that readers might remember from a few weeks ago.
❤️ 5
a
c
This is a very interesting point. Definitely one of those brilliant examples which makes you think you've got more thinking to do... My first reaction is that every tag is a kind of adjective, i.e. they are descriptive, and it might be more that "banned" is a verb/gerundive that caused the distinction. I think implicitly the #banned tag applies only to the "father tagged object" and not directly to the underlying object. You could represent this with a kind of nesting;
Copy code
person #father#banned #blond
person #father #blond#banned
(person #father #blond)#banned
These could be used to represent, person banned for being a father, banned for being blond, and banned for being a blond father. The top one would match a query of
#banned
,
#father
,
#blond
and
#banned#father
but not
#banned#blond
o you could remember what filter the object is being considered under at the time the tag is applied.
j
It's not clear to me how you mean "banned father" that doesn't mean the intersection of "banned" and "father". Could you elaborate?
c
The skilled baker/writer example is much clearer. One intersection is valid, one isn't
n
@Jack Rusher What I meant to convey is: In natural language, adjectives are sometimes ascribed to specific nouns, i.e. they are not transferrable between the different nouns that an entity can be named by. I added a second example to my original post that hopefully clarifies: someone who is both a "skilled baker" and a "writer" is not necessarily a "skilled writer". I've not yet seen a tagging system that accounts for this linguistic phenomenon. That said, I'm still figuring out the extent to which supporting it could be useful.
@Chris Knott I started thinking about linguistics after realising that hierarchy may not be a sufficiently powerful basis for a tagging system. So I'm skeptical that nesting is the right way to encode a reason for banning. (Aside: I didn't intend the discussion to be about verbs/actions, but it's an interesting side question)
c
Yeah it's not a strict nesting I think it's a semilattice or DAG
n
@Chris Knott I'm thinking it should be something more like: person (#father) (#blonde) (#banned #user) The tags here are grouped into unordered sets. The main purpose of the grouping is to handle the case where an adjective should be associated with a specific noun. Under a different interpretation of my initial prompt, you might get: person (#father) (#blonde) (#user) (#banned) as an answer. This can be encoded in an unsophisticated tagging system. I think this was @Jack Rusher’s interpretation. My second (less ambiguous) example would look like: person (#skilled #baker) (#writer)
s
I think a cleaner way there is to make "skilled" a function of sorts that takes an argument to give you a concrete tag
👍 1
j
The new example makes what you mean much clearer. In the banned + user case, a user is an entity and banned is a property that an entity can have. In the second example you have a person (entity) who has the role of skilled baker and (perhaps) the role of writer. The usual ways to encode this sort of thing in information retrieval include: * (folksonomy)
#baker
and
#skilled_baker
are different tags * (semantic) person hasRole Baker with a property on this instance of the hasRole property that indicates mastery * (statistical 1) mastery is inferred from another property (years baking, number of awards won) * (statistical 2) mastery is inferred from the position of the entity in some vector space (think Word2Vec and friends)
After the first time that enter auto-submitted this answer before I was done, I edited it in my editor of choice using markdown that Slack would have understood if I typed it inline, but which it has presented unmodified after copy-and-paste. 🤬
😥 1
a
Hierarchy alone might not be enough, but I don't think it can be avoided either. If you want a "skilled writer", that "skilled" is necessarily interpreted in the context of "writer".
s
@Nick Smith What are you hoping to find within linguistics that you think would be helpful here?
a
I don't think linguistics is the right approach at all. The thing wanted is logic, and trying to import the semantics of messy evolved natural languages will only make the logic harder. In general I don't entirely agree with the idea that "our mission is to adapt programming languages to the human mind". That might have been a good thought when Grace Hopper tried it, but we know better now. It just has to actually make sense, and people will come around.
👍 1
My idea for tagging the writer:
bob (#baker) (#writer (#skilled))
, where you can think of the nesting as expanding to
#writer #writer/skilled
for a hierarchy-oblivious system. From a logic perspective it might be more accurate to call it
#writer->skilled
, i.e. invoking implication, but I haven't quite figured out how that works, either...
r
Your question took my back to my RDF and OWL days where we were building ontologies to basically do this and reason about it. This has long been the promise of semantic web technologies. However, they never broke the usability barrier. Tags are amazing because of their simplicity. As soon as you have skilled writers you have increasingly complex relationships where the computer is trying to model what is in the user's head. It's doable, but complex and you run into all sorts of strange cases. Can you be a "skilled hobbyist" or a "skilled thinker"? As soon as you start applying meaning to the adjectives, you lose the ability for the definitions to adapt well based on the community using tags. The more precision you want, the more work you have to do. The more work you have to do, the less users want to do to maintain the taxonomy. IMO, this is one reason machine learning has been so successful. It can basically infer the relationships between tags based on how they are used. But you need a lot of data and you are at a decided disadvantage if you are searching using overloaded terms (I used to use a software package called "Chef" that had "cookbooks" and "recipes" - nightmare to find good docs for answers to questions).
n
@Jack Rusher To respond to each of your four points: • (folksonomy) My belief that a simple tagging system is inadequate is what led me to make this post. If
#skilled_baker
is an atomic tag, then you can't add qualifiers (extra adjectives) programmatically, unless you feel like playing with string parsing. I feel like qualifiers could be really important in a tag-based programming system: you can use it to organise/sort information within a specific context (noun), i.e. you don't pollute the global tag space and thereby risk the accidental inclusion of an entity into some faraway dataset that happened to use the same qualifier. You can use qualifiers to programmatically sort your `#user`s into
#free
`#user`s and
#premium
`#user`s. • (semantic) To me, this is the "graph view" of the problem. A graph-based model is an alternative to a tag-based model, in my mind (though some might argue you can combine them or switch between them). Some people are doing graphs, but I'm personally trying to avoid graphs where possible. • (statistical 1) This is about code (inference), not merely data! I think code is an important layer, but we can (and should) keep the layers separate. Code is not a tag, but code can apply tags. That still leaves us with the original question of what the tagging model should be. • (statistical 2) Ditto.
@Stefan In linguistics, I'm hoping to better understand the means by which we classify, qualify, and describe (etc.) things using natural language, and determine whether it is possible and useful to construct a simplified and reduced version of that as a means to classify, qualify, and describe digital information. As I said, this is all for the purpose of finding, to the degree possible, "an ideal model for information".
@Robert Butler I didn't mention it in my original post, but I'm focused on an information model for a user to develop programs within, such that they can easily understand how program data is organised and manipulated. I'm not looking for a "machine-readable" information model to be used as an input for AI. I think that was the problem of the whole "semantic web" thing: it was about AI, and AI isn't easy.
w
More commonly I have mutually exclusive tags (states really). Like, I don't know: #one_star, #two_star, #three_star.
j
@Nick Smith Tags are also a graph, just with a constrained set of semantics. Code is data and vice versa. @Andrew F’s observation that "logic is what you want" isn't wrong, but it's worth remembering that logic and language are co-travelers -- both spandrels evolved to serialize graph-structured human internals for transmission to other humans. If you follow linguistics -> logics to tease out the meaning of the transmissions, you end up with First Order Logic-based knowledge representation systems, like -- as @Robert Butler said -- the semantic web stack.
👍 1
n
@Jack Rusher I think we should be careful in uses of the word "are" and "is" when comparing concepts. It often sweeps away deeper understandings. Saying "tags are a graph" irks me, because a graph is defined as a set of nodes and edges (perhaps with attributes), and tags obviously aren't defined in terms of the same concepts. So perhaps the true relationship to be illuminated is: graphs can model anything that tags can model, i.e. graphs are a strictly more powerful model? This seems true when by "tag" we mean a traditional tagging system (hash tags), but that doesn't mean that all conceivable tagging/annotation systems are strictly less powerful than graphs. I'm worried that graphs are a conceptual cage that, once you've committed to thinking in terms of them, deny you the ability to discover new models.
Of course if you find something more powerful than graphs, you could then extend the definition of a graph, adding new "features" until it reaches power parity, but at that point you've bent and distorted the original definition (of which there are already many variants). So it might not hurt to just start from a clean state, rather than bolt on new features to an old model.
@Andrew F @Jack Rusher Yes, predicate logic is relevant, but the answer obviously isn't "just use logic". If it were, then we would already have found an ideal information model and/or programming language decades ago. Original ideas are needed. I spent a few years trying to do exactly as you suggest: take existing concepts/models/theories and just apply and combine them in the right way. But it's never worked out. Mathematicians invented predicate logic, and they invented graph theory. For my project I'm taking these ideas as inspiration but I truly think I need to invent a new model, which will obviously have some relationship/mapping to old ones.
s
@Nick Smith Seems like we're thinking about similar things — would love to hear/read more about your project. I went down the linguistics route (I'm two years in now), and as much as I'm happy to find people interested in it, from the previous discussion I can only sense that it would be more of a distraction for you than it would actually help. What you seem to be looking for is what linguists and cognitive scientists call "categorization". When I found out about it, I was shocked how much linguists ask the same questions we ask when we try to design a good data model. If you stay on the "classic" generative linguistics path (Chomsky et al.), you'd better get extremely comfortable around hierarchies and taxonomies. It seems most of the work here in the last few decades is basically trying to fit into the classic models what we learn about how the brain works, which more and more diverts from what can be meaningfully expressed with those models that are primarily based on set theory, perhaps with some fuzzy logic applied to it. It looks a lot like the frustration you voiced earlier — we can make it work by stretching the current models and making them much more complex, but it's everything but satisfying. There are linguists who realized that and who went looking for new approaches. I've been looking deeply into cognitive linguistics and think that's a great field to look at for inspiration. There's Rosch's prototype theory, which is still pretty close to classic categorization with a little bit of fuzzy logic sprinkled in, but that's just the gateway drug into metaphorical structuring and image schemas, and then all your set-theory based logic goes out the window, and you're left with embodied cognition and stuff that is way too ambiguous for what we'd like for static modeling. It seems you have extremely specific use cases in mind, and so I don't feel good about recommending you look into this. When you say you're looking for more powerful models, "something more powerful than graphs", I wonder what that means to you? If you want more flexibility in modeling, you need to take into account that this always comes in the form of trade-offs. Mathematics has this pretty much figured out though. If you look at algebraic structures you can pick one with few rules, which gives you a lot of flexibility of what you can model with them, but then you can't do much with these models — if you can't make any assumptions about structure, you can't run algorithms against it. And you will see that graphs are already pretty high up there in terms of flexibility, but to do anything useful with them, you'd have to look at slightly more restrictive (semi-)lattices or… tada… trees again. There's a reason why almost anything can be represented as a graph. Look at Category Theory as an extreme (not to be confused with the "categories" from above). I guess that's the only branch left that qualifies as "more powerful than graphs", but then all its useful applications are only useful once you pull them back down into the land of graphs, sets, and trees. I'm currently working under the assumption that "a better model" doesn't exist, or at least that I'm certainly not clever enough to invent it, and that the models we have are more than what's needed for progress — the problem is just that we need different models at different times. That's why I'm betting on homomorphic representations and (bi-directional) transformations between them to solve some of the problems of static models that lack the flexibility we need to model dynamic systems.
👍 1
n
@Stefan My project is an enormous soup of concepts, each sitting somewhere on an axis of acceptance/rejection, understanding/ignorance, and integration/isolation (from other concepts). I've been spending a few years (first casually, but now seriously) mapping out what the "ideal programming system" might look like, and some aspects (like a model for code/change/time/distribution) are starting to become clear, but fundamental aspects like the structure of information are still unclear. I've been saying for a long while that I will write a blog post when a sufficient fraction of my project crystallises, but until then I'm just going to keep churning on ideas. Essentially, I need to understand enough that I can build a non-trivial prototype. It's hard to do that without an information model! I'm not willing to believe that linguistics is a distraction yet. I'm only interested in the basics: I guess I want to understand what word classes, syntax, and grammar from a natural language might be useful as a basis for describing and manipulating the type of information found within a programming system. I probably don't want to go much further down the rabbit hole. By "more powerful model", I mean giving power to the programmer. I mean a model that makes it easy to express the things that a programmer might want to express, i.e. being possible is not enough. It's possible to model anything with a (souped-up) graph, I'm sure, but that doesn't help much. I definitely think a better model exists. As I said before, the models we know about today were just invented by some creative people a few decades or centuries ago, usually as a tool to explore a particular domain. Nobody discovered graph theory in the Amazon rainforest or on the surface of Venus. There are some fundamental patterns that result from the physical laws of our universe (e.g. as reified in geometry), but the models we build around these patterns are typically layered with additional constraints. We have a new domain now: programming, and I think it's very possible to invent new models which are appropriate for the domain.
I'm believing more and more that "fixed mindsets" are endemic in 21st century Western society — there is a disappointingly low threshold for what we are willing to accept can be newly created. We're willing to accept that we can create new dinner recipes, music, apps, programming languages, etc, but we're not willing to accept we can invent fundamentally new and groundbreaking things, especially foundational models (see: the mess that is modern physics). Besides the domain-specific knowledge required, what’s the difference? Reminds me of Peter Thiel's thesis on Western society's recent inability to invent new technologies. I've definitely been trapped in fixed mindsets myself. The hardest part is noticing the illusory walls, and the next-hardest part is figuring out an alternative.
a
I'm definitely not saying just use predicate logic (note that's not what my proposal did). Even if you do invent a totally new system, I still think existing logics are a better starting point than natural languages. AFAIK formal logic was evolved over centuries starting from natural language. Predicate logic in particular arises from similar questions to what you're asking. If you ignore all that experience, you're likely to end up tearing your hair out eventually. A logic database is already pretty close to an ideal data format anyway. You might even want some nice computable fragment of higher order logic rather than first-order to capture the relationships between predicates/tags, though that may be overkill. I definitely think the innovation will be in the right way to cut a logic system down to fit the relatively simple problem of tagging.
r
@Nick Smith Your thoughts triggered a line of thinking for me. What makes a groundbreaking thing groundbreaking? I think that discovering groundbreaking new technologies is more a function of connecting a set of normally unrelated ideas together. Most breakthroughs and new technologies have been a slow iteration of new ideas based on old ones, experimentation and connecting unrelated ones. Take flying, for example. Powered flight actually arose nearly simultaneously in several places because the necessary supporting ideas were available, we just had to put them together. This is true of almost everything. I'm not sure if I agree with this, but maybe you could argue that we don't have groundbreaking technologies anymore because everything is groundbreaking. In the age of the internet, we iterate so fast and can so easily connect so many different ideas together that it has become utterly common place. Truly groundbreaking technologies need to seem to come from nowhere. That is, there needs to be something mysterious in the source of it and it needs to fundamentally change the course of history. By the second measure, the internet, the iPhone, reusable space program, electric vehicles, batteries, cloud computing and so much more are in a very real sense changing nearly everything, except it's all mixed up and happening so fast that nothing looks groundbreaking anymore. Further, the mystery is gone in some sense. We have a really high quality record of where the innovations are coming from, what ideas are being combined and how. The internet is insane. Take Newton for example. Newton did a lot of utterly absurdly groundbreaking work. But in large part, that is because 1) we have limited records of the thought processes and ideas that were connected to get there and 2) he had access to much of the knowledge of his time and 3) it stood out from it's contemporary work. I also think there is a component of groundbreaking work coming from a single mind where it has to be conceivable in a single mind and not a lot of minds were doing the conceiving. That is, Newton lived in an age where a single human mind could "discover gravity" as it were. I would argue that we have minds today that are able to conceive of, understand and "break ground" on vastly more complex and strange things than Newton ever did. What has changed is the environment, frequency and number of minds conceiving. I highly recommend "How to Fly a Horse" by Kevin Ashton: https://en.wikipedia.org/wiki/How_to_Fly_a_Horse#:~:text=0385538596-,How%20to%20Fly%20a%20Horse%3A%20The%20Secret%20History%20of%20Creation,the%20true%20source%20of%20innovation.
❤️ 1
Also keep in mind the timescales here. Peter Thiel's "extended technological stagnation" is honestly laughable to me. It's been a sensational idea for a long time to figure out how to get the "world of tomorrow, today". His "extended" time period is a blip compared to the time scales things have taken historically. "We were promised flying cars and got 140 characters" is a straw man argument. Things are moving so fast right now that we literally can't keep up with the ground breaking consequences of it. We are swimming in so much ground breaking that we have forgotten it's the air we breath. Also, who said 140 characters wasn't groundbreaking? Social media has fundamentally changed the world in so many ways for good or ill. Also, we have flying cars. Whether they are useful or just a novelty remains to be seen.
Also the productivity discussion around Thiel's ideas is not specifically technology related. Productivity is an economic output, which is basically based on how much energy you can tap into. Jeremy Rifkin has done a lot of writing about that, and if he is right we are about to tap into the next jump in productivity as we start to unlock solar energy.
So... in summary, what I'm trying to say @Nick Smith is that you should definitely avoid a fixed mindset and keep pushing through to see what you can uncover while shooting for your ideal programming language. I believe it's a worthwhile endeavor regardless of whether I can see past my RDF and graph work. I've definitely long believed there is something there, but experience taught me that you end up getting too caught up in formal language as a substitute for logical formalism and it becomes awkward. That said, it doesn't mean that you won't be able to crack it or at least discover something new and interesting. Keep an open mind to look at what you might think are completely unrelated fields or areas of thought. Often they hold the keys to innovation.
👍 1
Also, maybe there isn't a single "ideal programming language". There is probably an ideal one for what you are trying to do. That might be helpful to focus on exactly what you want to do with it.
n
@Andrew F I am using formal logic as an inspiration, e.g. Datalog is my inspiration for a code model. It sucks as a data model though. You're probably right about there being a logic that could be invented and layered onto first-order logic to effectively describe the tagging system I'm looking for. Seems like I'm going to discover what that logic is after I invent a system though? As in, the properties I want will define/induce a logic, even if I'm not looking for one.
@Robert Butler This definitely deserves to be in its own thread. We're not talking about tagging systems any more! (Warning: a very personal perspective follows) Perhaps the word "groundbreaking" was too strong — it has too many connotations. My point is that I refuse to dismiss the possibility that I can invent something wholly new. I get the vibe from people sometimes that they believe they can invent new products but not new models. At best, they take some model that already exists and tweak it, and I'm given advice to do the same. There's a big difference between products and models, and Silicon Valley only knows how to make software products (and occasionally hardware products), and even then... most software products have poor utility and/or ergonomics. Silicon Valley isn't pumping out much new computer science (relative to their size), except in very specific niches like machine learning. And don't get me started on academia: they stick to very specific niches that are "accepted" within their circles — it's a game of conformity, or "micro-innovation". New products are great, but there's a limit of how much we can achieve by building incrementally upon the ideas and the models that are already known to "work". You cited stuff like the iPhone and Elon's stuff: those are the exceptions, not the norm. Those were/are situations where people asked "what if we try designing from scratch?". The existing notions of what a "phone" or a "car" entailed were thrown away, even the core fundamentals like having buttons or (soon) having a driver. You can treat math the same way: there's nothing sacred about existing mathematical models. You can use them as inspiration whilst being fully prepared to move beyond what exists.
❤️ 2
@Robert Butler I'm sticking with the "ideal programming system" notion for (again) the reason of not being willing to close any doors. I'm not willing to accept the conventional narratives on what is "realistic", because they're never based in fact: there's no real evidence to suggest that a (broadly) general purpose system (as opposed to a language) isn't possible. Domain-specific languages are always going to be "ideal" for their domains, so there is no universal language for computing, but a system is able to host these DSLs. The inbuilt language of the system itself is more about providing non-domain-specific notions like change. It's about providing a platform for these DSLs; something for them to be "compiled to", something universal. Also, the term "ideal" is more about taking software to the "next level", the next stratum. I think there's room for more strata, but we can't even dream about what they'll be like yet. Horse riders probably imagined mechanical horses, but not self-driving (galloping?) pedestrian-aware mechanical horse taxis.
❤️ 1
r
@Nick Smith For what it's worth, I applaud your efforts. I think new models are rare, but they do happen. They are hard, fraught with "peril" if you will, but can really shake things up. I agree with you on going back to the fundamentals. I have often found my most paradigm shifting moves have been when I start to feel stuck in the mire of all the complexity. Life is complex, but mostly we tend to tack on artificial complexity. If you can step back and look at the fundamentals there is often a new model that is begging to get out of the problems space, but we were just too far down the path we started down to notice.
Personally, I'm more interested in the future of programming as a way to find new models or rediscover new usefulness in old models. I'm personally not so interested in the new cool toys, but prefer the more fundamental type stuff. That said, I do often find that insight comes from criticism. Someone will say something to me that doesn't sit right but I can't immediately explain why. In the end, if I can really dive into that critique there is something waiting for me to discover it there. At any rate, I hope you take any criticism from my end as me trying to help move toward an answer rather than stop or slow you down or a belief that you won't be successful.
Truthfully, I'm also attempting to develop a new model for programming by going back to the fundamentals of how processors work and seeing if we can go back to an early time and branch in a different direction than the one we took to get where we are today. Who knows if I'm going to be successful in developing anything relevant or useful but I'm trying my best anyway.
@Nick Smith is there somewhere I can go to read more about what you are trying to do?
n
Yeah, I agree that constructive criticism can be helpful. In fact, I'm my own biggest critic. I keep tearing down my plans and prototypes as rubbish (because they are), and every time I do, I learn a little more. Those past failures led me to beliefs such as "graphs are neither the right interface, nor a helpful underlying model", upon which I base a lot of the assertions I make. Feedback from others is important too: hence I enjoy starting all these conversations here.
@Robert Butler Hardware design sounds 100x harder than PL design. Intel and AMD have armies of people whose career is exactly that 😬, though yes, with strong biases towards incrementalism.
@Robert Butler Unfortunately when people ask me this, the answer is no. There is no good place to read about what I'm doing. The reason? As mentioned above, aspects of my plan and vision keep churning significantly. I don't have a story I'm willing to commit to yet. But I'm working towards it!
My goal is pretty easy to state though: I'm trying to vastly simplify software development. I want to make it 100x simpler. I want to find the simplest programming model & infrastructure that can possibly exist. I've not been willing to make any compromises on that quest.
And unlike with projects like "Scratch", I don't think simplicity entails coming up with a cute cat avatar and adding lots of colours to the IDE. 😕
Though of course, the Scratch people would probably argue their goal is "onboarding", not discovering new simplicity.
I will know I've succeeded if children and experienced developers both use the same interface.
c
Using the Slack Pro trial to bump this thread which I think is interesting, and kind of relates to something I'm working on at the moment (a knowledge management system with tagging)
n
This thread feels like a lifetime ago! I wish I hadn't derailed it with a side-discussion on innovation 😅. Fwiw, I still haven’t figured out the ideal tagging system or the ideal model for information. But nor have I given up! I’ve made progress, and I'm not gonna stop till I've cracked it 🙂.
c
n
Fwiw I've long since thrown out the specific model I outlined in that thread. But I still think the general topic of the thread — finding an "ideal" model for information — is important and achievable. 🙂
j
Here's a model I've been considering for a CMS system, essentially a tag-oriented view of a graph database: - A database contains a set of entities. - An entity contains a set of tags. - A tag contains zero or more scalar fields. Scalars are entity references, strings, etc. Queries are: - "Entities which have this tag", with zero or more field constraints. - Top-level and field-level and/or/not. - Field constraints might be
= value
,
> value
, etc. Example entity:
#baker[skill="high" since=2018] #father[child=anna] #father[child=bob]
Example query (highly skilled baker who is also a father):
#baker[skill="high"] #father
🤔 1
c
This does a great job at capturing extra information relating to the tags, which solves the "skilled baker" problem, but it makes it slightly more awkward to query people who are highly skilled (at anything). I guess you could use a wildcard tag or something...?
#*[skill="high"]
j
Possibly, but does
skill
really mean the same thing in different contexts? The syntax I suggested also makes a bunch of other things awkward/impossible: • Nested queries (e.g. find fathers of highly skilled bakers) • Field relations (e.g. field1=field2) For my use case, this is by design, because it only allows specifying "fast" queries. But another system might want to lift those restrictions.