Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just like there is "decision fatigue" [1] I believe there is "naming fatigue", and naming are one of the three great problems of computing, as everyone knows.

I'd say that at least point-free prevents naming fatigue, but for the result to be nice to the reader, the naming and factorization is much more important than with explicit code, which has sort of much more "safeties".

On the specific question you ask, let's hear the creator of one of the major stack oriented languages, Forth, by its inventor when he had about 30 years of professional practice. He talks about code comments, which is the local solution that comes immediately to mind when thinking about the issues you pointed out:

So people who draw stack diagrams or pictures of things on the stack should immediately realize that they are doing something wrong. Even the little parameter pictures that are so popular. You know if you are defining a word and then you put in a comment showing what the stack effects are and it indicates F and x and y

F ( x - y )

I used to appreciate this back in the days when I let my stacks get too complicated, but no more. We don't need this kind of information. It should be obvious from the source code or be documented somewhere else.

Well, comment-less code isn't popular either, but we're not here to design the next Python anyway. By the way, Chuck Moore evolved his language until he determined that the remaining problems were "in the hardware". He did his own CAD tools with his language to design stack-oriented CPUs with some success, as some of them ended up in spacecrafts (notably Philae in 2014 [3]).

In my experience, when you want to keep the data flow as simple as possible (in Forth: keep "stack juggling" to a minimum), there's very often only one good order for parameters. That works very well for the writer, for whom the understanding of the problem helps with memorizing signatures and semantics. As a reader (of other's code), I have much less experience, but I guess that understanding the same things requires the readers to invest more time up front, in addition to the "accidental obfuscations" (poorly written code, unusual programming habits and conventions...).

[1] https://en.wikipedia.org/wiki/Decision_fatigue [2] https://www.ultratechnology.com/1xforth.htm [3] https://en.wikipedia.org/wiki/RTX2010



> "naming fatigue"

ChatGPT is quite good at coming up with names.

It can map a description of a thing to a name. And the descriptions can vary between developers and probably still end up with the same name. So if everyone relies on its naming-prowess then everyone ends up naming things consistently.

Aside: I wonder if it can name parameters from tacit-style...

    Write this in non-tacit style:

    sort input.txt | uniq -c | sort -rn > output.txt

    sort input.txt > sorted.txt
    uniq -c sorted.txt > counted.txt
    sort -rn counted.txt > output.txt
Seems it can. Look how the output of `uniq` was `counted`.

Maybe we should just let ChatGPT name everything.

Interesting to think what programming is you no longer have to name things. A lot of programming is grouping code and coming up with names for the groups.

What if we didn't worry about grouping or naming, and just dealt with the data, and let chatgpt provide names on-the-fly.

Functions could even be replaced by descriptions of the actions.

I wonder if you could let an LLM evolve a graphical operating system from just the hardware definition.

We went through ~70 years of trial and error for programming languages going from low-level to progressively higher-level, and kept all the baggage along the way.

How would an AI go about this...with all the knowledge of today? How would it reason about each step in evolving a language.

I'm guessing it would probably be a LISP :D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: