Top all-time · #4105
valuedlessons.com
Personal blog · valuedlessons.comprogramming
valuedlessons.com is a personal blog at valuedlessons.com about programming. Since 2008, 19 different Hacker News readers have linked it 20 times, most often “Monads in Python, with nice syntax”. No feed was found, so read it on the site itself.
Too few sampled comments (9) to say how often HN recommends it.?
Why HN links it
HN readers link valuedlessons.com mainly for its Python-based explanations of monads, which show they can be built in any language with objects or closures. Also linked for parser combinators and SQL Turing completeness.
Summarised by Claude from a sample of 9 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Monads in Python, with nice syntax9 people · 9 mentions · first linked 2008-01-08
- Monads in Python (with nice syntax)2 people · 2 mentions · first linked 2012-12-23
- /2008/02/pysec-monadic-combinatoric-parsing-in.html2 people · 2 mentions · first linked 2010-07-20
- Python memory usage of common types2 people · 2 mentions · first linked 2009-09-01
What Hacker News says?
Also SQL variants are turing complete http://www.valuedlessons.com/2009/08/sql-is-now-turing-compl...
Comment linking /2009/08/sql-is-now-turing-complete.html
on “Building Street Fighter II in Ruby [video]”Submitted Monads in Python (with nice syntax) as a story · 92 points
HN discussion> Do I need to know Haskell? Yes. This is enough for me to reject this blogpost. No you don't need a specific language to implement any functionality that can be implemented by a turing-complete language. I watched Crockford's monad talk [1]. He used javascript. The only problem with that talk is that he spent about 10 seconds or less explaining what a monad is (and the rest of the talk on implementation issues and…
Comment linking /2008/01/monads-in-python-with-nice-syntax.html
on “The Monad Challenges: Jump start your understanding of monads”Submitted Monads in Python, with nice syntax as a story · 39 points
HN discussionMonads are useful and unknowingly created in other languages all the time [0]. If you aren't quite comfortable enough with monads to follow the first link, I found this implementing monads in python tutorial[1] to be a huge help. For those that want to play with Monads in Python, check out PyMonad[2]. 0: http://blog.sigfpe.com/2006/08/you-could-have-invented-monad... 1: http://www.valuedlessons.com/2008/01/monads-in…
Comment linking /2008/01/monads-in-python-with-nice-syntax.html
on “A Gentle Introduction to Monad Transformers – or, Values as Exceptions”Submitted Python memory usage of common types as a story · 32 points
HN discussionC and Java can't represent monads at all, since they don't support closures. C# and Python can, sort of, but their syntax and object-oriented semantics make it somewhat difficult. I don't know C# well, and Python needs a lot of magic[1] to get reasonable-looking code. Here's a Python example. It's not a direct translation, but is close enough that you should be able to figure out the original. I've included the Hask…
Comment linking /2008/01/monads-in-python-with-nice-syntax.html
on “Try Haskell”Submitted Monads in Python (with nice syntax!) as a story · 7 points
HN discussionA parser combinator may be more powerful? Not sure. The python parsec package is really terribly documented, but there's a good example here: http://www.valuedlessons.com/2008/02/pysec-monadic-combinato... EDIT: The name of the package may have changed; it looks like this is the pypi package being documented (if not; i'm confused because pypi's pysec package is something totally different): https://pypi.python.org/p…
Comment linking /2008/02/pysec-monadic-combinatoric-parsing-in.html
on “Show HN: Using functions to construct Regex in Python”Submitted Garlic Programmers for Silver Code? How your code base affects productivity as a story · 6 points
HN discussion"It's a pattern." "All useful languages have monads ... nearly impossible to avoid." So here's a post on Python (hopefully useful) and monads, it appears to be implementing a pattern, although I don't think I would have ever stumbled across it naturally. http://www.valuedlessons.com/2008/01/monads-in-python-with-n... And here's a library implementing monads and other stuff: https://pypi.python.org/pypi/PyMonad/ It s…
Comment linking /2008/01/monads-in-python-with-nice-syntax.html
on “Monads Are Not Metaphors (2010)”Submitted Simple Reactive Programming with Python as a story · 2 points
HN discussionThat's funny. I implemented almost the exact same thing a few years ago, although mine is arguably more complete :) https://github.com/pthatcher/pyrec Here's my original post about it: http://www.valuedlessons.com/2009/10/introducing-pyrec-cure-... And here's my analysis of how much less memory it uses: http://www.valuedlessons.com/2008/10/blog-post.html
Comment linking /2008/10/blog-post.html
on “Stop passing naked dictionaries around: Introducing DStruct for Python”Submitted Monads in Python (With Nice Syntax)(2008) as a story · 1 points
HN discussionThe post is from 2008, and this seems to be the follow-up: http://www.valuedlessons.com/2008/02/pysec-monadic-combinato...
Comment linking /2008/02/pysec-monadic-combinatoric-parsing-in.html
on “Monads in Python, with nice syntax”Submitted Monads in Python as a story · 1 points
HN discussionHere is my favorite monad tutorial: http://www.valuedlessons.com/2008/01/monads-in-python-with-n... . The reason I like it is because it uses Python rather than Haskell while pointing out that you can build monads in any language that supports objects or closures. Actually, now that I think about it, it seems to me that pythonic monads should really be context managers, so they can be used like: with SomeMonad: do s…
Comment linking /2008/01/monads-in-python-with-nice-syntax.html
on “You Could Have Invented Monads (And Maybe You Already Have)”Submitted Monads in python [ed: *mind explodes*] as a story · 1 points
HN discussionSubmitted List Monad in Ruby and Python as a story · 1 points
HN discussion