PyPy is ruddy fast. So is Hy.
Time of fib(9), using a simple recursive implementation.
(import-from pymongo Connection) | |
(def connection (Connection "localhost" 27017) "test") | |
(def db connection.test) | |
(def hello db.test) | |
(for [x (.find hello {"hello" {"$exists" true}})] | |
(print (get x "hello"))) |
/* See: | |
http://bit.ly/WhXvb3 | |
for the Traceur */ | |
var foo = [9, 9, 9], | |
bar = [2, 2, 2], | |
baz = [1, 1, ...foo, 1, 1, ...bar, 1, 1]; | |
console.log(baz); | |
/* Output: 1,1,9,9,9,1,1,2,2,2,1,1 */ |
#!/usr/bin/env hython | |
; not actually clojure ... | |
(import "urllib2") | |
(import-from "lxml" "html") | |
(defn form-pts-url [developer] | |
"Return the PTS URL for a given developer." | |
(+ "http://qa.debian.org/developer.php?login=" developer)) |
PyPy is ruddy fast. So is Hy.
Time of fib(9), using a simple recursive implementation.
; vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 filetype=lisp | |
; Copyright (c) Paul Tagliamonte, in sofar as any of this is at all | |
; copyrightable. | |
(puts "Hello, World!") | |
; "Hello, World!" | |
(import ["os" | |
"sys"]) |
; vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 filetype=lisp | |
; Copyright (c) Paul Tagliamonte, in sofar as any of this is at all | |
; copyrightable. | |
(def hello "World!") | |
(def square (fn [arg] | |
(* arg arg))) |
from sunlight import openstates | |
bills = filter( | |
lambda x: x != [], | |
[ | |
[ | |
y['url'] for y in x['documents'] | |
] for x in openstates.bills(q="rifle", fields='documents', state='ct') | |
] | |
) |
/* | |
* "Throb" effect ( Part Deux ) | |
* | |
* Paul Tagliamonte, 2010. ( Peace, Love and C++, baby ) | |
* | |
* This code is released under the Bacon license. | |
* If you like this code enough, consider sending me bacon. | |
* | |
* That or GPL-3+. | |
* |
; Copyright (c) Paul R. Tagliamonte <paultag@debian.org>, 2012, under the | |
; terms of dput-ng it's self. | |
(ns clojtest | |
(:require dput.core | |
dput.exceptions)) | |
(defn log [x] ; for debug output | |
(.debug dput.core/logger x)) |
#!/usr/bin/bpython -i | |
from sunlight import * | |
import json | |
import sys | |
if '--local' in sys.argv: | |
import sunlight.services.openstates | |
sunlight.services.openstates.service_url = 'http://localhost:8000/api/v1' |