(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # For simpler use cases, see the UsesTracker instead: | |
| # https://gist.github.com/christhekeele/e858881d0ca2053295c6e10d8692e6ea | |
| ### | |
| # A way to know, at runtime, what modules a module has used at compile time. | |
| # In this case, you include `IndirectUsesTracker` into a module. When that module gets | |
| # used in some other module, it makes that module registerable under a namespace of your choosing. | |
| # When the registerable module is used into a third module, that third module will know at runtime which | |
| # registerables were `use`d in it at compile time, via a function titled after the namespace. |
| use std::rc::Rc; | |
| trait HKT<U> { | |
| type C; // Current type | |
| type T; // Type with C swapped with U | |
| } | |
| macro_rules! derive_hkt { | |
| ($t:ident) => { | |
| impl<T, U> HKT<U> for $t<T> { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
| ~/erlang_learning $ erl | |
| Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] | |
| Eshell V5.9.3.1 (abort with ^G) | |
| ([email protected])1> trace(recursive). | |
| ok | |
| ([email protected])2> recursive:fac(10). | |
| call: <0.42.0> recursive:fac(10), level: 0 | |
| call: <0.42.0> recursive:fac(9), level: 1 | |
| call: <0.42.0> recursive:fac(8), level: 2 |