News for hackers. Stuff that matters.
Re:Show HN: New visual language for teaching kids to code by aragonite on Tuesday November 21, 2023 @02:14PM (#38368472)
> The code editing experience is totally structured, where you select choices from menus rather than typing

Very cool! I wish there were something like this for working adult programmers, a general purpose structured editor for programming languages. When I program the intentions I form are in the first instance semantic (define a function here, check a condition there). Why shouldn't I just directly communicate my semantic intentions to the editor? Why do I have to first serialize my intentions into a string for the editor to then parse, in a error-prone process which introduces the possibility of silly syntactic errors like typos, mismatched brackets, operator precedence errors etc, rather than just semantic incorrectness?

Such an editor wouldn't necessarily have to be keyboard unfriendly any more than Excel is keyboard unfriendly. I guess it could also work something like input method editors for East Asian languages where you type into a "composition window" and make selections from a "candidate window" for insertion.

Re:Show HN: New visual language for teaching kids to code by jerf on Tuesday November 21, 2023 @02:43PM (#38368960)
Many have tried this. It is definitely not in the class of "nobody else has thought of this" so much as "tons of people have thought of this and tried it and smash up against some major problems right away".

AIUI, in this case, the major issue is that it is very tempting to try to impose a constraint that all intermediate states the code passes through are semantically valid. However while superficially appealing this turns out to be a crippling constraint. Even the best of us tend to think in somewhat more sloppy terms and then fix up code after the fact, even on a line-by-line basis. Being forced to be completely valid 100% of the time turns out to be a big mismatch. I am inclined to believe this mismatch is fundamental. Only vanishing fractions of a percent of humans, if any, think this way. Even professional mathematicians report that they tend to work this way in practice, in that they tend to leap ahead and then back-fill the rigor, rather than strictly working forward one step at a time, and if even they don't work in this manner, who does?

Programming has settled on semantically-aware autocomplete and suggestions, and that's probably the actual optimum, not just a symptom of some kind of laziness.

It is possible that if somebody really pushed through the development that the problems are solvable, but I'd advise anyone taking it on that if there's any fruit here, and there may well be, it is not low hanging.

As saurik mentioned, the Lisp world through emacs is the closest you can get to this, but again AIUI you can still do anything you want, it's just that you have a lot of tools that encourage "more" semanticness, not that it is enforced absolutely rigidly.

Re:Show HN: New visual language for teaching kids to code by hyperthesis on Tuesday November 21, 2023 @03:52PM (#38369932)
A related concept is compilers that keep going after the first error. Though I kind of like the hard-mode idea of a compiler that has only one error message, "fail".

BTW: could provide valid options (perhaps highlighted), not constraints. (...maybe been thought of already)

Re:Show HN: New visual language for teaching kids to code by george_____t on Tuesday November 21, 2023 @06:23PM (#38372048)
> AIUI, in this case, the major issue is that it is very tempting to try to impose a constraint that all intermediate states the code passes through are semantically valid. However while superficially appealing this turns out to be a crippling constraint.

This really isn't much of an issue in a language with holes as a first class concept, like Agda or Haskell.

Re:Show HN: New visual language for teaching kids to code by b4rtazz on Tuesday November 21, 2023 @04:20PM (#38370357)
For example https://github.com/nocode-js/sequential-workflow-designer is designed in this way, that you program some logic by setting predefined actions in a proper order. You program at the high level.
Re:Show HN: New visual language for teaching kids to code by jjkaczor on Tuesday November 21, 2023 @02:56PM (#38369161)
You wish there was something like this for adult programmers?

Blythe Omnis 7 in ... (checks CV/resume) ...1996 (and earlier), a 'RAD' platform/solution that worked across Windows and Macintosh... (I landed the job because I was the ONLY candidate who had even heard of this software, because I read a short article in a magazine once...)

https://en.wikipedia.org/wiki/Omnis_Studio

Clicking to program with drop-down lists (and popups) just wasn't all that well thought out. So - you would see your program as a listing. When you tried to edit a line, it would popup a modal dialog box, where you could edit... just that one line... Intellisense/code-completion were of course non-existent... ahahahahaha (laughs maniacally)

Man, I think my PTSD is kicking in, I need a drink/smoke or something.

Re:Show HN: New visual language for teaching kids to code by solardev on Tuesday November 21, 2023 @03:15PM (#38369418)
Aren't there quite a few of these? Scratch or its cousin Snap (https://snap.berkeley.edu/snap/snap.html), or even a visual flow editor for React (https://app.flowhub.io/#project/c111454c9fd2f74d37d1e8a4e739...) or the similar https://retejs.org/
Re:Show HN: New visual language for teaching kids to code by saurik on Tuesday November 21, 2023 @02:43PM (#38368957)
I am under the impression that this is what people who program in Lisp experience when working with Emacs, where they get to think in and work with forms rather than mere text.
Re:Show HN: New visual language for teaching kids to code by hyperthesis on Tuesday November 21, 2023 @03:54PM (#38369961)
ASTs