Show HN: Search code in GitHub repos using regular expressions
151–160 of 165 posts
Re: Show HN: Search code in GitHub repos using regular expressions
#152Earlier quoted context omitted.
If OP's goal was to get a job at Github, I'd say this was very well played.
It would certainly be an expensive play. When he mentioned a 20 core system, I'm assuming it is some VM system, since I don't know of any 20 core CPUs. I'm guessing he is using DigitalOcean and he has two of them, so he is looking at $1000 a month in hosting cost.
My own side project uses a server with 20 cores (2x E5-2690v2 CPUs), with 256GB RAM and a 2TB SSD. This is a dedicated server I rented from tier.net in Texas, after seeing it listed on webhostingtalk [1]. It costs about $160/mo, and that's recently fallen further by paying for 3 months up front.
Re: Show HN: Search code in GitHub repos using regular expressions
#153Re: Show HN: Search code in GitHub repos using regular expressions
#154Backend for codegrep was Play framework + Elasticsearch and you could search by programming languages.
Screenshot: http://archive.is/0mFML
Re: Show HN: Search code in GitHub repos using regular expressions
#155Earlier quoted context omitted.
pattern is, btw: (teakettle\w|abcd) Either pattern in alternation works fine, but even a simple alternation of the two goes back to the behavior that you might expect to get from awful patterns like \d..\d..\w...\s...\d (i.e. reporting only a partial set of matches).
Did you mean either patter in "isolation"?
Re: Show HN: Search code in GitHub repos using regular expressions
#156Re: Show HN: Search code in GitHub repos using regular expressions
#157Re: Show HN: Search code in GitHub repos using regular expressions
#158I still miss Google Code Search, which was a great way to find examples of anything I wanted to learn about in programming and usually answered my questions better than anything else, including Stack Overflow. Has it really been 8 years... https://news.ycombinator.com/item?id=3112029 If this tool can fill that hole in my world, I'll be stoked. I've bookmarked it.
Re: Show HN: Search code in GitHub repos using regular expressions
#159I still miss Google Code Search, which was a great way to find examples of anything I wanted to learn about in programming and usually answered my questions better than anything else, including Stack Overflow. Has it really been 8 years... https://news.ycombinator.com/item?id=3112029 If this tool can fill that hole in my world, I'll be stoked. I've bookmarked it.
Google code search still exists as long as you want to search Chromium source code. [1]: https://cs.chromium.org/
It also keeps track of back references, so you can search "who calls any function in this file", which is very hard to do with any other search system.
Major disadvantages are it only indexes one build config, so if you're debugging android code in a multi-platform project and the indexing was done on the windows version, you won't find much (apart from dumb text based search which it does in addition).
The difficulty of compiling every project to build a decent index would make this approach hard on a GitHub scale - all it takes is one missing header file from a dependency not in the repo and the build fails and the whole project can't be indexed. Also, have fun with things like JavaScript which are so dynamic you have to solve the halting problem to know which bit of code calls which other.
Re: Show HN: Search code in GitHub repos using regular expressions
#160Something I found when testing the regexp: the highlights seem to be off sometimes. When grepping for '' (sorry, just the first thing that came to mind to try out the regexp), the second highlight in the first result seems to be in the wrong location:
https://grep.app/search?q=%3C.%2A%3F%40gmail.com%3E®exp=t...