http://www.cs.indiana.edu/~dyb/pubs/hocs.pdf
- SDP (with Rex Dwyer)
- Z80 Scheme (with George Cohn)
- C-Scheme
- Data General Common Lisp (with Rob Vollum, others)
(ns n01se.externs-for-cljs | |
(:require [clojure.java.io :as io] | |
[cljs.compiler :as comp] | |
[cljs.analyzer :as ana])) | |
(defn read-file [file] | |
(let [eof (Object.)] | |
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))] | |
(vec (take-while #(not= % eof) | |
(repeatedly #(read stream false eof))))))) |
http://www.cs.indiana.edu/~dyb/pubs/hocs.pdf
;; See http://okmij.org/ftp/continuations/implementations.html#dynamic-wind | |
;; and http://axisofeval.blogspot.com/2012/08/delimited-continuations-do-dynamic-wind.html | |
;; Slight trick here: use identity of yield-record-tag function as the actual tag | |
(define (yield-record-tag) yield-record-tag) | |
(define (make-yield-record v k) | |
(list yield-record-tag v k)) | |
;; Yield simply aborts up to the generator's caller, delivering to it | |
;; the yielded value and the continuation for resuming after the call |
require 'thread' | |
module SonicPi | |
class Promise | |
def initialize | |
@val_sem = Mutex.new | |
@push_sem = Mutex.new | |
@box = Queue.new | |
@value = nil |
Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import shapeless._, HList._ | |
import shapeless._ | |
import HList._ | |
scala> "foo" :: 124 :: HNil | |
res0: shapeless.::[java.lang.String,shapeless.::[Int,shapeless.HNil]] = foo :: 124 :: HNil |
;; I wrote this in the Eurostar on my way back from the last lambdanext.eu clojure course. | |
(ns comprehensions | |
(:refer-clojure :exclude [for doseq]) | |
(:require [clojure.core.reducers :as r])) | |
;; borrowed from clojure.core | |
(defmacro ^{:private true} assert-args | |
[& pairs] | |
`(do (when-not ~(first pairs) |
;;; clips-mode.el --- Clips editing mode. | |
;;;************************************************************************ | |
;;; Basado en jess-mode.el de: | |
;; Copyright (C) 1999 by David E. Young. | |
;; Modified 2012 by Fogus (http://www.fogus.me) | |
;; Author: David E. Young <david.young@fnc.fujitsu.com> | |
;; Keywords: languages, clips |
data StartsWithA a b = StartsWithA a (StartsWithB a b) | |
| EmptyA | |
deriving Show | |
data StartsWithB a b = StartsWithB b (StartsWithA a b) | |
| EmptyB | |
deriving Show | |
infixr 7 <<< | |
infixr 7 >>> |
#!/usr/bin/env python | |
# -*-coding: utf8-*- | |
# Title: chessboard.py | |
# Author: Gribouillis | |
# Created: 2012-05-19 22:18:09.909216 (isoformat date) | |
# License: Public Domain | |
# Use this code freely. | |
version_info = (0, 1) | |
version = ".".join(map(str, version_info)) |
(ns rxjava-datomic.query | |
(:require [datomic.api :as d]) | |
(:use [clojure.repl :only [pst]]) | |
(:import [rx Observable] | |
datomic.Peer)) | |
(defn query [qry & inputs] | |
(Observable/toObservable | |
(Peer/q qry (object-array inputs)))) |