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
| class Lisp | |
| def initialize | |
| @env = { | |
| :label => lambda { |(name,val), _| @env[name] = val }, | |
| :quote => lambda { |sexpr, _| sexpr[0] }, | |
| :car => lambda { |(list), _| list[0] }, | |
| :cdr => lambda { |(list), _| list.drop 1 }, | |
| :cons => lambda { |(e,cell), _| [e] + cell }, | |
| :eq => lambda { |(l,r), _| l == r }, | |
| :if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) }, |
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
| ;; Hide slime version mismatches | |
| (setq slime-protocol-version 'ignore) | |
| ;; More syntax coloring | |
| (defun tweak-clojure-syntax (mode) | |
| (mapcar (lambda (x) (font-lock-add-keywords mode x)) | |
| '((("#?['`]*(\\|)" . 'clojure-parens)) | |
| (("#?\\^?{\\|}" . 'clojure-braces)) | |
| (("\\[\\|\\]" . 'clojure-brackets)) | |
| ((":\\w+" . 'clojure-keyword)) |
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 jquerytest.core) | |
| (def jquery (js* "$")) | |
| (jquery | |
| (fn [] | |
| (-> (jquery "div.meat") | |
| (.html "This is a test.") | |
| (.append "<div>Look here!</div>")))) |
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
| (definst fm [carrier 440 divisor 2.0 depth 1.0] | |
| (let [modulator (/ carrier divisor) | |
| mod-env (env-gen (lin-env 1 0 1)) | |
| amp-env (env-gen (lin-env 0 1 1))] | |
| (* amp-env | |
| (sin-osc (+ carrier | |
| (* mod-env (* carrier depth) (sin-osc modulator))))))) | |
| ; Some of these are more or less interesting | |
| (fm) |
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
| Originally: | |
| https://gist.github.com/7565976a89d5da1511ce | |
| Hi Donald (and Martin), | |
| Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
| appreciate the tone. This is a Yegge-long response, but given that you and | |
| Martin are the two people best-situated to do anything about this, I'd rather | |
| err on the side of giving you too much to think about. I realize I'm being very | |
| critical of something in which you've invested a great deal (both financially |
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
| (setq org-remember-templates | |
| (quote | |
| (("todo" ?t "* TODO %?\n %u\n %a" "~/Dropbox/org/gtd.org" bottom nil) | |
| ("note" ?n "* %?\n :NOTE:\n %u\n %a" "~/Dropbox/org/gtd.org" bottom nil) | |
| ("journal" ?j "* %U %?" "~/Dropbox/org/journal.org" 'top nil)))) |
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
| (defn property* | |
| "The property* driver handles the work when testing a property. It | |
| expects: | |
| * a descriptive message for failure reporting | |
| * a list of locals (also for reporting) | |
| * a generator which takes the scaled size and returns the input | |
| for the property | |
| * the property test in form of a function of the generated | |
| input." | |
| {:added "2.0"} |
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
| qQQggggWWWWWWWBgggpQQ, | |
| qggdWWWWWWWWWWWWWWWWWWWWWWWWgpQ, | |
| QgWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBpQ | |
| QgWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWp, | |
| \g#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBp | |
| \gWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBp | |
| gWW"""\ 7"""WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBp | |
| " "W"" ""WWWWWWWWWWWWWWWWWWWk, | |
| ,,,, "WWWWWWWWWWWWWWWWWB, | |
| QQQgggpQ, JEEEEEEEEENmqQ, "MWWWWWWWWWWWWWWWp |
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
| .. .. .. .. .... .. . . .. . . ... . ... . . .. .. .. .. .. .... .. | |
| . . .. . . ... . ... . . .. .. .. .. .. .... .. . . .. . . ... . ... | |
| . . .. .. .. .. .. .... .. 8@8@88@8@8@888 . ... . . .. .. .. .. .. | |
| .... .. . . .. . . ... .@@888@8@8@@88@88@@@88@@@88@.. .... .. . . .. . . ... | |
| . ... . . .. .. .8@@@88@88@8888@88@@8@8@88@8@8@888@@. ... . . .. .. .. | |
| .. .. .... .. . 8@88@8@8@888@@8@@888@8@8@@88@88@@@88@@@88o.. .... .. . . .. | |
| . . ... . ... .@8@@88@88@@@88@@@88@88@8888@88@@8@8@88@8@8@888 . ... . . .. | |
| .. .. .. .8@8888@88@@8@8@88@8@8@888@@8@@888@8@8@@88@88@@@88@@ .. .. .... .. | |
| . . .. . . 888 . ... . .@@88@88@@@88@@@88@88@8888@88@@8@8@88@8@8 ... . ... | |
| . . .. .. .. .. .. .... .c . . .. . . ... 8@@888@8@8@@88@88@@@.. .. .. |
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
| ______________ | |
| ,,--''::::::::::::::`-.___ | |
| ,--'::::::::::::::::::::::::::`-._ | |
| ,-'::::::::::::::::::::::::::::::::::`-. | |
| ,-'::::::::::::::::::::::::::::::::::::::::`. | |
| ,':::::::::::::::::::::::::::::::::::::::::::::`-. | |
| ,':__________:::::::::::::::::::::::::::::::::::::::\ | |
| /__/ `-._::________________::::::::::::::::::`. |