Out of the tar pit
http://shaffner.us/cs/papers/tarpit.pdf
Joe Armstrong’s Thesis
http://erlang.org/download/armstrong_thesis_2003.pdf
Culture/Humor
http://thecodelesscode.com/
http://thedailywtf.com/
| from pprint import pprint | |
| from copy import copy | |
| class KeyLens(object): | |
| def __init__(self, key): | |
| self.key = key | |
| def lget(self, data): | |
| return data[self.key] |
| import UIKit | |
| protocol LensProtocol { | |
| func lget(data: Any?) -> Any?; | |
| func lset(data: Any?, val: Any?) -> Any?; | |
| } |
| import UIKit | |
| protocol Lens { | |
| associatedtype ParentType | |
| associatedtype ChildType | |
| func lget(_ parent: ParentType) -> ChildType | |
| func lset(_ parent: ParentType, _ child: ChildType) -> ParentType | |
| } |
Out of the tar pit
http://shaffner.us/cs/papers/tarpit.pdf
Joe Armstrong’s Thesis
http://erlang.org/download/armstrong_thesis_2003.pdf
Culture/Humor
http://thecodelesscode.com/
http://thedailywtf.com/
| ;; Display a single todo item | |
| (defui todo-item [ & {:keys [todo]}] | |
| (horizontal-layout | |
| (translate 5 5 | |
| (on | |
| :mouse-down | |
| (fn [[mx my]] | |
| [[:delete $todo]]) | |
| (delete-X))) | |
| (translate 10 4 |
| Usage: | |
| Start a REPL clj [clj-opt*] [-A:aliases] [init-opt*] | |
| Exec function clojure [clj-opt*] -X[:aliases] [a/fn] [kpath v]* | |
| Run main clojure [clj-opt*] -M[:aliases] [init-opt*] [main-opt] [arg*] | |
| Prepare clojure [clj-opt*] -P [other exec opts] | |
| clj-opts: | |
| -Jopt Pass opt through in java_opts, ex: -J-Xmx512m | |
| -Sdeps EDN Deps data to use as the last deps file to be merged | |
| -Spath Compute classpath and echo to stdout only |
I started using clojure cli a few months ago and I'm already sold on switching all my projects to work with deps.edn.
It works really well for projects and tools that I write, but I struggle when trying to use the cli to run tools like depstar and deps-deploy.
My conceptual model for how to use clojure cli:
As a clojure cli user, is there a better conceptual model? I tend to struggle because the available clj command line options aren't organized into those 3 steps.
| {:via | |
| [{:type clojure.lang.ExceptionInfo, | |
| :message | |
| "No implementation of method: :getName of protocol: #'sci.impl.vars/HasName found for class: nil", | |
| :data | |
| {:type :sci/error, | |
| :line 1, | |
| :column 1, | |
| :message | |
| "No implementation of method: :getName of protocol: #'sci.impl.vars/HasName found for class: nil", |
| > *e | |
| #error { | |
| :cause "Could not resolve symbol: clojure.stacktrace/print-cause-trace" | |
| :data {:type :sci/error, :line 1, :column 2, :file nil, :phase "analysis"} | |
| :via | |
| [{:type clojure.lang.ExceptionInfo | |
| :message "Could not resolve symbol: clojure.stacktrace/print-cause-trace" | |
| :data {:type :sci/error, :line 1, :column 2, :file nil, :phase "analysis"} | |
| :at [sci.impl.utils$throw_error_with_location invokeStatic "utils.cljc" 49]}] | |
| :trace |
| [[:Struct_33023E32 [{:n-elems 1, :datatype :int32, :name :m} {:n-elems 1, :datatype :int32, :name :n_iter} {:n-elems 1, :datatype :int32, :name :max_linesearch} {:n-elems 1, :datatype :float32, :name :eps} {:n-elems 1, :datatype :float32, :name :ftol} {:n-elems 1, :datatype :float32, :name :wolfe} {:n-elems 1, :datatype :float32, :name :min_step} {:n-elems 1, :datatype :float32, :name :max_step} {:n-elems 1, :datatype :int32, :name :linesearch}]] [:ggml_scratch [{:n-elems 1, :datatype :int64, :name :offs} {:n-elems 1, :datatype :int64, :name :size} {:n-elems 1, :datatype :pointer, :name :data}]] [:ggml_cplan [{:n-elems 1, :datatype :int64, :name :work_size} {:n-elems 1, :datatype :pointer, :name :work_data} {:n-elems 1, :datatype :int32, :name :n_threads} {:n-elems 1, :datatype :pointer, :name :abort_callback} {:n-elems 1, :datatype :pointer, :name :abort_callback_data}]] [:Struct_B6B81675 [{:n-elems 1, :datatype :int32, :name :n_iter} {:n-elems 1, :datatype :float32, :name :sched} {:n-elems 1, :datatype :flo |