![]() Just type in your query and get the results. Naturally, a better download tool had to be created, but the important bit was to get somebody else’s computer to run it! And thus, Hackage Search was born: an online grep for Hackage. If a simple script is used to do it, then it’s hard to keep the local copy up to date without redownloading the same packages all over again. In modern shells, wildcard patterns have the same expressive power as regular expressions (i.e. Shell wildcard patterns are the way to match files by their names. The grep utility looks for patterns inside files its irrelevant if what you care about is the files name. Not to mention that there isn’t (or, rather, wasn’t, prior to this work) a tool to download all of Hackage incrementally. If you want to match files by their names, grep is the wrong tool. But in order to grep, one needs a local copy of the data, and the size of Hackage is over 4.5 GB (if we only consider the latest package versions), so that could possibly take a while to download. This way, I could estimate the breakage that would arise from making forall a keyword proper (it is currently a pseudo-keyword with special meaning in type-level contexts only). ![]() ![]() One day I needed to grep all of Hackage to see how often forall is used as an identifier in Haskell programs. So much so that ‘grep’ became a verb: grep this, grep that, you know what I mean, the same thing happened to Google. Regular expressions are a convenient way to search plain text files, which is why grep is a popular tool among software developers.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |