What if Git worked with Programming Languages?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Scout Monitoring - Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
www.scoutapm.com
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • diffsitter

    A tree-sitter based AST difftool to get meaningful semantic diffs

  • Counterpoint: a quick google reveals diffsitter: https://github.com/afnanenayet/diffsitter

    The output could be a lot more compact, it could do better at adding context (in the same way https://github.com/romgrk/nvim-treesitter-context does, etc), so if you're interested in this it's really within reach, go help out.

  • syntactic_versioning

    What if Git worked with Programming Languages?

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • nvim-treesitter-context

    Show code context

  • Counterpoint: a quick google reveals diffsitter: https://github.com/afnanenayet/diffsitter

    The output could be a lot more compact, it could do better at adding context (in the same way https://github.com/romgrk/nvim-treesitter-context does, etc), so if you're interested in this it's really within reach, go help out.

  • nbdime

    Tools for diffing and merging of Jupyter notebooks.

  • Interesting they mentioned Jupyter Notebooks but not NBDime https://github.com/jupyter/nbdime which is a Jupyter plugin specifically to address this problem. Without it, diffing notebooks is not feasible.

  • structured-haskell-mode

    Structured editing minor mode for Haskell in Emacs

  • > Structure editors haven't really taken off yet despite several historical and contemporary attempts.

    This is a nice contemporary one:

    https://github.com/projectional-haskell/structured-haskell-m...

    Lisps also have all kinds of options available in Emacs, but it is more special to see this outside of the land of s-expressions.

  • > Structure editors haven't really taken off yet despite several historical and contemporary attempts.

    This is a nice contemporary one:

    https://github.com/projectional-haskell/structured-haskell-m...

    Lisps also have all kinds of options available in Emacs, but it is more special to see this outside of the land of s-expressions.

  • terminusdb

    TerminusDB is a distributed database with a collaboration model

  • Author is CTO of TerminusDB (https://terminusdb.com/), which is a more graphy version of Dolt! Check it out.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • unison

    A friendly programming language from the future

  • dark

    Darklang main repo, including language, backend, and infra

  • fwiw, this is what we do in Dark [1]. We store (serialized) ASTs, then then we pretty print them in the editor. This converts the AST into tokens that you see on your screen, complete with configurable* indentation, line-length, etc. Code would be displayed according to your config* and the same code displayed differently to a different developer looking at the same code.

    [1] https://darklang.com

    * I haven't actually enabled users to configure this, but it's just some variables called 'indent' and `lineLength` in the code

  • DMFO

    Diff and Merge for Office

  • I looked this up and for anyone wondering, it's called "diff/merge drivers", but there are only a handful of them out there. Some highlights from a few minutes of searching:

    - MS Office: https://github.com/lcnittl/DMFO

  • git-sqlite

    A custom diff and merge driver for sqlite

  • jsonmerge_git_merge_driver

    demo custom Git merge driver to merge JSON objects

  • I investigated the option of using a custom git merge driver for a project where we were planning to version control a bunch of data files using git.

    Here's a proof of concept python merge driver I bashed together at the time to auto-merge JSON objects: https://github.com/fcostin/jsonmerge_git_merge_driver

    This never went anywhere near production, but it was very easy to put together something basic.

    One complication with using a custom merge driver, as discussed by https://github.com/Praqma/git-merge-driver , is that they need to be configured inside the `.git/config` of the repo, which itself is not version controlled. So there's an additional config management overhead to rolling that out to everyone in a machine. Additionally, if outsourcing hosting for git repos, it may not be supported to install and configure a custom merge driver for merges conducted by the hosting platform (e.g. merges created by github.com pull request workflow).

    One idea I had at the time was using external schema files (e.g. JSON schema for JSON files) to help guide/constrain the result of the merge. I never implemented it, but it should be possible. If the schemas were also version controlled in the same git repo that stores the data, you'd need to figure out which one (and which version) to load when resolving a merge conflict of a data file. There doesn't seem to be a well-supported robust way for a merge driver script to discover the source and destination branches, but there are some potentially fragile ways of doing it that work some of the time.

  • git-merge-driver

    Example of how to configure a custom git merge driver

  • I investigated the option of using a custom git merge driver for a project where we were planning to version control a bunch of data files using git.

    Here's a proof of concept python merge driver I bashed together at the time to auto-merge JSON objects: https://github.com/fcostin/jsonmerge_git_merge_driver

    This never went anywhere near production, but it was very easy to put together something basic.

    One complication with using a custom merge driver, as discussed by https://github.com/Praqma/git-merge-driver , is that they need to be configured inside the `.git/config` of the repo, which itself is not version controlled. So there's an additional config management overhead to rolling that out to everyone in a machine. Additionally, if outsourcing hosting for git repos, it may not be supported to install and configure a custom merge driver for merges conducted by the hosting platform (e.g. merges created by github.com pull request workflow).

    One idea I had at the time was using external schema files (e.g. JSON schema for JSON files) to help guide/constrain the result of the merge. I never implemented it, but it should be possible. If the schemas were also version controlled in the same git repo that stores the data, you'd need to figure out which one (and which version) to load when resolving a merge conflict of a data file. There doesn't seem to be a well-supported robust way for a merge driver script to discover the source and destination branches, but there are some potentially fragile ways of doing it that work some of the time.

  • locust

    "git diff" over abstract syntax trees (by bugout-dev)

  • I maintain a free/open source project that does exactly what the author asks for: https://github.com/bugout-dev/locust.

    Our tool uses git as the foundation of its functionality. It superimposes git diffs on top of ASTs.

    It is insanely powerful.

    For example, we use it to power semantic code search and current support Python, Javascript, and Java. We generate a JSON object defining the AST differences between initial and terminal commits on GitHub PRs and doing text search on the JSON objects performs surprisingly well when we want to answer questions like, "When did we add dateutils as a dependency?" or "When did we last change the /journals handler on the API?"

    The Python integration currently sees the most use but if you are interested in other languages, we would be happy to support it.

    Do drop me a DM if you want help getting started with Locust.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Git Machete

    1 project | news.ycombinator.com | 30 Mar 2024
  • Difftastic, a structural diff tool that understands syntax

    17 projects | news.ycombinator.com | 21 Mar 2024
  • Popular Git Config Options

    2 projects | news.ycombinator.com | 16 Feb 2024
  • So You Think You Know Git – Git Tips and Tricks by Scott Chacon

    6 projects | news.ycombinator.com | 13 Feb 2024
  • The VS Code Extension That Helps You Control Your Pull Requests Size

    1 project | dev.to | 1 Nov 2023