We use this to power things like find-references or jump-to-def, "symbol search" and autocomplete, or more complicated code queries and analysis (even across languages). Imagine rich LSPs without a local checkout, web-based code queries, or seeding fuzzers and static analyzers with entry points in code.<p>Our focus has been on very large scale, multi-language code indexing, and then low latency (e.g. hundreds of micros) query times, to drive highly interactive developer workflows.
Feature request: a live demo! I would love to try out the web interface described at <a href="https://glean.software/docs/trying" rel="nofollow">https://glean.software/docs/trying</a> without pulling down a 7GB Docker image first.
To prevent any confusion, this is a different product than Mozilla's Glean [0][1].<p>[0] <a href="https://docs.telemetry.mozilla.org/concepts/glean/glean.html" rel="nofollow">https://docs.telemetry.mozilla.org/concepts/glean/glean.html</a><p>[1] <a href="https://github.com/mozilla/glean/" rel="nofollow">https://github.com/mozilla/glean/</a>
I had a look at the site and it seems to be parsing source code in multiple languages and storing the parsed "syntax trees" into a database for querying.<p>I would love to know what the usecase for this tool is aside from maybe being a source for presentations? (We have 5 million if statements).<p>How can this be used to improve code quality or any other aspect of the code lifecycle?<p>Or is it solving problems in a completely different problem area?
Great to see this space moving! Any pointers on diff vs Kythe? Kythe has a mostly fixed schema, for one.<p>One of the pain points using Kythe is wiring up the indexer to the build system. Would Glean indexers be easier to wire up for the common cases?<p>Other is the index post-processing, which is not very scalable in the open source version (due to go-beam having rough Flunk support, for example).<p>Third, how does it link up references across compilation units? Is it heuristic, or relies on unique keys from indexers matching? Or across languages?
Datalog-ish query languages sure is a fun area to be working in. Such DSLs exist for various domains and, like Semmle's codeQL or the more academic Soufflé, Glean focuses on the domain of programming languages.<p>Glean seems to still be work in progress, e.g. no support for recursive queries yet, but I wonder where they're heading. I'll certainly keep an eye on the project but I wonder how exactly Glean aims to -- or maybe it already does -- improve upon the alternatives? From the talk linked in another comment I guess the distinctive feature may be the planned integration with IDEs. Correct me if I'm wrong. Other contenders provide great querying technology but there is indeed no strong focus on making such tech really convenient and integrated yet.
An excellent talk by Simon Marlow on Glean here: <a href="https://youtu.be/-OPN7QPsYKE" rel="nofollow">https://youtu.be/-OPN7QPsYKE</a>
Cool! I would love to play around with this.<p>How do I write a schema and indexer for my favorite programming language that isn't currently (and won't be) supported with official releases?<p>For Schemas, [1] says to modify (or base new ones off) these: <a href="https://github.com/facebookincubator/Glean/tree/main/glean/schema/source" rel="nofollow">https://github.com/facebookincubator/Glean/tree/main/glean/s...</a><p>For Indexers, it's a little less clear but it looks like I need to write my own type checker?<p>[1] <a href="https://glean.software/docs/schema/workflow" rel="nofollow">https://glean.software/docs/schema/workflow</a>
This seems very interesting, would love to see more alternatives to TreeSitter and microsoft LSP - what makes those hard to use is lack of examples and tutorials. So I hope tbere will be examples and tutorials. For example: How do you find all variables in scope when the text cursor is on line x and col y in /file/path/file.js
Very cool! How does this differ algorithmically from the trigram based search that everything uses from google code search from like 20 years ago?<p>And continuing off of that theme in practical terms how does it stand up against zoekt?<p>I’m curious because zoekt is kind of slow when it comes to ingesting large amounts of code like all of the publicly available code on GitHub<p>The few people using that commercially have basically had to spend a lot of time rewriting parts of it to make their goal of public codesearch for all attainable.<p>I and a few people I know are pretty convinced that there are better and easier ways / technologies to make that happen.
Great job with this. What's your roadmap for releasing some of the tooling for editor integration? Really, the question is should I build something or wait a few weeks?
We have used SciTools Understand to do this on local source code. What is the use of putting this in the cloud? The website doesn't really explain that.
I was recently looking for a library that takes a few lines of source code as input, and predicts the programming language as output.<p>That seems like a very tractable machine learning problem, yet all I could find was a single python library which looks nice, but doesn't have much adoption, and requires installing the entirety of tensorflow despite the fact that users just want a trained model and a predict() function.<p>Why doesn't a popular library like this exist?