Live data from Hacker News

Glean – System for collecting, deriving and querying facts about source code

glean.software

21–30 of 85 posts

Re: Glean – System for collecting, deriving and querying facts about source code

#21
Great to see this space moving! Any pointers on diff vs Kythe? Kythe has a mostly fixed schema, for one.

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?

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).

Third, how does it link up references across compilation units? Is it heuristic, or relies on unique keys from indexers matching? Or across languages?

Re: Glean – System for collecting, deriving and querying facts about source code

#22
post #19
post #5

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. Our focus has been on very large scale, multi-language code indexing, and then low latency (e.g. hundreds of micros…

Been away from Fb for a few years. How does this relate to tbgs?

Jump to def is nice when biggrepping a piece of code a la what you can do with codesearch, cs.android.com

Re: Glean – System for collecting, deriving and querying facts about source code

#25
I was recently looking for a library that takes a few lines of source code as input, and predicts the programming language as output.

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.

Why doesn't a popular library like this exist?

Re: Glean – System for collecting, deriving and querying facts about source code

#26
Cool! I would love to play around with this.

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?

For Schemas, [1] says to modify (or base new ones off) these: https://github.com/facebookincubator/Glean/tree/main/glean/s...

For Indexers, it's a little less clear but it looks like I need to write my own type checker?

[1] https://glean.software/docs/schema/workflow

Re: Glean – System for collecting, deriving and querying facts about source code

#28
post #5

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. Our focus has been on very large scale, multi-language code indexing, and then low latency (e.g. hundreds of micros…

I see you support Thrift and Buck. Would you also be interested in adding Proto and Bazel support? Being able to query the code based on the build graph (sort of) would be very cool.

Re: Glean – System for collecting, deriving and querying facts about source code

#29
post #23

I can't believe Facebook hasn't canned Flowtype yet and moved to TypeScript. They will have to do it eventually.

I'm not sure you understand the scale at which Facebook operates. They don't have to do anything.

As long as billions of people keep using Facebook they can maintain their own static analysis tooling for Javascript for as long as they want.

Post reply on HN