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

Declan 2024-09-23 00:03:32

I have lots of functions that map sets of inputs to values - depending on some rules (if branches). Now I want to enumerate all the rules/code paths; it will help me to analyse, optimise, explain, understand.

This can't be new, I guess it should be a thing that's feasible in any functional programming language. Maybe there is a name for this? Or a tool that does this?

I'm thinking about writing something, but it seems like a typechecker like tsc would have a lot of related logic, and if I can I'll experiment using some other friendly tool first. Any tips/references please shout, thanks!

Jimmy Miller 2024-09-23 04:09:25

What you are talking about sounds either like building a control flow graph. Or doing abstract interpretation. Unclear if either those exactly fit what you want to do. But might be some useful starting points.

Denny Vrandečić 2024-09-23 15:52:03

Or it could be content-addressable code, such as in Unison? Where you can hash the paths inside each function, in order to find overlaps?

Declan 2024-09-24 22:45:34

Hm, this might be quite interesting in Unison!

Well, a control flow graph is what I need. Apparently there's a big market for proprietary graphing tools along these lines, but for FP an extremely simple one should work. Seems like I'll need to make something myself, but at least I'll learn some things first and give it some context.

Thanks to you both!

Dany 2024-09-23 06:31:35

Should code completion preselect in the dropdown?

For example, if I write "object.l", this opens a dropdown with "length". Should the length be selected, so pressing "enter", inserts it directly or should I first need to press "down arrow"?

In visual studio, it is not preselect if I write a function, but does preselect for members. Is there some common approach?

Denny Vrandečić 2024-09-23 15:53:23

I am used to tab for completion, and to not preselect, but I haven't used a standard IDE for a long time -- one reason is because they annoy me a lot with their completion flows 😄

Dany 2024-09-24 03:15:25

See, that's the thing. I feel like pre select is great 90% of the time, but if it isn't, it's really irritating.

Jouke Waleson 2024-09-23 07:41:26

Not sure if this is the right place to post this and whether this is interesting to this group, but I gave a short presentation last week about the future of programming systems and curious what you think about it. I wrote it down in a blog post here: blog.waleson.com/2024/09/the-future-of-programming-systems-four.html

There are four thoughts that I think will shape the future:

  • Software development systems have a lot of vestigial parts (left-overs from the way it evolved)
  • Understanding is crucial to development, and with the right mediums we can understand the subject much faster
  • Most software platforms developed bottom-up, from the silicon, instead of focusing on the needs of the people
  • Software is truly different from other technologies in the freedom it gives us, so we can and should invent new abstractions that make things simpler than they are now

This isn't in the post, but I think that in the future we'll see:

  • Great integration between design tools, version control, IDEs, databases, monitoring & logging systems.
  • High-level concepts as first class systems in the programming systems. Simple examples are an email or phone number type as a database primitive, instead of strings.
  • Better reasoning / business logic rules so that IDEs can give feedback on "you are not allowed to store PII in this database".

This way all stakeholders can collaborate and the system can check correctness much better, and we require less discipline/in-depth knowledge from the team members.

I suspect most of these ideas have come by in this community already, but still curious what you think!

Konrad Hinsen 2024-09-24 06:12:59

I hope your predictions will become true!

One obstacle I see is the widespread belief in "software" and "programming" as universal abstractions. Human-friendly environments will have to be domain-specific. As a researcher working on protein dynamics, I have no use for your "phone number" entity, but I have lots of others that even my colleagues in neighboring domains would have no use for.

Domain-specific tools would necessarily need to a fragmentation of the software professions, and I suspect that is something many people don't want to happen.

Jouke Waleson 2024-09-24 07:49:26

Right, thanks for that! I'm a bit too focused on the web applications field so good to get other perspectives.

So the best known programming tools have universal adoption and hence offer the lowest common denominator in terms of concepts. This makes sense, the most powerful systems I've seen were indeed focused on making one kind of application.

Jouke Waleson 2024-09-24 07:57:27

So maybe a programming system with pluggable concepts and rules could be a thing. But that smells like over-engineering 😉

Maybe best to start with a niche and just build an amazingly integrated system there, so that productivity can go 10x. After that we figure out how to offer something similar to other niches.

Maikel van de Lisdonk 2024-09-24 08:59:51

Will you give this presentation again or a similar presentation in Zeist? I live nearby (Doorn) and would love to join a presentation in real live if possible 😀

Jouke Waleson 2024-09-24 09:05:43

Hah, nice! Nothing planned, but if you find a place where this presentation is welcome let me know!

Konrad Hinsen 2024-09-24 10:56:11

Plugin architecture or not, that's an implementation detail. If you want to be human-friendly, you have to start from how humans think and work, and develop tools that support them. Once you have done this for ten domains, you can look for shared aspects, a common infrastructure, and other low-level stuff. I see today's main problem in that we work the other way round: we start from tech stacks and have software specialists develop apps for users who are not expected to understand or modify these appls.

Paul Tarvydas 2024-09-24 01:17:32
Denny Vrandečić 2024-09-24 06:01:51

Is this a PDF published through a substack?

Konrad Hinsen 2024-09-24 06:17:22

The fact that we have pushed the function-based paradigm this far is not a testame g nt to functional thinking, but, is a testament to the tenacity of the human spirit. Humans will find workarounds for their inadequate tools, even if it takes them 50+ years.

True but only part of the story. There has to be inertia in technology if you want it to be useful. For stuff that lots of people depend on, you can't just pull the plug and start from scratch every couple of years.

For that reason, the only possibility I see for your ideas to become reality is as a generalization of today's function-based systems. Future systems must allow today's software to remain usable, and then open up new ways that can be explored incrementally.

Paul Tarvydas 2024-09-24 09:49:59

Denny Vrandečić I'm not sure how to answer your question. This is a PDF created with Apple Pages. Lately, I've been using substack for blogging, but writing in Apple Pages (before that, I was blogging on github, then Obsidian (from which I have since escaped)). I've discovered that dragging a Pages document that contains footnotes and images into substack is a very manual mega-project. Subtstack allows me to drag'n'drop PDF files directly into a post, but, readers must download the PDF to view it. Github allows me to "embed" PDFs in a frame that makes them kinda visible, whereas substack doesn't do this. I am back to considering whether I should re-consider the use of leanpub or gumroad or ???).

Paul Tarvydas 2024-09-24 10:45:15

Konrad Hinsen

... There has to be inertia in technology if you want it to be useful.

Inertia only gets you so far. I claim that it is impossible to express asynchronous concurrency using a function-based paradigm. You can chip away at trying to get there incrementally, but you reach an asymptote that you can only get closer to, but, never arrive at.

I claim that we're witnessing this phenomenon right now .

The real questions are: (1) is it impossible to express asynchronous concurrency using a function-based paradigm, and, (2) is it really true that the crop of problems that we face are rife with asynchronous concurrency?

If (1) and (2) are true, then continuing to push on the function-based paradigm is futile and a waste of time. Take the wins from thinking that way and move on. No need to wipe out what we've already achieved. Just stop beating our heads against the wall of what cannot be achieved in the future.

Alpha-beta pruning. If the going gets tough, find a way to make it be less tough. If you end up in a corner, don't keep pushing deeper into the corner.

For stuff that lots of people depend on, you can't just pull the plug and start from scratch every couple of years.

Did I actually say that I recommend pulling the plug? I hope not. In fact, all of my experiments with this stuff are based on existing technologies, like Odin, Python, draw.io.

Concurrency is easy (even the asynchronous kind). 5-year olds, without PhDs, understand hard realtime and written notation for expressing hard realtime (piano lessons and music notation). If concurrency using a specific paradigm looks not-easy, that's a tell. If you need to keep inventing workarounds to keep pushing a belief system, that's a tell. If you espouse an edict that contradicts reality, that's a tell (e.g. "no mutation" violates the basic premise of CPUs bolted to RAM ; e.g. "control flow is data" is patently untrue (the data that control flow interprets is data, but the interpreter is not data (CPUs are interpreters, albeit very fast ones))). When the tells pile up, maybe it's time to reconsider whether forging ahead on only one path continues to be reasonable.

For that reason, the only possibility I see for your ideas to become reality is as a generalization

There's something that I disagree with. The answers will not come from further generalization but from further specialization . Our current software development workflows are based on the idea of generalization . If you insist on incrementally developing something, how about incrementally developing a way to allow specializations to co-exist and to be composed into functioning code? (hint: I'm playing with and blogging about how to use existing languages as assemblers for new languages)

[I view, correctly or incorrectly, "Moldable Development" as another idea for how to insert specialization into our workflows.]

Future systems must allow today's software to remain usable,

Agreed.

and then open up new ways that can be explored incrementally.

You, also, need to be able to tell if you're at a dead-end and when to stop wasting your time.

Remembering and understanding how hardware works might offer up new ways to create new things. OTOH, pure research is, indeed, worthwhile. IMO, pushing on the functional paradigm has transmogrified into pure research into only one way to use ReprEMs (reprogrammable electronic machines - formerly known as "computers"). I wish to point out that there are many other vectors for pure research into the use of ReprEMs , that remain to be low-hanging fruit and might lead to more fruitful and cost-effective approaches to using ReprEMs.

Denny Vrandečić 2024-09-24 11:03:00

Paul Tarvydas thanks for the explanation! It's a pity Apple Pages doesn't allow for a more webby export format, such as HTML

Paul Tarvydas 2024-09-24 12:31:48

Firstly, it's substack - there appears to be no API for pumping stuff into it. I can't even drag'n'drop markdown into it. You have to use their editor, and manually enter text. Apple Pages can already export to epub and to .docx. The problem is that substack doesn't grok those formats. substack does partly grok Apple Pages format, but not footnotes and diagrams/images/screenshots (I haven't found anything yet that makes inclusion of .png / .svg easy and visible. Obsidian does, but it's paywalled, with unpleasant repercussions if you stop paying (ask me how I know 🙂). Github is close but no cigar). Substack's appeal is its distribution and other non-technical things. If substack would allow me to pump markdown or leanpub's markua at it, I would probably be happier. I continue to root around for solutions. I'm always open to suggestions to things that let me spend time building software instead of spending time writing about it. Denny Vrandečić

Konrad Hinsen 2024-09-25 05:37:19

Paul Tarvydas I actually agree with much of what you say! The only point we seem to disagree on is the role of inertia.

Inertia only gets you so far.

The role of inertia is to keep the rate of change in society at a level that society can absorb by adapting. So yes, it's an obstacle to innovation. But if you insist in innovating faster, the society will just ignore your work. Which is what is happening to most of us here (also for other reasons of course).

A "dead end" for innovation may well be what non-tech people are happy with. I doubt that's the case for today's IT, but that's another story. You don't want to get stuck in a dead end when doing research, but then research is a minority activity anyway, and will always remain one. As a researcher myself, I mostly share your point of view. But I also understand the majority of non-researchers who just want to tweak mainstream stuff to get a job done.

My choice of "generalization" was not the best one. The idea is that your new stuff and the old stuff must live in a single technological realm in which application-oriented people can move around with ease. Your new high-concurrency computers must be usable as coprocessors for commodity machines at first.

Paul Tarvydas 2024-09-26 02:12:51

Konrad Hinsen I'm enjoying this conversation and thank you for taking the time to read and comment.

1) I disagree with your disagreement. It appears that we disagree on deep-down beliefs, inertia is just a second order effect.

2) End-users don't care if developers use assembler or Haskell. It appears that most of my comments regard developers and practical application of programming research. Does that clarification of perspective change the thrust of this thread?

3) It seems to me that compute-ing is unduly influencing practical aspects of programming (while end-users just don't care).

Extended comments can be found in...programmingsimplicity.substack.com/p/beliefs-that-adversely-affect-the?r=1egdky

Konrad Hinsen 2024-09-26 07:59:44

Paul Tarvydas Maybe I am misinterpreting something. I read your text as a call for a technological revolution, from new chips to new software stacks. If you stay on today's commodity hardware and only change the programming toolchains, then it's indeed only developers that are concerned.

Tomas Petricek 2024-09-25 21:45:07

I've been looking at programming by demonstration recently (somewhat inspired by Pygmalion). There are some nice recent examples of using PbD for things like data wrangling (clean up data, extraction, etc.) and I know some examples for visual things (bar chart) - but I was hoping to use PbD to create something like TODO list app - do people in this group know if there are any systems (recent or ancient) that do something like this?

I actually have a prototype where I can construct adding of new items to the list using PbD (you do a sequence of actions to create and add an item and then you can replay that), but other things are trickier - e.g. to count checked items or to remove items that are completed, there needs to be some way of parameterizing the actions (so that they can be applied to all items) and specifying pre-conditions (so that they only apply to certain items) - I'm really not quite sure how to best do those...

Mariano Guerra 2024-09-25 22:06:17

Not directly PbD but it was developed during my PbD/PbE era 🙂

youtube.com/watch?v=Q9E6gv2raBY

PS: 6 years ago :face_holding_back_tears:

Mariano Guerra 2024-09-25 22:06:59

just to clarify (or confuse), that instadeq is not the same as the current thing called instadeq

Ivan Reese 2024-09-25 22:09:53

I actually have a prototype where I can construct adding of new items to the list using PbD (you do a sequence of actions to create and add an item and then you can replay that), but other things are trickier - e.g. to count checked items or to remove items that are completed, there needs to be some way of parameterizing the actions (so that they can be applied to all items) and specifying pre-conditions (so that they only apply to certain items) - I'm really not quite sure how to best do those...

What's the limiting factor? Is it, say, that you don't have a good UI to give people access to the programming model? Or do you not have a programming model that allows parameterization?

Ivan Reese 2024-09-25 22:11:11

I guess, it'd help to know what the user-facing affordances are for the parts that are working. It might be that you're missing a representation (like… it's hard to parameterize something if you can't get your hands on it in some way).

Tomas Petricek 2024-09-25 22:17:57

Ivan Reese I should do some video of what I've got (once it does at least something) - framing in terms of representation vs. UI is very good! I guess right now I'm missing both - I can imagine possible representation. Currently, this is a sequence of edits that do something to a document (app/whatever).

I think I could do what I want if I added a way to say an edit is only applicable if a certain condition holds (otherwise it should be skipped when replaying). The other thing I need is some kind of "apply these edits to all of these things". I think I can add these two things to the representation reasonably well - then the limiting factor will be a sensible UI for those. (So if there are any PbD systems that have similar concepts, I'd be curious how they handle the user-interaction...)

It may also be that my current thinking about the representation is wrong - and so if there are other ways of doing this, it would be interesting to know...

I remember seeing nice demos in Wrangler - where generalization was easy (you do things on one row, it generalizes to all other rows). But I suppose in document context, you can generalise to something like (perhaps cleverly inferred) CSS selector...

Tomas Petricek 2024-09-25 22:21:16

Mariano Guerra Thanks for the videos! It may not be exactly the answer to what I need, but there is lots to think about there!

Ivan Reese 2024-09-25 22:24:55

The other thing I need is some kind of "apply these edits to all of these things".

My thoughts on this, if it's helpful:

You need an affordance on your action that allows you to say "I selected this concrete stuff because it has these qualities ". If the qualities are visible / tangible things you can see and touch (eg: "I selected this object because it is red") then that lends itself quite naturally to PbD, because you don't need much additional representation beyond what's already on the canvas. But if you want to work with qualities that aren't visible / tangible (eg: "I selected this object because it has unsaved changes"), well you have two choices: 1. find a way to make those qualities visible/tangible on the canvas, 2. find a way to expose that stuff via some UI and be okay with the fact that it's a little more abstract.

Mariano Guerra 2024-09-25 22:29:25

@Tomas Petricek on instadeq 1 (the one from the videos above) if you applied an action to a thing inside the collection the inferred action was to that item and you had to "drag the i " to make it apply to every item in the collection. On instadeq 2 I did the reverse, by default it applies to all and you have to remove the iterator to make it apply to a single item or a slice.

I got some of the ideas from the specter library

the idea of reifying/defunctionalizing path transversal and updates may be useful to you

Tomas Petricek 2024-09-25 22:31:40

Thanks for the ideas (I have some boring things to finish now, but will get back to this soon enough!)

Jasmine Otto 2024-09-26 00:03:31

I will throw in Max's story-sifting DSL from the interactive digital narrative domain (similar to Ceptre). Their Felt system is interested in nudging long event streams toward finishing the 'incomplete' event sequences. for a sufficiently rich notion of 'incomplete'. Since 'expressive' event sequence authoring is quite hard, even once the action table itself is locked down, that leads to the PbD strategy.

Jasmine Otto 2024-09-26 00:07:00

The CSS selector analogy in particular has come up before. Super expressive DSL for preconditions, but the document model cuts against my intuition for a given event stream.

Jasmine Otto 2024-09-26 00:07:46

The broad term in IDN for this stuff is 'storylets', which end up producing incredibly flexible data wrangling experiments. E.g. here's a worked example of 'casting calls' that essentially make individual storylets auditable, as Ivan is pointing towards.

hypermagical.com/blog/narrative-system-experiment-reactive-storylets

Kartik Agaram 2024-09-28 17:47:43

Today in non-convivial computing experiences: I found out a modern car can get into a state where it won't turn off. And can't be put into neutral (so it can't be towed).

Arvind Thyagarajan 2024-09-28 18:27:54

An OBD2 reader for your make/model + an arduino-OBD2 library helps a car owner grow closer to their hunk of metal for sure!

Kartik Agaram 2024-09-28 19:48:35

The good news is I learned where my car's spare tire is. Not where I thought! Conviviality requires some curiosity from me as well.

Arvind Thyagarajan 2024-09-29 02:44:30

The first time I learnt that a spare in the US was a baby tire called a doughnut was years into driving there. Had a flat near Joshua Tree, opened the floorboards and thought, "whoa they gave me the tire to the wrong car!"