Table Of Contents:
call plug#begin() | |
" Autocompletion | |
Plug 'roxma/nvim-completion-manager' | |
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --racer-completer --omnisharp-completer --tern-completer' } | |
Plug 'ervandew/supertab' | |
Plug 'SirVer/ultisnips' | |
Plug 'honza/vim-snippets' | |
" Buffer |
This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.
Workshop Instructor:
- Lilly Ryan @attacus_au
This workshop is distributed under a CC BY-SA 4.0 license.
;; the SET game in clojure.spec | |
;; inspired by https://github.com/jgrodziski/set-game | |
(require '[clojure.spec :as s]) | |
(s/def ::shape #{:oval :diamond :squiggle}) | |
(s/def ::color #{:red :purple :green}) | |
(s/def ::value #{1 2 3}) | |
(s/def ::shading #{:solid :striped :outline}) | |
(s/def ::card (s/keys :req [::shape ::color ::value ::shading])) |
;; warm up: balancing | |
=> (s/def ::balanced | |
(s/* (s/cat :open #{'<} :children ::balanced :close #{'>}))) | |
:user/balanced | |
=> (s/conform ::balanced '[< < > < > > < >]) | |
[{:open <, :children [{:open <, :close >} {:open <, :close >}], :close >} {:open <, :close >}] | |
=> (s/conform ::balanced '[< < > < < > > > < >]) | |
[{:open <, :children [{:open <, :close >} {:open <, :children [{:open <, :close >}], :close >}], :close >} {:open <, :close >}] | |
;; infix to prefix |
=> (require '[net.cgrand.xforms :as x]) ; https://github.com/cgrand/xforms | |
=> (into [] | |
(x/window-by-time | |
:ts ; normalized time function -- window length is always 1.0 | |
4 ; number of steps to slide the window | |
(fn ; initializing/snapshooting/reducing function | |
([] clojure.lang.PersistentQueue/EMPTY) | |
([q] (vec q)) | |
([q x] (conj q x))) | |
(fn [q _] (pop q))) ; inverse reducing function |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var bower = require('bower'); | |
var concat = require('gulp-concat'); | |
var sass = require('gulp-sass'); | |
var compass = require('gulp-compass'); | |
var minifyCss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var sh = require('shelljs'); | |
var path = require('path'); |
defmodule MyApp do | |
use Application | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false | |
children = [ | |
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [ | |
dispatch: dispatch | |
]) |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on