diff --git a/core/procs.go b/core/procs.go
index e6bb575e..6c13a34a 100644
--- a/core/procs.go
+++ b/core/procs.go
@@ -38,7 +38,7 @@ const (
PRINT_IF_NOT_NIL
)
-const VERSION = "v1.3.3"
+const VERSION = "v1.3.4"
const (
CLJ Dialect = iota
diff --git a/docs/joker.time.html b/docs/joker.time.html
index cc75bb41..59615aab 100644
--- a/docs/joker.time.html
+++ b/docs/joker.time.html
@@ -37,6 +37,9 @@
Index
ansi-c
+
+ day-of-year
+
format
@@ -369,6 +372,16 @@ add-date
Returns the time t + (years, months, days).
+
+
+ day-of-year
+ Function
+ v1.3.4
+ (day-of-year t)
+
+ Returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years.
+
+
diff --git a/docs/main.js b/docs/main.js
index f2407e5b..c21b6acc 100644
--- a/docs/main.js
+++ b/docs/main.js
@@ -4,7 +4,7 @@ function toggleTypes(e) {
e.target.parentNode.querySelectorAll('code').forEach(el => el.classList.toggle('hide'));
}
-const terms = ["joker.base64/decode-string","joker.base64/encode-string","joker.better-cond/cond","joker.better-cond/if-let","joker.better-cond/if-some","joker.better-cond/when-let","joker.better-cond/when-some","joker.bolt/by-prefix","joker.bolt/close","joker.bolt/create-bucket","joker.bolt/create-bucket-if-not-exists","joker.bolt/delete","joker.bolt/delete-bucket","joker.bolt/get","joker.bolt/next-sequence","joker.bolt/open","joker.bolt/put","joker.core/*","joker.core/*'","joker.core/*1","joker.core/*2","joker.core/*3","joker.core/*assert*","joker.core/*command-line-args*","joker.core/*e","joker.core/*err*","joker.core/*file*","joker.core/*flush-on-newline*","joker.core/*in*","joker.core/*joker-version*","joker.core/*linter-config*","joker.core/*linter-mode*","joker.core/*main-file*","joker.core/*ns*","joker.core/*out*","joker.core/*print-readably*","joker.core/+","joker.core/+'","joker.core/-","joker.core/-'","joker.core/->","joker.core/->>","joker.core//","joker.core/<","joker.core/","joker.core/>!","joker.core/>=","joker.core/alias","joker.core/all-ns","joker.core/alter-meta!","joker.core/and","joker.core/any?","joker.core/apply","joker.core/array-map","joker.core/as->","joker.core/assert","joker.core/assoc","joker.core/assoc-in","joker.core/associative?","joker.core/atom","joker.core/bigfloat","joker.core/bigfloat?","joker.core/bigint","joker.core/binding","joker.core/bit-and","joker.core/bit-and-not","joker.core/bit-clear","joker.core/bit-flip","joker.core/bit-not","joker.core/bit-or","joker.core/bit-set","joker.core/bit-shift-left","joker.core/bit-shift-right","joker.core/bit-test","joker.core/bit-xor","joker.core/boolean","joker.core/boolean?","joker.core/bound?","joker.core/bounded-count","joker.core/butlast","joker.core/callable?","joker.core/case","joker.core/cast","joker.core/chan","joker.core/char","joker.core/char?","joker.core/chunked-seq?","joker.core/class","joker.core/close!","joker.core/coll?","joker.core/comment","joker.core/comp","joker.core/compare","joker.core/complement","joker.core/concat","joker.core/cond","joker.core/cond->","joker.core/cond->>","joker.core/condp","joker.core/conj","joker.core/cons","joker.core/constantly","joker.core/contains?","joker.core/count","joker.core/counted?","joker.core/create-ns","joker.core/cycle","joker.core/dec","joker.core/dec'","joker.core/declare","joker.core/dedupe","joker.core/default-data-readers","joker.core/defmacro","joker.core/defmethod","joker.core/defmulti","joker.core/defn","joker.core/defn-","joker.core/defonce","joker.core/delay","joker.core/delay?","joker.core/denominator","joker.core/deref","joker.core/disj","joker.core/dissoc","joker.core/distinct","joker.core/distinct?","joker.core/doall","joker.core/dorun","joker.core/doseq","joker.core/dotimes","joker.core/doto","joker.core/double","joker.core/double?","joker.core/drop","joker.core/drop-last","joker.core/drop-while","joker.core/empty","joker.core/empty?","joker.core/eval","joker.core/even?","joker.core/every-pred","joker.core/every?","joker.core/ex-cause","joker.core/ex-data","joker.core/ex-info","joker.core/ex-message","joker.core/exit","joker.core/false?","joker.core/ffirst","joker.core/filter","joker.core/filterv","joker.core/find","joker.core/find-ns","joker.core/find-var","joker.core/first","joker.core/flatten","joker.core/float?","joker.core/flush","joker.core/fn","joker.core/fn?","joker.core/fnext","joker.core/fnil","joker.core/for","joker.core/force","joker.core/format","joker.core/frequencies","joker.core/gensym","joker.core/get","joker.core/get-in","joker.core/get-method","joker.core/go","joker.core/group-by","joker.core/hash","joker.core/hash-map","joker.core/hash-set","joker.core/ident?","joker.core/identical?","joker.core/identity","joker.core/if-let","joker.core/if-not","joker.core/if-some","joker.core/in-ns","joker.core/inc","joker.core/inc'","joker.core/indexed?","joker.core/instance?","joker.core/int","joker.core/int?","joker.core/integer?","joker.core/interleave","joker.core/intern","joker.core/interpose","joker.core/into","joker.core/iterate","joker.core/joker-version","joker.core/juxt","joker.core/keep","joker.core/keep-indexed","joker.core/key","joker.core/keys","joker.core/keyword","joker.core/keyword?","joker.core/last","joker.core/lazy-cat","joker.core/lazy-seq","joker.core/let","joker.core/letfn","joker.core/line-seq","joker.core/list","joker.core/list*","joker.core/list?","joker.core/load","joker.core/load-file","joker.core/load-string","joker.core/loaded-libs","joker.core/loop","joker.core/macroexpand","joker.core/macroexpand-1","joker.core/map","joker.core/map-indexed","joker.core/map?","joker.core/mapcat","joker.core/mapv","joker.core/max","joker.core/max-key","joker.core/memoize","joker.core/merge","joker.core/merge-with","joker.core/meta","joker.core/methods","joker.core/min","joker.core/min-key","joker.core/mod","joker.core/name","joker.core/namespace","joker.core/nat-int?","joker.core/neg-int?","joker.core/neg?","joker.core/newline","joker.core/next","joker.core/nfirst","joker.core/nil?","joker.core/nnext","joker.core/not","joker.core/not-any?","joker.core/not-empty","joker.core/not-every?","joker.core/not=","joker.core/ns","joker.core/ns-aliases","joker.core/ns-interns","joker.core/ns-map","joker.core/ns-name","joker.core/ns-publics","joker.core/ns-refers","joker.core/ns-resolve","joker.core/ns-sources","joker.core/ns-unalias","joker.core/ns-unmap","joker.core/nth","joker.core/nthnext","joker.core/nthrest","joker.core/num","joker.core/number?","joker.core/numerator","joker.core/odd?","joker.core/or","joker.core/partial","joker.core/partition","joker.core/partition-all","joker.core/partition-by","joker.core/peek","joker.core/pop","joker.core/pos-int?","joker.core/pos?","joker.core/pprint","joker.core/pr","joker.core/pr-err","joker.core/pr-str","joker.core/prefer-method","joker.core/prefers","joker.core/print","joker.core/print-err","joker.core/print-str","joker.core/printf","joker.core/println","joker.core/println-err","joker.core/println-str","joker.core/prn","joker.core/prn-err","joker.core/prn-str","joker.core/qualified-ident?","joker.core/qualified-keyword?","joker.core/qualified-symbol?","joker.core/quot","joker.core/rand","joker.core/rand-int","joker.core/rand-nth","joker.core/random-sample","joker.core/range","joker.core/ratio?","joker.core/rational?","joker.core/re-find","joker.core/re-matches","joker.core/re-pattern","joker.core/re-seq","joker.core/read","joker.core/read-line","joker.core/read-string","joker.core/realized?","joker.core/reduce","joker.core/reduce-kv","joker.core/reductions","joker.core/refer","joker.core/refer-clojure","joker.core/rem","joker.core/remove","joker.core/remove-all-methods","joker.core/remove-method","joker.core/remove-ns","joker.core/repeat","joker.core/repeatedly","joker.core/replace","joker.core/require","joker.core/requiring-resolve","joker.core/reset!","joker.core/reset-meta!","joker.core/reset-vals!","joker.core/resolve","joker.core/rest","joker.core/reverse","joker.core/reversible?","joker.core/rseq","joker.core/run!","joker.core/second","joker.core/select-keys","joker.core/seq","joker.core/seq?","joker.core/seqable?","joker.core/sequence","joker.core/sequential?","joker.core/set","joker.core/set?","joker.core/shuffle","joker.core/simple-ident?","joker.core/simple-keyword?","joker.core/simple-symbol?","joker.core/slurp","joker.core/some","joker.core/some->","joker.core/some->>","joker.core/some-fn","joker.core/some?","joker.core/sort","joker.core/sort-by","joker.core/special-symbol?","joker.core/spit","joker.core/split-at","joker.core/split-with","joker.core/str","joker.core/string?","joker.core/subs","joker.core/subvec","joker.core/swap!","joker.core/swap-vals!","joker.core/symbol","joker.core/symbol?","joker.core/take","joker.core/take-last","joker.core/take-nth","joker.core/take-while","joker.core/test","joker.core/the-ns","joker.core/time","joker.core/trampoline","joker.core/tree-seq","joker.core/true?","joker.core/type","joker.core/unsigned-bit-shift-right","joker.core/update","joker.core/update-in","joker.core/update-keys","joker.core/update-vals","joker.core/use","joker.core/val","joker.core/vals","joker.core/var-get","joker.core/var-set","joker.core/var?","joker.core/vary-meta","joker.core/vec","joker.core/vector","joker.core/vector?","joker.core/when","joker.core/when-first","joker.core/when-let","joker.core/when-not","joker.core/when-some","joker.core/while","joker.core/with-bindings","joker.core/with-bindings*","joker.core/with-in-str","joker.core/with-meta","joker.core/with-out-str","joker.core/with-redefs","joker.core/with-redefs-fn","joker.core/xml-seq","joker.core/zero?","joker.core/zipmap","joker.crypto/hmac","joker.crypto/md5","joker.crypto/sha1","joker.crypto/sha224","joker.crypto/sha256","joker.crypto/sha384","joker.crypto/sha512","joker.crypto/sha512-224","joker.crypto/sha512-256","joker.csv/csv-seq","joker.csv/write","joker.csv/write-string","joker.filepath/abs","joker.filepath/abs?","joker.filepath/base","joker.filepath/clean","joker.filepath/dir","joker.filepath/eval-symlinks","joker.filepath/ext","joker.filepath/file-seq","joker.filepath/from-slash","joker.filepath/glob","joker.filepath/join","joker.filepath/list-separator","joker.filepath/matches?","joker.filepath/rel","joker.filepath/separator","joker.filepath/split","joker.filepath/split-list","joker.filepath/to-slash","joker.filepath/volume-name","joker.git/add-commit","joker.git/add-path","joker.git/commit","joker.git/config","joker.git/head","joker.git/log","joker.git/object","joker.git/open","joker.git/ref","joker.git/resolve-revision","joker.hex/decode-string","joker.hex/encode-string","joker.hiccup/html","joker.hiccup/raw-string","joker.html/escape","joker.html/unescape","joker.http/send","joker.http/start-file-server","joker.http/start-server","joker.io/close","joker.io/copy","joker.io/pipe","joker.json/json-seq","joker.json/read-string","joker.json/write-string","joker.markdown/convert-string","joker.math/abs","joker.math/ceil","joker.math/copy-sign","joker.math/cos","joker.math/cube-root","joker.math/dim","joker.math/e","joker.math/exp","joker.math/exp-2","joker.math/exp-minus-1","joker.math/floor","joker.math/hypot","joker.math/inf","joker.math/inf?","joker.math/ln-of-10","joker.math/ln-of-2","joker.math/log","joker.math/log-10","joker.math/log-10-of-e","joker.math/log-2","joker.math/log-2-of-e","joker.math/log-binary","joker.math/log-plus-1","joker.math/max-double","joker.math/modf","joker.math/nan","joker.math/nan?","joker.math/next-after","joker.math/phi","joker.math/pi","joker.math/pow","joker.math/pow-10","joker.math/precision","joker.math/round","joker.math/round-to-even","joker.math/set-precision","joker.math/sign-bit","joker.math/sin","joker.math/smallest-nonzero-double","joker.math/sqrt","joker.math/sqrt-of-2","joker.math/sqrt-of-e","joker.math/sqrt-of-phi","joker.math/sqrt-of-pi","joker.math/trunc","joker.os/SIGABRT","joker.os/SIGALRM","joker.os/SIGFPE","joker.os/SIGHUP","joker.os/SIGILL","joker.os/SIGINT","joker.os/SIGKILL","joker.os/SIGPIPE","joker.os/SIGQUIT","joker.os/SIGSEGV","joker.os/SIGTERM","joker.os/SIGTRAP","joker.os/args","joker.os/chdir","joker.os/chmod","joker.os/chown","joker.os/chtimes","joker.os/clearenv","joker.os/close","joker.os/create","joker.os/create-temp","joker.os/cwd","joker.os/egid","joker.os/env","joker.os/euid","joker.os/exec","joker.os/executable","joker.os/exists?","joker.os/exit","joker.os/expand-env","joker.os/get-env","joker.os/gid","joker.os/groups","joker.os/hostname","joker.os/kill","joker.os/lchown","joker.os/link","joker.os/ls","joker.os/lstat","joker.os/mkdir","joker.os/mkdir-all","joker.os/mkdir-temp","joker.os/open","joker.os/pagesize","joker.os/path-separator?","joker.os/pid","joker.os/ppid","joker.os/read-link","joker.os/remove","joker.os/remove-all","joker.os/rename","joker.os/set-env","joker.os/sh","joker.os/sh-from","joker.os/signal","joker.os/start","joker.os/stat","joker.os/symlink","joker.os/temp-dir","joker.os/truncate","joker.os/uid","joker.os/unset-env","joker.os/user-cache-dir","joker.os/user-config-dir","joker.os/user-home-dir","joker.pprint/print-table","joker.repl/apropos","joker.repl/dir","joker.repl/dir-fn","joker.repl/doc","joker.runtime/go-root","joker.runtime/go-version","joker.runtime/joker-version","joker.set/difference","joker.set/index","joker.set/intersection","joker.set/join","joker.set/map-invert","joker.set/project","joker.set/rename","joker.set/rename-keys","joker.set/select","joker.set/subset?","joker.set/superset?","joker.set/union","joker.strconv/atoi","joker.strconv/can-backquote?","joker.strconv/format-bool","joker.strconv/format-double","joker.strconv/format-int","joker.strconv/graphic?","joker.strconv/itoa","joker.strconv/parse-bool","joker.strconv/parse-double","joker.strconv/parse-int","joker.strconv/printable?","joker.strconv/quote","joker.strconv/quote-char","joker.strconv/quote-char-to-ascii","joker.strconv/quote-char-to-graphic","joker.strconv/quote-to-ascii","joker.strconv/quote-to-graphic","joker.strconv/unquote","joker.string/blank?","joker.string/capitalize","joker.string/ends-with?","joker.string/escape","joker.string/includes?","joker.string/index-of","joker.string/join","joker.string/last-index-of","joker.string/lower-case","joker.string/pad-left","joker.string/pad-right","joker.string/re-quote","joker.string/replace","joker.string/replace-first","joker.string/reverse","joker.string/split","joker.string/split-lines","joker.string/starts-with?","joker.string/trim","joker.string/trim-left","joker.string/trim-newline","joker.string/trim-right","joker.string/triml","joker.string/trimr","joker.string/upper-case","joker.template/apply-template","joker.template/do-template","joker.test/*initial-report-counters*","joker.test/*load-tests*","joker.test/*report-counters*","joker.test/*stack-trace-depth*","joker.test/*test-out*","joker.test/*testing-contexts*","joker.test/*testing-vars*","joker.test/are","joker.test/assert-any","joker.test/assert-expr","joker.test/assert-predicate","joker.test/compose-fixtures","joker.test/deftest","joker.test/deftest-","joker.test/do-report","joker.test/function?","joker.test/get-possibly-unbound-var","joker.test/inc-report-counter","joker.test/is","joker.test/join-fixtures","joker.test/report","joker.test/run-all-tests","joker.test/run-tests","joker.test/set-test","joker.test/successful?","joker.test/test-all-vars","joker.test/test-ns","joker.test/test-var","joker.test/test-vars","joker.test/testing","joker.test/testing-contexts-str","joker.test/testing-vars-str","joker.test/try-expr","joker.test/use-fixtures","joker.test/with-test","joker.test/with-test-out","joker.time/add","joker.time/add-date","joker.time/ansi-c","joker.time/format","joker.time/from-unix","joker.time/hour","joker.time/hours","joker.time/in-timezone","joker.time/kitchen","joker.time/microsecond","joker.time/millisecond","joker.time/minute","joker.time/minutes","joker.time/nanosecond","joker.time/now","joker.time/parse","joker.time/parse-duration","joker.time/rfc1123","joker.time/rfc1123-z","joker.time/rfc3339","joker.time/rfc3339-nano","joker.time/rfc822","joker.time/rfc822-z","joker.time/rfc850","joker.time/round","joker.time/ruby-date","joker.time/second","joker.time/seconds","joker.time/since","joker.time/sleep","joker.time/stamp","joker.time/stamp-micro","joker.time/stamp-milli","joker.time/stamp-nano","joker.time/string","joker.time/sub","joker.time/truncate","joker.time/unix","joker.time/unix-date","joker.time/until","joker.tools.cli/format-lines","joker.tools.cli/get-default-options","joker.tools.cli/make-summary-part","joker.tools.cli/parse-opts","joker.tools.cli/summarize","joker.url/path-escape","joker.url/path-unescape","joker.url/query-escape","joker.url/query-unescape","joker.uuid/new","joker.walk/keywordize-keys","joker.walk/macroexpand-all","joker.walk/postwalk","joker.walk/postwalk-demo","joker.walk/postwalk-replace","joker.walk/prewalk","joker.walk/prewalk-demo","joker.walk/prewalk-replace","joker.walk/stringify-keys","joker.walk/walk","joker.yaml/read-string","joker.yaml/write-string"];
+const terms = ["joker.base64/decode-string","joker.base64/encode-string","joker.better-cond/cond","joker.better-cond/if-let","joker.better-cond/if-some","joker.better-cond/when-let","joker.better-cond/when-some","joker.bolt/by-prefix","joker.bolt/close","joker.bolt/create-bucket","joker.bolt/create-bucket-if-not-exists","joker.bolt/delete","joker.bolt/delete-bucket","joker.bolt/get","joker.bolt/next-sequence","joker.bolt/open","joker.bolt/put","joker.core/*","joker.core/*'","joker.core/*1","joker.core/*2","joker.core/*3","joker.core/*assert*","joker.core/*command-line-args*","joker.core/*e","joker.core/*err*","joker.core/*file*","joker.core/*flush-on-newline*","joker.core/*in*","joker.core/*joker-version*","joker.core/*linter-config*","joker.core/*linter-mode*","joker.core/*main-file*","joker.core/*ns*","joker.core/*out*","joker.core/*print-readably*","joker.core/+","joker.core/+'","joker.core/-","joker.core/-'","joker.core/->","joker.core/->>","joker.core//","joker.core/<","joker.core/","joker.core/>!","joker.core/>=","joker.core/alias","joker.core/all-ns","joker.core/alter-meta!","joker.core/and","joker.core/any?","joker.core/apply","joker.core/array-map","joker.core/as->","joker.core/assert","joker.core/assoc","joker.core/assoc-in","joker.core/associative?","joker.core/atom","joker.core/bigfloat","joker.core/bigfloat?","joker.core/bigint","joker.core/binding","joker.core/bit-and","joker.core/bit-and-not","joker.core/bit-clear","joker.core/bit-flip","joker.core/bit-not","joker.core/bit-or","joker.core/bit-set","joker.core/bit-shift-left","joker.core/bit-shift-right","joker.core/bit-test","joker.core/bit-xor","joker.core/boolean","joker.core/boolean?","joker.core/bound?","joker.core/bounded-count","joker.core/butlast","joker.core/callable?","joker.core/case","joker.core/cast","joker.core/chan","joker.core/char","joker.core/char?","joker.core/chunked-seq?","joker.core/class","joker.core/close!","joker.core/coll?","joker.core/comment","joker.core/comp","joker.core/compare","joker.core/complement","joker.core/concat","joker.core/cond","joker.core/cond->","joker.core/cond->>","joker.core/condp","joker.core/conj","joker.core/cons","joker.core/constantly","joker.core/contains?","joker.core/count","joker.core/counted?","joker.core/create-ns","joker.core/cycle","joker.core/dec","joker.core/dec'","joker.core/declare","joker.core/dedupe","joker.core/default-data-readers","joker.core/defmacro","joker.core/defmethod","joker.core/defmulti","joker.core/defn","joker.core/defn-","joker.core/defonce","joker.core/delay","joker.core/delay?","joker.core/denominator","joker.core/deref","joker.core/disj","joker.core/dissoc","joker.core/distinct","joker.core/distinct?","joker.core/doall","joker.core/dorun","joker.core/doseq","joker.core/dotimes","joker.core/doto","joker.core/double","joker.core/double?","joker.core/drop","joker.core/drop-last","joker.core/drop-while","joker.core/empty","joker.core/empty?","joker.core/eval","joker.core/even?","joker.core/every-pred","joker.core/every?","joker.core/ex-cause","joker.core/ex-data","joker.core/ex-info","joker.core/ex-message","joker.core/exit","joker.core/false?","joker.core/ffirst","joker.core/filter","joker.core/filterv","joker.core/find","joker.core/find-ns","joker.core/find-var","joker.core/first","joker.core/flatten","joker.core/float?","joker.core/flush","joker.core/fn","joker.core/fn?","joker.core/fnext","joker.core/fnil","joker.core/for","joker.core/force","joker.core/format","joker.core/frequencies","joker.core/gensym","joker.core/get","joker.core/get-in","joker.core/get-method","joker.core/go","joker.core/group-by","joker.core/hash","joker.core/hash-map","joker.core/hash-set","joker.core/ident?","joker.core/identical?","joker.core/identity","joker.core/if-let","joker.core/if-not","joker.core/if-some","joker.core/in-ns","joker.core/inc","joker.core/inc'","joker.core/indexed?","joker.core/instance?","joker.core/int","joker.core/int?","joker.core/integer?","joker.core/interleave","joker.core/intern","joker.core/interpose","joker.core/into","joker.core/iterate","joker.core/joker-version","joker.core/juxt","joker.core/keep","joker.core/keep-indexed","joker.core/key","joker.core/keys","joker.core/keyword","joker.core/keyword?","joker.core/last","joker.core/lazy-cat","joker.core/lazy-seq","joker.core/let","joker.core/letfn","joker.core/line-seq","joker.core/list","joker.core/list*","joker.core/list?","joker.core/load","joker.core/load-file","joker.core/load-string","joker.core/loaded-libs","joker.core/loop","joker.core/macroexpand","joker.core/macroexpand-1","joker.core/map","joker.core/map-indexed","joker.core/map?","joker.core/mapcat","joker.core/mapv","joker.core/max","joker.core/max-key","joker.core/memoize","joker.core/merge","joker.core/merge-with","joker.core/meta","joker.core/methods","joker.core/min","joker.core/min-key","joker.core/mod","joker.core/name","joker.core/namespace","joker.core/nat-int?","joker.core/neg-int?","joker.core/neg?","joker.core/newline","joker.core/next","joker.core/nfirst","joker.core/nil?","joker.core/nnext","joker.core/not","joker.core/not-any?","joker.core/not-empty","joker.core/not-every?","joker.core/not=","joker.core/ns","joker.core/ns-aliases","joker.core/ns-interns","joker.core/ns-map","joker.core/ns-name","joker.core/ns-publics","joker.core/ns-refers","joker.core/ns-resolve","joker.core/ns-sources","joker.core/ns-unalias","joker.core/ns-unmap","joker.core/nth","joker.core/nthnext","joker.core/nthrest","joker.core/num","joker.core/number?","joker.core/numerator","joker.core/odd?","joker.core/or","joker.core/partial","joker.core/partition","joker.core/partition-all","joker.core/partition-by","joker.core/peek","joker.core/pop","joker.core/pos-int?","joker.core/pos?","joker.core/pprint","joker.core/pr","joker.core/pr-err","joker.core/pr-str","joker.core/prefer-method","joker.core/prefers","joker.core/print","joker.core/print-err","joker.core/print-str","joker.core/printf","joker.core/println","joker.core/println-err","joker.core/println-str","joker.core/prn","joker.core/prn-err","joker.core/prn-str","joker.core/qualified-ident?","joker.core/qualified-keyword?","joker.core/qualified-symbol?","joker.core/quot","joker.core/rand","joker.core/rand-int","joker.core/rand-nth","joker.core/random-sample","joker.core/range","joker.core/ratio?","joker.core/rational?","joker.core/re-find","joker.core/re-matches","joker.core/re-pattern","joker.core/re-seq","joker.core/read","joker.core/read-line","joker.core/read-string","joker.core/realized?","joker.core/reduce","joker.core/reduce-kv","joker.core/reductions","joker.core/refer","joker.core/refer-clojure","joker.core/rem","joker.core/remove","joker.core/remove-all-methods","joker.core/remove-method","joker.core/remove-ns","joker.core/repeat","joker.core/repeatedly","joker.core/replace","joker.core/require","joker.core/requiring-resolve","joker.core/reset!","joker.core/reset-meta!","joker.core/reset-vals!","joker.core/resolve","joker.core/rest","joker.core/reverse","joker.core/reversible?","joker.core/rseq","joker.core/run!","joker.core/second","joker.core/select-keys","joker.core/seq","joker.core/seq?","joker.core/seqable?","joker.core/sequence","joker.core/sequential?","joker.core/set","joker.core/set?","joker.core/shuffle","joker.core/simple-ident?","joker.core/simple-keyword?","joker.core/simple-symbol?","joker.core/slurp","joker.core/some","joker.core/some->","joker.core/some->>","joker.core/some-fn","joker.core/some?","joker.core/sort","joker.core/sort-by","joker.core/special-symbol?","joker.core/spit","joker.core/split-at","joker.core/split-with","joker.core/str","joker.core/string?","joker.core/subs","joker.core/subvec","joker.core/swap!","joker.core/swap-vals!","joker.core/symbol","joker.core/symbol?","joker.core/take","joker.core/take-last","joker.core/take-nth","joker.core/take-while","joker.core/test","joker.core/the-ns","joker.core/time","joker.core/trampoline","joker.core/tree-seq","joker.core/true?","joker.core/type","joker.core/unsigned-bit-shift-right","joker.core/update","joker.core/update-in","joker.core/update-keys","joker.core/update-vals","joker.core/use","joker.core/val","joker.core/vals","joker.core/var-get","joker.core/var-set","joker.core/var?","joker.core/vary-meta","joker.core/vec","joker.core/vector","joker.core/vector?","joker.core/when","joker.core/when-first","joker.core/when-let","joker.core/when-not","joker.core/when-some","joker.core/while","joker.core/with-bindings","joker.core/with-bindings*","joker.core/with-in-str","joker.core/with-meta","joker.core/with-out-str","joker.core/with-redefs","joker.core/with-redefs-fn","joker.core/xml-seq","joker.core/zero?","joker.core/zipmap","joker.crypto/hmac","joker.crypto/md5","joker.crypto/sha1","joker.crypto/sha224","joker.crypto/sha256","joker.crypto/sha384","joker.crypto/sha512","joker.crypto/sha512-224","joker.crypto/sha512-256","joker.csv/csv-seq","joker.csv/write","joker.csv/write-string","joker.filepath/abs","joker.filepath/abs?","joker.filepath/base","joker.filepath/clean","joker.filepath/dir","joker.filepath/eval-symlinks","joker.filepath/ext","joker.filepath/file-seq","joker.filepath/from-slash","joker.filepath/glob","joker.filepath/join","joker.filepath/list-separator","joker.filepath/matches?","joker.filepath/rel","joker.filepath/separator","joker.filepath/split","joker.filepath/split-list","joker.filepath/to-slash","joker.filepath/volume-name","joker.git/add-commit","joker.git/add-path","joker.git/commit","joker.git/config","joker.git/head","joker.git/log","joker.git/object","joker.git/open","joker.git/ref","joker.git/resolve-revision","joker.hex/decode-string","joker.hex/encode-string","joker.hiccup/html","joker.hiccup/raw-string","joker.html/escape","joker.html/unescape","joker.http/send","joker.http/start-file-server","joker.http/start-server","joker.io/close","joker.io/copy","joker.io/pipe","joker.json/json-seq","joker.json/read-string","joker.json/write-string","joker.markdown/convert-string","joker.math/abs","joker.math/ceil","joker.math/copy-sign","joker.math/cos","joker.math/cube-root","joker.math/dim","joker.math/e","joker.math/exp","joker.math/exp-2","joker.math/exp-minus-1","joker.math/floor","joker.math/hypot","joker.math/inf","joker.math/inf?","joker.math/ln-of-10","joker.math/ln-of-2","joker.math/log","joker.math/log-10","joker.math/log-10-of-e","joker.math/log-2","joker.math/log-2-of-e","joker.math/log-binary","joker.math/log-plus-1","joker.math/max-double","joker.math/modf","joker.math/nan","joker.math/nan?","joker.math/next-after","joker.math/phi","joker.math/pi","joker.math/pow","joker.math/pow-10","joker.math/precision","joker.math/round","joker.math/round-to-even","joker.math/set-precision","joker.math/sign-bit","joker.math/sin","joker.math/smallest-nonzero-double","joker.math/sqrt","joker.math/sqrt-of-2","joker.math/sqrt-of-e","joker.math/sqrt-of-phi","joker.math/sqrt-of-pi","joker.math/trunc","joker.os/SIGABRT","joker.os/SIGALRM","joker.os/SIGFPE","joker.os/SIGHUP","joker.os/SIGILL","joker.os/SIGINT","joker.os/SIGKILL","joker.os/SIGPIPE","joker.os/SIGQUIT","joker.os/SIGSEGV","joker.os/SIGTERM","joker.os/SIGTRAP","joker.os/args","joker.os/chdir","joker.os/chmod","joker.os/chown","joker.os/chtimes","joker.os/clearenv","joker.os/close","joker.os/create","joker.os/create-temp","joker.os/cwd","joker.os/egid","joker.os/env","joker.os/euid","joker.os/exec","joker.os/executable","joker.os/exists?","joker.os/exit","joker.os/expand-env","joker.os/get-env","joker.os/gid","joker.os/groups","joker.os/hostname","joker.os/kill","joker.os/lchown","joker.os/link","joker.os/ls","joker.os/lstat","joker.os/mkdir","joker.os/mkdir-all","joker.os/mkdir-temp","joker.os/open","joker.os/pagesize","joker.os/path-separator?","joker.os/pid","joker.os/ppid","joker.os/read-link","joker.os/remove","joker.os/remove-all","joker.os/rename","joker.os/set-env","joker.os/sh","joker.os/sh-from","joker.os/signal","joker.os/start","joker.os/stat","joker.os/symlink","joker.os/temp-dir","joker.os/truncate","joker.os/uid","joker.os/unset-env","joker.os/user-cache-dir","joker.os/user-config-dir","joker.os/user-home-dir","joker.pprint/print-table","joker.repl/apropos","joker.repl/dir","joker.repl/dir-fn","joker.repl/doc","joker.runtime/go-root","joker.runtime/go-version","joker.runtime/joker-version","joker.set/difference","joker.set/index","joker.set/intersection","joker.set/join","joker.set/map-invert","joker.set/project","joker.set/rename","joker.set/rename-keys","joker.set/select","joker.set/subset?","joker.set/superset?","joker.set/union","joker.strconv/atoi","joker.strconv/can-backquote?","joker.strconv/format-bool","joker.strconv/format-double","joker.strconv/format-int","joker.strconv/graphic?","joker.strconv/itoa","joker.strconv/parse-bool","joker.strconv/parse-double","joker.strconv/parse-int","joker.strconv/printable?","joker.strconv/quote","joker.strconv/quote-char","joker.strconv/quote-char-to-ascii","joker.strconv/quote-char-to-graphic","joker.strconv/quote-to-ascii","joker.strconv/quote-to-graphic","joker.strconv/unquote","joker.string/blank?","joker.string/capitalize","joker.string/ends-with?","joker.string/escape","joker.string/includes?","joker.string/index-of","joker.string/join","joker.string/last-index-of","joker.string/lower-case","joker.string/pad-left","joker.string/pad-right","joker.string/re-quote","joker.string/replace","joker.string/replace-first","joker.string/reverse","joker.string/split","joker.string/split-lines","joker.string/starts-with?","joker.string/trim","joker.string/trim-left","joker.string/trim-newline","joker.string/trim-right","joker.string/triml","joker.string/trimr","joker.string/upper-case","joker.template/apply-template","joker.template/do-template","joker.test/*initial-report-counters*","joker.test/*load-tests*","joker.test/*report-counters*","joker.test/*stack-trace-depth*","joker.test/*test-out*","joker.test/*testing-contexts*","joker.test/*testing-vars*","joker.test/are","joker.test/assert-any","joker.test/assert-expr","joker.test/assert-predicate","joker.test/compose-fixtures","joker.test/deftest","joker.test/deftest-","joker.test/do-report","joker.test/function?","joker.test/get-possibly-unbound-var","joker.test/inc-report-counter","joker.test/is","joker.test/join-fixtures","joker.test/report","joker.test/run-all-tests","joker.test/run-tests","joker.test/set-test","joker.test/successful?","joker.test/test-all-vars","joker.test/test-ns","joker.test/test-var","joker.test/test-vars","joker.test/testing","joker.test/testing-contexts-str","joker.test/testing-vars-str","joker.test/try-expr","joker.test/use-fixtures","joker.test/with-test","joker.test/with-test-out","joker.time/add","joker.time/add-date","joker.time/ansi-c","joker.time/day-of-year","joker.time/format","joker.time/from-unix","joker.time/hour","joker.time/hours","joker.time/in-timezone","joker.time/kitchen","joker.time/microsecond","joker.time/millisecond","joker.time/minute","joker.time/minutes","joker.time/nanosecond","joker.time/now","joker.time/parse","joker.time/parse-duration","joker.time/rfc1123","joker.time/rfc1123-z","joker.time/rfc3339","joker.time/rfc3339-nano","joker.time/rfc822","joker.time/rfc822-z","joker.time/rfc850","joker.time/round","joker.time/ruby-date","joker.time/second","joker.time/seconds","joker.time/since","joker.time/sleep","joker.time/stamp","joker.time/stamp-micro","joker.time/stamp-milli","joker.time/stamp-nano","joker.time/string","joker.time/sub","joker.time/truncate","joker.time/unix","joker.time/unix-date","joker.time/until","joker.tools.cli/format-lines","joker.tools.cli/get-default-options","joker.tools.cli/make-summary-part","joker.tools.cli/parse-opts","joker.tools.cli/summarize","joker.url/path-escape","joker.url/path-unescape","joker.url/query-escape","joker.url/query-unescape","joker.uuid/new","joker.walk/keywordize-keys","joker.walk/macroexpand-all","joker.walk/postwalk","joker.walk/postwalk-demo","joker.walk/postwalk-replace","joker.walk/prewalk","joker.walk/prewalk-demo","joker.walk/prewalk-replace","joker.walk/stringify-keys","joker.walk/walk","joker.yaml/read-string","joker.yaml/write-string"];
const els = document.querySelectorAll('a.types');
els.forEach(el => el.addEventListener('click', toggleTypes));
diff --git a/std/base64.joke b/std/base64.joke
index 12164970..c92d63db 100644
--- a/std/base64.joke
+++ b/std/base64.joke
@@ -1,16 +1,15 @@
-(ns
- ^{:go-imports []
- :doc "Implements base64 encoding as specified by RFC 4648."}
+(ns ^{:go-imports []
+ :doc "Implements base64 encoding as specified by RFC 4648."}
base64)
(defn ^String decode-string
"Returns the bytes represented by the base64 string s."
{:added "1.0"
- :go "decodeString(s)"}
+ :go "decodeString(s)"}
[^String s])
(defn ^String encode-string
"Returns the base64 encoding of s."
{:added "1.0"
- :go "encodeString(s)"}
+ :go "encodeString(s)"}
[^String s])
diff --git a/std/bolt.joke b/std/bolt.joke
index e8e03817..1df53383 100644
--- a/std/bolt.joke
+++ b/std/bolt.joke
@@ -1,6 +1,5 @@
-(ns
- ^{:go-imports []
- :doc "Provide API for Bolt embedded database https://github.com/etcd-io/bbolt.
+(ns ^{:go-imports []
+ :doc "Provide API for Bolt embedded database https://github.com/etcd-io/bbolt.
Example:
diff --git a/std/crypto.joke b/std/crypto.joke
index 44a3340c..45ee8a0c 100644
--- a/std/crypto.joke
+++ b/std/crypto.joke
@@ -1,59 +1,58 @@
-(ns
- ^{:go-imports ["crypto/sha256" "crypto/sha512" "crypto/md5" "crypto/sha1"]
- :doc "Implements common cryptographic and hash functions."}
+(ns ^{:go-imports ["crypto/sha256" "crypto/sha512" "crypto/md5" "crypto/sha1"]
+ :doc "Implements common cryptographic and hash functions."}
crypto)
(defn ^String hmac
"Returns HMAC signature for message and key using specified algorithm.
Algorithm is one of the following: :sha1, :sha224, :sha256, :sha384, :sha512."
{:added "1.0"
- :go "hmacSum(algorithm, message, key)"}
+ :go "hmacSum(algorithm, message, key)"}
[^Keyword algorithm ^String message ^String key])
(defn ^String sha256
"Returns the SHA256 checksum of the data."
{:added "1.0"
- :go "! t := sha256.Sum256([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha256.Sum256([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String sha224
"Returns the SHA224 checksum of the data."
{:added "1.0"
- :go "! t := sha256.Sum224([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha256.Sum224([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String sha384
"Returns the SHA384 checksum of the data."
{:added "1.0"
- :go "! t := sha512.Sum384([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha512.Sum384([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String sha512
"Returns the SHA512 checksum of the data."
{:added "1.0"
- :go "! t := sha512.Sum512([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha512.Sum512([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String sha512-224
"Returns the SHA512/224 checksum of the data."
{:added "1.0"
- :go "! t := sha512.Sum512_224([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha512.Sum512_224([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String sha512-256
"Returns the SHA512/256 checksum of the data."
{:added "1.0"
- :go "! t := sha512.Sum512_256([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha512.Sum512_256([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String md5
"Returns the MD5 checksum of the data."
{:added "1.0"
- :go "! t := md5.Sum([]byte(data)); _res := string(t[:])"}
+ :go "! t := md5.Sum([]byte(data)); _res := string(t[:])"}
[^String data])
(defn ^String sha1
"Returns the SHA1 checksum of the data."
{:added "1.0"
- :go "! t := sha1.Sum([]byte(data)); _res := string(t[:])"}
+ :go "! t := sha1.Sum([]byte(data)); _res := string(t[:])"}
[^String data])
diff --git a/std/csv.joke b/std/csv.joke
index 7b396354..6fe94ac5 100644
--- a/std/csv.joke
+++ b/std/csv.joke
@@ -1,6 +1,5 @@
-(ns
- ^{:go-imports []
- :doc "Reads and writes comma-separated values (CSV) files as defined in RFC 4180."}
+(ns ^{:go-imports []
+ :doc "Reads and writes comma-separated values (CSV) files as defined in RFC 4180."}
csv)
(defn csv-seq
@@ -34,8 +33,8 @@
This is done even if the field delimiter, comma, is white space.
Default value is false."
{:added "1.0"
- :go {1 "csvSeqOpts(rdr, EmptyArrayMap())"
- 2 "csvSeqOpts(rdr, opts)"}}
+ :go {1 "csvSeqOpts(rdr, EmptyArrayMap())"
+ 2 "csvSeqOpts(rdr, opts)"}}
([^Object rdr])
([^Object rdr ^Map opts]))
@@ -48,8 +47,8 @@
:use-crlf - if true, uses \\r\\n as the line terminator. Default value is false."
{:added "1.0"
- :go {1 "writeString(data, EmptyArrayMap())"
- 2 "writeString(data, opts)"}}
+ :go {1 "writeString(data, EmptyArrayMap())"
+ 2 "writeString(data, opts)"}}
([^Seqable data])
([^Seqable data ^Map opts]))
@@ -59,8 +58,8 @@
data must be Seqable, each element of which must be Seqable as well.
opts is as in joker.csv/write-string."
{:added "1.0"
- :go {2 "write(f, data, EmptyArrayMap())"
- 3 "write(f, data, opts)"}}
+ :go {2 "write(f, data, EmptyArrayMap())"
+ 3 "write(f, data, opts)"}}
([^IOWriter f ^Seqable data])
([^IOWriter f ^Seqable data ^Map opts]))
diff --git a/std/filepath.joke b/std/filepath.joke
index d6a860d1..052abb9c 100644
--- a/std/filepath.joke
+++ b/std/filepath.joke
@@ -1,12 +1,11 @@
-(ns
- ^{:go-imports ["path/filepath"]
- :doc "Implements utility routines for manipulating filename paths."}
+(ns ^{:go-imports ["path/filepath"]
+ :doc "Implements utility routines for manipulating filename paths."}
filepath)
(defn file-seq
"Returns a seq of maps with info about files or directories under root."
{:added "1.0"
- :go "fileSeq(root)"}
+ :go "fileSeq(root)"}
[^String root])
(defn ^String abs
@@ -15,7 +14,7 @@
The absolute path name for a given file is not guaranteed to be unique.
Calls clean on the result."
{:added "1.0"
- :go "! _res, err := filepath.Abs(path); PanicOnErr(err)"}
+ :go "! _res, err := filepath.Abs(path); PanicOnErr(err)"}
[^String path])
(defn ^String base
@@ -23,7 +22,7 @@
extracting the last element. If the path is empty, returns \".\". If the path consists
entirely of separators, returns a single separator."
{:added "1.0"
- :go "filepath.Base(path)"}
+ :go "filepath.Base(path)"}
[^String path])
(defn ^String clean
@@ -43,7 +42,7 @@ Finally, any occurrences of slash are replaced by separator.
If the result of this process is an empty string, returns the string \".\"."
{:added "1.0"
- :go "filepath.Clean(path)"}
+ :go "filepath.Clean(path)"}
[^String path])
(defn ^String dir
@@ -52,7 +51,7 @@ If the result of this process is an empty string, returns the string \".\"."
If the path is empty, returns \".\". If the path consists entirely of separators,
returns a single separator. The returned path does not end in a separator unless it is the root directory."
{:added "1.0"
- :go "filepath.Dir(path)"}
+ :go "filepath.Dir(path)"}
[^String path])
(defn ^String eval-symlinks
@@ -60,21 +59,21 @@ If the result of this process is an empty string, returns the string \".\"."
relative to the current directory, unless one of the components is an absolute symbolic link.
Calls clean on the result."
{:added "1.0"
- :go "! _res, err := filepath.EvalSymlinks(path); PanicOnErr(err)"}
+ :go "! _res, err := filepath.EvalSymlinks(path); PanicOnErr(err)"}
[^String path])
(defn ^String ext
"Returns the file name extension used by path. The extension is the suffix beginning at the final dot
in the final element of path; it is empty if there is no dot."
{:added "1.0"
- :go "filepath.Ext(path)"}
+ :go "filepath.Ext(path)"}
[^String path])
(defn ^String from-slash
"Returns the result of replacing each slash ('/') character in path with a separator character.
Multiple slashes are replaced by multiple separators."
{:added "1.0"
- :go "filepath.FromSlash(path)"}
+ :go "filepath.FromSlash(path)"}
[^String path])
(defn ^{:tag [String]} glob
@@ -85,13 +84,13 @@ If the result of this process is an empty string, returns the string \".\"."
Ignores file system errors such as I/O errors reading directories.
Throws exception when pattern is malformed."
{:added "1.0"
- :go "! _res, err := filepath.Glob(pattern); PanicOnErr(err)"}
+ :go "! _res, err := filepath.Glob(pattern); PanicOnErr(err)"}
[^String pattern])
(defn ^Boolean abs?
"Reports whether the path is absolute."
{:added "1.0"
- :go "filepath.IsAbs(path)"}
+ :go "filepath.IsAbs(path)"}
[^String path])
(defn ^String join
@@ -99,7 +98,7 @@ If the result of this process is an empty string, returns the string \".\"."
Calls clean on the result; in particular, all empty strings are ignored. On Windows,
the result is a UNC path if and only if the first path element is a UNC path."
{:added "1.0"
- :go "filepath.Join(elems...)"}
+ :go "filepath.Join(elems...)"}
[& ^String elems])
(defn ^Boolean matches?
@@ -108,7 +107,7 @@ If the result of this process is an empty string, returns the string \".\"."
Throws exception if pattern is malformed.
On Windows, escaping is disabled. Instead, '\\' is treated as path separator."
{:added "1.0"
- :go "! _res, err := filepath.Match(pattern, name); PanicOnErr(err)"}
+ :go "! _res, err := filepath.Match(pattern, name); PanicOnErr(err)"}
[^String pattern ^String name])
(defn ^String rel
@@ -118,7 +117,7 @@ If the result of this process is an empty string, returns the string \".\"."
relative to basepath or if knowing the current working directory would be necessary to compute it.
Calls clean on the result."
{:added "1.0"
- :go "! _res, err := filepath.Rel(basepath, targpath); PanicOnErr(err)"}
+ :go "! _res, err := filepath.Rel(basepath, targpath); PanicOnErr(err)"}
[^String basepath ^String targpath])
(defn split
@@ -126,42 +125,40 @@ If the result of this process is an empty string, returns the string \".\"."
If there is no separator in path, returns an empty dir and file set to path. The returned values have
the property that path = dir+file."
{:added "1.0"
- :go "! _dir, _file := filepath.Split(path); _res := NewVectorFrom(MakeString(_dir), MakeString(_file))"}
+ :go "! _dir, _file := filepath.Split(path); _res := NewVectorFrom(MakeString(_dir), MakeString(_file))"}
[^String path])
(defn ^{:tag [String]} split-list
"Splits a list of paths joined by the OS-specific list-separator, usually found in PATH or GOPATH environment variables.
Returns an empty slice when passed an empty string."
{:added "1.0"
- :go "filepath.SplitList(path)"}
+ :go "filepath.SplitList(path)"}
[^String path])
(defn ^String to-slash
"Returns the result of replacing each separator character in path with a slash ('/') character.
Multiple separators are replaced by multiple slashes."
{:added "1.0"
- :go "filepath.ToSlash(path)"}
+ :go "filepath.ToSlash(path)"}
[^String path])
(defn ^String volume-name
"Returns leading volume name. Given \"C:\\foo\\bar\" it returns \"C:\" on Windows. Given \"\\\\host\\share\\foo\"
returns \"\\\\host\\share\". On other platforms it returns \"\"."
{:added "1.0"
- :go "filepath.VolumeName(path)"}
+ :go "filepath.VolumeName(path)"}
[^String path])
-(def
- ^{:doc "OS-specific path separator."
- :added "1.0"
- :tag String
- :const true
- :go "string(filepath.Separator)"}
+(def ^{:doc "OS-specific path separator."
+ :added "1.0"
+ :tag String
+ :const true
+ :go "string(filepath.Separator)"}
separator)
-(def
- ^{:doc "OS-specific path list separator."
- :added "1.0"
- :tag String
- :const true
- :go "string(filepath.ListSeparator)"}
+(def ^{:doc "OS-specific path list separator."
+ :added "1.0"
+ :tag String
+ :const true
+ :go "string(filepath.ListSeparator)"}
list-separator)
diff --git a/std/hex.joke b/std/hex.joke
index efd0fd55..bd9ad1d6 100644
--- a/std/hex.joke
+++ b/std/hex.joke
@@ -1,16 +1,15 @@
-(ns
- ^{:go-imports ["encoding/hex"]
- :doc "Implements hexadecimal encoding and decoding."}
+(ns ^{:go-imports ["encoding/hex"]
+ :doc "Implements hexadecimal encoding and decoding."}
hex)
(defn ^String decode-string
"Returns the bytes represented by the hexadecimal string s."
{:added "1.0"
- :go "! t, err := hex.DecodeString(s); PanicOnErr(err); _res := string(t)"}
+ :go "! t, err := hex.DecodeString(s); PanicOnErr(err); _res := string(t)"}
[^String s])
(defn ^String encode-string
"Returns the hexadecimal encoding of s."
{:added "1.0"
- :go "hex.EncodeToString([]byte(s))"}
+ :go "hex.EncodeToString([]byte(s))"}
[^String s])
diff --git a/std/html.joke b/std/html.joke
index a646a723..68d2a8b3 100644
--- a/std/html.joke
+++ b/std/html.joke
@@ -1,16 +1,15 @@
-(ns
- ^{:go-imports ["html"]
- :doc "Provides functions for escaping and unescaping HTML text."}
+(ns ^{:go-imports ["html"]
+ :doc "Provides functions for escaping and unescaping HTML text."}
html)
(defn ^String escape
"Escapes special characters like < to become <. It escapes only five such characters: <, >, &, ' and \"."
{:added "1.0"
- :go "html.EscapeString(s)"}
+ :go "html.EscapeString(s)"}
[^String s])
(defn ^String unescape
"Unescapes entities like < to become <."
{:added "1.0"
- :go "html.UnescapeString(s)"}
+ :go "html.UnescapeString(s)"}
[^String s])
diff --git a/std/http.joke b/std/http.joke
index f583cd1f..2836d323 100644
--- a/std/http.joke
+++ b/std/http.joke
@@ -1,6 +1,5 @@
-(ns
- ^{:go-imports []
- :doc "Provides HTTP client and server implementations."}
+(ns ^{:go-imports []
+ :doc "Provides HTTP client and server implementations."}
http)
(defn send
@@ -18,18 +17,18 @@
- headers (map)
- content-length (int)"
{:added "1.0"
- :go "sendRequest(request)"}
+ :go "sendRequest(request)"}
[^Map request])
(defn start-server
"Starts HTTP server on the TCP network address addr."
{:added "1.0"
- :go "startServer(addr, handler)"}
+ :go "startServer(addr, handler)"}
[^String addr ^Callable handler])
(defn start-file-server
"Starts HTTP server on the TCP network address addr that
serves HTTP requests with the contents of the file system rooted at root."
{:added "1.0"
- :go "startFileServer(addr, root)"}
+ :go "startFileServer(addr, root)"}
[^String addr ^String root])
diff --git a/std/io.joke b/std/io.joke
index f317aad2..7ac5f17e 100644
--- a/std/io.joke
+++ b/std/io.joke
@@ -1,6 +1,5 @@
-(ns
- ^{:go-imports ["io"]
- :doc "Provides basic interfaces to I/O primitives."}
+(ns ^{:go-imports ["io"]
+ :doc "Provides basic interfaces to I/O primitives."}
io)
(defn ^Int copy
@@ -9,7 +8,7 @@
src must be IOReader, e.g. as returned by joker.os/open.
dst must be IOWriter, e.g. as returned by joker.os/create."
{:added "1.0"
- :go "! n, err := io.Copy(dst, src); PanicOnErr(err); _res := int(n)"} ;; TODO: 32-bit issue
+ :go "! n, err := io.Copy(dst, src); PanicOnErr(err); _res := int(n)"} ;; TODO: 32-bit issue
[^IOWriter dst ^IOReader src])
(defn pipe
diff --git a/std/json.joke b/std/json.joke
index 85c2e024..0de42fd5 100644
--- a/std/json.joke
+++ b/std/json.joke
@@ -1,6 +1,5 @@
-(ns
- ^{:go-imports []
- :doc "Implements encoding and decoding of JSON as defined in RFC 4627."}
+(ns ^{:go-imports []
+ :doc "Implements encoding and decoding of JSON as defined in RFC 4627."}
json)
(defn read-string
@@ -8,15 +7,15 @@
Optional opts map may have the following keys:
:keywords? - if true, JSON keys will be converted from strings to keywords."
{:added "1.0"
- :go {1 "readString(s, nil)"
- 2 "readString(s, opts)"}}
+ :go {1 "readString(s, nil)"
+ 2 "readString(s, opts)"}}
([^String s])
([^String s ^Map opts]))
(defn write-string
"Returns the JSON encoding of v."
{:added "1.0"
- :go "writeString(v)"}
+ :go "writeString(v)"}
[^Object v])
(defn json-seq
@@ -25,7 +24,7 @@
Optional opts map may have the following keys:
:keywords? - if true, JSON keys will be converted from strings to keywords."
{:added "1.0"
- :go {1 "jsonSeqOpts(rdr, EmptyArrayMap())"
- 2 "jsonSeqOpts(rdr, opts)"}}
+ :go {1 "jsonSeqOpts(rdr, EmptyArrayMap())"
+ 2 "jsonSeqOpts(rdr, opts)"}}
([^Object rdr])
([^Object rdr ^Map opts]))
diff --git a/std/markdown.joke b/std/markdown.joke
index 3142f113..ac5577bb 100644
--- a/std/markdown.joke
+++ b/std/markdown.joke
@@ -1,6 +1,5 @@
-(ns
- ^{:go-imports []
- :doc "Implements GitHub Flavored Markdown rendering."}
+(ns ^{:go-imports []
+ :doc "Implements GitHub Flavored Markdown rendering."}
markdown)
(defn ^String convert-string
@@ -14,5 +13,5 @@
{:added "1.0"
:go {1 "convertString(s)"
2 "convertStringOpts(s, opts)"}}
- ([^String s])
- ([^String s ^Map opts]))
+ ([^String s])
+ ([^String s ^Map opts]))
diff --git a/std/math.joke b/std/math.joke
index 0275ce89..2803512b 100644
--- a/std/math.joke
+++ b/std/math.joke
@@ -1,24 +1,23 @@
-(ns
- ^{:go-imports ["math"]
- :doc "Provides basic constants and mathematical functions."}
+(ns ^{:go-imports ["math"]
+ :doc "Provides basic constants and mathematical functions."}
math)
(defn ^Double sin
"Returns the sine of the radian argument x."
{:added "1.0"
- :go "math.Sin(x.Double().D)"}
+ :go "math.Sin(x.Double().D)"}
[^Number x])
(defn ^Double cos
"Returns the cosine of the radian argument x."
{:added "1.0"
- :go "math.Cos(x.Double().D)"}
+ :go "math.Cos(x.Double().D)"}
[^Number x])
(defn ^Double hypot
"Returns Sqrt(p*p + q*q), taking care to avoid unnecessary overflow and underflow."
{:added "1.0"
- :go "math.Hypot(p.Double().D, q.Double().D)"}
+ :go "math.Hypot(p.Double().D, q.Double().D)"}
[^Number p, ^Number q])
(defn ^Double abs
@@ -42,13 +41,13 @@
(defn ^Double copy-sign
"Returns value with the magnitude of x and the sign of y."
{:added "1.0"
- :go "math.Copysign(x.Double().D, y.Double().D)"}
+ :go "math.Copysign(x.Double().D, y.Double().D)"}
[^Number x, ^Number y])
(defn ^Double dim
"Returns the maximum of x-y and 0."
{:added "1.0"
- :go "math.Dim(x.Double().D, y.Double().D)"}
+ :go "math.Dim(x.Double().D, y.Double().D)"}
[^Number x, ^Number y])
(defn ^Double exp
@@ -191,116 +190,102 @@
:go "math.Trunc(x.Double().D)"}
[^Number x])
-(def
- ^{:doc "pi"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Pi"}
+(def ^{:doc "pi"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Pi"}
pi)
-(def
- ^{:doc "e"
- :added "1.0"
- :tag Double
- :const true
- :go "math.E"}
+(def ^{:doc "e"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.E"}
e)
-(def
- ^{:doc "Phi"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Phi"}
+(def ^{:doc "Phi"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Phi"}
phi)
-(def
- ^{:doc "Square root of 2"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Sqrt2"}
+(def ^{:doc "Square root of 2"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Sqrt2"}
sqrt-of-2)
-(def
- ^{:doc "Square root of e"
- :added "1.0"
- :tag Double
- :const true
- :go "math.SqrtE"}
+(def ^{:doc "Square root of e"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.SqrtE"}
sqrt-of-e)
-(def
- ^{:doc "Square root of pi"
- :added "1.0"
- :tag Double
- :const true
- :go "math.SqrtPi"}
+(def ^{:doc "Square root of pi"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.SqrtPi"}
sqrt-of-pi)
-(def
- ^{:doc "Square root of phi"
- :added "1.0"
- :tag Double
- :const true
- :go "math.SqrtPhi"}
+(def ^{:doc "Square root of phi"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.SqrtPhi"}
sqrt-of-phi)
-(def
- ^{:doc "Natural logarithm of 2"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Ln2"}
+(def ^{:doc "Natural logarithm of 2"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Ln2"}
ln-of-2)
-(def
- ^{:doc "Base-2 logarithm of e"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Log2E"}
+(def ^{:doc "Base-2 logarithm of e"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Log2E"}
log-2-of-e)
-(def
- ^{:doc "Natural logarithm of 10"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Ln10"}
+(def ^{:doc "Natural logarithm of 10"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Ln10"}
ln-of-10)
-(def
- ^{:doc "Base-10 logarithm of e"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Log10E"}
+(def ^{:doc "Base-10 logarithm of e"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Log10E"}
log-10-of-e)
-(def
- ^{:doc "Natural logarithm of 2"
- :added "1.0"
- :tag Double
- :const true
- :go "math.Ln2"}
+(def ^{:doc "Natural logarithm of 2"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.Ln2"}
ln-of-2)
-(def
- ^{:doc "Largest finite value representable by Double"
- :added "1.0"
- :tag Double
- :const true
- :go "math.MaxFloat64"}
+(def ^{:doc "Largest finite value representable by Double"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.MaxFloat64"}
max-double)
-(def
- ^{:doc "Smallest positive, non-zero value representable by Double"
- :added "1.0"
- :tag Double
- :const true
- :go "math.SmallestNonzeroFloat64"}
+(def ^{:doc "Smallest positive, non-zero value representable by Double"
+ :added "1.0"
+ :tag Double
+ :const true
+ :go "math.SmallestNonzeroFloat64"}
smallest-nonzero-double)
(defn ^BigInt precision
diff --git a/std/strconv.joke b/std/strconv.joke
index 651946fd..90432fa6 100644
--- a/std/strconv.joke
+++ b/std/strconv.joke
@@ -1,24 +1,23 @@
-(ns
- ^{:go-imports ["strconv"]
- :doc "Implements conversions to and from string representations of basic data types."}
+(ns ^{:go-imports ["strconv"]
+ :doc "Implements conversions to and from string representations of basic data types."}
strconv)
(defn ^Int atoi
"Equivalent to (parse-int s 10 0)."
{:added "1.0"
- :go "!_res, err := strconv.Atoi(s); PanicOnErr(err)"}
+ :go "!_res, err := strconv.Atoi(s); PanicOnErr(err)"}
[^String s])
(defn ^Boolean can-backquote?
"Reports whether the string s can be represented unchanged as a single-line backquoted string without control characters other than tab."
{:added "1.0"
- :go "strconv.CanBackquote(s)"}
+ :go "strconv.CanBackquote(s)"}
[^String s])
(defn ^String format-bool
"Returns \"true\" or \"false\" according to the value of b."
{:added "1.0"
- :go "strconv.FormatBool(b)"}
+ :go "strconv.FormatBool(b)"}
[^Boolean b])
(defn ^String format-double
@@ -26,43 +25,43 @@
The format fmt is one of 'b' (-ddddp±ddd, a binary exponent), 'e' (-d.dddde±dd, a decimal exponent), 'E' (-d.ddddE±dd, a decimal exponent), 'f' (-ddd.dddd, no exponent), 'g' ('e' for large exponents, 'f' otherwise), or 'G' ('E' for large exponents, 'f' otherwise).
The precision prec controls the number of digits (excluding the exponent) printed by the 'e', 'E', 'f', 'g', and 'G' formats. For 'e', 'E', and 'f' it is the number of digits after the decimal point. For 'g' and 'G' it is the maximum number of significant digits (trailing zeros are removed). The special precision -1 uses the smallest number of digits necessary such that ParseFloat will return f exactly."
{:added "1.0"
- :go "strconv.FormatFloat(f, byte(fmt), prec, bitSize)"}
+ :go "strconv.FormatFloat(f, byte(fmt), prec, bitSize)"}
[^Double f ^Char fmt ^Int prec ^Int bitSize])
(defn ^String format-int
"Returns the string representation of i in the given base, for 2 <= base <= 36. The result uses the lower-case letters 'a' to 'z' for digit values >= 10."
{:added "1.0"
- :go "strconv.FormatInt(int64(i), base)"}
+ :go "strconv.FormatInt(int64(i), base)"}
[^Int i ^Int base])
(defn ^Boolean graphic?
"Reports whether the char is defined as a Graphic by Unicode. Such characters include letters, marks, numbers, punctuation, symbols, and spaces, from categories L, M, N, P, S, and Zs."
{:added "1.0"
- :go "strconv.IsGraphic(c)"}
+ :go "strconv.IsGraphic(c)"}
[^Char c])
(defn ^Boolean printable?
"Reports whether the char is defined as printable by Joker: letters, numbers, punctuation, symbols and ASCII space."
{:added "1.0"
- :go "strconv.IsPrint(c)"}
+ :go "strconv.IsPrint(c)"}
[^Char c])
(defn ^String itoa
"Equivalent to (format-int i 10)."
{:added "1.0"
- :go "strconv.Itoa(i)"}
+ :go "strconv.Itoa(i)"}
[^Int i])
(defn ^Boolean parse-bool
"Returns the boolean value represented by the string. It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. Any other value returns an error."
{:added "1.0"
- :go "!_res, err := strconv.ParseBool(s); PanicOnErr(err)"}
+ :go "!_res, err := strconv.ParseBool(s); PanicOnErr(err)"}
[^String s])
(defn ^Double parse-double
"Converts the string s to a floating-point number."
{:added "1.0"
- :go "!_res, err := strconv.ParseFloat(s, 64); PanicOnErr(err)"}
+ :go "!_res, err := strconv.ParseFloat(s, 64); PanicOnErr(err)"}
[^String s])
(defn ^Int parse-int
@@ -70,55 +69,55 @@
If base == 0, the base is implied by the string's prefix: base 16 for \"0x\", base 8 for \"0\", and base 10 otherwise. For bases 1, below 0 or above 36 an error is returned.
The bitSize argument specifies the integer type that the result must fit into. Bit sizes 0, 8, 16, 32, and 64 correspond to int, int8, int16, int32, and int64. For a bitSize below 0 or above 64 an error is returned."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "!t, err := strconv.ParseInt(s, base, bitSize); PanicOnErr(err); _res := int(t)"}
+ ;; TODO: 32-bit issue
+ :go "!t, err := strconv.ParseInt(s, base, bitSize); PanicOnErr(err); _res := int(t)"}
[^String s ^Int base ^Int bitSize])
(defn ^String quote
"Returns a double-quoted string literal representing s. The returned string uses escape sequences (\\t, \\n, \\xFF, \\u0100)
for control characters and non-printable characters as defined by printable?."
{:added "1.0"
- :go "strconv.Quote(s)"}
+ :go "strconv.Quote(s)"}
[^String s])
(defn ^String quote-char
"Returns a single-quoted char literal representing the character. The returned string uses escape sequences (\\t, \\n, \\xFF, \\u0100)
for control characters and non-printable characters as defined by printable?."
{:added "1.0"
- :go "strconv.QuoteRune(c)"}
+ :go "strconv.QuoteRune(c)"}
[^Char c])
(defn ^String quote-char-to-ascii
"Returns a single-quoted char literal representing the character. The returned string uses escape sequences (\\t, \\n, \\xFF, \\u0100)
for non-ASCII characters and non-printable characters as defined by printable?."
{:added "1.0"
- :go "strconv.QuoteRuneToASCII(c)"}
+ :go "strconv.QuoteRuneToASCII(c)"}
[^Char c])
(defn ^String quote-char-to-graphic
"Returns a single-quoted char literal representing the character. The returned string uses escape sequences (\\t, \\n, \\xFF, \\u0100)
for non-ASCII characters and non-printable characters as defined by graphic?."
{:added "1.0"
- :go "strconv.QuoteRuneToGraphic(c)"}
+ :go "strconv.QuoteRuneToGraphic(c)"}
[^Char c])
(defn ^String quote-to-ascii
"Returns a double-quoted string literal representing s. The returned string uses escape sequences (\\t, \\n, \\xFF, \\u0100)
for non-ASCII characters and non-printable characters as defined by printable?."
{:added "1.0"
- :go "strconv.QuoteToASCII(s)"}
+ :go "strconv.QuoteToASCII(s)"}
[^String s])
(defn ^String quote-to-graphic
"Returns a double-quoted string literal representing s. The returned string uses escape sequences (\\t, \\n, \\xFF, \\u0100)
for non-ASCII characters and non-printable characters as defined by graphic?."
{:added "1.0"
- :go "strconv.QuoteToGraphic(s)"}
+ :go "strconv.QuoteToGraphic(s)"}
[^String s])
(defn ^String unquote
"Interprets s as a single-quoted, double-quoted, or backquoted string literal, returning the string value that s quotes.
(If s is single-quoted, it would be a Go character literal; Unquote returns the corresponding one-character string.)"
{:added "1.0"
- :go "!_res, err := strconv.Unquote(s); PanicOnErr(err)"}
+ :go "!_res, err := strconv.Unquote(s); PanicOnErr(err)"}
[^String s])
diff --git a/std/string.joke b/std/string.joke
index 85ebde11..2031eb65 100644
--- a/std/string.joke
+++ b/std/string.joke
@@ -1,30 +1,29 @@
-(ns
- ^{:go-imports ["regexp" "strings" "unicode"]
- :doc "Implements simple functions to manipulate strings."}
+(ns ^{:go-imports ["regexp" "strings" "unicode"]
+ :doc "Implements simple functions to manipulate strings."}
string)
(defn ^Boolean ends-with?
"True if s ends with substr."
{:added "1.0"
- :go "strings.HasSuffix(s, substr)"}
+ :go "strings.HasSuffix(s, substr)"}
[^String s ^Stringable substr])
(defn ^Boolean starts-with?
"True if s starts with substr."
{:added "1.0"
- :go "strings.HasPrefix(s, substr)"}
+ :go "strings.HasPrefix(s, substr)"}
[^String s ^Stringable substr])
(defn ^String pad-right
"Returns s padded with pad at the end to length n."
{:added "1.0"
- :go "padRight(s, pad, n)"}
+ :go "padRight(s, pad, n)"}
[^String s ^Stringable pad ^Int n])
(defn ^String pad-left
"Returns s padded with pad at the beginning to length n."
{:added "1.0"
- :go "padLeft(s, pad, n)"}
+ :go "padLeft(s, pad, n)"}
[^String s ^Stringable pad ^Int n])
(defn split
@@ -34,8 +33,8 @@
be the unsplit remainder. If n is <= 0, no limit is in effect (all substrings
are returned in the vector)."
{:added "1.0"
- :go {2 "splitOnStringOrRegex(s, sep, 0)"
- 3 "splitOnStringOrRegex(s, sep, n)"}}
+ :go {2 "splitOnStringOrRegex(s, sep, 0)"
+ 3 "splitOnStringOrRegex(s, sep, n)"}}
;; TODO: ^"String|Regex" sep
([^String s ^Object sep])
([^String s ^Object sep ^Int n]))
@@ -43,14 +42,14 @@
(defn split-lines
"Splits string on \\n or \\r\\n. Returns vector of the splits."
{:added "1.0"
- :go "split(s, newLine, 0)"}
+ :go "split(s, newLine, 0)"}
[^String s])
(defn ^String join
"Returns a string of all elements in coll, as returned by (seq coll), separated by an optional separator."
{:added "1.0"
- :go {1 "join(\"\", coll)"
- 2 "join(separator, coll)"}}
+ :go {1 "join(\"\", coll)"
+ 2 "join(separator, coll)"}}
([^Seqable coll])
([^Stringable separator ^Seqable coll]))
@@ -62,7 +61,7 @@
parenthesized group in the pattern.
"
{:added "1.0"
- :go "replace(s, match, repl)"}
+ :go "replace(s, match, repl)"}
[^String s ^Object match ^Stringable repl])
(defn ^String replace-first
@@ -73,25 +72,25 @@
parenthesized group in the pattern.
"
{:added "1.0"
- :go "replaceFirst(s, match, repl)"}
+ :go "replaceFirst(s, match, repl)"}
[^String s ^Object match ^Stringable repl])
(defn ^String trim
"Removes whitespace from both ends of string."
{:added "1.0"
- :go "strings.TrimSpace(s)"}
+ :go "strings.TrimSpace(s)"}
[^String s])
(defn ^String trim-newline
"Removes all trailing newline \\n or return \\r characters from string."
{:added "1.0"
- :go "strings.TrimRight(s, \"\\n\\r\")"}
+ :go "strings.TrimRight(s, \"\\n\\r\")"}
[^String s])
(defn ^String trim-left
"Removes whitespace from the left side of string."
{:added "1.0"
- :go "strings.TrimLeftFunc(s, unicode.IsSpace)"}
+ :go "strings.TrimLeftFunc(s, unicode.IsSpace)"}
[^String s])
(defn ^String triml
@@ -103,7 +102,7 @@
(defn ^String trim-right
"Removes whitespace from the right side of string."
{:added "1.0"
- :go "strings.TrimRightFunc(s, unicode.IsSpace)"}
+ :go "strings.TrimRightFunc(s, unicode.IsSpace)"}
[^String s])
(defn ^String trimr
@@ -115,14 +114,14 @@
(defn ^Boolean blank?
"True if s is nil, empty, or contains only whitespace."
{:added "1.0"
- :go "isBlank(s)"}
+ :go "isBlank(s)"}
[^Object s])
(defn ^String capitalize
"Converts first character of the string to upper-case, all other
characters to lower-case."
{:added "1.0"
- :go "capitalize(s)"}
+ :go "capitalize(s)"}
[^Stringable s])
(defn ^String escape
@@ -132,21 +131,21 @@
If (cmap ch) is nil, append ch to the new string.
If (cmap ch) is non-nil, append (str (cmap ch)) instead."
{:added "1.0"
- :go "escape(s, cmap)"}
+ :go "escape(s, cmap)"}
[^String s ^Callable cmap])
(defn ^Boolean includes?
"True if s includes substr."
{:added "1.0"
- :go "strings.Contains(s, substr)"}
+ :go "strings.Contains(s, substr)"}
[^String s ^Stringable substr])
(defn index-of
"Return index of value (string or char) in s, optionally searching
forward from from or nil if not found."
{:added "1.0"
- :go {2 "indexOf(s, value, 0)"
- 3 "indexOf(s, value, from)"}}
+ :go {2 "indexOf(s, value, 0)"
+ 3 "indexOf(s, value, from)"}}
([^String s ^Object value])
([^String s ^Object value ^Int from]))
@@ -154,27 +153,27 @@
"Return last index of value (string or char) in s, optionally
searching backward from from or nil if not found."
{:added "1.0"
- :go {2 "lastIndexOf(s, value, 0)"
- 3 "lastIndexOf(s, value, from)"}}
+ :go {2 "lastIndexOf(s, value, 0)"
+ 3 "lastIndexOf(s, value, from)"}}
([^String s ^Object value])
([^String s ^Object value ^Int from]))
(defn ^String lower-case
"Converts string to all lower-case."
{:added "1.0"
- :go "strings.ToLower(s)"}
+ :go "strings.ToLower(s)"}
[^Stringable s])
(defn ^String upper-case
"Converts string to all upper-case."
{:added "1.0"
- :go "strings.ToUpper(s)"}
+ :go "strings.ToUpper(s)"}
[^Stringable s])
(defn ^String reverse
"Returns s with its characters reversed."
{:added "1.0"
- :go "reverse(s)"}
+ :go "reverse(s)"}
[^String s])
(defn ^Regex re-quote
diff --git a/std/time.joke b/std/time.joke
index ad569028..4bcbf66d 100644
--- a/std/time.joke
+++ b/std/time.joke
@@ -1,45 +1,44 @@
-(ns
- ^{:go-imports ["time"]
- :doc "Provides functionality for measuring and displaying time."}
+(ns ^{:go-imports ["time"]
+ :doc "Provides functionality for measuring and displaying time."}
time)
(defn sleep
"Pauses the execution thread for at least the duration d (expressed in nanoseconds).
A negative or zero duration causes sleep to return immediately."
{:added "1.0"
- :go "! RT.GIL.Unlock(); time.Sleep(time.Duration(d)); RT.GIL.Lock(); _res := NIL"}
+ :go "! RT.GIL.Unlock(); time.Sleep(time.Duration(d)); RT.GIL.Lock(); _res := NIL"}
[^Integer d])
(defn ^Time now
"Returns the current local time."
{:added "1.0"
- :go "time.Now()"}
+ :go "time.Now()"}
[])
(defn ^Time from-unix
"Returns the local Time corresponding to the given Unix time, sec seconds and
nsec nanoseconds since January 1, 1970 UTC. It is valid to pass nsec outside the range [0, 999999999]."
{:added "1.0"
- :go "time.Unix(int64(sec), int64(nsec))"}
+ :go "time.Unix(int64(sec), int64(nsec))"}
[^Integer sec ^Integer nsec])
(defn ^Int unix
"Returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC."
{:added "1.0"
- :go "int(t.Unix())"}
+ :go "int(t.Unix())"}
[^Time t])
(defn ^Int sub
"Returns the duration t-u in nanoseconds."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "int(t.Sub(u))"}
+ ;; TODO: 32-bit issue
+ :go "int(t.Sub(u))"}
[^Time t ^Time u])
(defn ^Time add
"Returns the time t+d."
{:added "1.0"
- :go "t.Add(time.Duration(d))"}
+ :go "t.Add(time.Duration(d))"}
[^Time t ^Integer d])
(defn ^Time add-date
@@ -59,22 +58,22 @@
each with optional fraction and a unit suffix, such as 300ms, -1.5h or 2h45m. Valid time units are
ns, us (or µs), ms, s, m, h."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "!t, err := time.ParseDuration(s); PanicOnErr(err); _res := int(t)"}
+ ;; TODO: 32-bit issue
+ :go "!t, err := time.ParseDuration(s); PanicOnErr(err); _res := int(t)"}
[^String s])
(defn ^Int since
"Returns the time in nanoseconds elapsed since t."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "int(time.Since(t))"}
+ ;; TODO: 32-bit issue
+ :go "int(time.Since(t))"}
[^Time t])
(defn ^Int until
"Returns the duration in nanoseconds until t."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "int(time.Until(t))"}
+ ;; TODO: 32-bit issue
+ :go "int(time.Until(t))"}
[^Time t])
(defn ^String format
@@ -84,46 +83,46 @@
would be displayed if it were the value; it serves as an example of the desired output.
The same display rules will then be applied to the time value.."
{:added "1.0"
- :go "t.Format(layout)"}
+ :go "t.Format(layout)"}
[^Time t ^String layout])
(defn ^Double hours
"Returns the duration (passed as a number of nanoseconds) as a floating point number of hours."
{:added "1.0"
- :go "time.Duration(d).Hours()"}
+ :go "time.Duration(d).Hours()"}
[^Integer d])
(defn ^Double minutes
"Returns the duration (passed as a number of nanoseconds) as a floating point number of minutes."
{:added "1.0"
- :go "time.Duration(d).Minutes()"}
+ :go "time.Duration(d).Minutes()"}
[^Integer d])
(defn ^Int round
"Returns the result of rounding d to the nearest multiple of m. d and m represent time durations in nanoseconds.
The rounding behavior for halfway values is to round away from zero. If m <= 0, returns d unchanged."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "int(time.Duration(d).Round(time.Duration(m)))"}
+ ;; TODO: 32-bit issue
+ :go "int(time.Duration(d).Round(time.Duration(m)))"}
[^Integer d ^Integer m])
(defn ^Double seconds
"Returns the duration (passed as a number of nanoseconds) as a floating point number of seconds."
{:added "1.0"
- :go "time.Duration(d).Seconds()"}
+ :go "time.Duration(d).Seconds()"}
[^Integer d])
(defn ^String string
"Returns a string representing the duration in the form 72h3m0.5s."
{:added "1.0"
- :go "time.Duration(d).String()"}
+ :go "time.Duration(d).String()"}
[^Integer d])
(defn ^Int truncate
"Returns the result of rounding d toward zero to a multiple of m. If m <= 0, returns d unchanged."
{:added "1.0"
- ;; TODO: 32-bit issue
- :go "int(time.Duration(d).Truncate(time.Duration(m)))"}
+ ;; TODO: 32-bit issue
+ :go "int(time.Duration(d).Truncate(time.Duration(m)))"}
[^Integer d ^Integer m])
(defn ^Time in-timezone
@@ -133,175 +132,154 @@
[^Time t ^String tz])
(defn ^Int day-of-year
- "Returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years."
- {:added "1.3.3"
- :go "t.YearDay()"}
- [^Time t])
-
-(def
- ^{:doc "Number of nanoseconds in 1 nanosecond"
- :added "1.0"
- :tag Int
- :const true
- :go "int(time.Nanosecond)"}
+ "Returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years."
+ {:added "1.3.4"
+ :go "t.YearDay()"}
+ [^Time t])
+
+(def ^{:doc "Number of nanoseconds in 1 nanosecond"
+ :added "1.0"
+ :tag Int
+ :const true
+ :go "int(time.Nanosecond)"}
nanosecond)
-(def
- ^{:doc "Number of nanoseconds in 1 microsecond"
- :added "1.0"
- :tag Int
- :const true
- :go "int(time.Microsecond)"}
+(def ^{:doc "Number of nanoseconds in 1 microsecond"
+ :added "1.0"
+ :tag Int
+ :const true
+ :go "int(time.Microsecond)"}
microsecond)
-(def
- ^{:doc "Number of nanoseconds in 1 millisecond"
- :added "1.0"
- :tag Int
- :const true
- :go "int(time.Millisecond)"}
+(def ^{:doc "Number of nanoseconds in 1 millisecond"
+ :added "1.0"
+ :tag Int
+ :const true
+ :go "int(time.Millisecond)"}
millisecond)
-(def
- ^{:doc "Number of nanoseconds in 1 second"
- :added "1.0"
- :tag Int
- :const true
- :go "int(time.Second)"}
+(def ^{:doc "Number of nanoseconds in 1 second"
+ :added "1.0"
+ :tag Int
+ :const true
+ :go "int(time.Second)"}
second)
-(def
- ^{:doc "Number of nanoseconds in 1 minute"
- :added "1.0"
- :tag BigInt
- :const true
- :go "MakeMathBigIntFromInt64(int64(time.Minute))"}
+(def ^{:doc "Number of nanoseconds in 1 minute"
+ :added "1.0"
+ :tag BigInt
+ :const true
+ :go "MakeMathBigIntFromInt64(int64(time.Minute))"}
minute)
-(def
- ^{:doc "Number of nanoseconds in 1 hour"
- :added "1.0"
- :tag BigInt
- :const true
- :go "MakeMathBigIntFromInt64(int64(time.Hour))"}
+(def ^{:doc "Number of nanoseconds in 1 hour"
+ :added "1.0"
+ :tag BigInt
+ :const true
+ :go "MakeMathBigIntFromInt64(int64(time.Hour))"}
hour)
-(def
- ^{:doc "Mon Jan _2 15:04:05 2006"
- :added "1.0"
- :tag String
- :const true
- :go "time.ANSIC"}
+(def ^{:doc "Mon Jan _2 15:04:05 2006"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.ANSIC"}
ansi-c)
-(def
- ^{:doc "Mon Jan _2 15:04:05 MST 2006"
- :added "1.0"
- :tag String
- :const true
- :go "time.UnixDate"}
+(def ^{:doc "Mon Jan _2 15:04:05 MST 2006"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.UnixDate"}
unix-date)
-(def
- ^{:doc "Mon Jan 02 15:04:05 -0700 2006"
- :added "1.0"
- :tag String
- :const true
- :go "time.RubyDate"}
+(def ^{:doc "Mon Jan 02 15:04:05 -0700 2006"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RubyDate"}
ruby-date)
-(def
- ^{:doc "02 Jan 06 15:04 MST"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC822"}
+(def ^{:doc "02 Jan 06 15:04 MST"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC822"}
rfc822)
-(def
- ^{:doc "02 Jan 06 15:04 -0700"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC822Z"}
+(def ^{:doc "02 Jan 06 15:04 -0700"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC822Z"}
rfc822-z)
-(def
- ^{:doc "Monday, 02-Jan-06 15:04:05 MST"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC850"}
+(def ^{:doc "Monday, 02-Jan-06 15:04:05 MST"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC850"}
rfc850)
-(def
- ^{:doc "Mon, 02 Jan 2006 15:04:05 MST"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC1123"}
+(def ^{:doc "Mon, 02 Jan 2006 15:04:05 MST"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC1123"}
rfc1123)
-(def
- ^{:doc "Mon, 02 Jan 2006 15:04:05 -0700"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC1123Z"}
+(def ^{:doc "Mon, 02 Jan 2006 15:04:05 -0700"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC1123Z"}
rfc1123-z)
-(def
- ^{:doc "2006-01-02T15:04:05Z07:00"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC3339"}
+(def ^{:doc "2006-01-02T15:04:05Z07:00"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC3339"}
rfc3339)
-(def
- ^{:doc "2006-01-02T15:04:05.999999999Z07:00"
- :added "1.0"
- :tag String
- :const true
- :go "time.RFC3339Nano"}
+(def ^{:doc "2006-01-02T15:04:05.999999999Z07:00"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.RFC3339Nano"}
rfc3339-nano)
-(def
- ^{:doc "3:04PM"
- :added "1.0"
- :tag String
- :const true
- :go "time.Kitchen"}
+(def ^{:doc "3:04PM"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.Kitchen"}
kitchen)
-(def
- ^{:doc "Jan _2 15:04:05"
- :added "1.0"
- :tag String
- :const true
- :go "time.Stamp"}
+(def ^{:doc "Jan _2 15:04:05"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.Stamp"}
stamp)
-(def
- ^{:doc "Jan _2 15:04:05.000"
- :added "1.0"
- :tag String
- :const true
- :go "time.StampMilli"}
+(def ^{:doc "Jan _2 15:04:05.000"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.StampMilli"}
stamp-milli)
-(def
- ^{:doc "Jan _2 15:04:05.000000"
- :added "1.0"
- :tag String
- :const true
- :go "time.StampMicro"}
+(def ^{:doc "Jan _2 15:04:05.000000"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.StampMicro"}
stamp-micro)
-(def
- ^{:doc "Jan _2 15:04:05.000000000"
- :added "1.0"
- :tag String
- :const true
- :go "time.StampNano"}
+(def ^{:doc "Jan _2 15:04:05.000000000"
+ :added "1.0"
+ :tag String
+ :const true
+ :go "time.StampNano"}
stamp-nano)
diff --git a/std/time/a_time_slow_init.go b/std/time/a_time_slow_init.go
index 40872a9f..35c09084 100644
--- a/std/time/a_time_slow_init.go
+++ b/std/time/a_time_slow_init.go
@@ -132,7 +132,7 @@ func InternsOrThunks() {
timeNamespace.InternVar("day-of-year", day_of_year_,
MakeMeta(
NewListFrom(NewVectorFrom(MakeSymbol("t"))),
- `Returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years.`, "1.3.3").Plus(MakeKeyword("tag"), String{S: "Int"}))
+ `Returns the day of the year specified by t, in the range [1,365] for non-leap years, and [1,366] in leap years.`, "1.3.4").Plus(MakeKeyword("tag"), String{S: "Int"}))
timeNamespace.InternVar("format", format_,
MakeMeta(
diff --git a/std/url.joke b/std/url.joke
index cdbed413..0ad52367 100644
--- a/std/url.joke
+++ b/std/url.joke
@@ -1,12 +1,11 @@
-(ns
- ^{:go-imports ["net/url"]
- :doc "Parses URLs and implements query escaping."}
+(ns ^{:go-imports ["net/url"]
+ :doc "Parses URLs and implements query escaping."}
url)
(defn ^String path-escape
"Escapes the string so it can be safely placed inside a URL path segment."
{:added "1.0"
- :go "url.PathEscape(s)"}
+ :go "url.PathEscape(s)"}
[^String s])
(defn ^String path-unescape
@@ -16,13 +15,13 @@
PathUnescape is identical to QueryUnescape except that it does not unescape '+' to ' ' (space)."
{:added "1.0"
- :go "pathUnescape(s)"}
+ :go "pathUnescape(s)"}
[^String s])
(defn ^String query-escape
"Escapes the string so it can be safely placed inside a URL query."
{:added "1.0"
- :go "url.QueryEscape(s)"}
+ :go "url.QueryEscape(s)"}
[^String s])
(defn ^String query-unescape
@@ -30,5 +29,5 @@
substring of the form \"%AB\" into the hex-decoded byte 0xAB. It also converts
'+' into ' ' (space). It returns an error if any % is not followed by two hexadecimal digits."
{:added "1.0"
- :go "queryUnescape(s)"}
+ :go "queryUnescape(s)"}
[^String s])
diff --git a/std/uuid.joke b/std/uuid.joke
index 3116bf96..401233c4 100644
--- a/std/uuid.joke
+++ b/std/uuid.joke
@@ -1,5 +1,4 @@
-(ns
- ^{:doc "Generates UUIDs."}
+(ns ^{:doc "Generates UUIDs."}
uuid)
(defn ^String new
diff --git a/std/yaml.joke b/std/yaml.joke
index 6f92d90b..95e9bd32 100644
--- a/std/yaml.joke
+++ b/std/yaml.joke
@@ -1,18 +1,17 @@
-(ns
- ^{:go-imports []
- :doc "Implements encoding and decoding of YAML."}
+(ns ^{:go-imports []
+ :doc "Implements encoding and decoding of YAML."}
yaml)
(defn read-string
"Parses the YAML-encoded data and return the result as a Joker value."
{:added "1.0"
- :go "readString(s)"}
+ :go "readString(s)"}
[^String s])
(defn write-string
"Returns the YAML encoding of v."
{:added "1.0"
- :go "writeString(v)"}
+ :go "writeString(v)"}
[^Object v])