Live data from Hacker News

GitHub code search is generally available

github.blog

111–120 of 156 posts

Re: GitHub code search is generally available

#111
The feature isn't working well yet on C and C++. If I recall correctly it's based on Tree-Sitter[1] parsing, and there are still too many bugs in corresponding grammars - tree-sitter-c[2] and tree-sitter-cpp[3]. Hopefully, it will be greatly improved in the future as the share of the existing and newly written code in C and C++ is quite significant.

[1] https://tree-sitter.github.io/tree-sitter/

[2] https://github.com/tree-sitter/tree-sitter-c/issues

[3] https://github.com/tree-sitter/tree-sitter-cpp/issues

Re: GitHub code search is generally available

#112

Earlier quoted context omitted.

"monopoly on developer ecosystem" GitHub? fair OpenAI? how is this a part of dev. ecosystem? Vs Code? wtf? there's a lot of other IDEs/editors and many would argue that they are better >embrace, extend, extinguish strategy with WSL They are EEEing their product - Windows?

> Vs Code? wtf? there's a lot of other IDEs/editors and many would argue that they are better VS Code is hugely dominant in terms of IDEs used by developers per the StackOverflow survey. It commands more than double the percentage of the next most used… and the second place is Visual Studio. https://survey.stackoverflow.co/2022/#most-popular-technolog...

VSCode is just the lowest common denominator IDE that works decently with most languages and platforms, I use it a lot but would not think twice about switching to something else (as I have many times in my career). I don’t think it really has any “moat”

Re: GitHub code search is generally available

#113
post #48

Earlier quoted context omitted.

Absolutely. GitHub Code Search is by far the most valuable online development tool I have used the past year. It is so much more useful than Copilot or any of the AI LLMs in my experience. With Code Search, I have: * Rewritten a CMake build system, which would have been practically impossible without access to real-world examples because of how poorly designed and documented it is; * Validated machine-generated trans…

That's really interesting, do you have any examples handy of search queries you used?

For CMake stuff I would search like ` path:/CMakeLists\.txt$|cmake/`.

For translations I would search a phrase using ` lang:"Gettext Catalog" path://`.

For reviewing library consumers I would just search for ` ( OR OR ) NOT path:/**`.

There may be better queries for some of these, but I really didn’t have to do any magic or weird tricks. Everything more or less just works.

Re: GitHub code search is generally available

#114
post #57

Surprised more people aren't talking about how Microsoft has a near monopoly on the developer ecosystem. They've got GitHub, OpenAI, and VS Code all working together and collecting data that strengthen each other's products while also using their embrace, extend, extinguish strategy with WSL and all of these steer people towards Azure services whenever possible. Seems like something that verges on an anti-trust situa…

> more people aren't talking about how Microsoft has a near monopoly on the developer ecosystem. But do they? In my day job, outside of the occasional use of Visual Studio and developing on a Windows machine, I use no Microsoft products for development. > credit to Microsoft for rehabbing their reputation with developers With a fair number of younger developers, but certainly not all. Most devs I know don't think of…

Your particular individual experience is not representative of the overall reach that Microsoft has, which is what OP is pointing out.

GitHub is the defacto "point" of software these days, with most devs jumping to that before anything else.

VSCode is the highest ranked editor from the StackOverflow 2023 survey, with (IIRC) something akin to 70%.

Azure is the icing on the cake, because now you have an entire generation of developers building on GitHub, from VSCode, and deploying onto Microsoft infrastructure.

Re: GitHub code search is generally available

#115

Surprised more people aren't talking about how Microsoft has a near monopoly on the developer ecosystem. They've got GitHub, OpenAI, and VS Code all working together and collecting data that strengthen each other's products while also using their embrace, extend, extinguish strategy with WSL and all of these steer people towards Azure services whenever possible. Seems like something that verges on an anti-trust situa…

Count me in the list of dev teams where that is not remotely true. I use exactly 0 microsoft projects at my software engineering job.

Re: GitHub code search is generally available

#116
post #111

The feature isn't working well yet on C and C++. If I recall correctly it's based on Tree-Sitter[1] parsing, and there are still too many bugs in corresponding grammars - tree-sitter-c[2] and tree-sitter-cpp[3]. Hopefully, it will be greatly improved in the future as the share of the existing and newly written code in C and C++ is quite significant. [1] https://tree-sitter.github.io/tree-sitter/ [2] https://github.co…

As an Emacs user, the tree-sitter-based Elixir and HEEx modes are vastly superior to the built-in HTML+ and Elixir modes.

Re: GitHub code search is generally available

#117

Earlier quoted context omitted.

> Vs Code? wtf? there's a lot of other IDEs/editors and many would argue that they are better VS Code is hugely dominant in terms of IDEs used by developers per the StackOverflow survey. It commands more than double the percentage of the next most used… and the second place is Visual Studio. https://survey.stackoverflow.co/2022/#most-popular-technolog...

VSCode is just the lowest common denominator IDE that works decently with most languages and platforms, I use it a lot but would not think twice about switching to something else (as I have many times in my career). I don’t think it really has any “moat”

Lol. Except the huge library of plugins, tight copilot integration and majority market share

Re: GitHub code search is generally available

#118
post #81

Earlier quoted context omitted.

Why would they purchase StackOverflow ? They are partnered with the StackOverflow killer: ChatGPT.

Most of the use I get out of GPT is letting it summarize stackoverflow posts for me.

It can often respond your Google query you used to find the SO page.

Re: GitHub code search is generally available

#119
post #87
post #81

Earlier quoted context omitted.

Why would they purchase StackOverflow ? They are partnered with the StackOverflow killer: ChatGPT.

If StackOverflow dies, surely the developer-relevant quality of training data will suffer? After all, the capabilities of ChatGPT are basically proportional to how well a topic is represented in the training data, which is largely the internet.

If you kill your concurrent, you don't need to make your product better. But it will keep learning from it's users.

Re: GitHub code search is generally available

#120
post #13
post #6

I generally like the new code search, but I've got one big gripe: there's no way to sort code results by any kind of proxy for recency. The old code search had the ability to sort by indexed date. This wasn't perfect, but it was something. I like keeping up with who's using my code and whether they're leaving comments or commit chains that outline trouble they're having with it. Sometimes old code pops up in the rece…

(I work on code search.) Yeah, sorry about that. We've heard this feedback a lot. There's two reasons why we haven't implemented this. First, content is shared between repositories which makes this harder than before, when it wasn't. Second, we rebuild the index weekly or even more frequently, so the proxy of "when was this added" that was used doesn't work any more. What we would like to use is "when was this blob a…

git blame is expensive, especially at scale, on big repos, but the thing to understand is the exact hash something was commmitted at isn't important for time-based indexing. What's wanted is when, ± a few days, something was committed at, which makes for a much cheaper query. (How merges are dealt with might also be material)

Barring that though, the equivalent of a post-commit git hook that updates the DB with 'when this blob was added to this branch' and then run a backfill-enough job.

The easy answer, though, would seem to be keep a copy of last week's index, and run the query twice and figure out a way to efficiently compare results to figure out if something is this week's but not last weeks index.

Also of note, "when was this blob added to this branch" isn't even actually the same as git blame, which means that if a file was touched that matched the search but the latest change to the file doesn't affect the matching line of code, it'd show up as recent, which is not what the user wants.

Post reply on HN