News for hackers. Stuff that matters.

madjar

Re:Fast scraping in Python with Asyncio on Tuesday March 04, 2014 @03:32AM (#7339102)
I would say the performance are equivalent, with maybe some overhead if there is some heavy thread spawning. I'll run some benchmarks at some point.

One of the biggest advantages is the fact this is not multi-threading, so context switches can only happen at precise points (yield from). This makes it easier to reason about the code.

Re:Fast scraping in Python with Asyncio on Monday March 03, 2014 @03:48PM (#7336340)
I used that at some point, but I tend to prefer the explicit yield of asyncio to the implicit context change of greenlets. (This blog post is a good explanation of that: https://glyph.twistedmatrix.com/2014/02/unyielding.html)
Re:Strategy games, pricing, and the enjoyment curve on Sunday November 24, 2013 @03:53PM (#6791073)
I'm an old Civilization fan, and recently I have enjoyed playing Paradox's game (Crusader Kings, Europa Universalis and Victoria). They touch the same spot that Civ5 wasn't able to touch.
Re:Python alternatives for PHP functions on Tuesday December 25, 2012 @05:03AM (#4965667)
Except the problem most people actually want to solve is not "convert newlines to <br>", it is "convert some text to html", and this function may lead to think that it does that, when it only does a tiny fraction of that. And that's how injections are born.
Re:FreezeGun: easy mocking of Python datetimes on Tuesday December 11, 2012 @04:53PM (#4907060)
Sadly, it's not possible. datetime is a C class, so it is immutable.
Re:Introducing GNU Guix on Friday November 23, 2012 @05:24AM (#4821719)
According to the site of the project, "Guix is based on the Nix package manager."
Re:The definitive guide to forms based website authentication on Thursday November 08, 2012 @04:12AM (#4757030)
The first answer mentions a couple of time that any token given to the user (for remember-me login or password reset) should be hashed in the database.

Would it be possible to replace the whole storing by signing the token with some private key, so that the validity of the token can be checked without having to compare it to some stored value ?

Re:The Side-Project Project on Tuesday October 16, 2012 @04:03AM (#4658834)
Not as sexy as some of the things you can find on this page, but : https://github.com/madjar/pyramid_persona/ : a lib to use the persona auth system from mozilla with the pyramid web framework (that is specific !)