Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.
<code_scheme name="TW" version="173"> | |
<ClojureCodeStyleSettings>{ | |
:cljs.core/as-> :only-indent | |
:cljs.core/assoc 0 | |
:cljs.core/cond-> :only-indent | |
:cljs.core/cond->> :only-indent | |
:cljs.core/defonce :only-indent | |
:cljs.core/with-meta :only-indent | |
:cljs.core.async/go :only-indent | |
:cljs.core.async/go-loop :only-indent |
Short write up on using REPL when developing UIs in ClojureScript.
Everyone's standard approach to hot-reloading is to use a tool (Figwheel or shadow-cljs) that reloads changed namespaces automatically. This works really well: you change the code, the tool picks up changed files, compiles namespaces and dependants, notifies REPL client which then pulls in compiled changes, and re-runs a function that re-renders UI.
The other approach is to use ClojureScript's REPL directly and rely only on eval from the editor. This more or less matches Clojure style workflow. This approach might be useful when you don't want tools overhead or hot-reloading becomes slow for you or you just used to this style of interactions. Also changing code doesn't always mean that you want to reload all the changes. On the other hand it is very easy to change a couple of top-level forms and forget to eval one of them.
This logback configuration is an example of diverting debug level logs for a specific package to a separate file, while maintaining info level in the main log. This allows viewing all package logs in context, and then when an info or warn level log appears, you can switch to the debug log and see that line in context with debug statements.
This is particularly useful for debugging a new or troublesome package in production without cluttering up your main log stream.
The main
appender is the primary appender to which all application logs are
One thing that always made me a little sad about transducers was how map
lost its ability to iterate multiple collections in parallel. This is actually my favorite feature of map
. For example:
(map + (range 5) (range 5 10))
=> (5 7 9 11 13)
One somewhat practical use of this is if you want to compare two sequences, pairwise, using a comparator. Though I wish that every?
took multiple collections, this is an adequate substitute:
# empty the stash | |
$ git stash clear | |
# objects can also be reached through the reflog. | |
# while branches record the history of some project, reflogs record the history of these branches. | |
# if you amend, reset etc. commits are removed from the branch history | |
# but git keeps them around in case you realize that you made a mistake. | |
# reflogs are a convenient way to find out what destructive (and other) operations were performed | |
# on a branch (or HEAD), making it easier to undo a destructive operation. |
(ns pms.core | |
(:require [clojure.spec.alpha :as s] | |
[clojure.spec.gen.alpha :as gen] | |
[clojure.spec.test.alpha :as stest])) | |
(comment "This is a small experiment inspired by Oskar Wickströms | |
excellent work at | |
https://haskell-at-work.com/episodes/2018-01-19-domain-modelling-with-haskell-data-structures.html. I | |
wanted to see what would be involved in building the equivalent | |
functionality in reasonably ideomatic Clojure. It is also my first |
{:aliases {:dev {:extra-deps | |
{org.clojure/tools.nrepl {:mvn/version "0.2.13"} | |
cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"}}} | |
:std {:extra-paths ["resources"]} | |
:test {:extra-paths ["test"]}} | |
:mvn/repos {"private-repo" {:url "https://example.com/repository/maven-releases/"}}} |