- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- create any table to use as a test dataset | |
create table test_data ( | |
id serial not null primary key, | |
data jsonb not null | |
); | |
-- insert some data! | |
insert into test_data (data) values ('{}'); | |
insert into test_data (data) values ('{}'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let* ((secs 100) | |
(hours (/ secs 3600)) | |
(minutes (/ (% secs 3600) 60)) | |
(seconds (% secs 60))) | |
(format "%s%s%s" | |
(if (> hours 0) | |
(format "%sh " hours) | |
"") | |
(if (> minutes 0) | |
(format "%sm " minutes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# feature: Add beta sequence. | |
# ^-----^ ^----------------^ | |
# | | | |
# | +-> Summary in present tense sentence. | |
# | | |
# +-------> Type: binary, chore, doc, excise, feature, fix, hack, legal, refactor, | |
# style, or test. |
Note: These instructions will be unnecessary after Agda 2.6.0 is released.
- Clone the Agda repository.
git clone https://github.com/agda/agda.git cd agda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'dash) | |
(require 's) | |
(require 'loop) | |
(require 'icons-in-terminal) | |
(defun my-char-at-point (&optional p) | |
"P." | |
(let ((point (or p (point)))) | |
(if (< point (point-max)) (buffer-substring-no-properties point (1+ point)) | |
""))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is a riddle about people's ages that I made up. Below, we solve it | |
-- using the monadic interface to lists. Here it is: | |
-- | |
-- * Jordan is either 13 years old or 16 years old | |
-- * Shen is between 3 and 5 years older than Jordan (inclusive bounds) | |
-- * Claudia is between 6 and 9 years younger than Jordan's age plus Shen's age. | |
-- * I am as old as the three aforementioned people combined. | |
-- | |
-- Given the provided information, I could have many possible ages. The monad | |
-- instance for list models this kind of nondeterminism well. Run the example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Homebrew | |
$ su ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# show brew commands | |
$ brew help | |
# check current user | |
$ echo $(whoami) | |
# grant access to the folders |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Config.Gnome | |
import qualified XMonad.StackSet as W | |
spawnToWorkspace :: String -> String -> X () | |
spawnToWorkspace program workspace = do | |
spawn program | |
windows $ W.greedyView workspace | |
NewerOlder