View Null.java
This file contains 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
public class Null { | |
public static void main(String args[]) { | |
new String((String)null); | |
} | |
} |
View gist:9137965
This file contains 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
(defprotocol Foo | |
(alpha [this a]) | |
(beta [this a])) | |
(defrecord Bar [] | |
Foo | |
(alpha [_ a] | |
(inc a)) | |
(beta [this a] | |
(inc (alpha this a)))) |
View lazy_reemvoweler.clj
This file contains 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 reemvoweler.sync) | |
(defn build-sentence [orig-tree tree words chars consonants vowels] | |
(lazy-seq | |
(if tree | |
(concat | |
(if-let [[c & consonants] (seq consonants)] | |
(build-sentence orig-tree (get tree c) words (conj chars c) consonants vowels)) | |
(if-let [[v & vowels] (seq vowels)] | |
(build-sentence orig-tree (get tree v) words (conj chars v) consonants vowels)) |
View gist:10877484
This file contains 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
(defun dabbrev-allow-symbols () | |
(setq-local dabbrev-abbrev-skip-leading-regexp ":")) | |
(add-hook 'ruby-mode-hook 'dabbrev-allow-symbols) | |
(add-hook 'clojure-mode-hook 'dabbrev-allow-symbols) |
View gist:69b0333fc9c1927c7b34
This file contains 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
CREATED BY SIZE | |
/bin/sh -c chown -R bree /srv/www 204.1 MB | |
/bin/sh -c #(nop) ADD dir:1ba5e606b64673a429a6e41f22dd80c96f6b9fafb5e9988d813202ac9fd17ef0 in /srv/www 204.1 MB | |
/bin/sh -c sudo -u bree bundle install --deployment --without development test doc 203.2 MB |
View gist:17fbd13920b1698e53ab
This file contains 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
CREATED BY SIZE | |
/bin/sh -c #(nop) VOLUME /srv/www/public 0 B | |
/bin/sh -c #(nop) EXPOSE map[3000/tcp:{}] 0 B | |
/bin/sh -c #(nop) VOLUME /srv/www/log 0 B | |
/bin/sh -c #(nop) CMD [rails server] 0 B | |
/bin/sh -c #(nop) ENTRYPOINT [bundle exec] 0 B | |
/bin/sh -c bundle exec rake bower:install['--quiet --config.interactive=false'] assets:precompile 4.984 MB | |
/bin/sh -c #(nop) USER bree |
View gist:c7f1912da24fba07e088
This file contains 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
$(this).each -> that.load that._.defaults options, into: $(this) |
View code.clj
This file contains 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 typed.core | |
(:require [clojure.core.typed :as t :refer [ann ann-form def-alias declare-names]])) | |
(def-alias Cow '{:type ':cow}) | |
(def-alias Pig '{:type ':pig}) | |
(def-alias Animal (U Cow Pig)) | |
(t/ann in-the-barn '[Animal Animal *]) | |
(def in-the-barn [{:type :cow} {:type :pig}]) |
View orig.clj
This file contains 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
Type Error (NO_SOURCE_FILE:18:1) Type mismatch: | |
Expected: (U Long Integer BigInteger BigInt Byte Short (Value :empty)) | |
Actual: (U Long Integer BigInteger BigInt Byte Short (Value :empty) nil) | |
in: (if (seq c) (last c) :empty) | |
Type Error (NO_SOURCE_FILE:18:1) Type mismatch: | |
Expected: (Fn [(t/Coll t/AnyInteger) -> (U t/AnyInteger (Value :empty))]) |
View demo.clj
This file contains 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
(defmethod evaluate-one :assignment [system stmt] | |
(let [[_ name val] stmt | |
_ (assert val) ;; <--- Removing this removes the error | |
val (evaluate system val)] | |
(swap! (:variables system) var/add-binding name val))) |
OlderNewer