Commit a7e1cd12 authored by zlu's avatar zlu 🤸🏿
Browse files

Added photo link

parent ee4810cf
......@@ -5,6 +5,7 @@ main = div [id "main" ] [
div [id "link"] [ a [ href "https://blog.zlu.me" ] [ text "blog" ] ],
div [id "link"] [ a [ href "https://blog.zlu.me/about/" ] [ text "about" ]],
div [id "link"] [ a [ href "https://git.zlu.me/u/zlu/" ] [ text "git" ] ],
div [id "link"] [ a [ href "http://photo.zlu.me/" ] [ text "photo" ] ],
div [id "link"] [ a [ href "https://wiki.zlu.me/privacy-software" ] [ text "privacy software" ]],
div [id "link"] [ a [ href "https://git.zlu.me/zlu/self/blob/master/mybooks" ] [ text "books i read" ] ],
div [id "link"] [ a [ href "https://git.zlu.me/zlu/self/blob/master/mytweets" ] [ text "my tweets" ]]
......
......@@ -1249,49 +1249,123 @@ var _elm_lang$core$Native_Utils = function() {
// COMPARISONS
function eq(rootX, rootY)
function eq(x, y)
{
var stack = [{ x: rootX, y: rootY }];
while (stack.length > 0)
var stack = [];
var isEqual = eqHelp(x, y, 0, stack);
var pair;
while (isEqual && (pair = stack.pop()))
{
var front = stack.pop();
var x = front.x;
var y = front.y;
if (x === y)
isEqual = eqHelp(pair.x, pair.y, 0, stack);
}
return isEqual;
}
function eqHelp(x, y, depth, stack)
{
if (depth > 100)
{
stack.push({ x: x, y: y });
return true;
}
if (x === y)
{
return true;
}
if (typeof x !== 'object')
{
if (typeof x === 'function')
{
continue;
throw new Error(
'Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense.'
+ ' Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#=='
+ ' which describes why it is this way and what the better version will look like.'
);
}
if (typeof x === 'object')
return false;
}
if (x === null || y === null)
{
return false
}
if (x instanceof Date)
{
return x.getTime() === y.getTime();
}
if (!('ctor' in x))
{
for (var key in x)
{
var c = 0;
for (var key in x)
{
++c;
if (!(key in y))
{
return false;
}
if (key === 'ctor')
{
continue;
}
stack.push({ x: x[key], y: y[key] });
}
if ('ctor' in x)
if (!eqHelp(x[key], y[key], depth + 1, stack))
{
stack.push({ x: x.ctor, y: y.ctor});
return false;
}
if (c !== Object.keys(y).length)
}
return true;
}
// convert Dicts and Sets to lists
if (x.ctor === 'RBNode_elm_builtin' || x.ctor === 'RBEmpty_elm_builtin')
{
x = _elm_lang$core$Dict$toList(x);
y = _elm_lang$core$Dict$toList(y);
}
if (x.ctor === 'Set_elm_builtin')
{
x = _elm_lang$core$Set$toList(x);
y = _elm_lang$core$Set$toList(y);
}
// check if lists are equal without recursion
if (x.ctor === '::')
{
var a = x;
var b = y;
while (a.ctor === '::' && b.ctor === '::')
{
if (!eqHelp(a._0, b._0, depth + 1, stack))
{
return false;
}
a = a._1;
b = b._1;
}
else if (typeof x === 'function')
return a.ctor === b.ctor;
}
// check if Arrays are equal
if (x.ctor === '_Array')
{
var xs = _elm_lang$core$Native_Array.toJSArray(x);
var ys = _elm_lang$core$Native_Array.toJSArray(y);
if (xs.length !== ys.length)
{
throw new Error('Equality error: general function equality is ' +
'undecidable, and therefore, unsupported');
return false;
}
else
for (var i = 0; i < xs.length; i++)
{
if (!eqHelp(xs[i], ys[i], depth + 1, stack))
{
return false;
}
}
return true;
}
if (!eqHelp(x.ctor, y.ctor, depth + 1, stack))
{
return false;
}
for (var key in x)
{
if (!eqHelp(x[key], y[key], depth + 1, stack))
{
return false;
}
......@@ -1306,34 +1380,23 @@ var LT = -1, EQ = 0, GT = 1;
function cmp(x, y)
{
var ord;
if (typeof x !== 'object')
{
return x === y ? EQ : x < y ? LT : GT;
}
else if (x instanceof String)
if (x instanceof String)
{
var a = x.valueOf();
var b = y.valueOf();
return a === b
? EQ
: a < b
? LT
: GT;
return a === b ? EQ : a < b ? LT : GT;
}
else if (x.ctor === '::' || x.ctor === '[]')
if (x.ctor === '::' || x.ctor === '[]')
{
while (true)
while (x.ctor === '::' && y.ctor === '::')
{
if (x.ctor === '[]' && y.ctor === '[]')
{
return EQ;
}
if (x.ctor !== y.ctor)
{
return x.ctor === '[]' ? LT : GT;
}
ord = cmp(x._0, y._0);
var ord = cmp(x._0, y._0);
if (ord !== EQ)
{
return ord;
......@@ -1341,9 +1404,12 @@ function cmp(x, y)
x = x._1;
y = y._1;
}
return x.ctor === y.ctor ? EQ : x.ctor === '[]' ? LT : GT;
}
else if (x.ctor.slice(0, 6) === '_Tuple')
if (x.ctor.slice(0, 6) === '_Tuple')
{
var ord;
var n = x.ctor.slice(6) - 0;
var err = 'cannot compare tuples with more than 6 elements.';
if (n === 0) return EQ;
......@@ -1356,12 +1422,12 @@ function cmp(x, y)
if (n >= 7) throw new Error('Comparison error: ' + err); } } } } } }
return EQ;
}
else
{
throw new Error('Comparison error: comparison is only defined on ints, ' +
'floats, times, chars, strings, lists of comparable values, ' +
'and tuples of comparable values.');
}
throw new Error(
'Comparison error: comparison is only defined on ints, '
+ 'floats, times, chars, strings, lists of comparable values, '
+ 'and tuples of comparable values.'
);
}
......@@ -1574,24 +1640,14 @@ function toString(v)
return '[]';
}
if (v.ctor === 'RBNode_elm_builtin' || v.ctor === 'RBEmpty_elm_builtin' || v.ctor === 'Set_elm_builtin')
if (v.ctor === 'Set_elm_builtin')
{
var name, list;
if (v.ctor === 'Set_elm_builtin')
{
name = 'Set';
list = A2(
_elm_lang$core$List$map,
function(x) {return x._0; },
_elm_lang$core$Dict$toList(v._0)
);
}
else
{
name = 'Dict';
list = _elm_lang$core$Dict$toList(v);
}
return name + '.fromList ' + toString(list);
return 'Set.fromList ' + toString(_elm_lang$core$Set$toList(v));
}
if (v.ctor === 'RBNode_elm_builtin' || v.ctor === 'RBEmpty_elm_builtin')
{
return 'Dict.fromList ' + toString(_elm_lang$core$Dict$toList(v));
}
var output = '';
......@@ -1608,6 +1664,16 @@ function toString(v)
if (type === 'object')
{
if (v instanceof Date)
{
return '<' + v.toString() + '>';
}
if (v.elm_web_socket)
{
return '<websocket>';
}
var output = [];
for (var k in v)
{
......@@ -4047,33 +4113,50 @@ var _elm_lang$core$Dict$merge = F6(
function (leftStep, bothStep, rightStep, leftDict, rightDict, initialResult) {
var stepState = F3(
function (rKey, rValue, _p2) {
var _p3 = _p2;
var _p9 = _p3._1;
var _p8 = _p3._0;
var _p4 = _p8;
if (_p4.ctor === '[]') {
return {
ctor: '_Tuple2',
_0: _p8,
_1: A3(rightStep, rKey, rValue, _p9)
};
} else {
var _p7 = _p4._1;
var _p6 = _p4._0._1;
var _p5 = _p4._0._0;
return (_elm_lang$core$Native_Utils.cmp(_p5, rKey) < 0) ? {
ctor: '_Tuple2',
_0: _p7,
_1: A3(leftStep, _p5, _p6, _p9)
} : ((_elm_lang$core$Native_Utils.cmp(_p5, rKey) > 0) ? {
ctor: '_Tuple2',
_0: _p8,
_1: A3(rightStep, rKey, rValue, _p9)
} : {
ctor: '_Tuple2',
_0: _p7,
_1: A4(bothStep, _p5, _p6, rValue, _p9)
});
stepState:
while (true) {
var _p3 = _p2;
var _p9 = _p3._1;
var _p8 = _p3._0;
var _p4 = _p8;
if (_p4.ctor === '[]') {
return {
ctor: '_Tuple2',
_0: _p8,
_1: A3(rightStep, rKey, rValue, _p9)
};
} else {
var _p7 = _p4._1;
var _p6 = _p4._0._1;
var _p5 = _p4._0._0;
if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) < 0) {
var _v10 = rKey,
_v11 = rValue,
_v12 = {
ctor: '_Tuple2',
_0: _p7,
_1: A3(leftStep, _p5, _p6, _p9)
};
rKey = _v10;
rValue = _v11;
_p2 = _v12;
continue stepState;
} else {
if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) > 0) {
return {
ctor: '_Tuple2',
_0: _p8,
_1: A3(rightStep, rKey, rValue, _p9)
};
} else {
return {
ctor: '_Tuple2',
_0: _p7,
_1: A4(bothStep, _p5, _p6, rValue, _p9)
};
}
}
}
}
});
var _p10 = A3(
......@@ -4116,19 +4199,19 @@ var _elm_lang$core$Dict$reportRemBug = F4(
});
var _elm_lang$core$Dict$isBBlack = function (dict) {
var _p13 = dict;
_v11_2:
_v14_2:
do {
if (_p13.ctor === 'RBNode_elm_builtin') {
if (_p13._0.ctor === 'BBlack') {
return true;
} else {
break _v11_2;
break _v14_2;
}
} else {
if (_p13._0.ctor === 'LBBlack') {
return true;
} else {
break _v11_2;
break _v14_2;
}
}
} while(false);
......@@ -4142,10 +4225,10 @@ var _elm_lang$core$Dict$sizeHelp = F2(
if (_p14.ctor === 'RBEmpty_elm_builtin') {
return n;
} else {
var _v13 = A2(_elm_lang$core$Dict$sizeHelp, n + 1, _p14._4),
_v14 = _p14._3;
n = _v13;
dict = _v14;
var _v16 = A2(_elm_lang$core$Dict$sizeHelp, n + 1, _p14._4),
_v17 = _p14._3;
n = _v16;
dict = _v17;
continue sizeHelp;
}
}
......@@ -4164,18 +4247,18 @@ var _elm_lang$core$Dict$get = F2(
var _p16 = A2(_elm_lang$core$Basics$compare, targetKey, _p15._1);
switch (_p16.ctor) {
case 'LT':
var _v17 = targetKey,
_v18 = _p15._3;
targetKey = _v17;
dict = _v18;
var _v20 = targetKey,
_v21 = _p15._3;
targetKey = _v20;
dict = _v21;
continue get;
case 'EQ':
return _elm_lang$core$Maybe$Just(_p15._2);
default:
var _v19 = targetKey,
_v20 = _p15._4;
targetKey = _v19;
dict = _v20;
var _v22 = targetKey,
_v23 = _p15._4;
targetKey = _v22;
dict = _v23;
continue get;
}
}
......@@ -4198,12 +4281,12 @@ var _elm_lang$core$Dict$maxWithDefault = F3(
if (_p18.ctor === 'RBEmpty_elm_builtin') {
return {ctor: '_Tuple2', _0: k, _1: v};
} else {
var _v23 = _p18._1,
_v24 = _p18._2,
_v25 = _p18._4;
k = _v23;
v = _v24;
r = _v25;
var _v26 = _p18._1,
_v27 = _p18._2,
_v28 = _p18._4;
k = _v26;
v = _v27;
r = _v28;
continue maxWithDefault;
}
}
......@@ -4329,19 +4412,19 @@ var _elm_lang$core$Dict$redden = function (t) {
};
var _elm_lang$core$Dict$balanceHelp = function (tree) {
var _p27 = tree;
_v33_6:
_v36_6:
do {
_v33_5:
_v36_5:
do {
_v33_4:
_v36_4:
do {
_v33_3:
_v36_3:
do {
_v33_2:
_v36_2:
do {
_v33_1:
_v36_1:
do {
_v33_0:
_v36_0:
do {
if (_p27.ctor === 'RBNode_elm_builtin') {
if (_p27._3.ctor === 'RBNode_elm_builtin') {
......@@ -4351,44 +4434,44 @@ var _elm_lang$core$Dict$balanceHelp = function (tree) {
switch (_p27._4._0.ctor) {
case 'Red':
if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) {
break _v33_0;
break _v36_0;
} else {
if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) {
break _v33_1;
break _v36_1;
} else {
if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) {
break _v33_2;
break _v36_2;
} else {
if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) {
break _v33_3;
break _v36_3;
} else {
break _v33_6;
break _v36_6;
}
}
}
}
case 'NBlack':
if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) {
break _v33_0;
break _v36_0;
} else {
if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) {
break _v33_1;
break _v36_1;
} else {
if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) {
break _v33_4;
break _v36_4;
} else {
break _v33_6;
break _v36_6;
}
}
}
default:
if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) {
break _v33_0;
break _v36_0;
} else {
if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) {
break _v33_1;
break _v36_1;
} else {
break _v33_6;
break _v36_6;
}
}
}
......@@ -4396,81 +4479,81 @@ var _elm_lang$core$Dict$balanceHelp = function (tree) {
switch (_p27._4._0.ctor) {
case 'Red':
if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) {
break _v33_2;
break _v36_2;
} else {
if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) {
break _v33_3;
break _v36_3;
} else {
if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) {
break _v33_5;
break _v36_5;
} else {
break _v33_6;
break _v36_6;
}
}
}
case 'NBlack':
if (_p27._0.ctor === 'BBlack') {
if ((((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) {
break _v33_4;
break _v36_4;
} else {
if ((((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) {
break _v33_5;
break _v36_5;
} else {
break _v33_6;
break _v36_6;
}
}
} else {
break _v33_6;
break _v36_6;
}
default:
if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) {
break _v33_5;
break _v36_5;
} else {
break _v33_6;
break _v36_6;
}
}
default:
switch (_p27._4._0.ctor) {
case 'Red':
if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) {
break _v33_2;
break _v36_2;
} else {
if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) {
break _v33_3;
break _v36_3;
} else {
break _v33_6;
break _v36_6;
}
}
case 'NBlack':
if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) {
break _v33_4;
break _v36_4;
} else {
break _v33_6;
break _v36_6;
}
default:
break _v33_6;
break _v36_6;
}
}
} else {
switch (_p27._3._0.ctor) {
case 'Red':
if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) {
break _v33_0;
break _v36_0;
} else {
if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) {
break _v33_1;
break _v36_1;
} else {