After listening to the latest Magic Read-along episode "You should watch this" (which you should go listen to now) I got
caught up thinking about Brian's idea of an Endomorphism version of Kleisli composition for use with Redux,
it's actually a very similar model to what I'm using in my event
framework for event listeners so I figured I'd try to formalize the pattern and recognize
some of the concepts involved. IIRC Brian
described the idea of a Redux-reducer, which is usually of type s -> Action -> s
, it takes a state and an action and returns
a new state. He then re-arranged
the arguments to Action -> s -> s
. He then recognized this as Action -> Endo s
(an Endo
-morphism is just any function
from one type to itself: a -> a
).
He would take his list of reducers and partially apply them with the Action
, yielding a list of type Endo s
where s
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 mixin allows us use CSS grid without having to think about | |
what -ms-grid-row/-ms-grid-column we have to assign to a grid element | |
for it to properly work on Internet Explorer and Edge. | |
It takes three arguments, the last one of which is optional. Specify the | |
maximum amount of items you want to have in your grid, when they should | |
break to the next line and, if you like, a grid-gap of some sort. |
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
#!/bin/sh | |
if [ $(id -u) -ne 0 ]; then | |
echo "You must be root to run this." | |
exit 0 | |
fi | |
missing=0 | |
for pkg in wget curl rsync ar; do | |
echo -n "Checking for $pkg..." |
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
const Immutable = require('immutable-ext') | |
const {Just, Nothing} = require('data.maybe') | |
const Task = require('data.task') | |
// Setup | |
const Reader = f => | |
({ | |
run: f, | |
map: g => Reader(x => g(f(x))), |
These are some notes for running void linux on System76 Galagopro 2. Don't blindly cut-copy-paste, use your common sense.
In /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="splash loglevel=4 slub_debug=P page_poison=1 ec_sys.write_support=1 atkbd.reset intel_pstate=skylake_hwp psmouse.synaptics_intertouch=1 video=eDP-1:2048x1152-32@60 i915.enable_dc=2 i915.enable_guc=3 i915.modeset=1 i915.disable_power_well=0 i915.fastboot=1"
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
class Foo { | |
constructor(x,y,z) { | |
Object.assign(this,{ x, y, z }); | |
} | |
hello() { | |
console.log(this.x + this.y + this.z); | |
} | |
} |
- You need to have the latest version of Node. Preferably, you're using 9.8.0, but the latest LTS should work as well.
- You should have
npx
installed usingnpm install -g npx
. - Install the React Developer Tools.
A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.
Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.
These are my notes on instaling NixOS 16.03 on a Lenovo ThinkPad X1 Carbon (4th generation) with an encrypted root file system using UEFI.
Most of this is scrambled from the following pages:
OlderNewer