News for hackers. Stuff that matters.
Re:Where is the CRDT for syntax trees by dataflow on Friday December 03, 2021 @06:16PM (#29436858)
Sounds nice in theory.

But how is syntax based version control ever supposed to work when we have so many languages that literally parse differently depending on dependencies that aren't even in the codebase? Let alone ones that easily take hours to compile even when they are in the codebase?

Sounds impossible in practice unless we restrict ourselves to sufficiently context free languages.

Re:Where is the CRDT for syntax trees by kazinator on Friday December 03, 2021 @07:51PM (#29437552)
> But how is syntax based version control ever supposed to work when we have so many languages that literally parse differently depending on dependencies that aren't even in the codebase?

You create a language geared toward syntax-based version control which doesn't do that, and then relegate syntax-based version control the ghetto based around that language (not offering it as a general-purpose tool for programming in anything).

Re:Where is the CRDT for syntax trees by int0x80 on Friday December 03, 2021 @07:07PM (#29437236)
Do you have an example of a language that parses different because of dependencies?
Re:Where is the CRDT for syntax trees by layer8 on Friday December 03, 2021 @08:00PM (#29437604)
Languages with user-defined operators with user-defined precedence, like Haskell.

Languages with user-defined subgrammars, like Raku (Perl 6).

Languages with declaration-dependent ambiguity resolution, like C++ (https://en.wikipedia.org/wiki/Most_vexing_parse).

Re:Where is the CRDT for syntax trees by dataflow on Friday December 03, 2021 @07:11PM (#29437272)
Sure, just plain C can wreck any kind of parsing with its macros.
Re:Where is the CRDT for syntax trees by int0x80 on Saturday December 04, 2021 @12:59PM (#29442715)
Technically the parsing itself and the grammar are the same, they don't depend on defined macros. Yes, defining a macro in an included file can make the resulting AST change, but the parsing algorithm doesn't really care about it.
Re:Where is the CRDT for syntax trees by chriswarbo on Friday December 03, 2021 @07:25PM (#29437382)
Unfortunately, text-substitution macros (like CPP) pretty much force a source file to be treated as a stream of bytes. They can be handy, but delimited macros (e.g. like Lisps) are much less invasive.
Re:Where is the CRDT for syntax trees by dataflow on Friday December 03, 2021 @07:29PM (#29437404)
Yeah that's kind of my point. The idea of syntax based source control is nice in theory but in reality it's just wishful thinking with the kinds of languages we use.