TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Peg Parsing Series Overview (2019)

20 pointsby jumanjisamaalmost 4 years ago

3 comments

tylermauthealmost 4 years ago
I once used a parse expression grammar in a MongoDB load testing and cache warming program I wrote for a major migration project. We had limited hardware and ridiculous access patterns on the dbs; after the first painstakingly planned migration had a 1 minute degradation immediately after cutover, we decided we needed to pre-warm the new instance. MongoDB has a function to load indices into memory caches, except our indices were too big and the memory too small. This also didn&#x27;t warm Linux page caches the same way. Using a PEG parser I wrote a golang program to tail for find queries from the old instance and make identical queries against the new instance.<p>This worked very well and I was able to tweak the PEG pretty easily. This article was a great read and reminded me that PEG is great. I&#x27;d love to do that again, it was fun and I could really use another PEG.
boulosalmost 4 years ago
Fwiw, I think the PEP itself [1] is more interesting for discussion.<p>[1] <a href="https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0617&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0617&#x2F;</a>
b215826almost 4 years ago
With all due respect to Guido, why do people write technical posts (or for that matter, posts of any kind) on Medium? Medium has so much bloat and it is near impossible to read articles on Medium with JavaScript disabled. Even basic scrolling requires JavaScript. uBlock Origin counts a total of 37 scripts on that page and its total size is 2.70 MB. Are 37 scripts really required to describe the ideas in the article, which as far as I can understand only requires just text and images? These days I think twice before clicking on any link that starts with medium.com, and I clicked on this only because it was by Guido.
评论 #28044543 未加载
评论 #28044411 未加载