Hacker News new | ask | show | jobs
by greenyouse 3317 days ago
If you were going to take a new try at building a system like this, do you think something like Datomic's codeq[1] would be useful? It allows for navigating code semantics across multiple projects using a database query language as the interface. I've never actually used it but maybe it could help for data storage of an intentional programming system?

Thanks for the links, this was the first time I've heard of intentional programming. Neat idea!

[1] https://github.com/Datomic/codeq

1 comments

Hmm I don't know enough about Datomic/codeq.

Data storage for a demo of something like that is not really hard. Something as simple as a json object would work fine.

One hard part is to make it tolerant of incomplete/invalid objects.

If it's sufficiently tolerant you could make it look very similar to a normal text editor but it would have magical powers under the hood.

You could do all sorts of cool text-editor-like features but because you have a much richer object under the hood you could be much more magical.

The concept of "file" stops having any significance. You'd think in terms of your domain logic and program objects.

So your sidebar project tree could be organised arbitrarily (not dictated by the file system).

You could do fancy keyboard shortcuts. Imagine with key up/down you navigate around a list of objects that are highlighted (like functions). While the function is selected you'd press "d" and bam out pops the function documentation (because documentation would be an attribute of that function and tightly attached to it).

You'd type "h" and see the entire history of that function from day 1, who created it who worked on it, etc...

"r" and it asks you for a new name (name could be a phrase like "login the user into the system" because no text-parsing).

When you enter an entry is added to the history of that object (it has a unique id) "[timestamp] greenyouse renamed this function to 'login the user into the system'".

Then imagine the possibilities for CI/CD.

You could have constraint-based deployment and integration.

For example if any objects in the program tagged with 'security' have been created/modified/deleted you could require stronger code review sign-off etc...

You could "query" the diff of a software revision and do stuff based on that. For example all your "SQL query" nodes would have a pre-determined type.

So when a new revision is pushed you could tell if new SQL queries have been introduced in the system you could notify the database team "Revision #458 has introduced the following 3 SQL queries (click to view)".