Live data from Hacker News

Srclib: A polyglot code analysis library

srclib.org

21–30 of 34 posts

Re: Srclib: A polyglot code analysis library

#21
post #11

Wow, this looks like an awesome project. As a pretty fanatic Emacs user who doesn't much like IDEs, I've always wanted a nice editor-agnostic IDE ecosystem that I could just plug into Emacs. I've seen language-specific things, which are great but naturally linked to their language, and Emacs-specific monstrosities like CEDET, but never anything trying to be truly universal. Very promising. For some reason though, I c…

Thanks for the kind words! Please send feedback/complaints.

Re: the name "srclib", I was on the phone with our domain registrar when we got srclib.org/com, and the rep referred to it as "Sr. Clib" (as in "Señor Clib"). So that's stuck in our heads now. :)

Re: Srclib: A polyglot code analysis library

#22
post #17
post #15

related work: https://github.com/facebook/pfff which focused on languages srclib didn't. Also a polyglot source analysis library.

Yeah, pfff seems very cool. It seems that pfff has written parsers and type inferencers for a variety of languages in OCaml. That is an impressive achievement. For srclib, we are way lazier. We try to use existing libraries (written in the languages they target) for parsing, type checking/inference, dependency resolution, etc. We hope that makes it easier for JavaScript hackers to hack on srclib's JavaScript support,…

Yes, lately I've also tried to reuse existing "parsers" ... for instance I now use existing libraries for the java bytecode, ocaml typed AST (.cmt) and clang ASTs.

Re: Srclib: A polyglot code analysis library

#23
post #2

Thanks for posting this! I'm one of the original creators. It's still alpha, so there will be bugs. But it can do some pretty cool and useful stuff already in your editor (and it powers https://sourcegraph.com/ ). Anyone have feedback about how we're explaining the problem and solution, and the first-run experience of using the editor plugins and the "src" tool? We would LOVE to hear it so we can fix/improve it.

Looks really awesome! Love the Github and Sublime plugins. Unfortunately I can't try it out as there doesn't seem to be a Windows version. Any plans for one?

We would love to have Windows support in srclib, but we honestly have no idea what (or how much effort) it would take. It might work in Cygwin as-is. If you or anybody else wants to try it, or at least identify issues, we would help.

One related thing is a lot of folks want to add C# support. I assume that running Roslyn requires Windows, which'd require Windows support for srclib. https://github.com/sourcegraph/sourcegraph.com/issues/157

Re: Srclib: A polyglot code analysis library

#24
post #23

Earlier quoted context omitted.

Looks really awesome! Love the Github and Sublime plugins. Unfortunately I can't try it out as there doesn't seem to be a Windows version. Any plans for one?

We would love to have Windows support in srclib, but we honestly have no idea what (or how much effort) it would take. It might work in Cygwin as-is. If you or anybody else wants to try it, or at least identify issues, we would help. One related thing is a lot of folks want to add C# support. I assume that running Roslyn requires Windows, which'd require Windows support for srclib. https://github.com/sourcegraph/sour…

Actually, Roslyn targets Mono as a first-class citizen, so it'll run on any Mono-supported platform :)

Not sure how much progress they've made on that yet though as it's not release ready.

Re: Srclib: A polyglot code analysis library

#25
post #23

Earlier quoted context omitted.

We would love to have Windows support in srclib, but we honestly have no idea what (or how much effort) it would take. It might work in Cygwin as-is. If you or anybody else wants to try it, or at least identify issues, we would help. One related thing is a lot of folks want to add C# support. I assume that running Roslyn requires Windows, which'd require Windows support for srclib. https://github.com/sourcegraph/sour…

Actually, Roslyn targets Mono as a first-class citizen, so it'll run on any Mono-supported platform :) Not sure how much progress they've made on that yet though as it's not release ready.

Oh, that is fantastic!

Re: Srclib: A polyglot code analysis library

#27
A couple of points on the website, https://srclib.org/

1. Can't find an actual Download link, even in the section called "Try it now". Oh - turns out the download links are under "Docs", which is kinda strange.

2. Downloaded for Linux. Unzipped, ran, got

    $ ./src --help
    bash: ./src: cannot execute binary file
I wonder if the links are correct, as all three download links on the Docs page (https://srclib.org/gettingstarted/) include the phrase "...?os=darwin&..."

Re: Srclib: A polyglot code analysis library

#28
post #27

A couple of points on the website, https://srclib.org/ 1. Can't find an actual Download link, even in the section called "Try it now". Oh - turns out the download links are under "Docs", which is kinda strange. 2. Downloaded for Linux. Unzipped, ran, got $ ./src --help bash: ./src: cannot execute binary file I wonder if the links are correct, as all three download links on the Docs page ( https://srclib.org/gettingst…

Thanks for posting this.

Just fixed the download links.

What do you think of the new installation section on the homepage, at https://srclib.org/#install?

Re: Srclib: A polyglot code analysis library

#29
post #12

IIRC IntelliJ does some things like this: 1. It's a polyglot IDE and open-source. 2. Specialized tools for exporting to multiple languages/DSLs.

I wasn't able to find the source code for some of IntelliJ's dynamic language support, like Python and Ruby. If it is indeed open source, I would love to check it out. IntelliJ is awesome. We're just trying to make something that isn't coupled to a specific editor and is super non-monolithic. Our goal is for you to be able to run a single command ("src") in a directory, or have your editor plugin (or other kind of to…

That's a potentially very useful project, thanks so much for working on this!

Re: Srclib: A polyglot code analysis library

#30
post #23

Earlier quoted context omitted.

Looks really awesome! Love the Github and Sublime plugins. Unfortunately I can't try it out as there doesn't seem to be a Windows version. Any plans for one?

We would love to have Windows support in srclib, but we honestly have no idea what (or how much effort) it would take. It might work in Cygwin as-is. If you or anybody else wants to try it, or at least identify issues, we would help. One related thing is a lot of folks want to add C# support. I assume that running Roslyn requires Windows, which'd require Windows support for srclib. https://github.com/sourcegraph/sour…

From a quick try, getting it to build from source on Windows requires a minor modifications to task2/logger.go to remove the dependency on syslog and that's about it. But then src.exe toolchain -install-std fails on symlink creation via ln -s C\sourcegraph.com\sourcegraph\srclib-go C\sourcegraph.com\sourcegraph\srclib-go (looks odd btw). No stack trace to chase down to replace that with mklink, but it shouldn't be to hard to trace down.
Post reply on HN