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
| cc -DBUILD="\"1.3\"" -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -iquote. -c -o cmd-pipe-pane.o cmd-pipe-pane.c | |
| cmd-pipe-pane.c: In function ‘cmd_pipe_pane_exec’: | |
| cmd-pipe-pane.c:67: warning: implicit declaration of function ‘bufferevent_free’ | |
| cmd-pipe-pane.c:122: warning: implicit declaration of function ‘EVBUFFER_LENGTH’ | |
| cmd-pipe-pane.c:122: error: dereferencing pointer to incomplete type | |
| cmd-pipe-pane.c:124: warning: implicit declaration of function ‘bufferevent_new’ | |
| cmd-pipe-pane.c:125: warning: assignment makes pointer from integer without a cast | |
| cmd-pipe-pane.c:126: warning: implicit declaration of function ‘bufferevent_enable’ | |
| make: *** [cmd-pipe-pane.o] Error 1 |
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
| ~/projects/cloby ➔ cat examples/simple.rb | |
| require 'cloby' | |
| class MyClojureObj < Clojure::Object | |
| def initialize | |
| dosync { @foo = 'foo' } | |
| end | |
| attr_accessor :foo | |
| 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
| (defn quoted-string [ch] | |
| (let [quoteSeparator (is-char ch) | |
| stringBody (stringify (many1 (either (not-char-of #{ch \# \newline}) (not-followed-by (string "#") (string "{"))))) | |
| expressionBody (let-bind [_ (string "#{") | |
| expr (stringify (many1 (not-char \}))) | |
| _ (string "}")] | |
| (result (read-string expr))) | |
| expansionBody (many (either stringBody expressionBody)) | |
| optimize (fn [exp] (if (== 2 (count exp)) (second exp) exp))] | |
| (>>== (between quoteSeparator quoteSeparator expansionBody) #(optimize (apply list 'str %))))) |
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
| MyApp.MyModel.mixin({ | |
| resourcePathFor: function(action, storeKey, item) { | |
| var id, path; | |
| id = storeKey ? MyApp.store.idFor(storeKey) : null; | |
| switch(action) { | |
| case 'fetch': | |
| case 'create': | |
| path = 'items'; |
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
| watch( 'test/.*\.clj' ) {|md| test_stuff } | |
| watch( 'src/.*\.clj' ) {|md| test_stuff } | |
| def colorize(text, color_code) | |
| "#{color_code}#{text}\e[1;37m" | |
| end | |
| def red(text); colorize(text, "\e[0;31m"); end | |
| def green(text); colorize(text, "\e[0;32m"); 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
| ;; I have two primary goals: | |
| ;; 1.) ...{:foo (fn ...)}... should be defined outside of the | |
| ;; function-map in a way that allows you to update :foo's (fn ...) | |
| ;; (perhaps a ref, an atom?) | |
| ;; 2.) The cases for condp: "fred", "ethel" should live in a structure | |
| ;; that can be updated as well. For instance, if I want to add "lucy" | |
| ;; (handle-lucy a b c d) to the condp I'd like to be able to do that | |
| ;; by using a separate structure to hold all of the cases for the |
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@polyglot Homebrew (master) $ brew install -v mailtomutt | |
| ==> Build Environment | |
| CC: /usr/bin/cc => /usr/bin/gcc-4.2 | |
| CXX: /usr/bin/c++ => /usr/bin/c++-4.2 | |
| LD: /usr/bin/cc => /usr/bin/gcc-4.2 | |
| CFLAGS: -O3 -w -pipe | |
| CXXFLAGS: -O3 -w -pipe | |
| MAKEFLAGS: -j4 | |
| ==> Downloading http://downloads.sourceforge.net/project/mailtomutt/MailtoMutt/v0.4.1/mailtomutt-0.4.1.tar.bz2 | |
| File already downloaded and cached to /Users/defn/Library/Caches/Homebrew |
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 extract-sexps | |
| "Extracts s-exp from a string." | |
| [#^String string] | |
| (second | |
| (reduce (fn [[exp exps state cnt] c] | |
| (cond | |
| (= state :escape) | |
| [(.append exp c) exps :string cnt] | |
| (= state :string) (cond | |
| (= c \") |
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
| ;; Clojure | |
| ;; Load files, set mode based on hooks and filename | |
| (require 'clojure-mode) | |
| (autoload 'clojure-mode "clojure-mode" "A major mode for Clojure" t) | |
| (add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode)) | |
| (require 'swank-clojure) | |
| (require 'slime) |
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
| ;; Clojure | |
| ;; Load files, set mode based on hooks and filename | |
| (require 'clojure-mode) | |
| (autoload 'clojure-mode "clojure-mode" "A major mode for Clojure" t) | |
| (add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode)) | |
| (require 'swank-clojure) |