http://arstechnica.com/hardware/guides/2009/04/ars-technica-system-guide-april-2009-edition.ars | |
Asus M3A78-EM Motherboard - 80$ | |
AMD Athlon 64 X2 [TBD] Processor - 80$ (http://www.tigerdirect.com/applications/category/category_slc.asp?Recs=10&Nav=|c:2328|&Sort=2) | |
4GB DDR2 800MHz RAM - 40$ | |
[TBD] Case - $80 | |
Pass on video for now. |
_Sorry if this is poorly-articulated, I'm a bit drowsy at the moment._ | |
I know that Python is supposed to have an easy-to-read syntax, and appreciate | |
that allowing too much flexibility could have some effect on that. I don't see this as a replacement for Python's syntax, just as an alternative, maybe a fork or an interpreter flag. | |
I like Python's syntax, but would like it to be more flexible. Using ideas | |
from other languages, here's the approach I was thinking of. | |
Looking at a simple function decoration: |
Work in progress.
All names, identifiers and interfaces outlined in this document may be seen as placeholders, the functionality they provide is the important part.
Python is a wonderful language, but its metaprogramming facilities are limited and can lead to unnecessary verbosity. This document proposes a set of backward compatible changes which would allow developers more flexibility.
#!/usr/bin/env python3.1 | |
"""Shitty little script that spits out a Google chart of activity in a repo over time""" | |
import sys | |
import subprocess | |
import re | |
import collections | |
import itertools | |
import datetime | |
WHITESPACE = re.compile("[ \t\n\r]+") |
author: Jeremy Banks <[email protected]> | |
license: MIT (do what you want but give attribution) | |
I'm currently reading The Selfish Gene by Richard Dawkins. On page 185 | |
(of ISBN 9780199291151) he mentions a computer simulation he ran to | |
test a theory. It sounded interesting and not too complicated, so I | |
decided to attempt to replicate it. | |
Currently, I am failing rather badly. |
A galaxy-spanning post-singularity civalization (perhaps descending from us, perahps not) as the heat death of their univese approaches. They know that the cosmological natural selection theory (in which black holes create new universes with physical constants mutated slightly from our own) is correct. They intend to escape our universe through a black hole into a new universe using some contrived technology. Biological life wouild certainly be killed by any significant change in the fundemental constants of the universe, however if the right constants were modified singificantly little it may be possible for certain elements to keep properties close enough to those they have in our univese that it may be possible to build devices that could function in both. This is a lifeline for the civilization, as they've long since abandoned their physical bodies. Perhaps due to a correlation between the mass of the black hole and the size of the resultant uni
//
Since we don't want this visible in C, we put it in a comment.
&>/dev/null
Unfortunately //
is interpreted as an invalid shell command and produces an error message, so we need to redirect that to /dev/null
to get rid of it.
;x="${0%.*}"
http://www.utoronto.ca/TCard/when.html | |
http://www.uc.utoronto.ca/content/view/5/1249/ |
#!/usr/bin/env python3.1 | |
import sys, collections, re, json | |
Post = collections.namedtuple("Post", "postid _ _ username userid title _ content _ _ _ _ _ _ _ _ _ _", rename=True) | |
raw = sys.stdin.read() | |
raw = re.sub(r"\\(!\\)", "", raw) | |
raw_posts = raw.replace("\r\n", "\r").split("\n") | |
posts = [ eval("Post({})".format(raw_post.replace("\r", "\n").replace("'", "'''"))) for raw_post in raw_posts if raw_post ] |