Why regex still exists? It is unintuitive, requires mastering an obscure syntax, it is very hard to debug, and very difficult to explain to others how it works. It feels like we are trying to write intermediate code by ourselves, while we should have a human readable language that generates regex.
Show HN: Search code in GitHub repos using regular expressions
111–120 of 165 posts
Re: Show HN: Search code in GitHub repos using regular expressions
#112Earlier quoted context omitted.
Sure you built app on multi 20 core machines with functionality to search hundreds of millions of lines of code almost instantaneously, but are you someone I'd drink a beer with?
This snide remark dismisses the fact that working on software does mean working with other humans, not just unemotional robots devoid of any kind of irrational ideas. Being able to “drink a beer with” (and reasonably substituting the drinking of beer for just about any other social interaction) is an important part of being able to work with someone. Unless of course you believe an office environment consisting of a…
Give me someone who is talented who makes great code so I can be home at 4:30pm and I don't care what their personality is like. Additionally someone who tells me when something is an issue even at my ego's expense is extremely valuable, over back patters and schmoozers who just want to keep everyone happy. That leads to a terrible product. I would not like to see whatever product you're working on is like.
You all should take a long look at yourselves and ask why you have to work with people who are just like you instead of being adaptive to other walks of life, personality, and backgrounds. Try getting out of yourselves for a minute. You might even learn something now outside of your own tiny tiny worlds!
Re: Show HN: Search code in GitHub repos using regular expressions
#113Earlier quoted context omitted.
This snide remark dismisses the fact that working on software does mean working with other humans, not just unemotional robots devoid of any kind of irrational ideas. Being able to “drink a beer with” (and reasonably substituting the drinking of beer for just about any other social interaction) is an important part of being able to work with someone. Unless of course you believe an office environment consisting of a…
100%. I don't really care if you're a super genius if you're also a massive dick that everybody hates.
If they get me out of work at 4:30 pm and keep the project I'm working on in quality code so I have less fires to deal with, that's good enough for me.
Re: Show HN: Search code in GitHub repos using regular expressions
#114Earlier quoted context omitted.
This snide remark dismisses the fact that working on software does mean working with other humans, not just unemotional robots devoid of any kind of irrational ideas. Being able to “drink a beer with” (and reasonably substituting the drinking of beer for just about any other social interaction) is an important part of being able to work with someone. Unless of course you believe an office environment consisting of a…
It's an ego thing to want to work with someone just like you instead of adapting yourself to others. It's basically bro culture. It's kind of what's wrong with technology culture. Give me someone who is talented who makes great code so I can be home at 4:30pm and I don't care what their personality is like. Additionally someone who tells me when something is an issue even at my ego's expense is extremely valuable, ov…
I mean, if one person who rejects bro culture only wants to collaborate with other people who also reject bro culture, does that mean they are now proponents of bro culture?
I also find it frankly a bit weird for you to make grand sweeping assumptions about who some strangers on an Internet forum choose to associate and collaborate with. How do you know people here don’t work with people from other backgrounds?
Re: Show HN: Search code in GitHub repos using regular expressions
#115Earlier quoted context omitted.
It's an ego thing to want to work with someone just like you instead of adapting yourself to others. It's basically bro culture. It's kind of what's wrong with technology culture. Give me someone who is talented who makes great code so I can be home at 4:30pm and I don't care what their personality is like. Additionally someone who tells me when something is an issue even at my ego's expense is extremely valuable, ov…
That’s a pretty unfortunate interpretation of my comment, and not entirely logically consistent either. I mean, if one person who rejects bro culture only wants to collaborate with other people who also reject bro culture, does that mean they are now proponents of bro culture? I also find it frankly a bit weird for you to make grand sweeping assumptions about who some strangers on an Internet forum choose to associat…
And not a single thing you just said makes any logical sense.
I do know I would never want to work on any project that you're in charge of because I guarantee they're nightmare environments.
Best of luck to you nonetheless.
Re: Show HN: Search code in GitHub repos using regular expressions
#116I wonder how this compares to Debian Code Search ( https://codesearch.debian.net/about ) and Russ Cox’s code search tools ( https://swtch.com/~rsc/regexp/regexp4.html ). Obviously the source material is different (Debian packages vs GitHub repos) and grep.app also uses re2, but that is all I can see from a look at the “about” blurb.
Re: Show HN: Search code in GitHub repos using regular expressions
#117This is awesome! @danfox, sent you an email though commenting here too. I'm the CTO @ GitHub. Would love to talk to you about this and other things we are building in this area at GitHub. Feel free to email direct to jason at github.com
This project looks like it pulls literal factors out of the regex that I type in, maybe to an index a la that Russ Cox blog post a while back about Code Search. It seems to Not Like things that have very open-ended character classes (e.g. \w) unless there is a decent length literal involved somewhere.
It seems to have a very rudimentary literal extraction routine, as it decides to give a partial result set when fed an alternation between two literals that it handles pretty well on their own.
Re: Show HN: Search code in GitHub repos using regular expressions
#118This is awesome! @danfox, sent you an email though commenting here too. I'm the CTO @ GitHub. Would love to talk to you about this and other things we are building in this area at GitHub. Feel free to email direct to jason at github.com
iirc, Github uses (used?) my old project ( https://github.com/intel/hyperscan ) at Intel. It's probably faster than the alternatives, although if you want to support all types of regex you'll need to use Hyperscan as a prefilter for a richer regex engine like PCRE. This project looks like it pulls literal factors out of the regex that I type in, maybe to an index a la that Russ Cox blog post a while back about Code S…
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).
Re: Show HN: Search code in GitHub repos using regular expressions
#119This is awesome! @danfox, sent you an email though commenting here too. I'm the CTO @ GitHub. Would love to talk to you about this and other things we are building in this area at GitHub. Feel free to email direct to jason at github.com
I hope this means we’re getting grep searches for github soon. Cheers.
Re: Show HN: Search code in GitHub repos using regular expressions
#120Earlier quoted context omitted.
There must be something else or something wrong, because you indexed one of my small repo (~100 stars, ~20 forks, ~20Mb) and not the bigger ones (~500 stars, ~100/150 forks, ~150Mb)
Maybe he is limiting it to repositories of 50 MB or less, for example.