HNHacker News
TopNewBestAskShowJobs

grifaton

482 karma · joined December 15, 2009

submissionscomments
grifaton··on Guido van Rossum's Performance tips for Python
Sounds like you're looking for a Sufficiently Smart Compiler[0]. James Hague has a good piece on why this might not be so desirable[1].

One of the reasons I'm fond of Python is that, while there is a tradeoff between flexibility and performance, it gives you the means to sacrifice flexibility to aid you in improving performance -- once you've identified what (if any) actual performance bottlenecks you face.

[0] http://c2.com/cgi/wiki?SufficientlySmartCompiler [1] http://prog21.dadgum.com/40.html

grifaton··on Why I am no longer a skeptic
I don't think anybody's suggesting that Dawkins called Skepchick "Muslima".
grifaton··on The Concepts Get Harder (Python in 30 Days - Day 12)
I'm afriad this doesn't make much sense from a Python point of view, where a metaclass is a very specific language construct. For more details, you can't do much better than the StackOverflow answer that JulianWasTaken has linked to.
grifaton··on Experimental Python 3 support in Django
This has obviously been a mammoth effort, so congratulations to all involved!
grifaton··on Sexual Harassment at DefCon (and Other Hacker Cons)
Seriously?
grifaton··on Guido van Rossum talks about Python 3, tomorrow, University of Amsterdam
Looks like it'll cover similar ground to his Europython keynote (which I think was a rehash of his Pycon talk), a video of which you can see here: http://www.youtube.com/watch?v=RwbEEzl3bL4
grifaton··on Tails of the Unexpected
I'm puzzled by the references to paper/scissors/stone. Why is "stone" the "most obvious move"?

Later on, the paper states that the game is "well known to be power law distributed". I couldn't immediately find anything online to back this up -- the first hit in google was a link to this paper. Can anybody provide some insight?

grifaton··on PyCon UK 2012
Really? The UK's centre of population [0] is apparently Appleby Parva in Leicestershire [1], which is less than 25 miles from Coventry [2].

[0] http://en.wikipedia.org/wiki/Center_of_population [1] http://en.wikipedia.org/wiki/Appleby_Parva [2] https://maps.google.co.uk/maps?saddr=Appleby+Parva&daddr...

grifaton··on A few things to remember while coding in Python
I blogged about this, and other uses for mutable default arguments (with tongue somewhat in cheek) a few weeks ago: http://inglesp.github.com/2012/03/24/mutable-default-argumen...
grifaton··on A few things to remember while coding in Python
Here's a rare example of obfuscated python, deceptively called "Python's Ellipsis Explained": http://blog.brush.co.nz/2009/05/ellipsis/
grifaton··on Python iteration
I sometimes use zip as a poor man's matrix transposition operator:

    >>> m = [(1,2,3), (4,5,6), (7,8,9)]
    >>> zip(*m)
    [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
grifaton··on Google's Python style guide
This would catch a SyntaxError raised by eval().

For example,

    try:
        eval(".")
    except:
        pass
grifaton··on Poll: Do you have a Facebook account?
Sample bias?
grifaton··on Hacking a knitting machine
I think this is interesting because it's the first time I've seen "hacking" presented in a positive light in the media.
grifaton··on New York City gets a Software Engineering High School
Could anything like this ever happen in the UK?
grifaton··on Anti Leonard Poettering petition: Stop writing useless linux programs.
What's the back story here?
grifaton··on Facebook machine learning technology improves; Redditors alaramed.
It's not perfect yet -- Facebook knows that I went to university in Cambridge (UK) but keeps asking me if photos from my undergraduate years were taken in Cambridge (Massachusetts).
grifaton··on Metaclasses in Python
Jonathan Fine gave a talk on this at Europython this year.

Looks like there's a video available at http://ep2011.europython.eu/conference/talks/javascript-for-....

grifaton··on (Python) Generator Tricks For Systems Programmer (pdf)
Habit, I think. Will change it when I get the chance.
grifaton··on (Python) Generator Tricks For Systems Programmer (pdf)
Inspired by this very presentation, I recently knocked together a library for munging text streams in Python, rather than calling through to sed and grep.

If anyone's interested, the code's here: https://github.com/inglesp/munger.py

grifaton··on How to Use UTF-8 with Python
This was published in 2005. Unicode in python has come a long way since then, especially with respect to python 3 [1], [2].

[1] http://docs.python.org/release/3.0.1/whatsnew/3.0.html#text-... [2] http://docs.python.org/release/3.0.1/howto/unicode.html

grifaton··on Poll: Do you get spammed by tech recruiters?
We have a long-running (and open) challenge at work to recruit a cold-calling recruiter (of whom we seem to get rather a lot) to our HR team.

No luck yet...

grifaton··on Linus's first version README for git
One of the coolest cases of this I've seen recently is the second half of Kent Beck's "Test Driven Development: By Example". He uses builds a TDD framework with TDD, using the TDD framework he's building.
grifaton··on The end of an era: Internet Explorer drops below 50% of Web usage
Have you ever tried to book a rail ticket in Turkey via the Turkish State Railways website?

"Using TCDD Online ticket selling project requires internet explorer 5.0 or higher upgrades!"

grifaton··on Computing Your Skill
You can even observe cycles with just two players.

In Cambridge (UK), the River Cam is too narrow for side-by-side racing over more than a few hundred yards. Instead, a popular kind of racing has developed called "Bumps". Crews line up along the river with about a boat and a half's length between each other. At a signal, all crews start rowing, and if one boat manages to touch the boat in front ("bumping"), both crews pull over to the side, and the next day they switch places in the starting line up.

It's not uncommon to see two boats trade places repeatedly -- this could happen because crew A has a much stronger start than crew B, but that crew B have much more stamina than crew A, so A will always chase down B relatively quickly, but B will always manage to catch A over the course of a longer race.

grifaton··on They laughed when I sat down at the piano, but when I started to play
So what was this an advert for? Clicking on the advert itself just gives a 404.
grifaton··on Linux From Scratch 7 Released
It's a great way to learn how Linux works. I don't know of anybody using a Linux they've built from scratch for anything other than their education, though.
grifaton··on Work has started on Ruby 2.0
Just minutes ago, this was announced on the Twisted mailing list:

https://bitbucket.org/pitrou/t3k/wiki/Home

It's described as "an experimental, work-in-progress port of Twisted to Python 3".

grifaton··on LulzSec Redirects ‘The Sun’ Homepage To Fake Murdoch Death Story
Seems that the websites of all of NI's newspapers are down:

http://www.thetimes.co.uk/ http://www.thesundaytimes.co.uk/ http://www.thesun.co.uk/ http://www.newsoftheworld.co.uk/

grifaton··on The Broken Promises of MRI/REE/YARV
They're Ruby interpreters -- Matz's Ruby Interpreter, Ruby Enterprise Edition, and Yet Another Ruby VM respectively.
Page 1 of 2Next →