HN user

grifaton

482 karma
Posts28
Comments37
View on HN
github.com 13y ago

Method Combinators in CoffeeScript

grifaton
64pts25
mudge.github.com 14y ago

Implementing 'if' in Ruby

grifaton
2pts0
blog.mjrusso.com 14y ago

Redis from the ground up (2010)

grifaton
1pts0
github.com 14y ago

Inbox.py - Python SMTP Server for Humans

grifaton
4pts1
eli.thegreenplace.net 14y ago

Python object creation sequence

grifaton
59pts2
www.math.dartmouth.edu 14y ago

Non-sexist solution of the ménage problem

grifaton
1pts0
www.voidspace.org.uk 14y ago

Tests that fail one day every four years

grifaton
2pts0
blog.evernote.com 14y ago

Evernote blog: WhySQL?

grifaton
150pts73
www.guardian.co.uk 14y ago

Myspace "adds 1m new users in 30 days"

grifaton
4pts0
blip.tv 14y ago

David Beazley on "Inside the Python GIL"

grifaton
3pts0
homepage.mac.com 14y ago

Continuations in C

grifaton
3pts0
www.guardian.co.uk 14y ago

Guardian's Digital Literacy campaign

grifaton
2pts0
everything2.com 14y ago

A palindromic C program

grifaton
1pts0
moreintelligentlife.com 14y ago

The great piano swindle [2007]

grifaton
1pts0
stackoverflow.com 14y ago

Why does HTML think “chucknorris” is a color?

grifaton
2pts0
www.guardian.co.uk 14y ago

Guardian's Obituary for John McCarthy

grifaton
7pts0
code.activestate.com 14y ago

Self-recursive generators in Python

grifaton
1pts0
notaverb.com 14y ago

Not Verbs

grifaton
1pts0
forthfreak.net 14y ago

Try Forth

grifaton
61pts17
pybites.blogspot.com 15y ago

Assertion rewriting in py.test

grifaton
2pts0
ep2011.europython.eu 15y ago

All talk videos from EuroPython 2011

grifaton
6pts0
ep2011.europython.eu 15y ago

5 years of bad ideas

grifaton
1pts0
gowers.wordpress.com 15y ago

Fields medallist's perspective on UK electoral reform

grifaton
5pts0
www.patrickcraig.co.uk 15y ago

The $5000 Compression Challenge

grifaton
1pts0
gizmodo.com 15y ago

Thrutu - do more than talk when you're on the phone

grifaton
1pts0
user-mode-linux.sourceforge.net 15y ago

User-mode Linux Kernel

grifaton
31pts21
duncan-cragg.org 15y ago

The REST dialogues

grifaton
6pts0
www.guardian.co.uk 15y ago

The Guardian's new developer blog

grifaton
7pts0

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

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.

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?

Python iteration 14 years ago

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

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.

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.

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.