Live data from Hacker News

Browsing C++ Source Code on the Web

woboq.com

11–17 of 17 posts

Re: Browsing C++ Source Code on the Web

#11
post #7

Looks very similar to Mozilla's DXR: https://wiki.mozilla.org/DXR (DXR also uses Clang as its parsing engine)

DXR needs Python/CGI to run :-) My favorite difference between the Woboq Code Browser and DXR is to have a pure static website generated ahead of time without requiring dynamic code or a database on the HTTP server.

Re: Browsing C++ Source Code on the Web

#12
post #11
post #7

Looks very similar to Mozilla's DXR: https://wiki.mozilla.org/DXR (DXR also uses Clang as its parsing engine)

DXR needs Python/CGI to run :-) My favorite difference between the Woboq Code Browser and DXR is to have a pure static website generated ahead of time without requiring dynamic code or a database on the HTTP server.

Well, thanks for the downvote. I'm administering the server code.woboq.org is running on, so I think I have reasons to like that static HTML fact ;)

Re: Browsing C++ Source Code on the Web

#13
Is there an open-source equivalent of this anywhere? I have seen DXR/LXR but I think they use an "approximate" parser. So it will get confused by functions in different scopes with the same name, and so forth.

This actually uses clang which can do the analysis exactly.

Re: Browsing C++ Source Code on the Web

#14
The PHP project uses OpenGrok for its codebase (although curiously at an address suggesting it uses LXR instead). http://lxr.php.net/ is always the go-to place to read the soure code now, not the Git repo. It's especially useful when tearing through the Zend engine.

Re: Browsing C++ Source Code on the Web

#15
post #12
post #11

Earlier quoted context omitted.

DXR needs Python/CGI to run :-) My favorite difference between the Woboq Code Browser and DXR is to have a pure static website generated ahead of time without requiring dynamic code or a database on the HTTP server.

Well, thanks for the downvote. I'm administering the server code.woboq.org is running on, so I think I have reasons to like that static HTML fact ;)

Sometimes a single downvote is just someone mis-tapping while scrolling on a touchscreen. At any rate, your post is not gray right now.

Re: Browsing C++ Source Code on the Web

#16
post #9
post #4

Very nice, I've been looking for something like this for my own open source project, have even been thinking about developing one myself (also using clang/llvm, to get metrics for visualization, call graphs, usages, data dependencies etc). Current similar systems, as far as I know, are either very limited, or slow, or almost impossible to get to work for other projects than what they're based on. Nice work. I hope th…

DXR is similar, and is open source: https://github.com/mozilla/dxr/tree/testing

I saw DXR when I was searching around, but did not know of the github, and that it is still actively maintained. Thanks!

Re: Browsing C++ Source Code on the Web

#17
post #13

Is there an open-source equivalent of this anywhere? I have seen DXR/LXR but I think they use an "approximate" parser. So it will get confused by functions in different scopes with the same name, and so forth. This actually uses clang which can do the analysis exactly.

I was pleasantly surprised to see that DXR uses clang too, these days: https://github.com/mozilla/dxr/tree/testing/plugins/clang
Post reply on HN