[ANN] A lightweight time lib for Clojure(Script)

2017-06-15 Thread Isaac Zeng
time.clj is a lightweight lib. 1. extends Date(java.util.Date or js/Date) support `timezone` & 'first-day-of-week` 2. date format supports both Clojure & ClojureScript 3. a lightweight scheduler system, depends on core.async

Re: can clojure java.jdbc function 'result-set-seq' add option tosupportcustom 'result-set-read-column' ?

2016-08-08 Thread Isaac Zeng
That good suggestion @ Xiangtao Zhou I think we also can define customized reader/writer in `(create-table-ddl table spec)` ```clojure (create-table-ddl :user [[:name "VARCHAR(32)" {:read identity :wirte identity}]]) ``` On Monday, August 8, 2016 at 6:15:24 AM UTC+8, Sean Corfield wrote: > > Tha

Re: [ANN] Clojure 1.9.0-alpha4

2016-06-01 Thread Isaac Zeng
That really cool On Wednesday, June 1, 2016 at 10:17:14 PM UTC+8, Rich Hickey wrote: > > To give people an idea of the update-in and seq destructuring > improvements: > > (let [d3 {:a {:b {:c 2}}}] > (dotimes [_ 10] > (time (dotimes [_ 1000] > (update-in d3 [:a :b :c] in

Treat macro as function at compile time

2015-08-09 Thread Isaac Zeng
(defmacro foo [] `(list (defmacro ~'bar [] "nice") (defn ~'bar-fn [] (~'bar (foo) ;; => (#'defcrud.core/bar #'defcrud.core/bar-fn) (bar-fn) ArityException Wrong number of args (0) passed to: core/eval8800/bar--8801 clojure.lang.AFn.throwArity (AFn.java:429) but this working (def

Re: [ANN] CIDER 0.9

2015-06-17 Thread Isaac Zeng
leiningen use org.clojure/tools.nrepl 0.2.6 cider-nrepl throw warning On Tuesday, June 16, 2015 at 10:33:48 PM UTC+8, Bozhidar Batsov wrote: > > Hey everyone, > > CIDER 0.9 is finally out! You can read more about the release here > http://batsov.com/articles/2015/06/16/cider-0-dot-9/ > > Enjoy (r

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Isaac Zeng
this if-let-all do not support destructure, I writed a improved https://gist.github.com/gfZeng/8e8e18f148d5742b064c On Tuesday, June 9, 2015 at 8:00:53 PM UTC+8, crocket wrote: > > It evaluates true-case only if every local binding evaluates to true values. > false-case has no access to local bi

Re: any?

2015-04-26 Thread Isaac Zeng
some On Sunday, April 26, 2015 at 9:32:09 AM UTC+8, Colin Taylor wrote: > > Any reason why we don't have `any?`. Googled without much luck. > Trivially done as `comp boolean some` not doubt, but I know I use it more > than not-any at least. > It's particularly useful as a composable `or`. > > >

Re: Macro that modifies the body of a function

2014-08-31 Thread Isaac Zeng
;;; there is a simple, but not a good way ;;; (deftry foo [x] x) ;;; (:arglists (meta #'foo)) => ([& args__5399__auto__]) (defmacro deftry [name & fdecl] `(defn ~name [& args#] (try (apply (fn ~@fdecl) args#) (catch Error e# (println "err caught" e#) ;;; this is