8 ms·
Sourcegraph now running on an in-browser VS Code
- fortytw2 9y agomain/out/vs sure looks like vscode artifacts, not just monaco set up all nice with a fileviewer/split panes Super awesome to see vscode running outside electron - http://imgur.com/L6ipQgb http://imgur.com/L6ipQgb - https://github.com/Microsoft/monaco-editor https://github.com/Microsoft/monaco-editor
- sqs 9y agoSourcegraph CEO here. Indeed, this is based on the full version of VS Code, with heavy customizations and a new scalable language server backend for code intelligence. Huge thanks to the VSCode team for making an awesome editor core. We will have a technical blog post with more details soon. :)
- MetalMatze 9y agoLooks really awesome I have to say. I use Sourcegraph on a daily basis and this is a welcome improvement. Looks way more organized and better to grasp at first sight. Good job!
- sqs 9y agoThanks for the nice feedback! Our team is pumped to hear this. Keep the feedback coming, especially the things you don't like. :)
- sqs 9y agoSourcegraph CEO here. Thanks for posting! Our new VS Code-based UI makes Sourcegraph a better way for you to read a codebase on the web with the full power and intelligence of an editor, without the hassle of cloning or configuration. It provides jump-to-def, hovers, find references, advanced search, symbol search, cross-repo references, etc., for any repo and any commit on GitHub (in Go, Java, and some other languages...more coming soon). If you find yourself reading code on GitHub a lot, or cloning repos to open and read in your editor, you'll find Sourcegraph useful. If not, then you probably won't find it useful yet, but you might like our Chrome extension, which adds these features inline on GitHub.com (https://chrome.google.com/webstore/detail/sourcegraph-for-github/dgjhfomjieaadpoljlnidmbgkdffpack?hl=en https://chrome.google.com/webstore/detail/sourcegraph-for-gi...). We'd love feedback. Try hovering over some tokens at https://sourcegraph.com/github.com/sourcegraph/checkup@master/-/blob/checkup.go#L169:26 https://sourcegraph.com/github.com/sourcegraph/checkup@maste..., for example. Click on the smiley in the bottom right to give feedback. Huge thanks to the VS Code team for building an amazing and extensible open-source code editor that we can build on.
- donpark 9y agoopening a file takes too long, likely due to minimap. I'd disable expensive eye-candies by default.
- sqs 9y agoSorry about that. We do need to improve the UI perf. Can you try it with the minimap off and let me know if it's faster? There is a "secret" way to disable the minimap: (1) hit Cmd-Shift-P or F1, (2) go to "Preferences: Open User Settings", (3) search for the "editor.minimap.enabled" setting, (4) hover over it and press the pencil and select "false". Then go back to the file and it should not display anymore in your current browser.
- michaelmior 9y agoCtrl-P for me on Windows just opens the print dialog.
- sqs 9y agoWhoops, F1 or or Ctrl+E on Windows. Just updated the post above.
- michaelmior 9y agoThanks! Ctrl+E didn't work for me, but F1 does :)
- donpark 9y agoMission accomplished. Much faster without minimap enabled. :-)
- dorianm 9y agoInstalled it, didn't work on https://github.com/rails/rails https://github.com/rails/rails :( This doesn't work either https://sourcegraph.com/github.com/rails/rails https://sourcegraph.com/github.com/rails/rails :( Would be great if it worked, I liked the example with Go code.
- lacampbell 9y agoCan someone put this in some context for me? It's an IDE as a service, or what?
- sqs 9y agoSourcegraph CEO here. It is for reading code. It gives you the full power of an editor (jump-to-def, hovers, find references, advanced search, symbol search, cross-repo references, etc.) for any repo at any commit on GitHub. It supports Go and Java right now, with some more languages in beta. If you find yourself reading code on GitHub a lot, or cloning repos to open and read in your editor, you'll find it useful. If not, then you probably won't find it useful, but you might like our Chrome extension, which adds these features inline on GitHub.com (https://chrome.google.com/webstore/detail/sourcegraph-for-github/dgjhfomjieaadpoljlnidmbgkdffpack?hl=en https://chrome.google.com/webstore/detail/sourcegraph-for-gi...).
- sydd 9y agoLook really nice. What other languages are in beta? Any plans for python or JS support?
- sqs 9y agoThanks! The next languages will be TypeScript, JavaScript, Swift, and Python. You'll see some TS and JS support in the Chrome extension already. If you want to shoot me an email at sqs@sourcegraph.com, I'll make sure you hear about it when Python and JS support is released more widely.
- robzyb 9y agoThis is really cool. I might need to build a IDE soon, and I briefly looked at using VS Code for a base, but determined that it was a bit of overkill for my purposes. Out of curiosity, what was Sourcegraph running prior to this in-browser VS Code?
- sqs 9y ago
- deleted 9y ago[deleted]
- peterwaller 9y agoI just see a black screen. Icon in top left, no text other than "Login" and "Sign up". Chrome 58, Linux. No errors in the dev console.
- sqs 9y agoSourcegraph CEO here. We're on it. We are seeing significantly increased load times for some users due to a bottleneck in our serving of Git data. Sorry about the issues...will be fixed asap. Edit: Fixed. Thanks!
- atrudeau 9y agoOn a related note, is there any project targeting Vscode in a web browser? I would love to ditch tmux/Vim and move to remote vscode in browser. Currently I use vnc but perf is terrible.
- thousandx 9y agocheck out GHEdit https://github.com/spiffcode/ghedit https://github.com/spiffcode/ghedit
- fgblanch 9y agoMe too i would be super interested in having a cloud hosted version of vscode!
- Candles123 9y agoHi, sorry I wanted to reply to your comment on "ffffound.com closing" but it's archived I think. Do you know how ffffounds recommendation algorithm was working? Was it the most recent 10 people who liked it, or the first 10?
- floatboth 9y agoThat's nice! However it'd be more awesome if there was a local version, not tied to GitHub but instead like. you run the node part of VSCode in a development VM and access the UI from a web browser on the host machine.
- just_testing 9y agoJust dropping by to thank you guys. This extension will be amazingly useful to me. One question for the good fellas at Sourcegraph: Is it possible to run that extension in firefox? Did you try something like that? Is the code open, so I could give it a go?
- sqs 9y agoSourcegraph CEO here. We have a Firefox extension at https://addons.mozilla.org/en-US/firefox/addon/sourcegraph-addon-for-github/ https://addons.mozilla.org/en-US/firefox/addon/sourcegraph-a..., but it does not have quite as many features as the Chrome one. I agree we should open-source the browser extension code, though. I would like us to do that soon. Can you send me a quick email at sqs@sourcegraph.com so I can tell you when it's open source?
- floatboth 9y agoIt says "Compatible with Firefox 57+" so I assume it's based on the same code as the Chrome one… What APIs do you use that are not supported in Firefox? :) (Also it says "Released under MIT/X11 License" already…)
- sqs 9y agoWe're a small team and we don't yet update the Firefox extension as frequently (it is still a manual process, whereas we've automated the deployment of our Chrome extension). That's all. Regarding the licensing, I meant that we'll release the build scripts and supporting libraries used to build it, not just the final bundle.
- sdesol 9y ago@sqs Since you are posting in here, I figure I would ask. Are there plans to provide an API for Sourcegraph in the near future? My product is more focused on code history discovery and I was thinking it would be nice to be able to quickly transition into Sourcegraph for code browsing and search/analysis. The discovery workflow would go something like this: https://gitsense.com/media/source-graph-integration.mp4 https://gitsense.com/media/source-graph-integration.mp4 For the API, it would nice to be able to just query Sourcegraph to see if the tree for that commit has been indexed and is searchable.
- zeusk 9y agoThis is definitely not a documented "API" but if you want to take the user to sourcegraph for a specific repo/file:line@commit then the url (currently) is: sourcegraph.com/[repo]@[commit]/-/blob/[path/file]#L[line] afaik repo must be on github.com (iirc bitbucket and GCP support was in the works) and commit can be either an absolute commit hash or a relative one like a branch name. ie. https://sourcegraph.com/github.com/gorilla/mux@master/-/blob/context_gorilla_test.go#L7:11 https://sourcegraph.com/github.com/gorilla/mux@master/-/blob...
- sqs 9y agoWe do have an API available to customers running Sourcegraph internally. We plan to open it up to users of Sourcegraph.com in the future, but I don't have a date for that. In the meantime, URLs like the following will stay around forever: https://sourcegraph.com/REPO@GITREV/-/blob/DIR/FILE#L123 https://sourcegraph.com/REPO@GITREV/-/blob/DIR/FILE#L123 And there is no indexing step required (except for the initial clone), so you don't need to query for that. Sourcegraph's code analysis is realtime. Feel free to email if you want more info! sqs@sourcegraph.com
- look_lookatme 9y agoI converted to JetBrains products for a few different reasons, but one of the biggest was jump to definition that _just works_ across all language products. I suppose I could be made to consider something like this if it supported a number of other languages.
- Macha 9y agoYour experience is greatly different to mine in webstorm. Better, sure, but I get about a 60% success rate. This was a vast improvement on basically anything else but it isn't _just works_. Might be a pathological case however, the primary js project I work on is composed of about 12 modules, uses ES5 and Angular 1, except the build tooling which is ES6, has bower and npm dependencies, and has at times used every class/object pattern under the sun.
- derimagia 9y agoJavascript is a tricky language to do this, most libraries don't have types or JSDocs which is somewhat an issue so they need to be way less strict on what's auto-completed/interpreted. I don't see this as a fault in Jetbrains here. I say that wishing it would do more, but understanding it's probably at it's limits. Try IntelliJ with plugins for Ruby, Python, PHP, NodeJS, Go, Rust - I agree that for the most part it just "works". Although you can "feel" it's Java engine sometimes.
- fiatjaf 9y agoIf you're interested in Sourcegraph for reading code on GitHub you may be interested in this Chrome Extension I wrote that is in the same domain, although much less powerful: http://fiatjaf.alhur.es/module-linker/ http://fiatjaf.alhur.es/module-linker/ (on the plus side my tool is very lean and fast and supports a ton of languages.)
- dmitrygr 9y agoSyntax highlighting is laughably bad The "int" in "maintained" is highlighted in checkup_test.go as a type
- sqs 9y agoSourcegraph CEO here. There are indeed some glitches in syntax highlighting, on other languages as well. I hope it doesn't significantly detract from the product value, but I understand it is not good. Here's why it's happening: We're using TextMate syntax bundles, which require the Oniguruma regexp engine, which only has partial pure-JavaScript implementations that can run in the browser. We use https://github.com/bcoe/onigurumajs https://github.com/bcoe/onigurumajs, which is great. We think something in this stack is producing different results than using C-based Oniguruma, and we'll work on it. The good news is that we'll open-source whatever improvements we do make, so other folks building web-based syntax highlighting components will benefit.
- BenjaminCoe 9y agoI've been summoned :p We use Atom's syntax highlighter for syntax highlighting on npmjs.com -- I originally wrote onigurumajs, because I was seeing if we could viably remove the website's only compiled dependency (oniguruma) ... I wrote it over vacation, and then had to put the work down. I would love help to see the library over the finish line; on a grammar by grammar basis it would be great to figure out what the JavaScript regex engine is missing, and try to shim the logic. why??? The great thing about using oniguruma, is that it lets you leverage the huge collection of grammars available for TextMate -- unfortunately JavaScript's regex engine doesn't support quite a few rules that are present in TextMate grammars.
- headmelted 9y agoOniguruma was a big roadblock for me on Chromebooks too. Ideally, I'd have liked to have a version of VS Code that could be released to the Chrome Web Store, but regex is so labyrinthine in its edge cases that dropping in any other implementation was just inciting hatred from the editor. Ultimately I looked at cross-compiling Oniguruma to WebAssembly to see how far I could get with this, and if that didn't work, NaCl. I didn't get too far down this road as it was taking me away from the core goal of the project, and there's one of me.
- colemickens 9y agoHow... how is one meant to specify a repo? If I type "colemickens" it lists my repos. But I have... a lot of them. "colemickens/repo-name" doesn't work. Nor does any other form I've tried. edit: maybe it's a paging issue and the "repo-name" I was trying wasn't on the first page of my repos? Unclear...
- technickcal 9y agoWhere are you searching from? If you click "Go to repository" on the top left of the home page you should be able to find a specific repo by typing "colemickens/repo-name". If you don't see a repo that you know you have, then it might not yet be cloned on soucegraph.com because we clone repos lazily (try navigating directly to https://sourcegraph.com/github.com/colemickens/repo-name https://sourcegraph.com/github.com/colemickens/repo-name to trigger us to clone it).
- headmelted 9y agoI have to say I'm really impressed by what you guys have achieved here. I've been working for a while on different solutions to bring Visual Studio Code to more devices, among them Chromebooks (for which an in-browser editor would be ideal) - I'd be interested in seeing the writeup on this for sure. What you have currently is quite similar to Azure's App Service Editor: http://developingdane.com/content/images/2016/10/app_service_editor.jpg http://developingdane.com/content/images/2016/10/app_service... It's a versatile system, so it's good to see it getting more attention in the open. What's the story on things like extensions and a terminal? Have you plans to expand to there?
- mejamiewilson 9y agoSourcegraph Director of Product here: We're interested in extensions as a way for our users to extend our platform, you never know how creative developers are until they can hack your product! Do you have ideas in mind for extensions you'd like to build/use? In relation to the terminal, do you have anything in mind you'd like to use it for?
- SunboX 9y agoI used Cloud9 IDE [1] and ShiftEdit [2] a lot in history. Both are Working very well. [1] https://c9.io/ https://c9.io/ [2] https://shiftedit.net/ https://shiftedit.net/
- endentru 9y agoAnyone have any suggestions for a map view extension for VS Code? I like how it looks in sourcegraph, wouldn't mind having it locally but haven't been able to find one.
- tinus_hn 9y agoThis looks very pretty and I am once again amazed by what can be done in the browser. I don't understand how this is going to make money though. What is the montization strategy?
- Sean1708 9y agoAm I being stupid here? There's no information on this website about what it is. I take it from sqs's that it's some kind of code viewer for Github projects, but I shouldn't need to come to HN to find that information out. Edit: I was being stupid, the home page just didn't load the first couple of times I tried.
- ex3ndr 9y agoAre you starting new language server instance for each project? Isn't it not-scalable?
- ippa 9y agoGreat work! Any plans to get keyboard-shortcuts (or something similar) working? I use them heavily in vscode.
- sqs 9y agoSourcegraph CEO here. There are a ton of keyboard shortcuts, and they (mostly) match VS Code's default ones. To see them all, hit Shift+Cmd+P (or Shift+Ctrl+P), and go to 'Preferences: Open Keyboard Shortcuts'. Here are some of the key (no pun intended) ones: Opt+S: Open QuickOpen (omni-search: searches files, workspace symbols, and repos) - Cmd-P and F1 also work Opt+R: Go to repository Opt+X: Run command (e.g., 'Open User Settings') Opt+D: Go to symbol in workspace Shift+Opt+D: Go to symbol in file
- mr-kobayashi 9y agoi don't mean any ill intent about this comment, however that said. i worked something similar, and i strongly feel the direction that SourceGraph is heading in is the correct one. developing in the browser, especially at large organisations is a huge productivity benefit in addition to cost benefit etc. the pros are endless. just let your mind wonder. intro ----- the one i worked on, alongside Sourcegraph is available at: live: https://cloud.bana.io/monaco-go/ https://cloud.bana.io/monaco-go/ repo: https://github.com/mbana/monaco-go https://github.com/mbana/monaco-go the backend was adjusted somewhat to support a WebSocket connection, besides that, the code was almost written entirely by the folks over at Sourcegraph. please note i do not have funds to pay for the Azure cloud so it might be down, or seem very slow. i would love to resume development on this seeing as i work at large organisation and i see the huge potentional. implementation -------------- in my opinion, i think the approach taken in my implementation might be better. there was hardly any custom code aside from stubbing code out to make VScode, or rather, monaco-editor run in the browser. i will stress, i can and want to continue finishing this and having it land in monaco-editor master but my current job doesn't allow it. if anyone wants to join me, please do say.