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
defmodule Demo.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :demo, | |
version: "0.0.1", | |
elixir: "~> 1.3", | |
elixirc_paths: elixirc_paths(Mix.env), | |
compilers: [:phoenix, :gettext] ++ Mix.compilers, | |
build_embedded: Mix.env == :prod, |
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
;; In script/figwheel.clj | |
;; Can be run from project root: | |
;; $ rlwrap lein run -m clojure.main script/figwheel.clj | |
;; | |
;; Or, from a CLJS file buffer: | |
;; M-x cider-jack-in | |
;; then eval these forms: | |
;; M-x cider-eval-buffer | |
(require | |
'[figwheel-sidecar.repl :as r] |
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 [user-mu [*]]) | |
(require user-mu) | |
;; Mostly translated from Scheme examples in "The Reasoned Schemer," | |
;; by Daniel P. Friedman, William E. Byrd, and Oleg Kiselyov. | |
(defn caro [p a] | |
(fresh [d] | |
(== (cons a d) p))) |
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
;;=> (var 0) | |
;;Traceback (most recent call last): | |
;; File "<input>", line 1, in <module> | |
;; File "<input>", line 4, in __init__ | |
;;TypeError: object.__init__() takes no parameters | |
(defclass var [PSet] | |
[] | |
(defn --init-- [self c] | |
(.--init-- (super) self [c])) |
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
== Compilation error on file lib/common_macros.ex == | |
** (SyntaxError) lib/common_macros.ex:3: syntax error before: '>' | |
(elixir) lib/kernel/parallel_compiler.ex:95: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8 | |
** (exit) shutdown: 1 | |
(elixir) lib/kernel/parallel_compiler.ex:199: Kernel.ParallelCompiler.handle_failure/5 | |
(elixir) lib/kernel/parallel_compiler.ex:182: Kernel.ParallelCompiler.wait_for_messages/8 | |
(elixir) lib/kernel/parallel_compiler.ex:55: Kernel.ParallelCompiler.spawn_compilers/3 | |
(iex) lib/iex/helpers.ex:94: IEx.Helpers.c/2 |
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
defmodule CommonMacros do | |
defmacro left ~>> right do | |
[{h, _}|t] = Macro.unpipe({:|>, [], [left, right]}) | |
:lists.foldl fn | |
{{_, _, args} = x, _pos}, acc -> | |
pos = Enum.count(args) | |
Macro.pipe(acc, x, pos) | |
{x, pos}, acc -> | |
Macro.pipe(acc, x, pos) |
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
defmodule Math do | |
def add(x, y) do | |
x + y | |
end | |
def add(x, y, z) do | |
x + y + z | |
end |
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
Sorry if this is a dup. I thought I had posted this last night. | |
I have a new build of GHC 7.8.4 and Elm 0.15 on Mac OS X, and I'm getting an error trying to compile the Tasks tutorial code (from the blog post, http://elm-lang.org/learn/Tasks.elm). | |
I installed Elm via the install script (runhaskell BuildFromSource.hs 0.15). | |
The error I'm getting when trying to compile is: | |
````elm | |
$ elm make hello.elm |
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
! Molokai theme | |
*xterm*background: #101010 | |
*xterm*foreground: #d0d0d0 | |
*xterm*cursorColor: #d0d0d0 | |
*xterm*color0: #101010 | |
*xterm*color1: #960050 | |
*xterm*color2: #66aa11 | |
*xterm*color3: #c47f2c | |
*xterm*color4: #30309b | |
*xterm*color5: #7e40a5 |
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
/** | |
* Time Displacement | |
* by David Muth | |
* | |
* Keeps a buffer of video frames in memory and displays pixel rows | |
* taken from consecutive frames distributed over the y-axis | |
*/ | |
import processing.video.*; |