Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
#[optional] Installing Libsodium - ONLY if you do not want nix to handle this - otherwise skip | |
git clone https://github.com/input-output-hk/libsodium | |
cd libsodium | |
git checkout 66f017f1 | |
./autogen.sh | |
./configure | |
make | |
sudo make install && cd .. | |
#Export and source ~/.bashrc | |
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" |
<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 |
- 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 HAS BEEN AUTO-GENERATED BY "PRISMA DEPLOY" | |
# DO NOT EDIT THIS FILE DIRECTLY | |
# | |
# Model Types | |
# | |
type User implements Node { | |
id: ID! | |
name: String! |
;; Run using a local build of ClojureScript master, e.g.: | |
;; clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.155"}}}' -i build.clj | |
(require '[cljs.build.api :as b]) | |
(b/watch "src" | |
{:output-dir "out" | |
:output-to "out/main.js" | |
:optimizations :none | |
:verbose true |
These are some of the lessons I wish I had learned when I first picked up Elm, before I wrote a bunch of apps that are now more difficult to maintain than they need to be.
Breaking an Elm program up into multiple files just to reduce scrolling does not tend to work out optimally. Evan gave a really cool talk on this called "The life of a file". Files should split organically around data structures, not just to stay short. The reasons we want to keep JavaScript files as short as possible do not apply to Elm.
For example, I've created apps with a file structure like this:
(require '[cemerick.url :as url] | |
'[clojure.spec.alpha :as s] | |
'[clojure.spec.gen.alpha :as gen] | |
'[clojure.string :as string]) | |
(def non-empty-string-alphanumeric | |
"Generator for non-empty alphanumeric strings" | |
(gen/such-that #(not= "" %) | |
(gen/string-alphanumeric))) |
/** | |
* Making promises | |
*/ | |
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok")); | |
/* Simpler promise creation for static values */ | |
Js.Promise.resolve("easy"); | |
Js.Promise.reject(Invalid_argument("too easy")); |
Lightning Talk proposal for ReactiveConf 2017 http://www.reactiveconf.com #ReactiveConf
Elm is a statically-typed functional programming language. Its compiler produces safe JavaScript which is guaranteed to be free of runtime exceptions. Moreover Elm is packed with a bunch of powerful abstractions which let us build visual and reactive Web applications in a few lines of code.
As an example, I show the implementation of a simple framework for building Prezi-like presentations. It's just 99 lines of code!