News for hackers. Stuff that matters.
Re:Sourcegraph is no longer Open Source by williamDafoe on Tuesday July 04, 2023 @09:25AM (#36586327)
Never found a startup on the premise that someone else's product will be inadequate forever.

The recent rewrite of github search has probably made sourcegraph irrelevant. If you may recall, original github search used almost the most horrible algorithm possible. It dropped all punctuation and spacing and just searched for identifiers. No patterns allowed, no quoting allowed. One of the only meta-arguments was filename:xyz.

Now that github has improved its basic search functionality, sourcegraph might be doomed.

I used sourcegraph at Lyft which (at the time) had unlimited money to waste on software tools, and installed the open-source version at Databricks but nobody cared.

Re:Sourcegraph is no longer Open Source by ilyt on Tuesday July 04, 2023 @09:32AM (#36586402)
I still regularly download gh repos just to grep them because while less bad it still somehow sucks...
Re:Sourcegraph is no longer Open Source by thunky on Tuesday July 04, 2023 @09:59AM (#36586777)
Me too, but usually after I already have 15 GH tabs open and have wasted a bunch of time.
Re:Sourcegraph is no longer Open Source by ta988 on Tuesday July 04, 2023 @10:30AM (#36587228)
Yep I have a small shell script that caches a repo with only the last commit files and runs ripgrep on it. I'll give a go at live grep that's discusses above, that look exciting.
Re:Sourcegraph is no longer Open Source by woadwarrior01 on Tuesday July 04, 2023 @10:38AM (#36587335)
I’m curious to know, have you tried their dedicated search site? cs.github.com

Their default search still sucks, IMO. But the one I mentioned is comparable to Google’s internal CS.

Re:Sourcegraph is no longer Open Source by hgsgm on Tuesday July 04, 2023 @11:12AM (#36587745)
Why do that have a good search that's not part of the main site?
Re:Sourcegraph is no longer Open Source by ezekg on Tuesday July 04, 2023 @11:16AM (#36587785)
I actually think cs.github.com is now the same as github.com/search. It was in beta for awhile but they recently started redirecting it.
Re:Sourcegraph is no longer Open Source by andrewmcwatters on Tuesday July 04, 2023 @10:46AM (#36587445)
Yeah, even after their rewrite it’s essentially worthless.

In some ways it’s even worse now, because it seems to only build an index of the repository on the first search, when I need a result now.

Re:Sourcegraph is no longer Open Source by el_isma on Tuesday July 04, 2023 @11:42AM (#36588166)
I usually switch the url from github.com/whatever to github.dev/whatever

That will load a web version of VS Code, and you can then use the search from there.

Re:Sourcegraph is no longer Open Source by fortunateregard on Tuesday July 04, 2023 @12:57PM (#36589348)
Yesterday I found out about git-peek (https://github.com/Jarred-Sumner/git-peek). Instead of describing how satisfying it is to use, here is a GIF: https://imgur.com/a/cT8zAha

It uses a temp directory, and deletes it when you close your editor.

Re:Sourcegraph is no longer Open Source by ilyt on Tuesday July 04, 2023 @01:38PM (#36589979)
I just clone it to /tmp, that gets removed on restart.

Having it as button in browser seems cool but also horribly insecure...

Re:Sourcegraph is no longer Open Source by fortunateregard on Tuesday July 04, 2023 @01:50PM (#36590179)
The button on the browser just navigates to the URL `git-peek://https://github.com/name/repo`. How your system handles this git-peek protocol is completely up to you. While the git-peek package does offer to setup a handler for this custom git-peek protocol, I went ahead and set it up manually. Now, my system calls this bash script whenever it encounters the git-peek protocol:

  #!/usr/bin/env bash
  # Expects a single argument: git-peek://<path>
  # Example: git-peek://https://github.com/Jarred-Sumner/peek
  kitty --single-instance --detach -e zsh -c "source ~/.zshrc; git peek $1"
You can set it up to do anything you like.
Re:Sourcegraph is no longer Open Source by progval on Tuesday July 04, 2023 @04:29PM (#36592135)
What happens if you click a link to git-peek://$(cat</etc/passwd) ?
Re:Sourcegraph is no longer Open Source by fortunateregard on Tuesday July 04, 2023 @04:48PM (#36592344)
I'm not sure. What?

Is there a reasonably legitimate reason to stop using this?

Re:Sourcegraph is no longer Open Source by ilyt on Tuesday July 04, 2023 @07:22PM (#36593753)
That's the issue here. You need to be 100% sure handler is entirely bug free or any site can redirect to that url and exploit any bug in it
Re:Sourcegraph is no longer Open Source by mst on Wednesday July 05, 2023 @11:09AM (#36601500)
I tend to clone things I'm just having a quick look around in into ~/tmp - sometimes I'm intending to spelunk through the history so I don't fancy having that much data sat on a tmpfs and "running rm -rf ~/tmp/* when I notice it's getting a bit on the large size" is minimal enough effort that it's worth it for having control over when things disappear.
Re:Sourcegraph is no longer Open Source by dimator on Tuesday July 04, 2023 @03:12PM (#36591320)
I use grep.app instead, for open source projects. Many projects are indexed.
Re:Sourcegraph is no longer Open Source by robryan on Tuesday July 04, 2023 @06:07PM (#36593135)
It seems great across an org now. I can quickly answer the question of is anyone using something across 1000 repos.
Re:Sourcegraph is no longer Open Source by __float on Tuesday July 04, 2023 @11:03AM (#36587618)
Is there still an "enterprise" niche that doesn't use GitHub's cloud version? (Or GitLab, etc.)

My understanding is that GitHub's on premises version doesn't have any plans to include the new code search functionality.

Re:Sourcegraph is no longer Open Source by lopkeny12ko on Tuesday July 04, 2023 @11:08AM (#36587682)
> The recent rewrite of github search has probably made sourcegraph irrelevant.

It only makes it irrelevamt if all your code is hosted on Github.

I'm quite tired of Github-proprietary solutions being hailed as the "industry norm." Or vendors like shipping products and integrations that only work with Github. Git is a decentralized protocol; please treat it like one.

Re:Sourcegraph is no longer Open Source by hgsgm on Tuesday July 04, 2023 @11:12AM (#36587734)
The problem is that "people who don't want to pay to outsource things" isn't a lucrative market of providers of outsource services..
Re:Sourcegraph is no longer Open Source by sbussard on Tuesday July 04, 2023 @11:42AM (#36588168)
I strongly agree with this sentiment, whether applied to github, AWS, or any other popular platform. The industry should avoid single points of failure.
Re:Sourcegraph is no longer Open Source by swyx on Tuesday July 04, 2023 @02:55PM (#36591104)
(typed on Hacker News, on an Apple Mac, probably on Google Chrome)
Re:Sourcegraph is no longer Open Source by thewarpaint on Tuesday July 04, 2023 @08:08PM (#36594101)
Care to elaborate how the choice of a person’s equipment and browser relates to GitHub constituting a single point of failure for the industry as the prevalent Git hosting tool?
Re:Sourcegraph is no longer Open Source by rmbyrro on Tuesday July 04, 2023 @10:07PM (#36594777)
In my opinion (you may differ), Apple and Google are notorious for locking their users onto their proprietary platforms to milk as much money as they can, no matter at what cost.

So complaining about Github proprietary tools and at the same time supporting Apple and Google for doing the same is a bit contradictory. Should be using an open OS and browser.

Re:Sourcegraph is no longer Open Source by thewarpaint on Tuesday July 04, 2023 @10:44PM (#36594974)
Again, the original thread said “The industry should avoid single points of failure”. Neither Apple (Mac) nor Google (Chrome) represent single points of failure for the industry.
Re:Sourcegraph is no longer Open Source by rmbyrro on Wednesday July 05, 2023 @08:00AM (#36599135)
It depends on the angle you look.

From a software eng infra standpoint, in general, ok. But we can look elsewhere.

In the mobile space, for example, it's hard to deny iOS & Android, Appstore & Google Play.

In terms of privacy, the internet is a complete failure with Chrome, Google Analytics, etc.

A large chunk of the most relevant software businesses go to the extent of mandating developers to use Apple products. I experienced this myself, when I wasn't allowed to use a PC running Linux for "security reasons". Like if Apple OS is safer than Arch. That's a big point of failure, in my opinion...

Re:Sourcegraph is no longer Open Source by me551ah on Tuesday July 04, 2023 @11:36AM (#36588081)
I don’t think GitHub search will replace source graph.

1. GitHub isn’t free, especially for large private organisations 2. Source graph has much better search functions compared to GitHub

Re:Sourcegraph is no longer Open Source by prepend on Tuesday July 04, 2023 @02:48PM (#36591034)
It’s free for open source.

For large private organizations they are paying already so more likely to use built in search than buying a new product.