unison
locust
Our great sponsors
unison | locust | |
---|---|---|
17 | 4 | |
5,540 | 47 | |
0.9% | - | |
9.9 | 0.0 | |
about 3 hours ago | 6 months ago | |
Haskell | Python | |
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 Programming Language
-
Unison Cloud
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?
- Unison Language
-
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
-
Looking for a new language to learn for Advent of Code that's unlike anything you've tried before? Check out Unison!
they adjusted my ticket to be a bug fix on their part.
-
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.
- Unison
- Unison Milestone 3
- What if Git worked with Programming Languages?
locust
-
Effective Code Browsing
Nice!
Have been working on something similar, although my use case is more about learning how code has changed across git commits: https://github.com/bugout-dev/locust
For Javascript/Typescript/React support, like you, I hooked into the Babel toolchain. Can't recommend it highly enough.
There's also a newish project called quick-lint-js which seems to have written their own from-scratch AST parser for JS, but I haven't tried it yet: https://github.com/quick-lint/quick-lint-js
Finally, another project that I know in this space is comby (I believe it is owned/maintained by the folks at Sourcegraph): https://comby.dev/
Don't know why I dumped all those links there. Just figured there may be something useful in them for you. Am also just super passionate about building knowledge about code bases by analyzing their ASTs. Nice to meet a fellow enthusiast. :)
-
What if Git worked with Programming Languages?
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.
-
Diffsitter: A tree-sitter based AST difftool to get meaningful semantic diffs
My team has a similar project (Locust: https://github.com/bugout-dev/locust) where the goal is to learn the semantic meanings of code changes in git commits, GitHub PRs, etc.
Since we took git diffs as a target for semantic analysis, we have a different approach to our diffs. We start with line-by-line diffs (specifically using "git diff") and then take a semantic diff by superimposing the git diff information on top of the initial and terminal ASTs.
This makes the diff calculation cheaper because we don't have to do full diff between trees.
Haven't updated the code in a few months, but my team is actively using Locust on public GitHub repos to learn the semantics of those code bases. We do plan to do some work on it soon to make it easier to make Locust easier to use (especially as a library).
Really need to sit down and take a proper look at tree-sitter. We currently support Locust diffs for Python, Javascript, and Java, but each one is custom written and implements the same basic algorithm. It looks like tree sitter might just crush this problem for us.
- Difftastic: Syntax-aware structured diff tool
What are some alternatives?
nvim-treesitter-context - Show code context
weggli - weggli is a fast and robust semantic search tool for C and C++ codebases. It is designed to help security researchers identify interesting functionality in large codebases.
dark - Darklang main repo, including language, backend, and infra
gumtree - An awesome code differencing tool
project-m36 - Project: M36 Relational Algebra Engine
difftastic - a structural diff that understands syntax 🟥🟩
cone - Cone Programming Language
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
structured-haskell-mode - Structured editing minor mode for Haskell in Emacs
nbdime - Tools for diffing and merging of Jupyter notebooks.
diffsitter - A tree-sitter based AST difftool to get meaningful semantic diffs