News for hackers. Stuff that matters.
Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by dazbradbury on Monday March 20, 2023 @03:43PM (#35237496)
"Precise code navigation in 10+ languages helps you move quickly through refs and defs"

I can't find any mention of which languages are supported - can anyone point me in the right direction?

Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by bebrws on Monday March 20, 2023 @04:29PM (#35238185)
I tried to implement this using OpenAI's embeddings then using cosign similarity between produces vectors instead of the vector DB ( as shown in OpenAI's example code here ). I do the same thing where I take the highest ranking code snippets (vectors) and include them in a prompt to ChatGPT with an original prompt. My code is a mess since I just hacked it together after a long day of work but its a small file. Like 100 lines.

I used TreeSitter which I thought was pretty awesome though because it allows for parsing a TON of different languages. I had to parse the languages to create the different code snippet strings. I don't want to create a code snippet of half a function for example..

So TreeSitter parses the code into an AST and I send each different AST node to OpenAI to get the vector (I optimized this so multiple nodes of the same AST type are combined). Send the prompt to OpenAI to get a vector. Find the most similar code snippets to the prompt and include them at the top of a prompt to ChatGPT.

This is the same idea right? If anyones interested it can be found here: https://bbarrows.com/posts/using-embeddings-ada-and-chatgpt-...

https://github.com/bebrws/openai-search-codebase-and-chat-ab...

Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by visarga on Monday March 20, 2023 @05:37PM (#35239121)
I implemented this idea as well, but for PDF articles from arXiv. It's one application everyone is doing.

Next level is to select your prompt demonstrations based on the user request. Demonstrations too can be chosen by cosine similarity. The more specific they are, the better. You can "train" such a model by adding more demonstrations, especially adding failing cases (corrected) as demos.

Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by ggordonhall on Monday March 20, 2023 @03:59PM (#35237713)
We currently support Go, JS/TS, JSX/TSX, Python, Rust, C#, Java, C/C++
Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by slackware_linux on Monday March 20, 2023 @04:18PM (#35237994)
It would be nice to have this displayed somewhere prominently. I tried adding a lisp project and it sort of just spun around indefinitely until I clicked back.
Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by ggordonhall on Monday March 20, 2023 @04:40PM (#35238364)
Yes I agree! I'll update the README. We'll be adding some more information to our website about how we implement code navigation soon.
Re:Launch HN: Bloop (YC S21) – Code Search with GPT-4 by teaearlgraycold on Monday March 20, 2023 @04:18PM (#35238011)
This is a very competent set of supported languages for a startup. I think it would be stronger marketing to just list them out, and to omit the repetition of JSX/JS, TSX/TS.

If I see "10+ languages" but it's actually 10, no wait, actually 8, then I'm just getting progressively let down.