Jim Cheung

Tuesday, December 03, 2019

next year's gold will be studying MIT 6.824: Distributed Systems

Wednesday, December 04, 2019

trying noprompt/meander, neat:

(def latest-json (:body (client/get "https://reddit.com/r/programming/.json" {:as :json-strict})))

(->> (m/search latest-json
               {:data
                {:children
                 (m/scan
                   {:data
                    {:title ?title
                     :score ?score
                     :permalink ?permalink}})}}

               {:title ?title
                :score ?score
                :permalink ?permalink})

     (sort-by :score #(compare %2 %1)))

Friday, December 06, 2019

Clojure/conj 2019 videos

I watched a few:

also LISA19 videos, haven't watched all yet but picked a few:

and this is a good one:

GOTO 2018 • The Development Metrics You Should Use (but Don’t) • Catherine Swetel


tried alanmarazzi/panthera: Data frames & arrays on Clojure but not for development, maybe could be an option to pass manipulated data frames to clojure or run pandas codes by clojure, jupyter notebook still a far better experience.

for new clojure projects, I don't use lein now, just deps.edn with some other tools.

this article describes how: Clojure + deps.edn, a basic guide

I have few essential tools for setting up a project:

just add them to ~/.clojure/deps.edn:

:aliases {:find-deps {:extra-deps {find-deps
                                   {:git/url "https://github.com/hagmonk/find-deps",
                                    :sha "6fc73813aafdd2288260abb2160ce0d4cdbac8be"}}
                      :main-opts ["-m" "find-deps.core"]}
          :new {:extra-deps {seancorfield/clj-new {:mvn/version "0.7.6"}}
                :main-opts ["-m" "clj-new.create"]}
          :uberjar {:extra-deps {uberdeps {:mvn/version "0.1.6"}}
                    :main-opts ["-m" "uberdeps.uberjar"]}
          :prepl {:jvm-opts ["-Dclojure.server.repl={:port,5678,:accept,clojure.core.server/io-prepl}"]}}

create new project:

// create new project
$ clj -A:new app myname/myapp
$ cd myapp

// add dependencies
$ clj -A:find-deps -F:save cheshire

// start dev repl
$ clj -A:prepl

also I have a global conjure config in ~/.config/conjure/conjure.edn:

{:conns {:dev {:port 5678}}}
Blog Archive