Hacker News new | past | comments | ask | show | jobs | submit login
Optics and Regex: Greater than the sum of their parts (chrispenner.ca)
24 points by nuriaion on Sept 20, 2019 | hide | past | favorite | 7 comments



For pattern matching and search-and-replace in Haskell, some people might prefer monadic parsers to regular expressions. This library has a similar set of capabilities:

https://github.com/jamesdbrock/replace-megaparsec


I hate to be That Guy, but I found the massive overuse of exclamation points to be very distracting. I'm not quite at the level of those people who claim that using exclamation points is like laughing at your own jokes, but they should not be a default punctuation choice.


> I hate to be That Guy, but I found the massive overuse of exclamation points to be very distracting.… [Exclamation points] should not be a default punctuation choice.

I think that's overstating it quite a bit. There's one exclamation point in the first four paragraphs. The frequency picks up a bit after that, but I'd hardly call them the default punctuation choice.


> The frequency picks up a bit after that

"Hopefully you learned something! Did you know I'm currently writing a book? It's all about Lenses and Optics! It takes you all the way from beginner to optics-wizard and it's currently in early access! Consider supporting it, and more posts like this one by pledging on my Patreon page!"


There are 62 exclamations and 54 periods (counted after removing the periods in code sections).



And people were asking what good parameterizing over all instances of Functor or Applicative can do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: