This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've just put up a large chunk of my Twitter archives up on the | |
Talis Platform service. Talis Platform is a 'cloud'-based | |
triplestore hosting service. More at http://n2.talis.com | |
A triplestore is like a database but for graphs of RDF triples. | |
The cool thing about RDF and the triplestore is that you | |
basically have a completely schema-less datastore. You don't have | |
to figure out "Oh, there's integers going in this field and | |
strings going in that". You just upload a big pile of RDF and the | |
triplestore keeps it all there. This is obviously not as efficient | |
as using a database, so if you want to grow to Google size, it may |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The regex patterns in this gist are intended to match any URLs, | |
including "mailto:[email protected]", "x-whatever://foo", etc. For a | |
pattern that attempts only to match web URLs (http, https), see: | |
https://gist.github.com/gruber/8891611 | |
# Single-line version of pattern: | |
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- Mode: Lisp; Syntax: Common-Lisp -*- | |
;;; Package Management | |
(in-package :cl-user) | |
(defpackage :hige | |
(:use :cl | |
:drakma | |
:cl-ppcre) | |
#+ABCL (:shadow :y-or-n-p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; A simple Google Chart wrapper for Common Lisp | |
;;; | |
;;; API reference: http://code.google.com/apis/chart/ | |
;;; | |
;;; WARNING: Incomplete and buggy -- still has much to be done, e.g.: | |
;;; | |
;;; * more thorough testing (that won't be hard...) | |
;;; | |
;;; * handle spaces/newlines appropriately |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Fizzbuzz kata (see http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz) | |
(defpackage :fizzbuzz-test | |
(:use :cl :lisp-unit :fizzbuzz)) | |
(in-package :fizzbuzz-test) | |
(define-test fizzbuzz | |
(let ((seq (fizzbuzz::fizzbuzz-sequence))) | |
(assert-equal 100 (length seq)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone | |
from metaphone import dm as double_metaphone | |
# get the Redis connection | |
from jellybean.core import redis | |
import models | |
# Words which should not be indexed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.google.com/uds/GwebSearch?q=foo%20bar&v=1.0 | |
{ responseStatus: 200 | |
, responseData: | |
{ results: | |
[ { visibleUrl: 'www.foobar2000.org' | |
, titleNoFormatting: 'foobar2000' | |
, cacheUrl: 'http://www.google.com/search?q=cache:obAJTkESjhwJ:www.foobar2000.org' | |
, title: 'foobar2000' | |
, content: 'Media player with simple UI and low memory use. Offers plugin support for new features. Includes link to forum focused on application. [Win32]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -rubygems | |
# | |
# Simple Ruby interface for evaluating Common Lisp code, for use with RSpec. | |
# Written in August 2010 by Arto Bendiken <http://ar.to/> | |
# | |
# This is free and unencumbered software released into the public domain. | |
require 'open4' # `sudo gem install open4` | |
require 'bert' | |
require 'bert/decode' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Context from IRC logs for future reference. | |
[12:36] <kushal> nikodemus, can you point me to some tutorial on debugging on sbcl ? | |
[12:37] * andreer ([email protected]) has joined #quicklisp | |
[12:38] <nikodemus> kushal: no really good ones actually exist at the moment. i'm planning on writing one before the year is out, but... in the meanwhile, i can give some pointers | |
[12:38] <nikodemus> a couple of questions: is this a general question, or do you have a specific issue you need to debug? | |
[12:39] <kushal> right now , general, managed to debug the specific issue somehow :) | |
[12:39] <nikodemus> ok. are you using slime? | |
[12:39] <kushal> nikodemus, yes and no both | |
[12:40] <nikodemus> good. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns resource | |
"Automatic resource cleanup." | |
(:import (java.lang.ref ReferenceQueue PhantomReference))) | |
(def ^:private queue (ReferenceQueue.)) | |
(def ^:private cleanup-fns {}) | |
(defn resource | |
"Returns a reference to x. At some point after the reference is |
OlderNewer