Better HN
topnewbestaskshowjobs
Log inSign up

grifaton

482 karma · joined Dec 15, 2009 (16y ago) · 67 submissions

Submissions

comment 14y ago · link · parent

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

comment 14y ago · link · parent

I don't think anybody's suggesting that Dawkins called Skepchick "Muslima".

comment 14y ago · link · parent

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.

4.

Method Combinators in CoffeeScript(github.com ↗)

64 points · by grifaton · 14y ago · 25 comments

comment 14y ago · link · parent

This has obviously been a mammoth effort, so congratulations to all involved!

comment 14y ago · link · parent

Seriously?

comment 14y ago · link · parent

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

8.

Implementing 'if' in Ruby(mudge.github.com ↗)

2 points · by grifaton · 14y ago · discuss

comment 14y ago · link · parent

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?

comment 14y ago · link · parent

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...

11.

Redis from the ground up (2010)(blog.mjrusso.com ↗)

1 points · by grifaton · 14y ago · discuss

comment 14y ago · link · parent

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...

comment 14y ago · link · parent

Here's a rare example of obfuscated python, deceptively called "Python's Ellipsis Explained": http://blog.brush.co.nz/2009/05/ellipsis/

14.

Inbox.py - Python SMTP Server for Humans(github.com ↗)

4 points · by grifaton · 14y ago · 1 comment

comment 14y ago · link · parent

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)]

comment 14y ago · link · parent

This would catch a SyntaxError raised by eval().

For example,

    try:
        eval(".")
    except:
        pass

17.

Python object creation sequence(eli.thegreenplace.net ↗)

59 points · by grifaton · 14y ago · 2 comments

18.

Non-sexist solution of the ménage problem(math.dartmouth.edu ↗)

1 points · by grifaton · 14y ago · discuss

19.

Tests that fail one day every four years(voidspace.org.uk ↗)

2 points · by grifaton · 14y ago · discuss

20.

Evernote blog: WhySQL?(blog.evernote.com ↗)

150 points · by grifaton · 14y ago · 73 comments

21.

Myspace "adds 1m new users in 30 days"(guardian.co.uk ↗)

4 points · by grifaton · 14y ago · discuss

comment 14y ago · link · parent

Sample bias?

comment 14y ago · link · parent

I think this is interesting because it's the first time I've seen "hacking" presented in a positive light in the media.

24.

David Beazley on "Inside the Python GIL"(blip.tv ↗)

3 points · by grifaton · 14y ago · discuss

25.

Continuations in C(homepage.mac.com ↗)

3 points · by grifaton · 14y ago · discuss

comment 14y ago · link · parent

Could anything like this ever happen in the UK?

27.

Guardian's Digital Literacy campaign(guardian.co.uk ↗)

2 points · by grifaton · 14y ago · discuss

comment 14y ago · link · parent

What's the back story here?

comment 14y ago · link · parent

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).
123