4 ms·
Show HN: Online C/C++ Code Browser
- tlrobinson 11y agoI don't know if it's my relative unfamiliarity with C++ or those syntax highlighting colors but I find that code incredibly hard to parse quickly.
- aurhum 11y agoDifferent themes are available depending on your taste. Just pick one from the style combo box at the top right.
- hvs 11y agoC++ is definitely a language you need to spend some time with before you can visually parse it quickly. C++11 also allows you to trim down the verbosity with things like "auto".
- jlarocco 11y agoI suspect they wanted to show off features, so they crammed as much code as possible into the smallest area possible and stripped out the white space. IMO it'd be pretty nice with decent white space.
- GFK_of_xmaspast 11y agoIt would still be pretty gross, especially with all those variable declarations/assignments inside conditionals.
- jlarocco 11y agoOh, yeah, I wasn't trying to nitpick the overall code quality. I just meant using white space would be more readable for demonstrating the code browsing capability.
- slazaro 11y agoThere's a lot of whitespace removed, but also IMO they used way too many colors. Once you highlight everything, you're highlighting nothing.
- ogoffart 11y agoThe color theme is based on KDevelop's theme, which happen to be my favorite IDE. I find color really helpfull while reading code since they each have a different to which you quickly get used. But there are other themes that one can choose.
- personjerry 11y agoIMO having variables be different colors is a little distracting.
- guruz 11y agoThere is a combobox on the top right to change the theme. The other two themes don't have this feature. Try it for example here: https://code.woboq.org/llvm/clang/lib/AST/Expr.cpp.html#3537 https://code.woboq.org/llvm/clang/lib/AST/Expr.cpp.html#3537
- alschwalm 11y agoAwesome work! I've actually been making something in a similar vein myself, but it's not nearly this polished. One issue (I'm not sure how it could be fixed) is that sections of code that were disabled by the preprocessor are not highlighted at all. For example, the compiler (or flags) used when parsing the boost code did not support move semantics, so "BOOST_NO_CXX11_RVALUE_REFERENCES" was defined, which means this line is not parsed: https://code.woboq.org/boost/boost/boost/any.hpp.html#69 https://code.woboq.org/boost/boost/boost/any.hpp.html#69 But this is a minor thing, and I'm not sure there's really a solution.
- guruz 11y agoThanks everyone for the upvotes :) Right now we're wondering how to make a bit of money out of this. Do you have any hints or recommendations? (consulting/contract work is the main income for the company currently) Current license and price: https://woboq.com/codebrowser.html#license https://woboq.com/codebrowser.html#license
- Ono-Sendai 11y agoMaybe you could combine it with static analysis or code coverage output?
- quadrature 11y agoI would love for this to be baked in with repo hosting, it would make reviewing PRs easier. Also ruby/python support would be awesome, although a huge can of worms.
- Jyaif 11y agoI've been wanting a service like that for a long time. Here's what I would have thought of doing if I were you: Step 1: Copy github, but with features people want. Step 2: Online IDE for the projects (with distributed compilation/testing). Step 3: Market place where people can hire programmers on demand to work on their project.
- sdesol 11y ago> Step 1: Copy github, but with features people want. I hope you are not suggesting they implement a new Git hosting product, because that would be an extreme waste of time/money. Implementing the hosting logic/UI would probably chew up a year or two of development time. I don't know how long sourcegraph has been in development but this is what they are doing. The smart thing to do in my mind is just build on top of Gogs/GitLab/Bitbucket/GitHub. You may want to focus mainly on Gogs/GitLab/Bitbucket instead though. And the reason why I say this is because I think the vast majority of GitHub/GitHub Enterprise customers are script related shops that develop in JavaScript, Ruby, etc. > Step 3: Market place where people can hire programmers on demand to work on their project. Unless you can draw an audience (millions of users) like GitHub/Stackoverflow, I wouldn't even ponder this. What I really think is a smart play is https://www.starfighters.io/ https://www.starfighters.io/ which doesn't require millions of eyeballs. They just need to continually attract really bright university kids/seasoned programmers for this to be viable. This is definitely not monster.com, but if it works out, they are looking at a very comfortable lifestyle business.