Dave "Novalis" Turner (novalis) wrote,
Dave "Novalis" Turner
novalis

Random notes on programming

One:

Time periods: When searching, the time periods now have their upper bound excluded. It will allow us to have a cleaner or more correct dataset. API doc. Credits go to @NovalisDMT for spotting the problem.


Well, actually, thanks to Dijkstra. What's really crazy is this: what if I hadn't happened to read that article? Then would I be doing bounds wrong? Or would I have figured it out anyway? And how many other things have I been doing wrong because I didn't read the right Dijkstra article?

Two:
PCRE: "
The maximum length of a subject string is the largest positive number that an integer variable can hold.
"

Sure, because 2GB should be enough for anyone. It's not like there is a special data type designed explicitly for representing the size of data in memory that is no harder to use than integer.

Oh, look, here's the issue biting someone. (My comment on that bug is not correct; there is a workaround possible. But it will still be a big hassle).

Three:
I added a bunch of code to ag (a replacement for ack). Unfortunately, due to the bug fixes I made, it is no longer faster than ack. Which I guess should not be all that surprising; Perl's regexp engine is pretty well tuned, and most of the time will be spent in regexps or system calls, so there's no strong reason for a C reimplementation to be dramatically faster. On the other hand, ag is now handling gitignore files (and hgignore, etc) more correctly (this is the cause of the slowdown); ack doesn't even bother to try. So, I guess I'll stick with ag for now.

This entry was originally posted at http://novalis.dreamwidth.org/172842.html. There are comment count unavailable comments on the DW version of this post already. Please comment there using OpenID.
Subscribe

  • (no subject)

    This is stupid. People have an a right to believe what they want, even if they are too stupid to evaluate evidence. It's actually pretty sad that…

  • Cranberry nut pie

    Since I've made this recipe like four times this winter, I figure I should probably share it. Preheat oven to 325. 12 oz raw cranberries 1/3c sugar…

  • Call no man happy until he is dead

    I feel like I've said before that I cannot judge a work of fiction until I've finished reading it. This is probably not actually true. Like, I'm…

Comments for this post were disabled by the author