With Puppet:
puppet module install rtyler-jenkins
puppet apply -v -e "include jenkins"
(defn uuid [] (str (java.util.UUID/randomUUID))) |
#!/usr/bin/env python | |
# coding: UTF-8 | |
# code extracted from nigiri | |
import os | |
import datetime | |
import sys | |
import traceback | |
import re |
// | |
// Distributed chat example | |
// | |
#include <czmq.h> | |
static void | |
listener_task (void *args, zctx_t *ctx, void *pipe) | |
{ | |
void *listener = zsocket_new (ctx, ZMQ_SUB); | |
int address; |
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |
import zmq | |
DEFAULT_PAGE = '\r\n'.join([ | |
"HTTP/1.0 200 OK", | |
"Content-Type: text/plain", | |
"", | |
"Hello, World!", | |
]) |
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
// Here is an extremely simple version of work scheduling for multiple | |
// processors. | |
// | |
// The Problem: | |
// We have a lot of numbers that need to be math'ed. Doing this on one | |
// CPU core is slow. We have 4 CPU cores. We would thus like to use those | |
// cores to do math, because it will be a little less slow (ideally | |
// 4 times faster actually). | |
// | |
// The Solution: |
diff --git a/swank/sbcl.lisp b/swank/sbcl.lisp | |
index a09e04b3..78038659 100644 | |
--- a/swank/sbcl.lisp | |
+++ b/swank/sbcl.lisp | |
@@ -979,7 +979,8 @@ QUALITIES is an alist with (quality . value)" | |
(make-location `(:file ,(namestring | |
(translate-logical-pathname pathname))) | |
'(:position 1) | |
- (when (eql type :function) | |
+ (when (and (eql type :function) |