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

Nick Smith 2021-10-11 02:29:11

Heretical idea: a function call syntax where the function name can appear anywhere in the call.

First, presume we're using Haskell-style syntax, so that f(2,3) (C-style) is written as f 2 3 (Haskell-style). Second, presume that parameters (in function signatures) must be prefixed with a & symbol (or whatever symbol you prefer; we'll need this later), so the definition of f would look something like f &x &y = .... Now, imagine the definer of the function can choose where the function name is supposed to appear. So we could define the function f in several ways:

  • f &x &y = , in which case a function call would look like f 2 3
  • &x f &y = , in which case a function call would look like 2 f 3
  • &x &y f =, in which case a function call would look like 2 3 f

Why would we want a syntax like this? Many reasons.

  • We get infix operators for free:
  • &x + &y =
  • &x mod &y =
  1. We can have multi-word function names:
  • &x is less than &y =
  • if &cond then &a else &b =
  1. This syntax erases the distinction between defining three separate functions returning one value each, and defining one function returning a record with three fields. I think this is nice; the distinction seemed arbitrary in the first place! Reducing the number of superficial choices a programmer needs to make helps reduce the cognitive burden of programming.

And probably more things 🙂.

What are the downsides of this syntax?

  • Some of the "classic" syntax of programming languages now becomes ambiguous. In particular, we hit ambiguities when passing functions around as values. In Haskell you can write expressions like map f list where f is a function being passed as an argument. Given we could now define f as an infix or postfix function (see earlier), we need to make sure that we can refer to the function in an unambiguous manner. We could do this by writing something like map (. f .) list where the . symbol means an unbound parameter. For the multi-word functions, you'd write map (. is less than 5) list
  • There are a few other potential issues I'm working out.

Regardless, this seems like an interesting idea, right? 🙂 How do people feel about it?

Axel Svensson 2021-10-11 04:21:21

I think you will open up for a lot of ambiguities. It might be necessary to protect against them by automatic means, like Bison does.

Nick Smith 2021-10-11 04:24:45

Yeah, I'm taking that as a challenge. If I can find an unambiguous syntax and semantics, the payoff could be huge 🙂. Think about all the fun natural-language tricks you could do when defining functions.

Nick Smith 2021-10-11 04:26:12

One constraint I'm going to be using is to demand each "function call" be delimited by brackets (...). The contents of every pair of brackets will need to fit a function signature exactly (not a prefix or a subset of it). That means there will be no concept of operator precedence or associativity.

Nick Smith 2021-10-11 04:26:31

But I may be able to recover associativity by adding a separate feature that captures it.

Axel Svensson 2021-10-11 04:34:16

Multi-word function names look cool, but I'm not sure they are useful. For example, wouldn't your if...then...else function always evaluate all three arguments? Many lisps implement DSLs using macros, including some that appear more like English sentences, e.g. the Common Lisp loop macro (see http://cl-cookbook.sourceforge.net/loop.html)

Nick Smith 2021-10-11 04:37:03

The syntax concept I’m presenting can be contemplated separately from the operational semantics of the language. So it could be lazy, or strict 🤷‍♀️. I have some ideas about the semantics I want, but that’s for a separate thread 🙂.

Axel Svensson 2021-10-11 04:39:49

Ah, with parenthesis around every call, you might be halfway there. Will you use the & prefix for every argument in function calls also?

Nick Smith 2021-10-11 04:40:57

Nah, I think the prefix is only necessary to disambiguate the definitions. It shouldn’t be necessary at the call site!

Axel Svensson 2021-10-11 04:44:40

Consider any user defined functions (fun1 &X &Y) and (&X fun2 &Y). What prevents the user from naming variables to make the ambiguous call (fun1 fun2 var3)?

nicolas decoster 2021-10-11 04:45:32

I played a bit with this idea few years ago, to use "symbols with spaces" for JavaScript functions. And I ended using parenthesis I also tried some other weird symbols, just to see if I can find one which is better visually (but failed).

https://stackblitz.com/edit/symbols-with-space

📷 image.png

📷 image.png

nicolas decoster 2021-10-11 04:47:13

I once thought to use a syntax like the_productof$1by$2 for the name of the function, to tell where exactly you take the parameters.

nicolas decoster 2021-10-11 04:52:21

On this topic, maybe some inspiration can be taken from the text language to specify Scratch Blocks program using text. Which is only used on the Scratch forum. It is interesting that it is not a text language that is designed to be executed directly, only to generate an image of a Scratch Program that might be executed (or not).

https://en.scratch-wiki.info/wiki/Block_Plugin/Syntax

📷 image.png

Nick Smith 2021-10-11 05:04:29

@Axel Svensson

Consider any user defined functions > (fun1 &X &Y)>  and > (&X fun2 &Y)> . What prevents the user from naming variables to make the ambiguous call > (fun1 fun2 var3)> ?

There should be some rules for how and when names/words can be re-used. The simplest is probably that if a word appears in a function name, then it can't also be the full name of a variable (nullary function).

Assuming fun1 and fun2 aren't pre-defined variables, your example doesn't violate the aforementioned rule. However, that call would match nothing, so you'd get a compile time error.

Nick Smith 2021-10-11 05:21:45

Nicolas Decoster Cool! There are probably a million directions you can go with the idea of space-separated symbols, especially if you start treating them as lists, i.e. data, as Lisp does. I'm being conservative right now though, and just thinking about this as a "generalized function call syntax".

I'm going to check out that Scratch syntax 🙂.

(Regarding brackets: I actually prefer the square bracket syntax partly because it's list-like, but also because you don't have to hold shift to type them 😇).

George Campbell 2021-10-11 05:26:56

Check out objective-c’s inline arguments function syntax. https://www.tutorialspoint.com/objective_c/objective_c_functions.htm

(int)max:(int)num1 andNum:(int)num2 {…}

nicolas decoster 2021-10-11 06:08:00

(Regarding brackets: I actually prefer the > square>  bracket syntax partly because it's list-like, but also because you don't have to hold shift to type them > 😇> )

That depends on your keyboard layout. On mine (AZERTY, French), it is the parenthesis that don't need extra key and both curly and square brackets require "Atl-Gr" key. Which is annoying when you code and that's why some French devs prefer using a qwerty keyboard (so without "éàè..." keys).

📷 image.png

Nick Smith 2021-10-11 06:10:08

Ah, I didn’t realise they did that for brackets! I’d love to get some statistics on (for each ASCII symbol) the percentage of people on earth who can type that symbol without any modifier keys 🧐.

It’s really important for a language designer to know 😅

Konrad Hinsen 2021-10-11 06:22:38

I wanted something like this for my digital scientific notation Leibniz (https://github.com/khinsen/leibniz) and found it very easy to implement since Leibniz is a term rewriting system. There are no function calls, only rewrite rules, so it's no problem to make the equivalent of function-call syntax function-specific.

For the parenthesis issue, I adopted a feature from the Pyret language (https://www.pyret.org/index.html): it requires parenthesis around any operator/function call, the one exception being chained use of the same operator. So you can write 2 + 3 + 4, meaning (2 + 3) + 4, which is the most frequent situation where parenthesis can become visually dominant.

It looks to me as if this approach could be transposed to more standard programming languages, but that's a bit outside of my expertise.

Alexander Chichigin 2021-10-11 09:45:05

I'm sorry but did you reinvent Agda's Mixfix syntax? 😅

Mariano Guerra 2021-10-11 10:02:31

never saw it, so coinvented 😛

Mariano Guerra 2021-10-11 10:03:19

interfix doesn't require the underscores

Diego Moya 2021-10-11 11:30:07

You can call me a convert and subscribe me to your heresy 😛

I've always been convinced of the need to reduce the syntax needed in formal end-user languages, and decoupling parameters from their exact position is a basic tool for that; passing parameters by name instead of position was an improvement in post-C languages, so it's easy to imagine what benefits that style can bring.

I'll go deeper into heresy: in a visual environment (think e.g. a spreadsheet or graphical design tool), you don't even need the function name to be adjacent to the parameters; the environment itself can suggest the list of nearby locally available values that are compatible with the function's input types, and the user chooses which one is appropriate. Applying functions becomes a point&click interaction rather than recalling which syntax I need.

This can even depend on named parameters. Think of an IDE where, when you're passing a parameter to a function, "intellisense" suggests all nearby variables in scope with the right type that could be used for that parameter. Conversely, you could select a value and type a parameter name over it, and it could suggest function names that use that type of the value with that parameter name as a role for the value, so that the user to choose the most adequate suggested function. How many less API reference queries would it take for the user of this system?

In this style of coding, the structure of connections is more important than the concrete syntax of the text you create them with. In my opinion visual languages are the ones that can benefit the most from this separation between structure and placement, as perfect placement of values w.r.t. functions in a graphical environment is more difficult than with raw text.

Axel Svensson 2021-10-11 13:09:31

However, that call would match nothing, so you'd get a compile time error.

Nick Smith could you explain how? I imagined it'd match both.

Denny Vrandečić 2021-10-11 22:03:11

Natural languages split into synthetic (eg Russian, Turkish) and analytic (eg English, Chinese) languages (very roughly). Synthetic languages do a lot of agglunitation and morphology, for example they have cases like accusative or locative and lots of agreement. Analytic languages don't bother much with aggrement and morphology (which is also why NLP on English always starts off so easily). But that comes with a price: English has a relatively fixed word order, whereas in Russian you can basically order the words in your sentence almost any way you like.

So from that we learn that in order to avoid ambiguity, if we could tag the tokens in our programming language with a 'case', we could get away with much more free token order in each statement.

Nick Smith 2021-10-11 22:31:55

Denny Vrandečić Do you mean we could let the programmer choose the order of tokens for each function call? If so, I'd consider that an anti-feature, because now there are many syntaxes for the same call, and we can no longer exploit our "shape recognition" capabilities to quickly identify a function. There's merit to only allowing the definer of the function to choose the token order. But perhaps I'm missing your point.

Denny Vrandečić 2021-10-11 22:33:04

Yes, that was my suggestion.

Nick Smith 2021-10-11 22:34:07

Do you think there are benefits to that level of freedom? Would it help Russians write more readable code?

Nick Smith 2021-10-11 22:47:45

@Axel Svensson We've probably got different ideas about the underlying semantics. If I had to guess, you're thinking of each symbol in the sequence (a b c) as a value. In contrast, I was thinking of each symbol as a "piece of syntax" that helps identify which function to call.

Under your interpretation, (fun1 fun2 var3) is ambiguous, because it could be interpreted as passing the symbolic value "fun2" to the fun1 function, or as passing the symbolic value "fun1" to the fun2 function.

Under my interpretation, there is no function definition with the signature (fun1 fun2 .), so you get a compile-time error.

But since starting this thread, I've actually been trending towards the first interpretation. It might turn out to be "nicer" in practice, especially as an alternative to passing strings around everywhere. But I think you'd now want/need variable references to be distinguished from symbols, using the & syntax as you mentioned, or even just the parentheses (after all, a variable reference is just a function call with zero arguments). So a function call would look like fun1 (a) (b) or fun1 &a &b. Though I've been thinking about a more lightweight syntax inspired by Rust's lifetime syntax: fun1 'a 'b. It's probably necessary to avoid parentheses/syntax hell.

Axel Svensson 2021-10-11 22:56:58

Since we're all wild heretic here: How about capitalization carrying syntactic significance? Small initial letter means it's part of the invoked function name, e.g. fun1 Fun2 Var3 means invoke fun1 with fun2 and var3 as arguments, while Fun1 fun2 Var3 means to invoke fun2.

Axel Svensson 2021-10-11 22:58:27

So essentially, capital first letter instead of &. The heretical part would be to have the first character (or all characters) in identifiers be case insensitive.

Nick Smith 2021-10-11 23:02:21

Would that be giving special treatment to Latin-based alphabets though? It would be nice to support arbitrary Unicode. Imagine asking someone writing in Hiragana to start their words with an English letter!

Nick Smith 2021-10-11 23:05:14

Also, that proposal wouldn't work with symbols like + and *. But I do like the sneakiness of it 😉.

Axel Svensson 2021-10-11 23:44:59

True. "First character in Katakana or upper-case Latin!" :-D

Nick Smith 2021-10-12 00:05:51

@Diego Moya I think there's a lot of merit to ensuring identical function calls have an identical visual structure. Readability/skimmability is one of my key concerns. I am definitely interested in smart IDEs, but I'm not sure that requiring the use of a smart IDE to specify arguments (rather than having a rigid syntax) is a good thing. If you had this, I'd hope the manipulations would be immediately serialized back into a rigid textual form that is easily skimmable.

Nick Smith 2021-10-12 05:14:42

Konrad Hinsen To enable the writing of expressions like (2 + 3 + 4), I'm now wondering if I can extend my proposed function call syntax to something based on regexes. For example, to parse the aforementioned expression you might be able to write a function signature like:

&x (+ &y)* = ...

And then &y would be assigned a list of numbers, rather than a single number.

Of course, regular expressions aren't known for being easy to understand. Perhaps I could find a somewhat simpler pattern language that still allows the description of arbitrary-length expressions.

Konrad Hinsen 2021-10-12 08:31:28

Denny Vrandečić There's Perligata for a transposition of the analytic vs. synthetic concept to programming: https://users.monash.edu/~damian/papers/HTML/Perligata.html

Konrad Hinsen 2021-10-12 08:36:14

Nick Smith Pattern matching looks like an idea worth exploring. But as you said, it needs to be more human-friendly than regex.

Konrad Hinsen 2021-10-12 08:36:53

Mariano Guerra Was interfix in any way inspired by Smalltalk? Smalltalk keyword messages feel very similar.

Mariano Guerra 2021-10-12 08:38:03

Konrad Hinsen yes, smalltalk and dylan where some of the inspirations

Denny Vrandečić 2021-10-12 15:44:31

Nick Smith not sure if there's a benefit. In natural language it has the advantage of emphasis. It can give some flexibility w.r.t. visual layout of the code. But in the end, it might make it more complex without a clear win. I am not advocating it, just an idea 😄

Nick Smith 2021-10-13 05:04:26

Having thought about things further, I think my proposal ends up being about metaprogramming and homoiconic languages pretty quickly. Perhaps I should search for inspiration from those.

Breck Yunits 2021-10-14 00:36:11

I also took a crack at this 2 years ago. We called it "anyfix"/"omnifix". It's fun to see these other implementations with names like Interfix and Mixfix!

The use case for us was talking to medical care providers and discovering that many would invent their own written shorthands (grammars) for jotting down EMR data while working with patients, which would often have out-of-order parameters (20 inches 10lbs or 10lbs 20 inches etc). IIRC ambiguity was the exception rather than the rule. We figured if it's very clear to humans what the intent is the parser should be able to figure it out too.

It was rather easy to implement in Tree Notation, which is a whitespace based syntax where each row is a node split into cells. The line parser first determines what kind of node the line is, and then a cell parser determines what the type of each cell is. A node definition states the cell types expected and whether to use a prefix/postfix/omnifix parser. Simple tests (such as regex) are then used to detect the type of each word in the omnifix case.

In theory this puts the onus of avoiding ambiguity on the language designer, but in practice (IIRC from our small experiments) it was surprisingly easy to avoid. It seemed that usually when you have 2 params with the same type, it was often better to take a list instead.

A really dumb toy demo for our implementation: https://jtree.treenotation.org/designer/#standard%20poop

Duncan Cragg 2021-10-14 18:13:02

My language works this way because it's not based on functions as such, but on a lower-level mechanism: rewriting after pattern matching. The "function" symbol is just another pattern element, not distinguished from "data" or "parameters".

Nick Smith 2021-10-14 22:35:44

Duncan Cragg Yeah, I'm thinking of this in a similar way: a "function signature" is just a pattern, where none of the tokens are special "function name" tokens. Function calling is just pattern matching. However, I'm not thinking about rewriting, since that is conflating operational semantics with the mere syntax presented here. The actual means by which a computer executes a program consisting of these patterns can be considered separately.

I'm aiming for a very non-conventional operational semantics, inspired by relational programming.

Konrad Hinsen 2021-10-15 06:46:18

Nick Smith I see your point but I think you would probably gain from studying term rewriting systems. A main featured distinguishing term rewriting from traditional function-calling approaches is precisely the separation of syntax and evaluation. Term rewriting systems start from a term algebra, which just says what valid terms look like. The next layer adds patterns and pattern matching, the result of which is a substitution. With patterns you can define rules. Rewriting is yet another layer, in which you have to decide on a strategy to select and apply rules. If you want different operational semantics, you just change the last one or two layers, but you can keep the lower ones.

In contrast, with traditional PL design, there is no useful layer between the AST and the full language, evaluation semantics included.

Nick Smith 2021-10-15 06:49:13

What if my semantics involves the equivalent of database equi-joins and aggregation? Surely those can’t be described in terms of term rewriting.

Nick Smith 2021-10-15 06:49:59

i.e. my operational semantics has nothing to do with substitution of terms

Konrad Hinsen 2021-10-15 09:42:20

I am not a database expert, but my first reaction is that everything can be encoded in terms. Terms are isomorphic to s-expressions, XML trees, etc. You may in the end want specialized hand-written implementations for some of those terms, for performance reasons, but I'd be surprised if your semantic would be impossible to express as terms.

Duncan Cragg 2021-10-15 09:50:02

Rewriting is Turing Complete so you can do anything you want. 😃👍

Duncan Cragg 2021-10-15 09:56:27

The actual transformation mechanism from before-state to after-state in the rewrite needn't be TC, though, and is probably better off not, so it terminates!

Duncan Cragg 2021-10-15 10:05:38

Primitive Recursive perhaps? Need a fixpoint each time: when applying the rewrites has no effect or there are no matching rewrites.

Adnan Chaumette 2021-10-13 23:23:30

Is there some research/articles worth checking about the usage of icons in user interfaces?

Looking at 3D softwares like Maya, or VS Code's right panel icons; I sometimes have a hard time understanding why we've come to rely on icons so much when they're almost never readable without an extra effort of hovering on them or clicking on them to know more about them.

Photoshop is the guiltiest of all in this category, and you also have softwares like Figma, where all possible operations tend to be grouped under just a few icons, and clicking on those icons opens a dropdown that contains icon + description, which makes everything really easy to understand.

Could there be some reasonable explanation beyond lack of space?

In contrast, Windows Explorer took a different approach, where it occupies more space, but every single option is cristal clear even for the most untrained eye.

Not sure how close this is to the FoC; but definitely close enough to the future of software visual design I believe.

Mariano Guerra 2021-10-14 08:31:45

I was searching for the rationale behing the Ribbon UI redesign at microsoft, they should explain pros and cons of each approach somewhere, I found this: https://www.youtube.com/watch?v=Tl9kD693ie4&list=PLjCU_7jji6Ch8l9YAJVBfdOQUk6k_ve5D

Daniel Krasner 2021-10-14 10:19:55

It’s worth watching (or re-watching) Alan Kay’s Doing with Images Makes Symbols https://www.youtube.com/watch?v=p2LZLYcu_JY which gives a lot of insight into how they were thinking about representation, language, etc in the early GUI (and Smalltalk) work

Florian Schulz 2021-10-14 19:01:45

Using text labels with icons is always better and more clear.

It’s hard to say why a specific interface relies on icons exclusively. It may be: lack of usability testing, graphic designers doing interface design, ignorance, lack of time to come up with better solutions, preferring aesthetics over accessibility.

Of course, using only icons can be okay in some cases: The longer one uses a tool and the more familiar one becomes with a tool, it might make sense to hide labels for less noise and more space. macOS toolbars provide users the option to choose between “text and icons”, “icons only”, “text only”.

There have been attempts to design user interfaces that adapt with time and usage: from high information density in the beginning that slowly hide labels the more often you use a feature.

General rule of thumb: except for arrows and handful very common icons, most icons will not be understood by users and text will always work better.

Ray Imber 2021-10-14 20:03:51

This is the classic, "beginner user vs. professional user" dichotomy. What is good for one is not necessarily good for the other.

Instruments are the classic example. Pianos don't come labeled with the notes on the keys. Though students will often add that kind of thing when learning the instrument, as they become more advanced, they remove those kinds of aids.

All the examples you listed are what I would consider "professional software". They are designed for people that already have a lot of experience in their respective fields. With that extra background context, those icons probably carry much more information.

In fact, for many professional software packages, the users don't use the GUI, often preferring keyboard shortcuts. For the professional, "discoverability" is not a problem, speed and intuitive workflow is.

Florian Schulz 2021-10-15 04:08:52

Here’s the post about “Progressive Reduction” that I had in mind:

https://layervault.tumblr.com/post/42361566927/progressive-reduction

And here’s a detailed article on the topic of icon usability: https://www.nngroup.com/articles/icon-usability/

It all comes down to learned familiarity.

If you think about signs (pictograms) at an airport or train station, they are not only large in size but also represent the real world (planes, food, bath room, people, …) which makes it easier to understand those pictures.

But icons in software often need to represent abstract or novel features that don’t have a real world metaphor. And worse: they are often displayed in small size and too many of them nearby.

Another example that comes to my mind are traffic signs that may not come with labels but which need to be learned in driving school. Traffic signs come with color coding which can certainly help to convey additional meaning.

Adnan Chaumette The toolbar on the right side of Pixelmator shows icons only, but once you hover over an icon, labels for all other icons are shown as well. https://www.pixelmator.com/support/guide/pixelmator-pro/1218

Andreas S. 2021-10-14 08:14:18

Ouch , true? What do you think: 1. Is it harder? 2. About that relationship.. https://twitter.com/KevinHoffman/status/1448272900759379972

🐦 Kevin Hoffman 🦀: Because our industry has a codependent relationship with complexity. https://twitter.com/timClicks/status/1448001283307102209

🐦 Tim McNamara: Why is it harder to make a website in 2021 than it was in 1996?

Daniel Krasner 2021-10-14 10:23:03

Not a web historian but if I had to guess … in 2001 the web was still reasonably close to the idea of readability (and simplicity) of html - that was mostly what you had to know and understand to make a site. (This doesn’t mean it was a good framework … ).

JS changed that drastically.

Chris Knott 2021-10-14 11:23:20

I think it's way easier isn't it? Most people use things like Squarespace, Shopify, WordPress etc. Expanding the definition of "website" somewhat, lots of independent small businesses (restaurants etc) use their Facebook page as their primary online presence.

I think what people are nostalgic about is the ability for a lone hacker to max out the possible quality of a website. That is, in 1996 your personal static HTML site had a similar perceived quality to CNN's.

People say similar things about game development. How come it used to be that a single 15yo could write a world class game, now it needs a team of 100 professionals? Well, the definition of "world class game" moved a long way.

Certainly between 1996 and 2021 "make a website" has become something that my parents can do.

Andrew F 2021-10-14 13:40:35

I don't know about 1996 exactly, but you can still make websites with very simple tech if you feel like it. I don't know if you can still find reputable shared hosting with SSH, so you might have to admin your own server, but plain HTML still works. Inline JavaScript still works.

I guess I agree with Chris Knott, but would phrase it differently: A lot of the change is that people's expectations have gone up as we've seen what's possible.

Which is not to necessarily say that software doesn't also have some kind of unhealthy relationship with complexity.

Paul Tarvydas 2021-10-14 14:45:40

“Because our industry has a codependent relationship with complexity.”

[my reaction to the above statement]

Definition of Simplicity

“Lack of Nuance”

Source of Complexity

Problems have a number of degrees of freedom - dimensions.

Our reality appears to have 4 dimensions (4D) - x,y,z,t.

Trying to squeeze more than one dimension into a single notation results in what we perceive as complexity.

Flattening 4D (reality) down to 2D (pen and paper) results in “complexity” - some things become merely harder to express. We need more than one 2D notation to express 4D concepts, each in a seemingly “simple” way.

Complexity Is In The Eye Of The Beholder

Nothing is “complex”.

The use of a mis-fitting notation might make a problem appear more complex, but does not change the underlying nature of the problem.

more at https://guitarvydas.github.io/2021/10/14/Complexity-vs-Simplicity-II.html

Kartik Agaram 2021-10-14 16:01:24

No question that some of the complexity is well-justified. It's also equally clear that times of increasing complexity provide lots of cover for capture and rentierism. Such times are when priest classes gain power. If the "complexity inequality" grows too large in society it can become irreversible. The time for an intervention is when the priest class is still small and relatively ineffective. It's questionable if the programmer priest class is small these days, but it seems clear that it's ineffective. Society is constantly reminded these days of its failures. So these debates seem very valuable.

Chris Knott You're right that the space of possible quality has expanded a lot. An additional part of the problem is that the supported part of the space is a tiny fraction of the total space. Someone learning how to build websites today is unlikely to encounter pure-html tutorials anymore (that are not references). There's a pervasive implicit assumption in tutorials that the end point is CNN's website, which requires lots of ongoing maintenance in exchange for its perceived quality. I think it's valuable to expose people early to the idea of wabi-sabi in software.

Christopher Galtenberg 2021-10-14 16:23:18

In 1996, I found it stomach-churningly complex and frustrating to figure out how to even run more than a basic web page from my university network's servers, not to mention running a server myself, especially getting configurations right and the early versions of CGI working – I had years of web ptsd – no warm and fuzzy feelings here

Yes, html was easy, at least that

David Brooks 2021-10-14 18:19:38

the dream of the 90's is alive at https://neocities.org/

🔗 Neocities

David Brooks 2021-10-14 18:25:08

https://glitch.com/ is also pretty fun. My 90's self would approve.

Konrad Hinsen 2021-10-15 06:38:34

The question posed initially requires some context: Is making a Web site harder today than in 1996 - FOR WHO?

For someone familiar with Web technology, the answer is no, as others have pointed out: if you want a plain HTML site, you can still make one with exactly the same effort as in 1996.

For someone familiar with just browsing the Web, who then wants to move on to creating a Web site, the answer is yes: it's much harder to get started because of the enormous labyrinth of paths you need to evaluate to make a good choice. Most of them end in some non-obvious trap such as a walled garden.

In 1996, you could walk into a book store, buy "Web sites for Dummies", and get going. Maybe some other book would give slightly better advice, but you couldn't make a serious mistake following any book's advice. Today, there is no obvious place to look for guidance, and most advertised solutions can be a serious mistake, depending on your requirements.

Andreas S. 2021-10-15 09:14:29

So Konrad you would see it as a "Paradox of choice" issue?

Konrad Hinsen 2021-10-15 09:39:46

Yes, that's the main issue. With evaluating the options being the most difficult task, in a context where advertising abounds, educational resources are rare, and the market changes so fast that evaluations become rapidly obsolete.

Doug Moen 2021-10-16 00:43:26

Is it possible for a one or two person dev team to build an open source photo management app? Ars Technica thinks not, it's just too complicated:

Our perhaps unsatisfying conclusion to this seven-app showdown exposes an important truth: the photo management software world is too complex for a one- or two-person dev team to properly handle.

https://arstechnica.com/gadgets/2021/06/the-big-alternatives-to-google-photos-showdown/

Kartik Agaram 2021-10-16 00:50:57

Certainly if you want to have lots of users, grow like a weed. But I'd argue most teams with more than one or two people fail at that as well. So, just don't try that maybe?

https://www.robinsloan.com/notes/home-cooked-app

100 people building for 100M people: very hard. Doesn't matter what you build.

2 people building for 10: very doable. Doesn't matter what you build.

nicolas decoster 2021-10-16 05:23:52

Thanks for sharing this great article , Kartik! Some quotes:

In a better world, I would have built this in a day using some kind of modern, flexible HyperCard for iOS, exporting a sturdy, standalone app that did exactly what I wanted and nothing else.

In our actual world, I built it in about a week [...]. I waved some incense and threw some stones and the gods of Xcode allowed me to pass.

And:

This messaging app I built for, and with, my family, it won’t change unless we want it to change. There will be no sudden redesign, no flood of ads, no pivot to chase a userbase inscrutable to us. It might go away at some point, but that will be our decision, too. What > is>  this feeling? Independence? Security? Sovereignty?

Is it simply… the feeling of being home?

I really like this idea of home-cooking app (or computing to be more general). I also find the parallel with cooking very nice and expressive.

Konrad Hinsen 2021-10-16 16:08:49

I remember the article that Kartik Agaram shared from a while ago. Back then, it got me thinking. I have a few ideas for similar few-people situated apps that I could use. But there's still a huge learning curve for mobile platform development, plus the eternal risk that whatever development tool you choose will not be supported under future versions of Android and/or iOS. In other words, in my mind mobile platforms are inherently unstable, much like Web platforms that go beyond plain HTML. Am I wrong there? What's the track record for the longevity of mobile apps?

Kartik Agaram 2021-10-16 16:23:22

I think you're exactly right. What my efforts to be more radical have taught me is that it's really difficult right now to avoid these issues. So I have even more appreciation now for people making these difficult trade-offs as best they can with the knowledge and skills they have at hand.

I've been spending some time in the Collapse and Permacomputing communities lately. And noticing that even if they turn out to be too pessimistic about our future, the approach they take helps us today. We don't have the capacity to perfectly reshape our computers, so we're forced to accept them as they are and adapt them to our needs as best we can.

Konrad Hinsen 2021-10-16 19:08:44

Extremist approaches often end up useful in more moderate settings. I had seen permacomputing before, but not CollapseOS. Reminds me of the computer I used in the 1980s (a Colour Genie to which I had ported Forth myself). I knew every byte in the ROM of that machine.

George Campbell 2021-10-15 16:06:47

Does anyone know of work on software maintenance? Specifically around modifying code after upgrading libraries with breaking changes. I spend most of my time making sure no one notices that I’ve changed anything. I feel like improvements to this could have huge benefits to productivity.

Kartik Agaram 2021-10-15 18:02:47

I think this is the implicit motivation for a lot of research and tech choices. Languages trying to be predictable (Go) are focused on maintenance. Rhetoric about readability, how programs are read a lot more than modified, Literate Programming and how programs should be written for people to read. Automated testing and version control are arguably the biggest recent advances.

In spite of all the research it remains a problem. I think it'll never be completely solved because better tools just cause people to take on more complex projects, the way building more roads never seems to eliminate traffic jams. And those local complexifying choices pollute our shared commons.

Dijkstra said his brain is very small and can only handle small programs. Dennis Ritchie said if you write programs using all of your brain you won't be smart enough to debug them. Illich warned us of the consequences of adopting tools too quickly. Unfortunately the world doesn't listen to any of these prophets. After 10k years the prisoner's dilemma continues to reign supreme.

Jack Rusher 2021-10-17 09:13:24

s/Dennis Ritchie/Brian Kerighan/ 🙂

Kartik Agaram 2021-10-17 04:44:06

Has the utterly brutalist approach to end-user programming ever been tried? Just forcibly package up apps with all their dependencies, along with all the tools needed to edit, build and run them?

For a while now, we've had this notion of "end-user programming" in this community: the ability to modify software while we use it.

https://futureofcoding.org/episodes/033.html by Steve Krouse

https://www.inkandswitch.com/end-user-programming/ by @Szymon Kaliski

https://malleable.systems by J. Ryan Stinnett is also relevant

Here's a sketch for an MVP that provides this experience in the bluntest, most obvious way possible:

  • Download a framework packaged as a single file, including all necessary dependencies. You download it from an https URL, and that's it, you're good to go.
  • It only supports *nix platforms on desktop machines. Linux, BSD, maybe Windows Subsystem for Linux. Macs are explicitly out because they're basically not an open platform anymore[1]. And we're going to need an open platform for the sorts of stuff we're planning below.
  • You can install arbitrary apps from arbitrary sources that run atop the framework. The apps are in interpreted languages and always come with source code.
  • When you run an app, it always opens on the app first. This is important. There's no REPL or IDE front and center. The interaction modes are whatever the app chooses.
  • When you run an app, the framework always shows the privileges it has in some consistent part of the screen. The vocabulary and enforcement of those privileges is the major responsibility of the framework. Needing it to be always visible is why you need a desktop machine with a large screen.
  • The app can ask for privileges, but the framework gives you the ability to lie to the app. Here's a simulated network environment that looks offline or has these honeypots. Here's a simulated file system with almost nothing or a few honeypot files. (Inspired by the Arcan project: https://www.divergent-desktop.org/blog/2020/08/10/principles-overview/#p6)
  • While running any app, the framework always provides a consistent set of primitives for interacting with the interpreted sources for that app. Imagine a button in the corner that flips a Hypercard over to open an editor on its sources, or something like that. Once you're in the editor you can modify it, run it, get syntax errors, test failures, etc. The editor and build environment themselves are implemented in the framework; for the MVP we'll assume we don't need to support modifying the framework.

I wonder how far Glamorous Toolkit is from this sort of experience, Tudor Girba Konrad Hinsen. On one hand it massively over-delivers on the editing framework. The sandboxing stuff is a new frontier with lots of open-ended questions on the best experience to avoid confusing people before they understand how things work.

I'm also thinking about building on something less ambitious for an MVP, like libSDL atop femtolisp or LuaJIT. Maybe also JavaScript 😬

[1] Like, it's great Apple that you eliminated vectors for malicious apps with all the restrictions on installing software. But I already had a perfectly good and healthy and functional relationship with the folks who provide gdb. When you prevent me from installing gdb, that's not cool. It's good to want to protect people from dysfunctional relationships. But to require all relationships to go through a single point is not. /rant

Konrad Hinsen 2021-10-17 09:24:11

I am not aware of anything like that that has actually been tried on a large enough scale. The closest I have seen proposed recently is https://playb.it/. I suspect that in today's economic environment, it is not obvious how to develop such a platform commercially, nor as an Open Source commons, but I'd love to be proven wrong.

Konrad Hinsen 2021-10-17 09:26:33

My view of Glamorous Toolkit in this context is as a tool for developers and power users, not as the framework you describe. Technically it would be one app among others.

Konrad Hinsen 2021-10-17 09:27:27

Another interesting question: how far are the JVM and .NET ecosystems from the view you describe? After all, they were designed as frameworks that share some of the listed goals.

Mariano Guerra 2021-10-17 10:28:10

a web browser? 🙃

Mariano Guerra 2021-10-17 10:28:55

an android emulator 😄

Mariano Guerra 2021-10-17 10:30:19

T2 Tile talked about packaging all in a single file recently https://www.youtube.com/watch?v=kXrD-mrQ4QA

Srini Kadamati 2021-10-17 13:42:47

don’t have a video off hand but I believe Jonathan Blow has talked about this as well. The pitfalls of universally reference-able packages & package versions in an OS environment, vs each one just bringing their requirements with them

Konrad Hinsen 2021-10-17 15:10:11

The idea of packaging apps with all their dependencies has been proposed and implemented many times. What's new in Kartik Agaram proposal is "long with all the tools needed to edit, build and run them". That implies full transparency, which is very far from how we use containers nowadays.

Kartik Agaram 2021-10-17 15:20:00

PICO-8 is a great point. It has editing tools and everything right within the same 128x128px screen.

The Android development environment is a thought-provoking answer as well. .apk is a single file. Can you run it just by passing it to the Android environment? Even if it opens in the IDE, hitting one keystroke to get to the simulator doesn't seem such a big deal. Seems akin to the Borland tools from the '90s which were pretty nice.

Which has me wondering what other requirements I need to add 😛 I think a key piece is: the only way to run the app is from within the development framework. It's impossible to run in isolation.

Zooming out to a whole computer is a way to trivially satisfy these criteria. Hence my attempt to start out focused on a single app that the end-user is using.

Kartik Agaram 2021-10-17 15:26:04

Ever since I learned programming I wanted to build polished apps like the ones I used to learn programming. For example, I was never satisfied with the programs I built on my BASIC interpreter because it forced me to hit Enter after pressing a key, where I could see the professional apps respond instantly to any key. I think this instinct is widespread and has basically been leading us all astray. If we just commit to never bundling apps without their development environment, never completely hiding the development environment, I think that one constraint, that commitment to a little less polish and a little more overhead, might have cascading benefits.

We'll have to fake it till we make it for a while, because clearly there's no market pressure to do this today. "Forgive them God, for they know not what they do."

Mariano Guerra 2021-10-17 15:29:19

I've read something similar about scratch, students don't like to learn with a toy environment since they know professionals don't use that. They want to learn "the real stuff"

Chris Knott 2021-10-17 18:17:10

I know the feeling. When I learnt to program the most important thing was that my program had a custom icon and appeared under Programs on the Start menu - like Real Software. What it actually did not so important.

Chris Knott 2021-10-17 18:19:49

Not sure how to reconcile that with something like TikTok where people don't mind about not using Real video editing software.

I think one aspect might be that they are seen as "a TikTok" rather than "an edited video". In this paradigm it might be seen as inauthentic to edit it outside the app on a Hollywood editing desk, then somehow upload it. Kind of like writing a compiler that targeted minified PICO-8 - it would be seen as dishonest.

Chris Knott 2021-10-17 18:28:59

Probably it's comes from the privilege of not having a real need.

If you actually just want to plan reservations at your restaurant, organising training sessions for your cricket club, budget your wedding etc (i.e. what people use Excel for atm) then you don't care what it looks like, only what it does