unison
diffsitter
Our great sponsors
unison | diffsitter | |
---|---|---|
17 | 15 | |
5,504 | 1,509 | |
1.0% | - | |
9.9 | 8.7 | |
6 days ago | 4 days ago | |
Haskell | Rust | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
unison
-
Unison Cloud
Hi, one of the Unison creators here. We've talked about adding pluggable syntax[1]. It's in principle straightforward (the code is already stored in a database as its abstract syntax tree, not text) and I imagine a future version of Unison could let you pick from a variety of syntaxes. But we haven't gotten to it yet.
[1] https://github.com/unisonweb/unison/issues/499
... that said, the language semantics and libraries are still going to be different, so even if we have a python-ish or typescript-y syntax, there'll still be new things to learn. :)
Short version: no type classes (yet)
Longer version:
Building upon what Quekid5 mentioned, Unison abilities are an implementation of what is referred to as algebraic effects in programming language literature. They represent capabilities like IO, state, exceptions, etc. They aren't really a replacement for type classes, though in some cases you can shoehorn abilities in where you might otherwise use a type class.
For someone coming from a Haskell background, I think that abilities are closer to a replacement for monad transformers. But in my opinion they are much more ergonomic.
Discusson of type classes comes up a lot. Here is a long-standing GitHub issue: https://github.com/unisonweb/unison/issues/502
For what it's worth, I've written Unison quite a lot over the past few years and while I've missed type classes at times, I think that reading unfamiliar code is easier without them. There's no implicit magic; you can see exactly what is being passed into a function. So far I've been happy with a bit more verbosity for the sake of readability.
-
Show HN: Winglang – a new Cloud-Oriented programming language
I've been following the Unison lang [1] for quite some. Wing seem to set similar goals? From the first glance Wing looks more polished, but there's "The Big Idea" behind Unison - is there something similar?
-
C++ evolution vs C++ successor languages. Circle's feature pragmas let you select your own "evolver language."
in haskell it looks like this, you specify the language extensions you want at the top of the source files: https://github.com/unisonweb/unison/blob/trunk/unison-core/src/Unison/ABT.hs
-
Syntax Design
I think Unison is going in this direction. Imo this is a mistake, as a program language functions not just as specification for the machine, but also as communication between programmers. Allowing the introduction of arbitrary dialects to suit individual preferences seems like it would interfere with that communication.
- What if Git worked with Programming Languages?
-
Red and blue functions are a good thing
The Unison language [1] also has a very interesting effect system.
-
What does your ideal programming language look like?
I think Unison might have at keast somewhat similar features to what you talk about with package manegement and possibly modules. I haven't tried it out yet but from the documentation it sounds similar.
diffsitter
-
AST-grep(sg) is a CLI tool for code structural search, lint, and rewriting
Or https://github.com/afnanenayet/diffsitter. I've tried both and I like them. No preference or notable opinions on them yet!
-
Enable new diff option linematch (#14537) · neovim/neovim@04fbb1d
For git diff's I've been using https://github.com/afnanenayet/diffsitter
-
Difftastic, the Fantastic Diff: How it works
One more tree-sitter based diffing tool - diffsitter
-
What Comes After Git
Several threads here point to difftastic: https://github.com/Wilfred/difftastic
I know a lot of people who have a lot of hope for diffsitter (or something like it): https://github.com/afnanenayet/diffsitter
Personally, I think the reason most "good" semantic diff tools are proprietary is that they are huge amounts of effort that are mostly "hacks" and "heuristics" bandaged together in ways that people don't want to let out how the sausage was made.
But I also "general, language agnostic AST-based semantic diff" is a mountain peak we cannot reach (probably ever), and I believe my experiments found an interesting local maxima that people are maybe sleeping on (lexer-based diffs rather than parser-based diffs): https://github.com/WorldMaker/tokdiff
-
Fast Kernel Headers: Tree -v1: Eliminate the Linux kernel's "Dependency Hell"
https://github.com/afnanenayet/diffsitter there are quiet a few projects such as this one, attempting to solve the issue. :)
-
Thinking about programming systems and not just languages and environments
There’s an interesting project in the semantic diff/merge space that I have been keeping an eye out for https://github.com/afnanenayet/diffsitter
-
What if Git worked with Programming Languages?
I have never used any of them, but it look like tree-sitter based diff tools are exactly what you are searching for (like difftastic, gumtree or diffsitter).
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.
I believe Unison is the only attempt to do this at a programming language/environment level.
For Git diffs, there is Diffsitter, which uses Tree Sitter to generate semantic diffs of code files: https://github.com/afnanenayet/diffsitter
I have not used it, but it is high on my todo list.
I think everyone may be interested in: https://github.com/afnanenayet/diffsitter
Github having an option to have their PR GUI use an AST diff like this could be a fun and useful option.
What are some alternatives?
difftastic - a structural diff that understands syntax 🟥🟩
semantic-source - Parsing, analyzing, and comparing source code across many languages
nvim-treesitter-context - Show code context
dark - Darklang main repo, including language, backend, and infra
project-m36 - Project: M36 Relational Algebra Engine
git-merge-driver - Example of how to configure a custom git merge driver
tree-sitter-json - JSON grammar for tree-sitter
cone - Cone Programming Language
nbdime - Tools for diffing and merging of Jupyter notebooks.
locust - "git diff" over abstract syntax trees