This gist is no longer in use.
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
- The link in the table of content jumps at the copy of the answer on this page.
- The link on the answer itself points back at the original post.
Someone sent me an email asking me what advice I had for new developers. I get this question a bunch, so I wanted to put all my thoughts in one place, that I can update as I get more ideas!
I answered this a bunch on my AMA repo, so here's some initial general answers, before I get to some of the specific questions:
- how to find a project to work on: notwaldorf/ama#33
- how I learn: notwaldorf/ama#32
- what to learn: notwaldorf/ama#51
- advice for your first job: notwaldorf/ama#59
This guide is intended to help you get started with CLJS.
An important note: CLJS is best experienced when developing and testing interactively against a live running instance of your application. In this way it's different than most other languages which use an edit/compile/restart method of working. While it is technically possible to use an edit/compile/restart workflow, if you use it with CLJS, you're gonna have a bad time.
{Embedded Video of Tools Installation}
;; Set up instrumentation somewhere in your project | |
;; (only need to do this once) | |
(require '[clojure.core.specs.alpha]) | |
(require '[clojure.spec.alpha :as s]) | |
(require '[clojure.spec.test.alpha :as stest]) | |
(require '[expound.alpha :as expound]) | |
(set! s/*explain-out* expound/printer) | |
(stest/instrument) | |
;;; later on ... |