Instead of just writing your program in Lisp, you can write your own language on Lisp, and write your program in that.
It is possible to write programs bottom-up in any language, but Lisp is the most natural vehicle for this style of programming. In Lisp, bottom-up design is not a special technique reserved for unusually large or difficult programs. Any substantial program will be written partly in this style. Lisp was meant from the start to be an extensible language. [...]
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
module.config(['$provide', function($provide) { | |
// Add a method to $q that returns a promise resolved to | |
// the given value. Use as: $q.now(42) | |
$provide.decorator('$q', ['$delegate', function($delegate) { | |
$delegate.now = function(value) { | |
var d = $delegate.defer(); | |
d.resolve(value); | |
return d.promise; | |
}; |
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
// Framework | |
function createInjector() { | |
var instanceCache = {}; | |
var providerCache = {}; | |
function constant(key, value) { | |
instanceCache[key] = value; | |
} |
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
{ "names": [ "Anne", "Bette", "Cate", "Dawn", | |
"Elise", "Faye", "Ginger", "Harriot", | |
"Izzy", "Jane", "Kaye", "Liz", | |
"Maria", "Nell", "Olive", "Pat", | |
"Queenie", "Rae", "Sal", "Tam", | |
"Uma", "Violet", "Wilma", "Xana", | |
"Yvonne", "Zelda", | |
"Abe", "Billy", "Caleb", "Davie", | |
"Eb", "Frank", "Gabe", "House", | |
"Icarus", "Jack", "Kurt", "Larry", |
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
/* | |
* call-seq: | |
* Rugged::Repository.new(name, options = {}) -> repository | |
* | |
* Open a Git repository with the given +name+ and return a +Repository+ object | |
* representing it. | |
* | |
*/ | |
static VALUE rb_git_repo_new(int argc, VALUE *argv, VALUE klass) | |
{ |
- The best tutorials are in the introductory books. See below.
- Getting Started with Clojure - A detailed tutorial on getting a modern (as of Jan 2013) Clojure workflow going.
- Emacs Live is a nice development environment based on Emacs.
- Understanding The Clojure Development Ecosystem
- Clojure Docs Site is a community-driven doc site with good tutorials, and reference material going somewhat deeper than individual API docs.
- Functional Programming for the Rest of Us is a classic introduction to functional thinking
- [A comprehensive article on namespaces and different ways of requiring them](http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.
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
config.around(:each) do |example| | |
Rails.logger.tagged(example.metadata[:full_description]) do | |
example.run | |
end | |
end |
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
(def seats (-> (repeat 5000 nil) vec ref)) | |
(def clerks (repeatedly 10 #(agent 0))) | |
(defn available-indexes | |
"Given a sequence of seats, returns a (lazy) | |
sequence of the indexes of the available seats. | |
This is purely functional and doesn't know anything | |
about refs or agents" | |
[seats] | |
(keep-indexed |
NewerOlder