Live data from Hacker News

Sourcegraph now running on an in-browser VS Code

sourcegraph.com

31–40 of 84 posts

Re: Sourcegraph now running on an in-browser VS Code

#32

Syntax highlighting is laughably bad The "int" in "maintained" is highlighted in checkup_test.go as a type

Sourcegraph 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, 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.

Re: Sourcegraph now running on an in-browser VS Code

#33
post #27
post #21

Earlier quoted context omitted.

Looks cool! Mobile experience seems poor: - Weird margins taking up lots of the screen - Back button seems to be disabled (I pressed it about 200x trying to get back to HN and nothing happened) - "view mode" would be nice: don't pop up keyboard for editing when I click on some part of a source file, but still support clicking symbols and offering options e.g. jump to definition.

Thanks for the feedback. We haven't done much mobile-specific work, and Sourcegraph does not work well on mobile. (Unlike most sites, very few people actually use Sourcegraph on mobile, but we want to make a great first impression no matter what.) We will be improving the mobile experience in a few weeks.

mobile is a huge deal for me. continuity is very important for my toolset. i also do over 50% of casual code reading mobile. mobile is also where i have the biggest issue that you solve. on desktop, i don't really need your product, on mobile i desperately do.

Re: Sourcegraph now running on an in-browser VS Code

#34
post #32

Syntax highlighting is laughably bad The "int" in "maintained" is highlighted in checkup_test.go as a type

Sourcegraph 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/b…

I'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.

Re: Sourcegraph now running on an in-browser VS Code

#35
post #33
post #27

Earlier quoted context omitted.

Thanks for the feedback. We haven't done much mobile-specific work, and Sourcegraph does not work well on mobile. (Unlike most sites, very few people actually use Sourcegraph on mobile, but we want to make a great first impression no matter what.) We will be improving the mobile experience in a few weeks.

mobile is a huge deal for me. continuity is very important for my toolset. i also do over 50% of casual code reading mobile. mobile is also where i have the biggest issue that you solve. on desktop, i don't really need your product, on mobile i desperately do.

Got it. I'll email you. I would love to learn more about how you read code on mobile.

Re: Sourcegraph now running on an in-browser VS Code

#36
post #20
post #19

Earlier quoted context omitted.

Installed it, didn't work on https://github.com/rails/rails :( This doesn't work either https://sourcegraph.com/github.com/rails/rails :( Would be great if it worked, I liked the example with Go code.

Sourcegraph CEO here. We don't support Ruby yet, unfortunately. It officially works for Go and Java, and we have alpha/beta support for a couple more languages enabled too (TypeScript and JavaScript). As you can imagine, Ruby code intelligence (type inference, etc.) is super tough, and there are maybe 5-10 people in the world who could build it right now. We'd love to find and sponsor a Ruby expert to add Ruby suppor…

What!? There are libraries available that do static type inference on Ruby. Although the language is rather dynamic, it's in no way an intractable problem, or even one that requires a PhD in Ruby Bullshit.

Here are some libraries that could contain that one-in-a-billion knowledge:

- RDL: type annotation, but also has a static type checker. https://github.com/plum-umd/rdl#static-type-checking

- Typed: gradual typing system, with type inference https://github.com/antoniogarrote/typed.rb

- Jetbrains has something, too: https://github.com/JetBrains/ruby-type-inference

Re: Sourcegraph now running on an in-browser VS Code

#37
post #36
post #20

Earlier quoted context omitted.

Sourcegraph CEO here. We don't support Ruby yet, unfortunately. It officially works for Go and Java, and we have alpha/beta support for a couple more languages enabled too (TypeScript and JavaScript). As you can imagine, Ruby code intelligence (type inference, etc.) is super tough, and there are maybe 5-10 people in the world who could build it right now. We'd love to find and sponsor a Ruby expert to add Ruby suppor…

What!? There are libraries available that do static type inference on Ruby. Although the language is rather dynamic, it's in no way an intractable problem, or even one that requires a PhD in Ruby Bullshit. Here are some libraries that could contain that one-in-a-billion knowledge: - RDL: type annotation, but also has a static type checker. https://github.com/plum-umd/rdl#static-type-checking - Typed: gradual typing s…

Thanks. I am on your side and have been a Ruby fan since 2005. I'm trying to throw money at building better Ruby tooling. :)

I'm familiar with those projects, but when I last tried them, they did not work well enough with some additional constraints that the nature of our product imposes (chiefly requirements for error-tolerance and cross-project resolution), and we weren't able to find people to help us. I will try them again and see if we can sponsor someone now to help integrate when with Sourcegraph, since it looks like quite a bit of progress has been made in the last few months.

Re: Sourcegraph now running on an in-browser VS Code

#38
post #3

Sourcegraph 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 languag…

Looking forward to the Python parser being GA, keep up the good work :)

Re: Sourcegraph now running on an in-browser VS Code

#39
How... 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...

Re: Sourcegraph now running on an in-browser VS Code

#40
post #25

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

Your 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 cla…

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

Post reply on HN